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 1mcDwD-0004pA-Jt for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Oct 2021 21:43:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mcDwC-0005Om-Fd for pgsql-hackers@arkaria.postgresql.org; Sun, 17 Oct 2021 21:43:24 +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 1mcDwC-0005Od-3Q for pgsql-hackers@lists.postgresql.org; Sun, 17 Oct 2021 21:43:24 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mcDw7-0007df-Sg for pgsql-hackers@postgresql.org; Sun, 17 Oct 2021 21:43:23 +0000 Received: by mail-il1-x12a.google.com with SMTP id h27so7138456ila.5 for ; Sun, 17 Oct 2021 14:43:19 -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=CCXY0nyZ6ZQen04/raTj74XK3/IPaHs/xLcn8EYBsAw=; b=mncbRNw3uXbJIKu+4rfGuvQkOm5VaxkIOj0H88SB+k0Ptw6w1EGN9+WAFqkKApDUW5 ZkGkwMknCQZH04sjGRZCCYmtI/BXQN5yjIuVmgXSekWqn4ZCTrtGDl1LthiPUKJSl65Z E0AaX3YrHNIOvKfx+dLPXpZLcxNZHaVPJpdLFoUkHTOsOc2Z0FyxhTqbP0ch7KaAVDl4 Lw0Iv4mexV/wggXrY9DzKuGdJ137QqtWTZNOR6cnqzCNEe9oCcUbtfcTiC7ShMLgy5Vk TBmwL71rc1kM0+7gr6Kxzy9bBhPRdM7Js5m5cTd94Xo3IqVetSYVgkJuJ3yqYNo2nHge lGRA== 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=CCXY0nyZ6ZQen04/raTj74XK3/IPaHs/xLcn8EYBsAw=; b=lOzsdbaGpwzHqa8AeVkDG0CZ7W1bFIHCGpAxKtJ1TGoy5dJpu0s8WQoEf0afGUiDFy UUgXRWlysePKi9sWieiAuTW4IhVdlbFBC6RLx1pPZXF2CEvVjHCH0bU2PA8rW6Rw2TJY 8FFylxi1MKQqAVcXQz9fylN9Gfz39syuEhx3QrcqGzXhbC/eZe4ZCO00vY7Ih7Z+nxH7 Gjyew+goamPGkm1QAbyPeX32zgBbOP4MYqTP+++/CMCcwoVFV5DXz3Hl3EPS7lGnrP39 Ogj5QRM6i47bGKjp8ilfqPvgN3FcQQ7/lYEBwCbrjGTCC/BqsJLqK7uQRqKqdEUY31ZJ OjSg== X-Gm-Message-State: AOAM530VdZqGq/7ye1cM+xpG2xkOEdP/vRTBfLogrX49hIMNY2OHjSom uX+liF1pG4EVTCJMAXMgvu+1XQ== X-Google-Smtp-Source: ABdhPJy96S/nLdgnUZhbgAxC2WINsxVgeYVtH5LBWLqu6j9Qsa0ko7sUEP5Q6NP2K6jPDKGR/n8iRA== X-Received: by 2002:a05:6e02:1baf:: with SMTP id n15mr11146289ili.249.1634506997210; Sun, 17 Oct 2021 14:43:17 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id n3sm2375454ili.37.2021.10.17.14.43.16 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 17 Oct 2021 14:43:16 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id AAFDF800897; Sun, 17 Oct 2021 16:43:15 -0500 (CDT) Date: Sun, 17 Oct 2021 16:43:15 -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: <20211017214315.GA4679@telsasoft.com> References: <2472976.1621117273@sss.pgh.pa.us> <2591376.1621196582@sss.pgh.pa.us> <20210815144455.GQ10479@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210815144455.GQ10479@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, 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). I notice now that Tom was referring to failures in pg_upgrade, so maybe didn't notice this part: $ grep -c BACKTRACE src/test/regress/log/postmaster.log 10 2021-10-17 16:30:42.623 CDT autovacuum worker[13490] BACKTRACE: postgres: autovacuum worker regression(errbacktrace+0x4e) [0x5650e5ea08ee] postgres: autovacuum worker regression(HeapTupleSatisfiesVisibility+0xd93) [0x5650e5a85283] postgres: autovacuum worker regression(heap_hot_search_buffer+0x2a5) [0x5650e5a7ec05] postgres: autovacuum worker regression(+0x1b573c) [0x5650e5a8073c] postgres: autovacuum worker regression(index_fetch_heap+0x5d) [0x5650e5a9345d] postgres: autovacuum worker regression(index_getnext_slot+0x5b) [0x5650e5a934fb] postgres: autovacuum worker regression(systable_getnext_ordered+0x26) [0x5650e5a92716] postgres: autovacuum worker regression(heap_fetch_toast_slice+0x33d) [0x5650e5a866ed] postgres: autovacuum worker regression(+0x162f61) [0x5650e5a2df61] postgres: autovacuum worker regression(toast_flatten_tuple+0xef) [0x5650e5a85dbf] postgres: autovacuum worker regression(+0x5b770d) [0x5650e5e8270d] postgres: autovacuum worker regression(+0x5b7d85) [0x5650e5e82d85] postgres: autovacuum worker regression(SearchCatCache3+0x1a9) [0x5650e5e83dc9] postgres: autovacuum worker regression(+0x29e4f5) [0x5650e5b694f5] postgres: autovacuum worker regression(+0x2a012e) [0x5650e5b6b12e] postgres: autovacuum worker regression(analyze_rel+0x1d1) [0x5650e5b6c851] postgres: autovacuum worker regression(vacuum+0x5c0) [0x5650e5bd4480] postgres: autovacuum worker regression(+0x40ce91) [0x5650e5cd7e91] postgres: autovacuum worker regression(+0x40df16) [0x5650e5cd8f16] postgres: autovacuum worker regression(AutoVacuumUpdateDelay+0) [0x5650e5cd9020] postgres: autovacuum worker regression(+0x41cccb) [0x5650e5ce7ccb] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890) [0x7f1dd1d26890] /lib/x86_64-linux-gnu/libc.so.6(__select+0x17) [0x7f1dd128fff7] postgres: autovacuum worker regression(+0x41d11e) [0x5650e5ce811e] postgres: autovacuum worker regression(PostmasterMain+0xd1c) [0x5650e5ce9c1c] postgres: autovacuum worker regression(main+0x220) [0x5650e5a1f4f0] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f1dd119ab97] postgres: autovacuum worker regression(_start+0x2a) [0x5650e5a1f83a] -- Justin