aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/dbcommands.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2025-04-16 13:31:44 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2025-04-16 13:31:59 -0400
commit1fc3403626d4aa99a81996435549e47c56c16897 (patch)
treeba27da1af3dcbc9e0216c1e640d66e893b35f291 /src/backend/commands/dbcommands.c
parent40b9c27014d90d77c61e8f5c77ddeb84fa9a6b69 (diff)
downloadpostgresql-1fc3403626d4aa99a81996435549e47c56c16897.tar.gz
postgresql-1fc3403626d4aa99a81996435549e47c56c16897.zip
Fix pg_dump --clean with partitioned indexes.
We'd try to drop the partitions of a partitioned index separately, which is disallowed by the backend, leading to an error during restore. While the error is harmless, it causes problems if you try to use --single-transaction mode. Fortunately, there seems no need to do a DROP at all, since the partition will go away silently when we drop either the parent index or the partition's table. So just make the DROP conditional on not being a partition. Reported-by: jian he <jian.universality@gmail.com> Author: jian he <jian.universality@gmail.com> Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com> Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://postgr.es/m/CACJufxF0QSdkjFKF4di-JGWN6CSdQYEAhGPmQJJCdkSZtd=oLg@mail.gmail.com Backpatch-through: 13
Diffstat (limited to 'src/backend/commands/dbcommands.c')
0 files changed, 0 insertions, 0 deletions