Re: pgsql: Delay commit status checks until freezing executes.

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: pgsql: Delay commit status checks until freezing executes.
Дата
Msg-id CA+TgmobMdMGeBb=t8u5Z9++-V6cDfpJjSJtpAmUi=YEUPUA_mw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Delay commit status checks until freezing executes.  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: pgsql: Delay commit status checks until freezing executes.
Список pgsql-hackers
On Wed, Jan 4, 2023 at 1:53 AM Peter Geoghegan <pg@bowt.ie> wrote:
> I think that we should definitely have a comment directly over
> TransactionIdDidAbort(). Though I wouldn't mind reorganizing these
> other comments, or making the comment over TransactionIdDidAbort()
> mostly just point to the other comments.

Yeah, I think it would be good to have a comment there. As Andres
says, it is almost always wrong to use this function, and we should
make that more visible. Possibly we should even rename the function,
like TransactionIdKnownToHaveAborted().

But that having been said, I'm kind of astonished that you didn't know
about this already. The freezing behavior is in general extremely hard
to get right, and I guess I feel if you don't understand how the
underlying functions work, including things like performance
considerations and which functions return fully reliable results, I do
not think you should be committing your own patches in this area.
There is probably a lot of potential benefit in improving the way this
stuff works, but there is also a heck of a lot of danger of creating
subtle data corrupting bugs that could easily take years to find.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



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

Предыдущее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: Add a new pg_walinspect function to extract FPIs from WAL records
Следующее
От: Ibrar Ahmed
Дата:
Сообщение: Re: explain analyze rows=%.0f