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 1mnrtN-0005IB-1v for pgsql-bugs@arkaria.postgresql.org; Fri, 19 Nov 2021 00:36:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mnrtL-0002X0-8g for pgsql-bugs@arkaria.postgresql.org; Fri, 19 Nov 2021 00:36:35 +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 1mnrtK-0002Wq-0U for pgsql-bugs@lists.postgresql.org; Fri, 19 Nov 2021 00:36:35 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mnrtE-0003EJ-JJ for pgsql-bugs@lists.postgresql.org; Fri, 19 Nov 2021 00:36:33 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id D172E3201D41; Thu, 18 Nov 2021 19:36:25 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 18 Nov 2021 19:36:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=e7g04JSX0Mb0JHZYuqsT7RTzWSF y86kvPreFslujOHY=; b=PdpuSnw2NN6TYie8O1x/Tg5c1Xs6HT7E+cxWubS4u6X nL/mB3IY7SydtDTAGHTt2AwVIdjMVn/l8TfE2tBaKSEurssCaFcT3kRh6gkAlO6e E62T3WDdpYYizPAwlBnbTvqcA0SMkb9Lv6z5ciyopIv25BYAMpm25uftrdf+wYgY pYcyeBn4CRcHdMgvIHz3seYrPhpF1YA6IUCedSEGy4hVzJXKYRWO3/xdLIckA41Z tJHv+yGvLn2Yf1+BSmsMIsLTk9+m/oebeQTN1tabTINGWqoapaqMUL30sqsA4rFy 8VAHjzaLu2QvLNEl1SBLnLQ5LF2aKpXOuoULcwn/CTg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=e7g04J SX0Mb0JHZYuqsT7RTzWSFy86kvPreFslujOHY=; b=QxsUyNskQ7QUllg/vYBJjg B4/euBuW11znMJczDT2T6KYYBfId9b/Jn7IYII/kd2rH0WayGEJ7vmKX/fl/6LjT rXNVm2l69Vt8xZ0+twyNq+MvwA/MoqSk0uDRNEP2fVrNDcENNhQqPxxqEBvhlBBY Sd5d2M/MtO3R6P856gS2FDQK4kobcC329HIRwct/XUhVIp8M/xanF/Kt/kaq/nmH wAl1m4uGWv6PK1qs6tm1iVHLJnUvFCfL5DfHwhLvIiogLiVg3no9BplJgt85GSMR 81akz9olBA/lQFCD71P94LaLHKKurHJHsB9k8jPssa1oK1VL9cO2cDa3Cee7Y2Iw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrfeejgddvfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesmhdtreertddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepgfeuheevheehtdeugfdvjeeuudejueekleetkeekveejudehgedvtdefveeh leeknecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 18 Nov 2021 19:36:24 -0500 (EST) Date: Thu, 18 Nov 2021 16:36:23 -0800 From: Andres Freund To: Peter Geoghegan Cc: Dmitry Dolgov <9erthalion6@gmail.com>, Alexander Lakhin , Matthias van de Meent , PostgreSQL mailing lists Subject: Re: BUG #17255: Server crashes in index_delete_sort_cmp() due to race condition with vacuum Message-ID: <20211119003623.d3jusiytzjqwb62p@alap3.anarazel.de> References: <20211030213948.3i3f7cieqxzhd7kq@alap3.anarazel.de> <20211031192051.e3r2uxft3bulymrr@localhost> <08c2445c-c3c9-ba45-18d3-6399707d8306@gmail.com> <20211108172852.pvsarxoxi54uatch@localhost> <20211109150216.fgfybn35mwnkeef3@localhost> <20211110192010.ckvfzz352hsba5xf@alap3.anarazel.de> <20211118071941.e4far2w5vufnahun@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="75kz67mim3znj7ji" Content-Disposition: inline In-Reply-To: <20211118071941.e4far2w5vufnahun@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --75kz67mim3znj7ji Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, On 2021-11-17 23:19:41 -0800, Andres Freund wrote: > Not sure if it's worth it, but I think this can be made into a reliably > isolationtest by causing a tables index to locked exclusively, blocking > vac_open_indexes(), which can then reliably schedule a new relcache inval, > which in turn can compute a new RecentXmin. Might be too fragile to be worth > it. Attached is such an isolationtest. In an unmodified HEAD it ends up with step s1_select_1: SET LOCAL enable_seqscan = false; SELECT ctid, /*xmin, xmax, */ id FROM many_updates WHERE id = 1; RESET enable_seqscan; ctid |id -----+-- (0,3)|17 (1 row) without amcheck detecting corruption at that point:(. It's clearly not yet something we could consider committable, but I think it might be a useful basis for such a test. Greetings, Andres Freund --75kz67mim3znj7ji Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v1-0001-wip-test-heap_prune_page-bug-recently-dead-dead-i.patch"