On Thu, Mar 15, 2012 at 12:56 AM, Joachim Wieland <j...@mcknight.de> wrote: > On Wed, Mar 14, 2012 at 2:02 PM, Robert Haas <robertmh...@gmail.com> wrote: >> I think we should get rid of die_horribly(), and instead have arrange >> to always clean up AH via an on_exit_nicely hook. > > Good. The only exit handler I've seen so far is > pgdump_cleanup_at_exit. If there's no other one, is it okay to remove > all of this stacking functionality (see on_exit_nicely_index / > MAX_ON_EXIT_NICELY) from dumputils.c and just define two global > variables, one for the function and one for the arg that this function > would operate on (or a struct of both)?
No. That code is included by other things - like pg_dumpall - that don't know there's such a thing as an Archive. But I don't see that as a big problem; just on_exit_nicely whatever you want. We could also add on_exit_nicely_reset(), if needed, to clear the existing handlers. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers