Re: [HACKERS] logical decoding of two-phase transactions

Поиск
Список
Период
Сортировка
От Stas Kelvich
Тема Re: [HACKERS] logical decoding of two-phase transactions
Дата
Msg-id E6112EA9-2949-4E4A-8FE4-1C6A2096379D@postgrespro.ru
обсуждение исходный текст
Ответ на Re: [HACKERS] logical decoding of two-phase transactions  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: [HACKERS] logical decoding of two-phase transactions  (Craig Ringer <craig@2ndquadrant.com>)
Список pgsql-hackers
> On 20 Mar 2017, at 11:32, Craig Ringer <craig@2ndquadrant.com> wrote:
>
> On 19 March 2017 at 21:26, Petr Jelinek <petr.jelinek@2ndquadrant.com> wrote:
>
>> I think only genam would need changes to do two-phase scan for this as
>> the catalog scans should ultimately go there. It's going to slow down
>> things but we could limit the impact by doing the two-phase scan only
>> when historical snapshot is in use and the tx being decoded changed
>> catalogs (we already have global knowledge of the first one, and it
>> would be trivial to add the second one as we have local knowledge of
>> that as well).
>
>
> TBH, I have no idea how to approach the genam changes for the proposed
> double-scan method. It sounds like Stas has some idea how to proceed
> though (right?)
>

I thought about having special field (or reusing one of the existing fields)
in snapshot struct to force filtering xmax > snap->xmax or xmin = snap->xmin
as Petr suggested. Then this logic can reside in ReorderBufferCommit().
However this is not solving problem with catcache, so I'm looking into it right now.


> On 17 Mar 2017, at 05:38, Craig Ringer <craig@2ndquadrant.com> wrote:
>
> On 16 March 2017 at 19:52, Stas Kelvich <s.kelvich@postgrespro.ru> wrote:
>
>>
>> I’m working right now on issue with building snapshots for decoding prepared tx.
>> I hope I'll send updated patch later today.
>
>
> Great.
>
> What approach are you taking?


Just as before I marking this transaction committed in snapbuilder, but after
decoding I delete this transaction from xip (which holds committed transactions
in case of historic snapshot).


> --
> Craig Ringer                   http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services




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

Предыдущее
От: Ronan Dunklau
Дата:
Сообщение: [HACKERS] [Proposal] Make the optimiser aware of partitions ordering
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: [HACKERS] PinBuffer() no longer makes use of strategy