Re: pg_dump versus hash partitioning
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Julien Rouhaud <rjuju123@gmail.com>
Cc: Andrew Dunstan <andrew@dunslane.net>,
Alvaro Herrera <alvherre@alvh.no-ip.org>,
David Rowley <dgrowleyml@gmail.com>, Peter Geoghegan <pg@bowt.ie>,
Robert Haas <robertmhaas@gmail.com>,
pgsql-hackers@lists.postgresql.org,
Andrew <pgsqlhackers@andrewrepp.com>
Date: 2023-03-11T03:10:14Z
Lists: pgsql-hackers
Julien Rouhaud <rjuju123@gmail.com> writes: > Working on some side project that can cause dump of hash partitions to be > routed to a different partition, I realized that --load-via-partition-root can > indeed cause deadlock in such case without FK dependency or anything else. > The problem is that each worker will perform a TRUNCATE TABLE ONLY followed by > a copy of the original partition's data in a transaction, and that obviously > will lead to deadlock if the original and locked partition and the restored > partition are different. Oh, interesting. I wonder if we can rearrange things to avoid that. regards, tom lane
Commits
-
Simplify and speed up pg_dump's creation of parent-table links.
- 064709f803c0 16.0 landed
-
Fix pg_dump for hash partitioning on enum columns.
- bc8cd50fefd3 16.0 landed
- 8f83ce8c5244 12.15 landed
- 7e7c5b683985 13.11 landed
- 5fc1ac151d85 14.8 landed
- 2b216da1e55d 15.3 landed
- 012ffb365a05 11.20 landed