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 1oTd7e-0003GW-D2 for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Sep 2022 05:52:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oTd7c-0005pA-8O for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Sep 2022 05:52: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 1oTd7b-0005p1-S4 for pgsql-hackers@lists.postgresql.org; Thu, 01 Sep 2022 05:52:11 +0000 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oTd7Z-0004rV-CW for pgsql-hackers@postgresql.org; Thu, 01 Sep 2022 05:52:10 +0000 Received: by mail-io1-xd35.google.com with SMTP id b142so13734695iof.10 for ; Wed, 31 Aug 2022 22:52:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date; bh=ui5tJB4ogoELegWgVDKmeKGSYVfsYHcIP/Yzm4PA19w=; b=DQAoF5f6xV5VD/Z/88LqzAMLB+2xSm/6KNrEPkYgfwfss1y+dv7qZARkVGhevlGm6I TYKhnO4+42kT6ERjjr/2go3y9+qc59txuurPeo9RLL9pGLeteawO21IWK2TbVmZW1Yq5 NoLC7vFbjIpCjE/T8DXafa5nshEVxWZn2/Dr5rLKiV2oBNpsEUkAcQ+YXJR4jLYbS/ba NYqyjHIKxuW6hDZEaA3ZDBc2lRz21Q7d9y+5lRTD6kHtyMIECnHHC0QZlsfua5i3d+eu Ag4DNnZg3FDguuVeS/8u4VlgmQFxbyqk04KJrgcu9qzitp+NrbNq0dsXNBEJ2sYlWM4i rlpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date; bh=ui5tJB4ogoELegWgVDKmeKGSYVfsYHcIP/Yzm4PA19w=; b=QU2vJOtsjzNkrkg0wngFDwhl/A26+etOk9TUf9J7DlEYzKIqXSVhDYW2i6PBgjKZ6O HTAOEUOZg8IPcvaYEGRmijMiLCZwSvhuzU1NVbXVU0cx8KOrN93DSHOMg/EpENBbZYnu bgK/qt/mR2Y1b20zr35BOAjryX8Wh4tTFo9T/0rX7R49WEc1FFhKF1w/EbSjZD+QNckY LgFCpnsjKRYJQOHF9F5kHluM83bUJwFgfARoRuTTKcoPECD7d8nLTFTtDj7x2LWy/v4N y+oQhf7cDXOdt0yGSNITkru0nDxFdn/F5MApkOEs4zv5WZfi9K6HTJErPCjJAzC7oj9p fs/g== X-Gm-Message-State: ACgBeo2iG65I+RHVZoVfb/eXM3UQRwhB5MVgCS32vcEtAB3wRR2bGOUI vrQVyKvwZ/ZoFhccJFz/0LBS3g== X-Google-Smtp-Source: AA6agR5buKU/n4epPrTBCP2XeaWc+kjNvzkl+QHPqKx4xpFsf8PYWtrXUTHch/QPEWUqQuEdyUusLQ== X-Received: by 2002:a05:6602:2be6:b0:688:c977:92d2 with SMTP id d6-20020a0566022be600b00688c97792d2mr14281201ioy.179.1662011528685; Wed, 31 Aug 2022 22:52:08 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id z11-20020a027a4b000000b00349bdd5212asm7752506jad.47.2022.08.31.22.52.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Aug 2022 22:52:08 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 53C37801058; Thu, 1 Sep 2022 00:52:07 -0500 (CDT) Date: Thu, 1 Sep 2022 00:52:07 -0500 From: Justin Pryzby To: Thomas Munro Cc: Kyotaro Horiguchi , "Shinoda, Noriyoshi (PN Japan FSIP)" , Tomas Vondra , Stephen Frost , Andres Freund , Jakub Wartak , Alvaro Herrera , Tomas Vondra , Dmitry Dolgov <9erthalion6@gmail.com>, David Steele , pgsql-hackers@postgresql.org Subject: Re: pg15b3: recovery fails with wal prefetch enabled Message-ID: <20220901055207.GK31833@telsasoft.com> References: <20220901.120804.504461198570722498.horikyota.ntt@gmail.com> <20220901044753.GG31833@telsasoft.com> <20220901.141758.1654910865904256686.horikyota.ntt@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Thu, Sep 01, 2022 at 05:35:23PM +1200, Thomas Munro wrote: > So it *looks* like it finished early (and without the expected > error?). But it also looks like it replayed that record, according to > the page LSN. So which is it? Could you recompile with WAL_DEBUG > defined in pg_config_manual.h, and run recovery with wal_debug = on, > and see if it replays 1CAF84B0? This is with 6672d79139 un-reverted. $ sudo -u postgres ./tmp_install/usr/local/pgsql/bin/postgres -D /mnt/tmp/15/data -c logging_collector=no -c port=5678 -c wal_debug=on 2>&1 |grep 1CAF84B0 || echo not found not found $ sudo -u postgres ./tmp_install/usr/local/pgsql/bin/postgres -D /mnt/tmp/15/data -c logging_collector=no -c port=5678 -c wal_debug=on -c recovery_prefetch=no 2>&1 |grep 1CAF84B0 || echo not found < 2022-09-01 00:44:55.878 CDT >LOG: REDO @ 1201/1CAF8478; LSN 1201/1CAF84B0: prev 1201/1CAF8438; xid 0; len 2; blkref #0: rel 1663/16881/2840, blk 53 - Heap2/VACUUM: nunused 4 < 2022-09-01 00:44:55.878 CDT >LOG: REDO @ 1201/1CAF84B0; LSN 1201/1CAF84F0: prev 1201/1CAF8478; xid 0; len 5; blkref #0: rel 1663/16881/2840, fork 2, blk 0; blkref #1: rel 1663/16881/2840, blk 53 - Heap2/VISIBLE: cutoff xid 3678741092 flags 0x01 < 2022-09-01 00:44:55.878 CDT >LOG: REDO @ 1201/1CAF84F0; LSN 1201/1CAF8AC0: prev 1201/1CAF84B0; xid 0; len 2; blkref #0: rel 1663/16881/1259, blk 1 FPW, compression method: zstd - Heap/INPLACE: off 33 (Note that "compression method: zstd" is a local change to xlog_block_info() which I just extracted from my original patch for wal_compression, after forgetting to compile --with-zstd. I'll mail about that at a later time...). -- Justin