Re: pgsql: Detach constraints when partitions are detached

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)lists(dot)postgresql(dot)org, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgsql: Detach constraints when partitions are detached
Date: 2019-01-24 14:28:30
Message-ID: 201901241428.qggskqa5qwi2@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

CC'ing -hackers.

On 2019-Jan-24, Amit Langote wrote:

> On 2019/01/24 13:58, Tom Lane wrote:
> > Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-01-24 16:32:05 pgsql: Fix portability problem in pgbench.
Previous Message Alvaro Herrera 2019-01-24 14:27:32 pgsql: Simplify coding to detach constraints when detaching partition

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-01-24 14:37:41 Re: Use an enum for RELKIND_*?
Previous Message Amit Langote 2019-01-24 12:57:26 Re: using expression syntax for partition bounds