• Tom Lane's avatar
    Dump ALTER TABLE ... ATTACH PARTITION as a separate ArchiveEntry. · 9a4c0e36
    Tom Lane authored
    Previously, we emitted the ATTACH PARTITION command as part of
    the child table's ArchiveEntry.  This was a poor choice since it
    complicates restoring the partition as a standalone table; you have
    to ignore the error from the ATTACH, which isn't even an option when
    restoring direct-to-database with pg_restore.  (pg_restore will issue
    the whole ArchiveEntry as one PQexec, so that any error rolls back
    the table creation as well.)  Hence, separate it out as its own
    ArchiveEntry, as indeed we already did for index ATTACH PARTITION
    commands.
    
    Justin Pryzby
    
    Discussion: https://postgr.es/m/20201023052940.GE9241@telsasoft.com
    9a4c0e36
pg_dump.h 22.2 KB