Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgJqX-000h4j-Iw for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Aug 2024 08:04:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sgJqV-00BjQj-L2 for pgsql-hackers@arkaria.postgresql.org; Tue, 20 Aug 2024 08:04:04 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sgJqV-00BjJt-9U for pgsql-hackers@lists.postgresql.org; Tue, 20 Aug 2024 08:04:03 +0000 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sgJqT-000XIS-EL for pgsql-hackers@lists.postgresql.org; Tue, 20 Aug 2024 08:04:02 +0000 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-42817f1eb1fso41645375e9.1 for ; Tue, 20 Aug 2024 01:04:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aiven.io; s=google; t=1724141040; x=1724745840; darn=lists.postgresql.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iUuy2yToRqmFY7CpE+jCkzj03C42s/XZ31VFIZLFwgM=; b=OmLk9m/skHBzakY2m7E+zCvnw1jxrmxGNSsZ9526dZO5bo/02+9DFBL9Qn1IRlYxxz Iwp792uvd9GB9+xMffqWEL1j0llANYDwJ1YP5FDZa9BzgK46kIR0qy5UFmGIsJ2TKBi+ b6fyQo0HfuW2vc0526rzVtVzC2NhX3zpl22lY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724141040; x=1724745840; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iUuy2yToRqmFY7CpE+jCkzj03C42s/XZ31VFIZLFwgM=; b=iCpEHpnyGNCiPlwVudmgqxy6WR/xgVl70K6lvaEuoCQQYIpuE9RTJG3sIay888miMu a0IcMql2EH+Ettt9nILk4wwuJeziBY7yYJOkIAUtpUwIHLmfwjzA/gMy8z51ThEYa1ie 8bnIY9KWoliGkibyrNknSxXdfnmIabUIxhWNMLlL1T+Hop/3pmX+0raa4Oi6mRLB0yEN eukBPHfl34/Kvkyx03p0C2OyiuySkbNuIWJiIVnOjOjahYwZOrDSIvCK29cmE+zkfe/b ehOkIO9KPbfLhgccMkQojAngm1MuEb73jKcSQVE41R1CrFkgBXLc81kV3IWXK0a88wgW 39qw== X-Forwarded-Encrypted: i=1; AJvYcCXqWOVXQR7gDmN17V0HkwXGUYsxLoX3f7Ykn43glbo+uHjNAIX7T2nRI3W0rGRbXknQQzHU/uczbkQtVpku@lists.postgresql.org X-Gm-Message-State: AOJu0Yz8BQy36xkrDVQD6jCMyh+sb4DexvVJ9hFQIOjsKGfWM5wps3M1 nn5m6PIbK3Vq3PbA9C1HzV57BaEbX5qPOYAYq8RR5BxqOi6ZX3eIXzw8anI76dA6Q2wslIIUmP4 8 X-Google-Smtp-Source: AGHT+IFsLOrogcXtwMHx92KvZbtjqg9U+mMkDlRIiuZw6yWqZ8LRipDSRQQhDqksZVRt7rz6QkBwdQ== X-Received: by 2002:a05:600c:3152:b0:427:dae6:8416 with SMTP id 5b1f17b1804b1-429ed7d3583mr79944345e9.36.1724141039763; Tue, 20 Aug 2024 01:03:59 -0700 (PDT) Received: from aivenlaptop.localnet ([45.13.105.93]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429ed648f4asm134429035e9.5.2024.08.20.01.03.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2024 01:03:59 -0700 (PDT) From: Ronan Dunklau To: Fujii Masao , Tom Lane Cc: Stephen Frost , pgsql-hackers@lists.postgresql.org Subject: Re: Provide a pg_truncate_freespacemap function Date: Tue, 20 Aug 2024 10:03:58 +0200 Message-ID: <12508648.O9o76ZdvQC@aivenlaptop> In-Reply-To: <535627.1721540353@sss.pgh.pa.us> References: <5446938.Sb9uPGUboI@aivenlaptop> <8acb1f83-2945-42cf-8795-780c94bbed36@oss.nttdata.com> <535627.1721540353@sss.pgh.pa.us> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Le dimanche 21 juillet 2024, 07:39:13 UTC+2 Tom Lane a =C3=A9crit : > Fujii Masao writes: > >> Le mercredi 6 mars 2024, 20:28:44 CET Stephen Frost a =C3=A9crit : > >>> I agree that this would generally be a useful thing to have. >=20 Sorry for the late reply, as I was not available during the late summer. > Personally, I want to push back on whether this has any legitimate > use-case. Even if the FSM is corrupt, it should self-heal over > time, and I'm not seeing the argument why truncating it would > speed convergence towards correct values. Worse, in the interim > where you don't have any FSM, you will suffer table bloat because > insertions will be appended at the end of the table. So this > looks like a foot-gun, and the patch's lack of user-visible > documentation surely does nothing to make it safer. > (The analogy to pg_truncate_visibility_map seems forced. > If you are in a situation with a trashed visibility map, > you are probably getting wrong query answers, and truncating > the map will make that better. But a trashed FSM doesn't > result in incorrect output, and zeroing it will make things > worse not better.) Now that the other patch for self-healing is in, I agree it may not be that= =20 useful. I'm withdrawing the patch and will keep it in mind if we encounter= =20 other FSM issues in the future. Best regards, =2D- Ronan Dunklau