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 11:51:41 -0700
Message-ID: <20210807185141.ncmuxchr6d2qv2v6@alap3.anarazel.de> (raw)
In-Reply-To: <2782786.1628357836@sss.pgh.pa.us>
References: <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>
<2771326.1628356007@sss.pgh.pa.us>
<20210807172556.rda5m7jjhk7ktukl@alap3.anarazel.de>
<2782786.1628357836@sss.pgh.pa.us>
Hi,
On 2021-08-07 13:37:16 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > On 2021-08-07 13:06:47 -0400, Tom Lane wrote:
> >> Fair. But I suggest that the first cut should look more like what
> >> I suggest above, ie just be willing to lose events during shutdown.
> >> The downsides of that are not so enormous that we should be willing
> >> to undertake major klugery to avoid it before we've even got a
> >> semi-working system.
>
> > I think that's more likely to hide bugs unfortunately. Consider fa91d4c91f2 -
> > I might not have found that if we had just ignored "too late" pgstats activity
> > in pgstats.c or fd.c, and that's not an edge case.
>
> Depends what you want to define as a bug. What I am not happy about
> is the prospect of random assertion failures for the next six months
> while you finish redesigning half of the system. The rest of us
> have work we want to get done, too. I don't object to the idea of
> making no-lost-events an end goal, but we are clearly not ready
> for that today.
I don't know what to do about that. How would we even find these cases if they
aren't hit during regression tests on my machine (nor on a lot of others)?
Obviously I had ran the regression tests many times before pushing the earlier
changes.
The check for pgstat being up is in one central place and thus easily can be
turned into a warning if problems around the shutdown sequence become a
frequent issue on HEAD. If you think it's better to turn that into a WARNING
now and then arm into an assert later, I can live with that as well, but I
don't think it'll lead to a better outcome.
The shared memory stats stuff isn't my personal project - it's
Horiguchi-san's. I picked it up because it seems like an important thing to
address and because it'd been in maybe a dozen CFs without a lot of
progress. It just turns out that there's a lot of prerequisite changes :(.
Greetings,
Andres Freund
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: <20210807185141.ncmuxchr6d2qv2v6@alap3.anarazel.de>
References: <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> <2771326.1628356007@sss.pgh.pa.us> <20210807172556.rda5m7jjhk7ktukl@alap3.anarazel.de> <2782786.1628357836@sss.pgh.pa.us> <20210807185141.ncmuxchr6d2qv2v6@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