Set AUTOCOMMIT to on in script output by pg_dump
Shinya Kato <shinya11.kato@oss.nttdata.com>
From: Shinya Kato <Shinya11.Kato@oss.nttdata.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-10-09T02:10:37Z
Lists: pgsql-hackers
Attachments
- v1-0001-Set-AUTOCOMMIT-to-on-in-script-output-by-pg_dump.patch (text/x-diff) patch v1-0001
Hi hackers! When SQL scripts created with pg_dump/pg_dumpall/pg_restore are executed in psql with AUTOCOMMIT turned off, they will not succeed in many cases. This is because the script contains SQL statements that cannot be executed within a transaction block. If you simply add set AUTOCOMMIT on to the scripts created by pg_dump/pg_dumpall/pg_restore, they will work fine. A patch is attached No documentation has been added as we could not find any documentation on the details in the script. Do you think? Regards, Shinya Kato NTT DATA GROUP CORPORATION
Commits
-
Doc: recommend "psql -X" for restoring pg_dump scripts.
- d83a108c10a3 18.0 landed
- c768f54a25a4 15.11 landed
- aaa0f061936a 13.19 landed
- 76601c0c885a 17.3 landed
- 53771e44df81 16.7 landed
- 4106942f004f 14.16 landed