Re: Calling pgstat_report_wait_end() before ereport(ERROR)

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Calling pgstat_report_wait_end() before ereport(ERROR)
Дата
Msg-id 20190412120707.GQ2144@paquier.xyz
обсуждение исходный текст
Ответ на Calling pgstat_report_wait_end() before ereport(ERROR)  (Masahiko Sawada <sawada.mshk@gmail.com>)
Ответы Re: Calling pgstat_report_wait_end() before ereport(ERROR)  (Masahiko Sawada <sawada.mshk@gmail.com>)
Список pgsql-hackers
On Fri, Apr 12, 2019 at 07:27:44PM +0900, Masahiko Sawada wrote:
> As far as I know there are three places where call
> pgstat_report_wait_end before ereport(ERROR): two in twophase.c
> andanother in copydir.c(at L199). Since we eventually call
> pgstat_report_wait_end() in AbortTransaction(). I think that we don't
> need to call pgstat_report_wait_end() if we're going to raise an error
> just after that. Is that right?

RecreateTwoPhaseFile() gets called in the checkpointer or the startup
process which do not have a transaction context so the wait event
would not get cleaned up, and we should call pgstat_report_wait_end()
in the third elog(ERROR), no?  It looks that 249cf070 has been rather
inconsistent in its way of handling things.
--
Michael

Вложения

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

Предыдущее
От: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Сообщение: Re: REINDEX CONCURRENTLY 2.0
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: Checksum errors in pg_stat_database