Skip to content

Cannot execute VACUUM with postgres_execute() #285

@mldisibio

Description

@mldisibio

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions