Bump to duckdb main and plug DuckDB own logging #387
Conversation
|
Failure is legit, PostgresTransaction outlives ClientContext, and so Solutions:
Problem on 1 is that requires changes in core, and might change behaviour of what happens at the border (say in destructors). Problem on 2 is that some transactions will not be logged. |
|
I went for path 2, since can be implemented only |
|
@Mytherin: main risk is this changing a bunch of signatures, but should be sort of OK. Not really urgent. |
|
Looks fine to me but let's merge it into the branch for v1.5 |
|
@pdet if you can take a look, this would help DuckLake debugging a lot, particularly now that we want to optimize performance for postgres |
|
Maybe we just need to branch (off current I guess this would still be needed at some later point, LTS vs main, so can as well be done in advance, but I am fine with whatever timeline. Let me know if I need to change the PR somehow (even retargeting to a different duckdb commit). |
|
Retargeted to recent duckdb (last night), applied patch |
|
@carlopi is this going to go into 1.5? |
pdet
left a comment
There was a problem hiding this comment.
I think the PR looks great, I don't have any major comments. Is mostly signature changes , which are necessary since all these methods are static. Only thing I'm missing is a test.
dc0687a to
0d48970
Compare
|
Added test, and restored integration tests. This should be passing CI, and so ready to land. |
|
Thanks! |
Changes:
PostgresQueryLogDUCKDB_LOGs, logging query (or queries) and duration in msSecond step, that is passing around
ClientContext &contextchanging a lot of signatures I am less sure, it can probably be reworked, open to feedback.All in all, this allows for example:
Here we are attaching to a ducklake backed by Postgres, and run some queries.
This could allowing a faster feedback cycle: directly from SQL, debug what interactions (and how much latency they bring) are required on the underlying Postgres database. This allows both users to tweak / understand how heavy are certain queries, and developers to get feedback and optimize them.