forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite2ff7d9
committed
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 codingfat-fingered this by checking the wrong array element. We fixed itin passing in403a3d9, but that later got reverted, and we forgotto keep this bug fix.Most of the time this'd be relatively harmless, since once we lockany of the partitioned table's leaf partitions, that would sufficeto prevent major DDL on the partitioned table itself. However, achildless partitioned table would get dumped with no relevant lockwhatsoever, possibly allowing dump failure or inconsistent output.Unlike403a3d9, there are no versioning concerns, since every serverversion 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.us1 parentb76c1d6 commite2ff7d9
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7016 | 7016 |
| |
7017 | 7017 |
| |
7018 | 7018 |
| |
7019 |
| - | |
| 7019 | + | |
7020 | 7020 |
| |
7021 | 7021 |
| |
7022 | 7022 |
| |
|
0 commit comments
Comments
(0)