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 1pw9lV-0007LS-Dq for pgsql-general@arkaria.postgresql.org; Mon, 08 May 2023 22:55:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pw9lU-00004u-0r for pgsql-general@arkaria.postgresql.org; Mon, 08 May 2023 22:55:32 +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 1pw9lS-0008WQ-9R for pgsql-general@lists.postgresql.org; Mon, 08 May 2023 22:55:31 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pw9lO-001HRT-9x for pgsql-general@postgresql.org; Mon, 08 May 2023 22:55:29 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id B61AF3200991; Mon, 8 May 2023 18:55:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 08 May 2023 18:55:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1683586522; x=1683672922; bh=Fw QM7hEZuLvnN64x3oBJVxvzO8bawb24Kg9I9Pqtk3M=; b=ZruEkChQhwjNuuuGDp qmwH8fXPTLVkAPtEtSzYuMcDSW6SXLHTMNBcnibAucdXWndvkrhe+OycHdhnNSyi Ah0EL6u3nPe6D/WoOquCjoWFXpCW8jWZnVpeIHj+cx2AY431YE1ZvsCv2+NgqwAZ ZnSYtnTBx6sLS3RDRBIyIwn783/kI33IpPWbXH8wOad2GatbXx4BlMmeeR9E+2Vw KQleewgDUCwNO1zQPuYMrW5+ny1hlbbx2xdFgLbkZ3ra5X/wnvlm1b+DqaPKUWDT GjcS4AcmzpbL2TNJfw2W5paZgd8wBalk/B8CI8r7GcplxtBDICxYpZToThwqAmbj C2GA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1683586522; x=1683672922; bh=FwQM7hEZuLvnN 64x3oBJVxvzO8bawb24Kg9I9Pqtk3M=; b=VhFjnvGYFtPzgLAlo6380Zoir0S8T HtZhDlLkIu+Uz5rs2m55lPVtY0eZhajB+p02Af7Yo9Ums8bUlAHquW3Gz3YbWX2d L/i4C06oVZdg3g8rIMBNjionKNq5zEISy7U5Q5cR+4CX6n67bMvVrNv3kOaDMGGj JwXyMYsHyOoNHHIqA0WE8/HnSRqnrrZ2cEkB3q8VxyK59DMRNFYB3mU5A/xHL++c rWRc64D/9yiK1xzVj03eqoLLyFDPI3ri3rAE8LqVfWKcrSOCNxMhVF/XdU6oN7Re pIfylZF62xu0E3M2jLmJySJnKE99RS6sb1zwgc83P7vl0xdTnVNYgPilQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeefledgudegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 May 2023 18:55:19 -0400 (EDT) Date: Tue, 9 May 2023 07:55:13 +0900 From: Michael Paquier To: Tom Lane Cc: Dilip Kumar , Thomas Munro , Evgeny Morozov , PostgreSQL General Subject: Re: "PANIC: could not open critical system index 2662" - twice Message-ID: References: <01020187f07f341f-d1593cf8-4fc7-4186-b70c-0c8862a2aa32-000000@eu-west-1.amazonses.com> <4029098.1683422490@sss.pgh.pa.us> <486434.1683583463@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KHR2k/wbdYz/qlL3" Content-Disposition: inline In-Reply-To: <486434.1683583463@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --KHR2k/wbdYz/qlL3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, May 08, 2023 at 06:04:23PM -0400, Tom Lane wrote: > Andres seems to think it's a problem with aborting a DROP DATABASE. > Adding more data might serve to make the window wider, perhaps. And the odds get indeed much better once I use these two toys: CREATE OR REPLACE FUNCTION create_tables(num_tables int) RETURNS VOID AS $func$ BEGIN FOR i IN 1..num_tables LOOP EXECUTE format(' CREATE TABLE IF NOT EXISTS %I (id int)', 't_' || i); END LOOP; END $func$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION drop_tables(num_tables int) RETURNS VOID AS $func$ BEGIN FOR i IN 1..num_tables LOOP EXECUTE format(' DROP TABLE IF EXISTS %I', 't_' || i); END LOOP; END $func$ LANGUAGE plpgsql; And then use this loop with the others I have mentioned upthread (just create origindb and the functions in them): while true; do psql -c 'select create_tables(1000)' origindb > /dev/null 2>&1 ; psql testdb -c "select 1" > /dev/null 2>&1 ; psql -c 'select drop_tables(1000)' origindb > /dev/null 2>&1 ; psql testdb -c "select 1" > /dev/null 2>&1 ; done; On top of that, I have also been able to reproduce the issue on HEAD, and luckily some pg_class file remain around, full of zeros: $ hexdump ./base/199634/1259 0000000 0000 0000 0000 0000 0000 0000 0000 0000 The contents of 2662, though, looked OK. Echoing Alvaro.. Could we, err, revisit the choice of making WAL_LOG the default strategy even for this set of minor releases? FWIW, I've mentioned that this choice was too aggressive in the thread of 8a86618.. -- Michael --KHR2k/wbdYz/qlL3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmRZfdEACgkQnvQgOdby QH162g/7BNlRvXonjujqIOtsnGlXJCQR68KBZ16au+hNLUVtVAnrr1mV2Xu0wI75 Jp38Vx2YGDb8IA/sAuTUYYFEBGwcOKSPp+0AF5ze8yF/fIlv15VJLJEi7/Cbyy+M V6IqZ+QokfQx5eH3W3gO1LXBaNrQbJ7srwPLjjgjWX7UDhM9adBzBgjl1iLqqcvk ltqAU97Qkp/bMGitEOoAT2JRgswa9XucxfMs5iyPmYHd0j4e7iuIOWE5yFgVpArH Uw22816aIDWsBUEVk+YThDE7Dzip2c/P3kfHWBgnjM/50KFqmki9U3y/2ALmDC7M +xOKcjs3O4uqwHUWn4sSDHUKL/NUWU5gaYVs/KwxLFF0tV+Ykc4DvuTQRh8YzMsV 1KoAWygkAeNQ7bkuX9/JcAwu/QMCQd+IA+6U9WVhIpUhGbkVl3h+toamQTzbZ3Ym zjLzLqFf75IsfRjcQr+TT3UuCpXzZGV03KQwUccSGQSoVZzZsMBZDFd0j8OEZnJY EAL7RnJB454R2P98xfLr2KeYqrkB7Qbvyox6Gyr/7BD1tZg7E5gHJue1QyWY5CqI lvDse8JDlVBe2bY6jHBJygs8CwYGOrpkddRFq5EKKZEWpjwhDH6Qz6WoNiG4pSIB DEKC73a6XwZ47XXJHwwmSxQjrSUGKnrabdcqk8l/22QyKdGAIKY= =9GDI -----END PGP SIGNATURE----- --KHR2k/wbdYz/qlL3--