Re: Flush some statistics within running transactions
| От | Álvaro Herrera |
|---|---|
| Тема | Re: Flush some statistics within running transactions |
| Дата | |
| Msg-id | 202601301359.pwvtc26izo5z@alvherre.pgsql обсуждение исходный текст |
| Ответ на | Re: Flush some statistics within running transactions (Álvaro Herrera <alvherre@kurilemu.de>) |
| Ответы |
Re: Flush some statistics within running transactions
Re: Flush some statistics within running transactions |
| Список | pgsql-hackers |
On 2026-Jan-30, Álvaro Herrera wrote: > So apparently the first function to do this in postinit.c was added by > commit c6dda1f48e57 -- and apparently it was mimicking > CheckDeadLockAlert(), which at this time looked like this: I'm now wondering if CheckDeadLockAlert() really needed to have this in the first place, or it was just an exercise in paranoia ... it was added by commit 6753333f55e1, with the discussion in [1], and it's not clear to me that there was any theoretical or experimental evidence that it was necessary; the thread didn't discuss it, and the commit message doesn't either. Added Andres to CC as committer to this thread, maybe he remembers. [1] https://www.postgresql.org/message-id/flat/20150115020335.GZ5245%40awork2.anarazel.de Just for laughs I moved the SetLatch call in handle_sig_alarm() to the bottom, and remove the ones in handlers, on the theory that by the time the SetLatch call is reached, all the handlers have already run and thus the flag variables are set. Everything seems to continue to work: https://cirrus-ci.com/build/5758839359799296 (Though to be honest, it's not clear to me why it would matter at which point in handle_sig_alarm we call SetLatch relative to the variables being set, given that these variables are only going to matter once the signal handler returns to the original code and the next CHECK_FOR_INTERRUPTS is hit.) -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Pensar que el espectro que vemos es ilusorio no lo despoja de espanto, sólo le suma el nuevo terror de la locura" (Perelandra, C.S. Lewis)
В списке pgsql-hackers по дате отправления: