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 1mcK9X-00020K-L5 for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Oct 2021 04:21:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mcK9W-0004ES-Hp for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Oct 2021 04:21:34 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcK9W-0004EJ-5X for pgsql-hackers@lists.postgresql.org; Mon, 18 Oct 2021 04:21:34 +0000 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mcK9T-0002Yz-SM for pgsql-hackers@postgresql.org; Mon, 18 Oct 2021 04:21:33 +0000 Received: by mail-io1-xd33.google.com with SMTP id s17so14626375ioa.13 for ; Sun, 17 Oct 2021 21:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=wNf9pOYA0QTufYlmYsMajPQigjoH7PsaPbnVH0A/4Yg=; b=ElqZatHQqh5LEKcYys8n6x9hnyv4RrU7Xxf9yOzwYgWFNwxwlvgIu2PcObzt8heaWo 2XpQ5CHEdhQCL+yge7/02G2n6rdO4yjy17Bn5BMeSxaMysklLw/p5CI+275vycW14Yug 2zC1knWxFcZmK1Lcd+9HiIlAUTTsfY0Mk2DoFiv/PQZdB0t5UgJZrD0W/stC8wcVrbXI utgawMzIx4swkVZlvxVhruBTi/0ldRImsnoUrkADWnAMlwpdzA8/GFoZmkXX0draIaHK btF1WBP6qQXpKD4jHbbecNYzQIxzLiKEKKslgqJ/qwflCTu1JDDrdSVd1jTLf0/ZPT84 352A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=wNf9pOYA0QTufYlmYsMajPQigjoH7PsaPbnVH0A/4Yg=; b=4N8BWcxyxdp1bQEgWjIq8bV5D/N/vPpqrumVLNoASfow8sWWZX+OrALvfQup6u1HPi voSwp6cIhhDFaaWxTH8O+A7NMbaqTuEa8SeUMIGYZh7NNmZ5K+I0SYht93GF8+fEDz33 jBUwx0cHiYFdZfHnZdkofoGprhAP3za9DwXwTKR0zFjwe60EKFOzxxdAHtsqMXHSkv7f pwS7eK+7yIwsnNjxBppEEAoUlCQDSABtHXoIjtSJwbKZQwbDDUg1he6555Rz65nSOs4H mLthu3f0Hnv84eAOfhFYvXbpNwv9R/XOanraTxNFdFTpIjkgMvRpLAycmkZBk9LnZzPU fuTQ== X-Gm-Message-State: AOAM533iTsE0VeDEg6iCJtXChulss4AAdKhsC6hdU23GgBASuANhDXP2 C2CvIsPsxXcti0onZkI/7BYL/A== X-Google-Smtp-Source: ABdhPJxq9Uc9hawI55arzo7rIosgJA7hx150Q31puUwSuTeU6pYoGikNKoo+vyMhZ7eUSPW5jvqBxQ== X-Received: by 2002:a05:6602:1603:: with SMTP id x3mr6809406iow.13.1634530889860; Sun, 17 Oct 2021 21:21:29 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id r24sm6228234ioa.5.2021.10.17.21.21.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Oct 2021 21:21:29 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 790738008F8; Sun, 17 Oct 2021 23:21:28 -0500 (CDT) Date: Sun, 17 Oct 2021 23:21:28 -0500 From: Justin Pryzby To: Tom Lane Cc: Heikki Linnakangas , pgsql-hackers , Andres Freund Subject: Re: prion failed with ERROR: missing chunk number 0 for toast value 14334 in pg_toast_2619 Message-ID: <20211018042128.GB4679@telsasoft.com> References: <2472976.1621117273@sss.pgh.pa.us> <2591376.1621196582@sss.pgh.pa.us> <20210815144455.GQ10479@telsasoft.com> <20211017214315.GA4679@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211017214315.GA4679@telsasoft.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Oct 17, 2021 at 04:43:15PM -0500, Justin Pryzby wrote: > On Sun, Aug 15, 2021 at 09:44:55AM -0500, Justin Pryzby wrote: > > On Sun, May 16, 2021 at 04:23:02PM -0400, Tom Lane wrote: > > > 1. Fix FullXidRelativeTo to be a little less trusting. It'd > > > probably be sane to make it return FirstNormalTransactionId > > > when it'd otherwise produce a wrapped-around FullXid, but is > > > there any situation where we'd want it to throw an error instead? > > > > > > 2. Change pg_resetwal to not do the above. It's not entirely > > > apparent to me what business it has trying to force > > > autovacuum-for-wraparound anyway, but if it does need to do that, > > > can we devise a less klugy method? > > > > > > It also seems like some assertions in procarray.c would be a > > > good idea. With the attached patch, we get through core > > > regression just fine, but the pg_upgrade test fails immediately > > > after the "Resetting WAL archives" step. > > > > #2 is done as of 74cf7d46a. > > > > Is there a plan to include Tom's procarray assertions ? > > I'm confused about the state of this patch/thread. > > make check causes autovacuum crashes (but then the regression tests succeed > anyway). Sorry, I was confused here. autovacuum is not crashing as I said; the BACKTRACE lines from the LOG added by Tom's debugging patch: + if (trace_toast_visibility) + ereport(LOG, + errmsg("HeapTupleSatisfiesToast: xmin %u t_infomask 0x%04x", + HeapTupleHeaderGetXmin(tuple), + tuple->t_infomask), + debug_query_string ? 0 : errbacktrace()); 2021-10-17 22:56:57.066 CDT autovacuum worker[19601] LOG: HeapTupleSatisfiesToast: xmin 2 t_infomask 0x0b02 2021-10-17 22:56:57.066 CDT autovacuum worker[19601] BACKTRACE: ... I see that the pg_statistic problem can still occur on v14. I still don't have a recipe to reproduce it, though, other than running VACUUM FULL in a loop. Can I provide anything useful to debug it? xmin, infomask, core, and log_autovacuum_min_duration=0 ?? -- Justin