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

From David Rowley
Subject Re: ATTACH/DETACH PARTITION CONCURRENTLY
Date
Msg-id CAKJS1f82VsDgtHP25YNyauZrdRGf1qSrGFZDT5Zz3TgUzBHcmg@mail.gmail.com
Whole thread Raw
In response to Re: ATTACH/DETACH PARTITION CONCURRENTLY  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: ATTACH/DETACH PARTITION CONCURRENTLY
List pgsql-hackers
On 9 November 2018 at 05:34, Robert Haas <robertmhaas@gmail.com> wrote:
> I suspect the only good way of fixing this problem is using a single
> snapshot to perform both the scan of pg_inherits and the subsequent
> pg_class lookups.  That way, you know that you are seeing the state of
> the whole partitioning hierarchy as it existed at some particular
> point in time -- every commit is either fully reflected in the
> constructed PartitionDesc or not reflected at all.  Unfortunately,
> that would mean that we can't use the syscache to perform the lookups,
> which might have unhappy performance consequences.

I do have a patch sitting around that moves the relpartbound into a
new catalogue table named pg_partition. This gets rid of the usage of
pg_inherits for partitioned tables. I wonder if that problem is easier
to solve with that.  It also solves the issue with long partition keys
and lack of toast table on pg_class.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Postgres, fsync, and OSs (specifically linux)
Next
From: David Rowley
Date:
Subject: Re: Speeding up INSERTs and UPDATEs to partitioned tables