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: Fri, 6 Aug 2021 20:06:52 -0700
Message-ID: <20210807030652.qf5wsbhxk7dpsmtn@alap3.anarazel.de> (raw)
In-Reply-To: <2638683.1628304247@sss.pgh.pa.us>
References: <E1mCC6U-0004Ik-Fs@gemulon.postgresql.org>
<2638683.1628304247@sss.pgh.pa.us>
Hi,
On 2021-08-06 22:44:07 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > pgstat: Bring up pgstat in BaseInit() to fix uninitialized use of pgstat by AV.
>
> sifaka took exception to this, or at least I guess it was this one out
> of the four you pushed at once:
Longfin as well. It's the assertions from ee3f8d3d3ae, but possibly only
exposed after fb2c5028e63.
Not sure why it's your two animals that report this issue, but not others? Why
would a backend doing SendBaseBackup() previously have allocated temp files?
Don't get me wrong - it's good that they surfaced the issue, and it's an issue
independent of the specific trigger.
Glad I added the assertions...
See also https://www.postgresql.org/message-id/20210803023612.iziacxk5syn2r4ut%40alap3.anarazel.de> TRAP: FailedAssertion("pgstat_is_initialized && !pgstat_is_shutdown", File: "pgstat.c", Line: 4810, PID: 74447)
> 0 postgres 0x0000000100e5a520 ExceptionalCondition + 124
> 1 postgres 0x0000000100ca1dec pgstat_reset_counters + 0
> 2 postgres 0x0000000100ca2548 pgstat_report_tempfile + 80
> 3 postgres 0x0000000100d07ca4 FileClose + 536
> 4 postgres 0x0000000100d09764 CleanupTempFiles + 160
> 5 postgres 0x0000000100d0f8c0 proc_exit_prepare + 228
> 6 postgres 0x0000000100d0f79c proc_exit + 24
> 7 postgres 0x0000000100e5ae04 errfinish + 856
> 8 postgres 0x0000000100f1a804 ProcessInterrupts.cold.9 + 88
> 9 postgres 0x0000000100d36a98 ProcessInterrupts + 604
> 10 postgres 0x0000000100cd93c4 sendDir + 1516
> 11 postgres 0x0000000100cd83a0 perform_base_backup + 3592
> 12 postgres 0x0000000100cd72c0 SendBaseBackup + 256
> 13 postgres 0x0000000100ce6a48 exec_replication_command + 1852
> 14 postgres 0x0000000100d39190 PostgresMain + 3260
> 15 postgres 0x0000000100ca9c78 process_startup_packet_die + 0
> 16 postgres 0x0000000100ca94ec ClosePostmasterPorts + 0
> 17 postgres 0x0000000100ca6a0c PostmasterMain + 4584
> 18 postgres 0x0000000100c0b798 help + 0
> 19 libdyld.dylib 0x0000000184391430 start + 4
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: <20210807030652.qf5wsbhxk7dpsmtn@alap3.anarazel.de>
References: <E1mCC6U-0004Ik-Fs@gemulon.postgresql.org> <2638683.1628304247@sss.pgh.pa.us> <20210807030652.qf5wsbhxk7dpsmtn@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