Re: BUG #14279: Logical decoding misses a transaction completely

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: BUG #14279: Logical decoding misses a transaction completely
Дата
Msg-id 8760rgfhrr.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на BUG #14279: Logical decoding misses a transaction completely  (marko@joh.to)
Ответы Re: BUG #14279: Logical decoding misses a transaction completely
Список pgsql-bugs
>>>>> "marko" == marko  <marko@joh.to> writes:

 marko> The problem seems to be that ReorderBufferCommitChild()
 marko> overwrites the main transaction's base_snapshot with a NULL
 marko> because it thinks the subtransaction's base_snapshot_lsn=0 is
 marko> older than the main transaction's actual snapshot

i.e. here in ReorderBufferCommitChild:

    /*
     * Pass the our base snapshot to the parent transaction if it doesn't have
     * one, or ours is older. That can happen if there are no changes in the
     * toplevel transaction but in one of the child transactions. This allows
     * the parent to simply use it's base snapshot initially.
     */
    if (txn->base_snapshot == NULL ||
        txn->base_snapshot_lsn > subtxn->base_snapshot_lsn)
    {

it's possible for subtxn to exist, but for subtxn->base_snapshot to be
NULL and base_snapshot_lsn to be 0, and obviously propagating this to
txn is wrong.

--
Andrew (irc:RhodiumToad)

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

Предыдущее
От: marko@joh.to
Дата:
Сообщение: BUG #14279: Logical decoding misses a transaction completely
Следующее
От: prikshat@cadence.com
Дата:
Сообщение: BUG #14280: Error in PostgreSQL - could not extend file "base...": File too large