Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY
Дата
Msg-id 20200910205424.GA29214@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY  (Hao Wu <hawu@vmware.com>)
Ответы Re: ALTER TABLE .. DETACH PARTITION CONCURRENTLY
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: John Naylor
Дата:
Сообщение: Re: WIP: BRIN multi-range indexes
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Print logical WAL message content