Re: ATTACH/DETACH PARTITION CONCURRENTLY - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: ATTACH/DETACH PARTITION CONCURRENTLY
Date
Msg-id 42e887c2-939f-41df-dd94-e886454b2529@2ndquadrant.com
Whole thread Raw
In response to Re: ATTACH/DETACH PARTITION CONCURRENTLY  (Andres Freund <andres@anarazel.de>)
Responses Re: ATTACH/DETACH PARTITION CONCURRENTLY
List pgsql-hackers
On 07/08/2018 15:29, Andres Freund wrote:
> I don't think that solves the problem that an arriving relcache
> invalidation would trigger a rebuild of rd_partdesc, while it actually
> is referenced by running code.

The problem is more generally that a relcache invalidation changes all
pointers that might be in use.  So it's currently not safe to trigger a
relcache invalidation (on tables) without some kind of exclusive lock.
One possible solution to this is outlined here:
<https://www.postgresql.org/message-id/CA+TgmobtmFT5g-0dA=vEFFtogjRAuDHcYPw+qEdou5dZPnF=pg@mail.gmail.com>

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: libpq should not look up all host addresses at once
Next
From: Bruce Momjian
Date:
Subject: Re: POC for a function trust mechanism