pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o
Date: Sat, 7 Aug 2021 19:24:35 -0700
Message-ID: <20210808022435.svp4spxlrfoi3w4p@alap3.anarazel.de> (raw)
In-Reply-To: <20210807190131.2bm24acbebl4wl6i@alap3.anarazel.de>
References: <E1mCC6U-0004Ik-Fs@gemulon.postgresql.org>
	<2638683.1628304247@sss.pgh.pa.us>
	<20210807030652.qf5wsbhxk7dpsmtn@alap3.anarazel.de>
	<2640064.1628306008@sss.pgh.pa.us>
	<2640490.1628306556@sss.pgh.pa.us>
	<20210807044952.orwuf7hua2wytx4g@alap3.anarazel.de>
	<20210807051149.x2j3n64ejcu23hm4@alap3.anarazel.de>
	<2675112.1628350987@sss.pgh.pa.us>
	<20210807164850.52atvo2qkmtfnzgt@alap3.anarazel.de>
	<20210807190131.2bm24acbebl4wl6i@alap3.anarazel.de>

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





view thread (53+ messages)  latest in thread

Message-ID: <20210808022435.svp4spxlrfoi3w4p@alap3.anarazel.de>
Permalink:  ../20210808022435.svp4spxlrfoi3w4p@alap3.anarazel.de/
Also on:    postgresql.org/message-id/20210808022435.svp4spxlrfoi3w4p@alap3.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: andres@anarazel.de, tgl@sss.pgh.pa.us
  Subject: Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o
  In-Reply-To: <20210808022435.svp4spxlrfoi3w4p@alap3.anarazel.de>
  References: <E1mCC6U-0004Ik-Fs@gemulon.postgresql.org> <2638683.1628304247@sss.pgh.pa.us> <20210807030652.qf5wsbhxk7dpsmtn@alap3.anarazel.de> <2640064.1628306008@sss.pgh.pa.us> <2640490.1628306556@sss.pgh.pa.us> <20210807044952.orwuf7hua2wytx4g@alap3.anarazel.de> <20210807051149.x2j3n64ejcu23hm4@alap3.anarazel.de> <2675112.1628350987@sss.pgh.pa.us> <20210807164850.52atvo2qkmtfnzgt@alap3.anarazel.de> <20210807190131.2bm24acbebl4wl6i@alap3.anarazel.de> <20210808022435.svp4spxlrfoi3w4p@alap3.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox