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 1oTaG6-0007T4-HB for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Sep 2022 02:48:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oTaG5-0008Ns-7L for pgsql-hackers@arkaria.postgresql.org; Thu, 01 Sep 2022 02:48:45 +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 1oTaG4-0008Nj-Pk for pgsql-hackers@lists.postgresql.org; Thu, 01 Sep 2022 02:48:44 +0000 Received: from mail-il1-x12f.google.com ([2607:f8b0:4864:20::12f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oTaG2-0002kM-CT for pgsql-hackers@postgresql.org; Thu, 01 Sep 2022 02:48:44 +0000 Received: by mail-il1-x12f.google.com with SMTP id h14so6985755ilh.10 for ; Wed, 31 Aug 2022 19:48:41 -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=lk6a6zc+iKhhBR8duHjU5DKQM9ei+maeQpGyfui38BI=; b=DQrXEEVU056RdE+QDhBZD8h5FPcQpwfK2aTujqmtLSd3r/lq5XcuD1oTXm7Uly2NSD ZY/Sni4Uze9HIXFiebRq2/jk6BKQ1Q0wgMnZHHfONEe2YicuTk7xhv3J6rKDxSZcsG5/ qlOuEKNNyRjeOJQ0v0kAf0AR1SWUbWefqqGQSPJWcR9qd26gOXpL8Wmed10wCYACleYa POIy/wbdJfwahQXqtu/6OnbcyhwVdBvhT2psgY/2nzqqWuvDG6bacpehr65nXNJd6eMI vr4IoyIdWHXfnQJqR3tVLfy4xvTN5VE4PQrvxuH5wz0G2DLGHqkaNgYP27dQoOQQcLiX hu5g== 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=lk6a6zc+iKhhBR8duHjU5DKQM9ei+maeQpGyfui38BI=; b=JImVtTMrVhnuj2IYr0uzszETlO6JbhFkbeG1as7WImrZtcNrjOwn/HP9RWvbPUlXUR m0LF4BB0aDeuGVmfcfnDSdBOgVZlPNMlLzXrcIGrZPY/5g2kZBPYPNIRU7GnLXlCY2O1 SRQryeOF4zgmneteusu+MeODThIPjEaINDbd4Y0ZlfDCfwxc5NtI+olYF1+2cvJYyejD dkYWuMwDxWzN97w0g6vJhKE7Sz6GZwE8+KUFpDQa4EWXB9t0YZBKpnM4Wul5czKtpIkI 9vVx1mnwexs5A609fac2SWEKXp/+rVkrc/aePyGOozaWfu5upI/HmgV5OiGZi3DuZmL1 o42g== X-Gm-Message-State: ACgBeo2T0p93qHNZwvG84EYJVtLP/dN55wYA2wOgHV/9cwcPqz2d2fwM 0VfpuaLNLJ0dxftgMVy7qQUicQ== X-Google-Smtp-Source: AA6agR5u6d/ooHgAInvA+mLqRD1YWlPprTTvaJeCvGfsg3e0P1h50uAKNuf6ogO8SG+Goqeg054Axg== X-Received: by 2002:a92:cbc4:0:b0:2e7:147b:6f7 with SMTP id s4-20020a92cbc4000000b002e7147b06f7mr16006436ilq.174.1662000520334; Wed, 31 Aug 2022 19:48:40 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id a18-20020a6b6c12000000b00688b30a7812sm8614108ioh.42.2022.08.31.19.48.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 Aug 2022 19:48:39 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 1E13D800EB6; Wed, 31 Aug 2022 21:48:38 -0500 (CDT) Date: Wed, 31 Aug 2022 21:48:38 -0500 From: Justin Pryzby To: Thomas Munro Cc: "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: <20220901024837.GD31833@telsasoft.com> References: <20220831140128.GS31833@telsasoft.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 Some more details, in case they're important: First: the server has wal_compression=zstd (I wonder if something doesn't allow/accomodate compressed FPI?) I thought to mention that after compiling pg15 locally and forgetting to use --with-zstd. I compiled it to enable your debug logging, which wrote these during recovery: < 2022-08-31 21:17:01.807 CDT >NOTICE: suppressing prefetch in relation 1663/16888/165958212 from block 156 until 1201/1C3965A0 is replayed, which truncates the relation < 2022-08-31 21:17:01.903 CDT >NOTICE: suppressing prefetch in relation 1663/16888/165958523 from block 23 until 1201/1C39CC98 is replayed, which truncates the relation < 2022-08-31 21:17:02.029 CDT >NOTICE: suppressing prefetch in relation 1663/16888/165958523 from block 23 until 1201/1C8643C8 is replayed, because the relation is too small Also, pg_waldump seems to fail early with -w: [pryzbyj@template0 ~]$ sudo /usr/pgsql-15/bin/pg_waldump -w -R 1663/16881/2840 -F vm -p /mnt/tmp/15/data/pg_wal 00000001000012010000001C rmgr: Heap2 len (rec/tot): 64/ 122, tx: 0, lsn: 1201/1CAF2658, prev 1201/1CAF2618, desc: VISIBLE cutoff xid 3681024856 flags 0x01, blkref #0: rel 1663/16881/2840 fork vm blk 0 FPW, blkref #1: rel 1663/16881/2840 blk 54 pg_waldump: error: error in WAL record at 1201/1CD90E48: invalid record length at 1201/1CD91010: wanted 24, got 0 Also, the VM has crashed with OOM before, while runnning pg15, with no issue in recovery. I haven't been able to track down the cause.. The VM is running: kernel-3.10.0-1160.66.1.el7.x86_64 pgsql is an ext4 FS (no tablespaces), which is a qemu block device exposed like: It's nowhere near full: /dev/vdc 96G 51G 46G 53% /var/lib/pgsql