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 1ntrjQ-00079f-52 for pgsql-general@arkaria.postgresql.org; Wed, 25 May 2022 14:11:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ntrjP-0004kT-0k for pgsql-general@arkaria.postgresql.org; Wed, 25 May 2022 14:11:23 +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 1ntrjO-0004kK-MA for pgsql-general@lists.postgresql.org; Wed, 25 May 2022 14:11:22 +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 1ntrjI-0000CI-6D for pgsql-general@postgresql.org; Wed, 25 May 2022 14:11:21 +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 24PEBCx31919214; Wed, 25 May 2022 10:11:13 -0400 From: Tom Lane To: Abhishek Bhola cc: pgsql-general Subject: Re: PG 13.6 : Data corruption error message not being sent to syslog In-reply-to: References: Comments: In-reply-to Abhishek Bhola message dated "Wed, 25 May 2022 17:32:30 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1919212.1653487872.1@sss.pgh.pa.us> Date: Wed, 25 May 2022 10:11:12 -0400 Message-ID: <1919213.1653487872@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Abhishek Bhola writes: > This morning I noticed this error in my PG CSV log file. > 2022-05-25 23:59:17.776 JST,,,117110,,628cf2c5.1c976,1,,2022-05-25 23:59:17 > JST,9/611296,0,ERROR,XX001,"uncommitted xmin 16395356 from before xid > cutoff 144683296 needs to be frozen",,,,,"while scanning block 19267 of > relation ""relation_name"" > This was a data corruption error that I resolved by truncating the table > and reloading it. However, I was curious why this message was not sent to > my syslog. Seems to me this filter explains that well enough: > ## Added by DataConsulting Team for syslog filter > if $programname == 'postgres' and \ > ($msg contains 'CODE:28000' or \ > $msg contains 'CODE:28P01' or \ > $msg contains 'CODE:3D000' or \ > $msg contains 'CODE:08006' or \ > $msg contains 'CODE:42501' \ > ) then /xxxx/xxxx/xxx/pg_log/postgres_filter.log You should realize of course that syslog is not a 100% reliable logging mechanism -- at least most implementations are capable of dropping messages under load. But we needn't guess about reasons for missed messages here. regards, tom lane