Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCCKL-0006wi-5z for pgsql-committers@arkaria.postgresql.org; Sat, 07 Aug 2021 02:44:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mCCJo-0004v4-Fj for pgsql-committers@arkaria.postgresql.org; Sat, 07 Aug 2021 02:44:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCCJo-0004tb-A1 for pgsql-committers@lists.postgresql.org; Sat, 07 Aug 2021 02:44:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mCCJm-0002K2-CH for pgsql-committers@lists.postgresql.org; Sat, 07 Aug 2021 02:44:11 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 1772i7fO2638684; Fri, 6 Aug 2021 22:44:07 -0400 From: Tom Lane To: Andres Freund cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: pgstat: Bring up pgstat in BaseInit() to fix uninitialized use o In-reply-to: References: Comments: In-reply-to Andres Freund message dated "Sat, 07 Aug 2021 02:30:26 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2638682.1628304247.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 06 Aug 2021 22:44:07 -0400 Message-ID: <2638683.1628304247@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund 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: TRAP: FailedAssertion("pgstat_is_initialized && !pgstat_is_shutdown", File= : "pgstat.c", Line: 4810, PID: 74447) 0 postgres 0x0000000100e5a520 ExceptionalCond= ition + 124 1 postgres 0x0000000100ca1dec pgstat_reset_co= unters + 0 2 postgres 0x0000000100ca2548 pgstat_report_t= empfile + 80 3 postgres 0x0000000100d07ca4 FileClose + 536 4 postgres 0x0000000100d09764 CleanupTempFile= s + 160 5 postgres 0x0000000100d0f8c0 proc_exit_prepa= re + 228 6 postgres 0x0000000100d0f79c proc_exit + 24 7 postgres 0x0000000100e5ae04 errfinish + 856 8 postgres 0x0000000100f1a804 ProcessInterrup= ts.cold.9 + 88 9 postgres 0x0000000100d36a98 ProcessInterrup= ts + 604 10 postgres 0x0000000100cd93c4 sendDir + 1516 11 postgres 0x0000000100cd83a0 perform_base_ba= ckup + 3592 12 postgres 0x0000000100cd72c0 SendBaseBackup = + 256 13 postgres 0x0000000100ce6a48 exec_replicatio= n_command + 1852 14 postgres 0x0000000100d39190 PostgresMain + = 3260 15 postgres 0x0000000100ca9c78 process_startup= _packet_die + 0 16 postgres 0x0000000100ca94ec ClosePostmaster= Ports + 0 17 postgres 0x0000000100ca6a0c PostmasterMain = + 4584 18 postgres 0x0000000100c0b798 help + 0 19 libdyld.dylib 0x0000000184391430 start + 4 regards, tom lane