Re: pg_dump, ATTACH, and independently restorable child partitions
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>, David Rowley <drowley@postgresql.org>, pgsql-hackers@lists.postgresql.org
Date: 2020-12-02T22:50:13Z
Lists: pgsql-hackers
Attachments
On Wed, Nov 25, 2020 at 06:35:19PM -0500, Tom Lane wrote: > Justin Pryzby <pryzby@telsasoft.com> writes: > > 1. Maybe pg_restore ExecuteSqlCommandBuf() should (always?) call > > ExecuteSimpleCommands() instead of ExecuteSqlCommand(). It doesn't seem to > > break anything (although that surprised me). > > That certainly does break everything, which I imagine is the reason > why the cfbot shows that this patch is failing the pg_upgrade tests. Thanks for looking, I have tried this. > What we'd need to do if we want this to work with direct-to-DB restore > is to split off the ATTACH PARTITION command as a separate TOC entry. > That doesn't seem amazingly difficult, and it would even offer the > possibility that you could extract the partition standalone without > having to ignore errors. (You'd use -l/-L to select the CREATE TABLE, > the data, etc, but not the ATTACH object.) -- Justin
Commits
-
pg_dump: label INDEX ATTACH ArchiveEntries with an owner.
- 9f15188a1b82 11.11 landed
- 9eabfe300a22 14.0 landed
- 436d9c5cabfc 12.6 landed
- 0011c5a0fdac 13.2 landed
-
Dump ALTER TABLE ... ATTACH PARTITION as a separate ArchiveEntry.
- 9a4c0e36fbd6 14.0 landed
-
Make pg_dump emit ATTACH PARTITION instead of PARTITION OF (reprise)
- 33a53130a894 12.0 cited