On Thu, Jul 19, 2018 at 11:51 PM Thomas Munro <thomas.mu...@enterprisedb.com> wrote: > On Thu, Jul 19, 2018 at 10:30 PM, Kyotaro HORIGUCHI > > Yeah. That seems good. Couldn't we reuse prepared WaitEventSet in > > other places? For example PgstatCollectorMain has the same > > characteristics, where WaitLatchOrSocket is used with fixed > > parameters and waiting on a socket which gets frequent receipts. > > +1, but I'm considering that to be a separate project, or I'll never > get this patch committed. It may be possible to have a small number > of them reused in many places, and it may be possible for > WaitLatchXXX() to reuse them automatically (so we don't have to change > every call site). > > > # Is it intentional that the patch doesn't touch pgstat.c? > > Yes. pgstat.c still uses WL_POSTMASTER_DEATH because it does > something special: it calls pgstat_write_statsfiles() before it exits.
Rebased. -- Thomas Munro http://www.enterprisedb.com
0001-Add-WL_EXIT_ON_PM_DEATH-pseudo-event-v3.patch
Description: Binary data