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 1p8l0z-0002Eu-3I for pgsql-bugs@arkaria.postgresql.org; Fri, 23 Dec 2022 16:35:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p8l0x-0000rP-Ve for pgsql-bugs@arkaria.postgresql.org; Fri, 23 Dec 2022 16:35:19 +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 1p8l0x-0000rG-3d for pgsql-bugs@lists.postgresql.org; Fri, 23 Dec 2022 16:35:19 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p8l0u-0003h4-60 for pgsql-bugs@lists.postgresql.org; Fri, 23 Dec 2022 16:35:18 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 3BF6E3200911; Fri, 23 Dec 2022 11:35:12 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 23 Dec 2022 11:35:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:reply-to:sender :subject:subject:to:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1671813311; x=1671899711; bh=R MlMVGO8X1KVxvfPNYdfzWh1lhh58o+5y66WIu8MbKI=; b=bsjWX0uIOjn0aAMeu s0rwvvmXrJI+o6iXydd6Mj9jSxrXec3FrIuHJISW7RdkKfYQ9q3rtCwOUVukR+45 7RCJCqy6J5+PM/sp8PEx4w2njWxm9/B1p7cLttuO10iV9s3SDoNZM3PIEYU+nJ9R HrKaiGBxEbKeiR44MpjY5QI1h/uSPf4XzraSsLsTNuvPcbY/KEUj9B1oyqgrCe9+ tgzf73HOmW3IVc25ugI4K15alDsvUk7SMA+EbB5052YZaajUFG5WwVOUuUfifZ6M ezD7Jc/2gnmW0fYoAA7P5xR3Mz2lWowhZioSVzIcyXt3eUhyjzRmJ6weNmZ/1rqW JlEWw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrhedvgdeklecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfggtggugfgjsehtkeertddttdejnecuhfhrohhmpeetlhhvrghr ohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgqe enucggtffrrghtthgvrhhnpedvkedtffduffdtffffheffhfejjefhgfeiueeukeejkeff gfdufffhudffffeuveenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhh vghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 23 Dec 2022 11:35:11 -0500 (EST) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 44226E9A; Fri, 23 Dec 2022 17:35:09 +0100 (CET) Date: Fri, 23 Dec 2022 17:35:09 +0100 From: Alvaro Herrera To: Karina Litskevich Cc: =?utf-8?B?546L5rW35rSL?= , Kyotaro Horiguchi , pgsql-bugs@lists.postgresql.org Subject: Re: [PATCH] BUG FIX: inconsistent page found in BRIN_REGULAR_PAGE Message-ID: <20221223163509.rwxpzy6xfemppkxd@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, On 2022-Dec-23, Karina Litskevich wrote: > Is there any special reason to read WAL records until the last inserted > record? Hmm, no, there's no good reason to do it that way. > It seems that in some rare situations on slower machines this test can fail. > If any background process inserts a WAL record before lsn('insert') > and this record isn't flushed before > pg_get_wal_records_info('$start_lsn', '$end_lsn'), > pg_get_wal_records_info('$start_lsn', '$end_lsn') ends with ERROR > "cannot accept future end LSN" as it works only if record with end LSN > is inserted. Hmm. I've never seen that, but it sounds plausible. > I attached two patches with two ways of fixing this minor issue. > -my $end_lsn = $whiskey->lsn('insert'); > +my $end_lsn = $whiskey->lsn('flush'); Thank you, I used this one. Regards -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/