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 1sRaCY-00GhTB-9t for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Jul 2024 16:29:54 +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 1sRaCW-007FNL-Q5 for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Jul 2024 16:29:52 +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 1sRaCW-007FND-GB for pgsql-hackers@lists.postgresql.org; Wed, 10 Jul 2024 16:29:52 +0000 Received: from mail-io1-xd33.google.com ([2607:f8b0:4864:20::d33]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sRaCU-001Q5K-DD for pgsql-hackers@lists.postgresql.org; Wed, 10 Jul 2024 16:29:51 +0000 Received: by mail-io1-xd33.google.com with SMTP id ca18e2360f4ac-7f3c5af0a04so331518539f.0 for ; Wed, 10 Jul 2024 09:29:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720628988; x=1721233788; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=U2REEBUrN81iXBb60JR4QTITw3O9n6Z695SNrA7zHyM=; b=kX4KWPpNz9C2S+m7wRjrdzSPZXnRxeRSZBqp6Gvdov+hkeS3aVsKakUKx/0bcT6CVz IuvVUzbdE3st5gd80NBJwQCnLhoXXYLquBq1bhFKRqrKTzBjhliGUT2RO9pDWR4wsFpF /JoS3cn7/ILe3SSuES8WF0RvoLUXLyWgiAAlabPda7iwAbUs/nE4HX3p/O6EXPnUYidJ uBszkMtqtbZb86/z+sqvRKJfmJF+c+7IfPZGLH/lYV/uKP6EL/SUsxd3hX4s5kpfd+7z JjOnB/joLXG7spLvyc4g1/Khj5S7t9iDprkOv4oi+Znkf00JbbgpjcsxlAo1PRZ331mM eyOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720628988; x=1721233788; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=U2REEBUrN81iXBb60JR4QTITw3O9n6Z695SNrA7zHyM=; b=jPl78eQhUeiqJfyXU5JMahfpN9PoDBQNr8qD7cwzQgL10WcmEuKHHkwChkKuUs3p+o Kj+szjlOEccqHSU7i81LAilrQfvPOsnO9ONHVUpn9I37MnzNyVubqZw4GYVwML6DPWsw cwq/rO/pFE6S4bbq6RidNrTu99U1hEyT679nR7igUW9otG94VWtIG7aDkRa+hdK2WC8L 8Hmrfa0sM+PZTQypiEmQ/TGRXmnC67xuxPrM27FKUPou5u/iAK//+uotG3PSYWKwZTK1 5ADN41mc3B/1JsWOHwj7zbf29CTbsxtB7LGX0Fq+z3XiE3OZE1jYU0XhgLnyw9PN1UhG vYsg== X-Forwarded-Encrypted: i=1; AJvYcCWug1s/soOQSU08EML9UFE9c3JbdpjMkXf1jBsa2fSbFKrOL3FLCyD2x5dAUaKv+01wOPGTK/Dn774dpWKyjEfIgYdTJ9+INE6WEibn1IxZeoBG X-Gm-Message-State: AOJu0Yz8sCS6kkTxFfUzyXBDHovrk2ZjUzahuv8p5VqvSnaybYbhXUXw g7Et5agTGl3QNq1R4DkDOOBT978BLQlzvoBazZjTkUfpJJy8ayDJ X-Google-Smtp-Source: AGHT+IHYs7uAtrH4VzsQenrAOjDFl1YpBdpv/Kltb+vmrJiKR5KfWvPiJWzgXa498+66G9T7tqzW+Q== X-Received: by 2002:a6b:d005:0:b0:805:bc4a:d44a with SMTP id ca18e2360f4ac-805bc4ad45dmr155354339f.12.1720628988396; Wed, 10 Jul 2024 09:29:48 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4c0b1c2c81asm1243065173.174.2024.07.10.09.29.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jul 2024 09:29:48 -0700 (PDT) Date: Wed, 10 Jul 2024 11:29:46 -0500 From: Nathan Bossart To: Fujii Masao Cc: Robert Haas , pgsql-hackers@lists.postgresql.org Subject: Re: Add a GUC check hook to ensure summarize_wal cannot be enabled when wal_level is minimal Message-ID: 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> <523cc094-0fe1-4e2c-9653-a3cf9cde0c49@oss.nttdata.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <523cc094-0fe1-4e2c-9653-a3cf9cde0c49@oss.nttdata.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Jul 11, 2024 at 01:02:25AM +0900, Fujii Masao wrote: > On 2024/07/10 23:18, Nathan Bossart wrote: >> Yeah. I initially thought this patch might be okay, at least as a stopgap, >> but Jelte pointed out a case where it doesn't work, namely when you have >> something like the following in the config file: >> >> wal_level = 'minimal' >> summarize_wal = 'true' >> wal_level = 'logical' > > Unless I'm mistaken, the patch works fine in this case. If the check_hook > triggered every time a parameter appears in the configuration file, > it would mistakenly detect wal_level=minimal and summarize_wal=on together > and raise an error. However, this isn't the case. The check_hook is > designed to trigger after duplicate parameters are deduplicated. > Am I missing something? After further research, I think you are right about that. -- nathan