Do not dump identity sequences with excluded parent table

Michael Paquier <michael@paquier.xyz>

Commit: 4ed59e02f5aa97618bb33355dc3accbcc2d5ace1
Author: Michael Paquier <michael@paquier.xyz>
Date: 2018-08-22T05:22:39Z
Releases: 11.0
Do not dump identity sequences with excluded parent table

This commit prevents a crash of pg_dump caused by the exclusion of a
table which has identity columns, as the table would be correctly
excluded but not its identity sequence.  In order to fix that, identity
sequences are excluded if the parent table is defined as such.  Knowing
about such sequences has no meaning without their parent table anyway.

Reported-by: Andy Abelisto
Author: David Rowley
Reviewed-by: Peter Eisentraut, Michael Paquier
Discussion: https://postgr.es/m/153479393218.1316.8472285660264976457@wrigleys.postgresql.org
Backpatch-through: 10

Files

PathChange+/−
src/bin/pg_dump/pg_dump.c modified +14 −2

Discussion