From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers <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-10 11:06:45 |
Message-ID: | CAD21AoCCAa+J1-udHRo5-Hbtv=D38WdZDAaXZGDbQQ_Vg_d3bQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
Hi,
On Sun, Aug 8, 2021 at 11:24 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
>
> 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.
While testing streaming logical replication, I got another assertion
failure with the current HEAD (e2ce88b58f) when the apply worker
raised an error during applying spooled changes:
TRAP: FailedAssertion("pgstat_is_initialized && !pgstat_is_shutdown",
File: "pgstat.c", Line: 4810, PID: 11084)
0 postgres 0x000000010704fd9a
ExceptionalCondition + 234
1 postgres 0x0000000106d41e62
pgstat_assert_is_up + 66
2 postgres 0x0000000106d43854 pgstat_send + 20
3 postgres 0x0000000106d4433e
pgstat_report_tempfile + 94
4 postgres 0x0000000106df9519
ReportTemporaryFileUsage + 25
5 postgres 0x0000000106df945a
PathNameDeleteTemporaryFile + 282
6 postgres 0x0000000106df8c7e
unlink_if_exists_fname + 174
7 postgres 0x0000000106df8b3a walkdir + 426
8 postgres 0x0000000106df8982
PathNameDeleteTemporaryDir + 82
9 postgres 0x0000000106dfe591
SharedFileSetDeleteAll + 113
10 postgres 0x0000000106dfdf62
SharedFileSetDeleteOnProcExit + 66
11 postgres 0x0000000106e05275
proc_exit_prepare + 325
12 postgres 0x0000000106e050a3 proc_exit + 19
13 postgres 0x0000000106d3ba99
StartBackgroundWorker + 649
14 postgres 0x0000000106d54e85
do_start_bgworker + 613
15 postgres 0x0000000106d4ef26
maybe_start_bgworkers + 486
16 postgres 0x0000000106d4d767 sigusr1_handler + 631
17 libsystem_platform.dylib 0x00007fff736705fd _sigtramp + 29
18 ??? 0x0000000000000000 0x0 + 0
19 postgres 0x0000000106d4c990 PostmasterMain + 6640
20 postgres 0x0000000106c24fa3 main + 819
21 libdyld.dylib 0x00007fff73477cc9 start + 1
The apply worker registers SharedFileSetDeleteOnProcExit() when
creating a file set to serialize the changes. When it raises an error
due to conflict during applying the change, the callback eventually
reports the temp file statistics but pgstat already shut down,
resulting in this assertion failure.
Regards,
--
Masahiko Sawada
EDB: https://www.enterprisedb.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Daniel Gustafsson | 2021-08-10 13:23:50 | pgsql: Disable OpenSSL EVP digest padding in pgcrypto |
Previous Message | Daniel Gustafsson | 2021-08-10 09:31:03 | pgsql: Remove unused regression test certificate server-ss |
From | Date | Subject | |
---|---|---|---|
Next Message | Masahiko Sawada | 2021-08-10 11:08:35 | Re: Skipping logical replication transactions on subscriber side |
Previous Message | Julien Rouhaud | 2021-08-10 10:42:29 | Re: add operator ^= to mean not equal (like != and <>) |