Re: [HACKERS] Proper cleanup at backend exit - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Proper cleanup at backend exit
Date
Msg-id 29241.907288157@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Proper cleanup at backend exit  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] Proper cleanup at backend exit
List pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
>> [ should we work harder to ensure pg_listener entries get cleaned out? ]

> Seems like we should try and clean them out, especially when the backend
> is doing a normal exit.  In a panic exit, we don't need to clean it out.

OK, I will add some more code to try to cope with the exit-during-
uncommitted-transaction case.

> We can install something into proc_exit() and shmem_exit() to clean out
> the table.

The old code inserted the cleanup action into shmem_exit().  Is that the
right list to put it in?  I'm not clear on the difference between
shmem_exit and proc_exit lists...

> You can have a global variable that installed the pg_listen
> cleaner the first time a notify() is done so as not to install a new
> exit handler for each notify() call.

That part's already done.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] It sorta works, but I'm confused about locking
Next
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] It sorta works, but I'm confused about locking