From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Hao Wu <hawu(at)vmware(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY |
Date: | 2020-09-10 20:54:24 |
Message-ID: | 20200910205424.GA29214@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2020-Aug-31, Hao Wu wrote:
> I tested the patch provided by Alvaro. It seems not well in REPEATABLE READ.
> -- the tuples from tpart_2 are gone.
> gpadmin=*# select * from tpart;
> i | j
> ----+----
> 10 | 10
> 50 | 50
> (2 rows)
Interesting example, thanks. It seems this can be fixed without
breaking anything else by changing the planner so that it includes
detached partitions when we are in a snapshot-isolation transaction.
Indeed, the results from the detach-partition-concurrently-1.spec
isolation test are more satisfying with this change.
The attached v2, on current master, includes that change, as well as
fixes a couple of silly bugs in the previous one.
(Because of experimenting with git workflow I did not keep the 0001
part split in this one, but that part is unchanged from v1.)
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Attachment | Content-Type | Size |
---|---|---|
v2-0001-ALTER-TABLE-.-DETACH-CONCURRENTLY.patch | text/x-diff | 78.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Pryzby | 2020-09-10 22:27:05 | Re: PG 13 release notes, first draft |
Previous Message | John Naylor | 2020-09-10 20:42:46 | Re: WIP: BRIN multi-range indexes |