Re: doc: mentioned CREATE+ATTACH PARTITION as an alternative to CREATE TABLE..PARTITION OF - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: doc: mentioned CREATE+ATTACH PARTITION as an alternative to CREATE TABLE..PARTITION OF
Date
Msg-id ZBOGH1qUZmkVA9H7@telsasoft.com
Whole thread Raw
In response to Re: doc: mentioned CREATE+ATTACH PARTITION as an alternative to CREATE TABLE..PARTITION OF  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: doc: mentioned CREATE+ATTACH PARTITION as an alternative to CREATE TABLE..PARTITION OF
List pgsql-hackers
On Thu, Mar 16, 2023 at 04:52:07PM -0400, Tom Lane wrote:
> Justin Pryzby <pryzby@telsasoft.com> writes:
> > On Thu, Jan 19, 2023 at 04:47:59PM -0500, Robert Treat wrote:
> >> I think all of that feedback is useful, I guess the immediate question
> >> becomes if Justin wants to try to proceed with his patch implementing
> >> the change, or if adjusting the documentation for the current
> >> implementation is the right move for now.
> 
> > The docs change is desirable in any case, since it should be
> > backpatched, and any patch to change CREATE..PARTITION OF would be for
> > v17+ anyway.
> 
> Right.  Pushed with a little further effort to align it better with
> surrounding text.

Thanks.

      It is possible to use <link linkend="sql-altertable"><command>ALTER
      TABLE ATTACH/DETACH PARTITION</command></link> to perform these
      operations with a weaker lock, thus reducing interference with
      concurrent operations on the partitioned table.

Note that in order for DETACH+DROP to use a lower lock level, it has to be
DETACH CONCURRENTLY.  ATTACH is implicitly uses a lower lock level, but for
DETACH it's only on request.

-- 
Justin



pgsql-hackers by date:

Previous
From: Tejasvi Kashi
Date:
Subject: Re: How to check for in-progress transactions
Next
From: Melanie Plageman
Date:
Subject: Re: Track IO times in pg_stat_io