-
Notifications
You must be signed in to change notification settings - Fork 70
Bump to duckdb v1.4.2 and plug DuckDB own logging #387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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). |
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.