Re: pgsql: Detach constraints when partitions are detached - Mailing list pgsql-committers

From Alvaro Herrera
Subject Re: pgsql: Detach constraints when partitions are detached
Date
Msg-id 201901241428.qggskqa5qwi2@alvherre.pgsql
Whole thread Raw
In response to Re: pgsql: Detach constraints when partitions are detached  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
List pgsql-committers
CC'ing -hackers.

On 2019-Jan-24, Amit Langote wrote:

> On 2019/01/24 13:58, Tom Lane wrote:
> > Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> >> Detach constraints when partitions are detached
> > 
> > Hm ... it looks like this fails under -DRELCACHE_FORCE_RELEASE:
> 
> Oops, sorry.  This is why:
> 
>          index_close(idx, NoLock);
> ...
> +        if (!idx->rd_index->indisprimary && !idx->rd_index->indisunique)
> +            continue;
> 
> Attached a fix.

Mumble.  I changed course here and went for simpler coding instead.

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


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Simplify coding to detach constraints when detaching partition
Next
From: Tom Lane
Date:
Subject: pgsql: Fix portability problem in pgbench.