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 1sTBtV-00Dr05-OA for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Jul 2024 02:56:53 +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 1sTBtT-007lmp-VZ for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Jul 2024 02:56:51 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sTBtT-007lmh-Ld for pgsql-hackers@lists.postgresql.org; Mon, 15 Jul 2024 02:56:51 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sTBtQ-002AYM-KV for pgsql-hackers@lists.postgresql.org; Mon, 15 Jul 2024 02:56:50 +0000 Received: from [172.20.10.7] (sp49-97-70-242.msc.spmode.ne.jp [49.97.70.242]) by oss.nttdata.com (Postfix) with ESMTPSA id 421366007F; Mon, 15 Jul 2024 11:56:43 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at oss.nttdata.com Message-ID: <8a668c51-c6af-4744-a978-c6a2ce3b1d83@oss.nttdata.com> Date: Mon, 15 Jul 2024 11:56:42 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal Content-Language: en-US To: Robert Haas Cc: Nathan Bossart , pgsql-hackers@lists.postgresql.org References: <6e30082e-041b-4e31-9633-95a66de76f5d@oss.nttdata.com> <802ff3d5-fdc7-4b08-9046-2e9fc5fdae0e@oss.nttdata.com> <7c1b48d8-0f08-4733-a4e6-d55f04581db7@oss.nttdata.com> From: Fujii Masao In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2024/07/12 1:16, Robert Haas wrote: > On Thu, Jul 11, 2024 at 6:51 AM Fujii Masao wrote: >> It looks like the fast_forward field in WalSummarizerData is no longer necessary. >> >> So far, I haven't found any other issues with the patch. > > Thanks for reviewing. Regarding fast_forward, I think I had the idea > in mind that perhaps it should be exposed by > pg_get_wal_summarizer_state(), Understood. > but I didn't actually implement that. > Thinking about it again, I think maybe it's fine to just remove it > from the shared memory state, as this should be a rare scenario in > practice. What is your opinion? I don't think it's a rare scenario since summarize_wal can be enabled after starting the server with wal_level=minimal. Therefore, I believe such a configuration should be prohibited using a GUC check hook, as my patch does. Alternatively, we should at least report or log something when summarize_wal is enabled but fast_forward is also enabled, so users can easily detect or investigate this unexpected situation. I'm not sure if exposing fast_forward is necessary for that or not... Regarding pg_get_wal_summarizer_state(), it is documented that summarized_lsn indicates the ending LSN of the last WAL summary file written to disk. However, with the patch, summarized_lsn advances even when fast_forward is enabled. The documentation should be updated, or summarized_lsn should be changed so it doesn't advance while fast_forward is enabled. On 2024/07/12 3:00, Robert Haas wrote: > On Thu, Jul 11, 2024 at 6:51 AM Fujii Masao wrote: >> So far, I haven't found any other issues with the patch. > > Here is a new version that removes the hunks you highlighted and also > adds a test case. Thanks for updating the patch! LGTM. I have one small comment: +# This test aims to validate that takeing an incremental backup fails when "takeing" should be "taking"? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION