Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o
Date: 2021-08-08 02:24:35
Message-ID: 20210808022435.svp4spxlrfoi3w4p@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hi,

On 2021-08-07 12:01:31 -0700, Andres Freund wrote:
> Attached is a patch showing how this could look like. Note that the PANIC
> should likely not be that but a WARNING, but the PANIC more useful for running
> some initial tests...

I pushed a slightly evolved version of this. As the commit message noted, this
may not be the best approach, but we can revise after further discussion.

> I'm not sure whether we'd want to continue having the proc exit hook? It seems
> to me that asserts would provide a decent enough protection against
> introducing new temp files during shutdown.

> Alternatively we could make the asserts in OpenTemporaryFile et al
> elog(ERROR)s, and be pretty certain that no temp files would be open too late?

I ended up removing the proc exit hook and not converting the asserts to an
elog(). Happy to change either.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2021-08-08 02:27:36 pgsql: Make regexp engine's backref-related compilation state more bull
Previous Message Andres Freund 2021-08-08 02:23:06 pgsql: Move temporary file cleanup to before_shmem_exit().

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2021-08-08 04:50:53 Re: Small documentation improvement for ALTER SUBSCRIPTION
Previous Message Tom Lane 2021-08-08 01:03:26 Re: Assert triggered during RE_compile_and_cache