Re: Dependencies for partitioned indexes are still a mess - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: Dependencies for partitioned indexes are still a mess
Date
Msg-id 20200812224828.GA3888@alvherre.pgsql
Whole thread Raw
In response to Dependencies for partitioned indexes are still a mess  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Dependencies for partitioned indexes are still a mess
List pgsql-hackers
On 2020-Jul-15, Tom Lane wrote:

> Issue #2: parallel restore does not work
> 
> 1. dropdb r2; createdb r2
> 2. pg_restore -j8 -d r2 regression.dump 
> 
> This is fairly timing-dependent, but some attempts fail with messages
> like
> 
> pg_restore: while PROCESSING TOC:
> pg_restore: from TOC entry 6684; 2606 29166 FK CONSTRAINT fk fk_a_fkey postgres
> pg_restore: error: could not execute query: ERROR:  there is no unique constraint matching given keys for referenced
table"pk"
 
> Command was: ALTER TABLE fkpart3.fk
>     ADD CONSTRAINT fk_a_fkey FOREIGN KEY (a) REFERENCES fkpart3.pk(a);

Hmm, we do make the FK constraint depend on the ATTACH for the direct
children; what I think we're lacking is dependencies on descendants
twice-removed (?) or higher.  This mock patch seems to fix this problem
by adding dependencies recursively on all children of the index; I no
longer see this problem with it.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: run pgindent on a regular basis / scripted manner
Next
From: Alvaro Herrera
Date:
Subject: Re: run pgindent on a regular basis / scripted manner