Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qomK8-002rMR-A6 for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Oct 2023 15:01:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qomK6-0089lQ-3B for pgsql-hackers@arkaria.postgresql.org; Fri, 06 Oct 2023 15:01:03 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qomK5-0089ky-Oy for pgsql-hackers@lists.postgresql.org; Fri, 06 Oct 2023 15:01:02 +0000 Received: from charmander.telsasoft.com ([50.244.222.1] helo=pryzbyj2023.telsasoft) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qomK3-000c2I-Po for pgsql-hackers@lists.postgresql.org; Fri, 06 Oct 2023 15:01:01 +0000 Received: by pryzbyj2023.telsasoft (Postfix, from userid 1000) id 428BD9179; Fri, 6 Oct 2023 10:00:57 -0500 (CDT) Date: Fri, 6 Oct 2023 10:00:57 -0500 From: Justin Pryzby To: Michael Paquier Cc: pgsql-hackers@lists.postgresql.org, Andres Freund Subject: Re: pg16: invalid page/page verification failed Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Oct 06, 2023 at 09:20:05AM +0900, Michael Paquier wrote: > On Thu, Oct 05, 2023 at 11:45:18AM -0500, Justin Pryzby wrote: > > This table is what it sounds like: a partition into which CSV logs are > > COPY'ed. It would've been created around 8am. There's no special > > params set for the table nor for autovacuum. > > This may be an important bit of information. 31966b151e6a is new as > of Postgres 16, has changed the way relations are extended and COPY > was one area touched. I am adding Andres in CC. Also, I realized that someone kicked off a process just after 9am which would've done a lot of INSERT ON CONFLICT DO UPDATE, VACUUM FULL, and VACUUM. Which consumed and dirtied buffers about 100x faster than normal. log_time | 2023-10-05 10:00:55.794-05 pid | 31754 left | duration: 51281.001 ms statement: VACUUM (FULL,FREEZE) othertable... log_time | 2023-10-05 10:01:01.784-05 backend_type | checkpointer left | checkpoint starting: time log_time | 2023-10-05 10:01:02.935-05 pid | 10023 left | page verification failed, calculated checksum 5074 but expected 5050 context | COPY postgres_log, line 947 left | COPY postgres_log FROM '/var/log/postgresql/postgresql-2023-10-05_095600.csv' WITH csv log_time | 2023-10-05 10:01:02.935-05 pid | 10023 left | invalid page in block 119 of relation base/16409/801594131 context | COPY postgres_log, line 947 left | COPY postgres_log FROM '/var/log/postgresql/postgresql-2023-10-05_095600.csv' WITH csv log_time | 2023-10-05 10:01:11.636-05 pid | 31754 left | duration: 15838.374 ms statement: VACUUM (FREEZE) othertable... I meant to point out that the issue is on the last block. postgres=# SELECT pg_relation_size('"BROKEN_postgres_log_2023_10_05_0900"')/8192; ?column? | 120 It sounds like there may be an issue locking (pinning?) a page, or rather not locking it, or releasing the lock too early. -- Justin