RE: pg_restore causing deadlocks on partitioned tables - Mailing list pgsql-hackers

From Domagoj Smoljanovic
Subject RE: pg_restore causing deadlocks on partitioned tables
Date
Msg-id VI1PR03MB31673715215C080F3360025FEB210@VI1PR03MB3167.eurprd03.prod.outlook.com
Whole thread Raw
In response to Re: pg_restore causing deadlocks on partitioned tables  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Thanx Tom and Amit for the effort.

Looking forward to try it out.
D.

-----Original Message-----
From: Tom Lane <tgl@sss.pgh.pa.us>
Sent: 16. rujna 2020. 20:41
To: Amit Langote <amitlangote09@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>; Domagoj Smoljanovic <domagoj.smoljanovic@oradian.com>;
pgsql-hackers@postgresql.org
Subject: Re: pg_restore causing deadlocks on partitioned tables

Amit Langote <amitlangote09@gmail.com> writes:
> Updated patch attached.

Pushed with a little bit of fooling about.  After looking at the git history, I saw that the Assert we were wondering
aboutused to be just "Assert(constr)", and there were not run-time checks on whether constr is null.  That was changed
whenf0e44751d added partition constraint checking into ExecConstraints' responsibilities. 
At some later point that code was removed from ExecConstraints, but we failed to undo the other changes in
ExecConstraints,leaving it looking pretty silly.  So I reverted this to the way it was, with just an Assert and no
regularchecks. 

I also did a bit more work on the comments.  (Speaking of which, is there a better place to put the commentary you
removedfrom InitResultRelInfo?  It was surely wildly out of place there, but I'm wondering if maybe we have a README
thatshould cover it.) 

I pushed this to HEAD only, and the other patch as far back as v12, so we will have a solution to the deadlock problem
inv12. 

            regards, tom lane



pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: pgindent vs dtrace on macos
Next
From: Peter Geoghegan
Date:
Subject: Re: PG 13 release notes, first draft