Skip to content
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

Cannot execute VACUUM with postgres_execute() #285

Open
mldisibio opened this issue Jan 28, 2025 · 0 comments
Open

Cannot execute VACUUM with postgres_execute() #285

mldisibio opened this issue Jan 28, 2025 · 0 comments

Comments

@mldisibio
Copy link

After attaching to a postgres database, the statement:

CALL postgres_execute('pg', 'VACUUM my_schema.my_table');

fails with

Invalid Error:
Failed to execute query "BEGIN TRANSACTION ISOLATION LEVEL REPEATABLE READ;
VACUUM my_schema.my_table": ERROR:  VACUUM cannot run inside a transaction block

which makes sense. You cannot vacuum inside a transaction block in postgres itself either.

But a helpful feature would be a flag on CALL or adding another extension statement that would allow VACUUM to be executed without a transaction, given that DuckDb targets large etl operations, and Postgres benefits from vacuuming after large updates or deletes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant