Re: [BUGS] pg_logical_slot_peek_changes crashes postgres when called from inside pl/pgsql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] pg_logical_slot_peek_changes crashes postgres when called from inside pl/pgsql
Дата
Msg-id 8637.1507217920@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] pg_logical_slot_peek_changes crashes postgres when calledfrom inside pl/pgsql  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: [BUGS] pg_logical_slot_peek_changes crashes postgres when calledfrom inside pl/pgsql
Список pgsql-bugs
Michael Paquier <michael.paquier@gmail.com> writes:
> This looks like a legit bug to me. Andres, any opinions?

I wonder why ReorderBufferCommit does this:
    if (using_subtxn)        BeginInternalSubTransaction("replay");    else        StartTransactionCommand();

and then tries to clean that up with this brain-dead-looking sequence:
    AbortCurrentTransaction();
    /* make sure there's no cache pollution */    ReorderBufferExecuteInvalidations(rb, txn);
    if (using_subtxn)        RollbackAndReleaseCurrentSubTransaction();

Shouldn't that be something like
    if (using_subtxn)        RollbackAndReleaseCurrentSubTransaction();    else        AbortCurrentTransaction();

?  Although by this theory, the using_subtxn path has never worked,
not even a little bit, which seems somewhat unlikely.
        regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] [BUGS] BUG #14825: enum type: unsafe use?
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [BUGS] pg_logical_slot_peek_changes crashes postgres when calledfrom inside pl/pgsql