aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/dbcommands.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-10-16 12:23:57 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-10-16 12:23:57 -0400
commite2ff7d9a83d4b489806281dc6dfce88510b40ad7 (patch)
tree9828b5b450c7057a1005e75ec61055d1128d1420 /src/backend/commands/dbcommands.c
parentb76c1d6e849779e4a5a6c24d159a42125e522154 (diff)
downloadpostgresql-e2ff7d9a83d4b489806281dc6dfce88510b40ad7.tar.gz
postgresql-e2ff7d9a83d4b489806281dc6dfce88510b40ad7.zip
Make pg_dump acquire lock on partitioned tables that are to be dumped.
It was clearly the intent to do so all along, but the original coding fat-fingered this by checking the wrong array element. We fixed it in passing in 403a3d91c, but that later got reverted, and we forgot to keep this bug fix. Most of the time this'd be relatively harmless, since once we lock any of the partitioned table's leaf partitions, that would suffice to prevent major DDL on the partitioned table itself. However, a childless partitioned table would get dumped with no relevant lock whatsoever, possibly allowing dump failure or inconsistent output. Unlike 403a3d91c, there are no versioning concerns, since every server version that has partitioned tables will allow you to lock one. Back-patch to v10 where partitioned tables were introduced. Discussion: https://postgr.es/m/1018205.1634346327@sss.pgh.pa.us
Diffstat (limited to 'src/backend/commands/dbcommands.c')
0 files changed, 0 insertions, 0 deletions