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 1sRYan-00GRvq-Je for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Jul 2024 14:46:49 +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 1sRYam-005v54-22 for pgsql-hackers@arkaria.postgresql.org; Wed, 10 Jul 2024 14:46:48 +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 1sRYal-005v4w-OL for pgsql-hackers@lists.postgresql.org; Wed, 10 Jul 2024 14:46:47 +0000 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sRYaj-001PC9-7K for pgsql-hackers@lists.postgresql.org; Wed, 10 Jul 2024 14:46:47 +0000 Received: by mail-io1-xd2d.google.com with SMTP id ca18e2360f4ac-7ebde93bf79so264334639f.1 for ; Wed, 10 Jul 2024 07:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720622803; x=1721227603; 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=hGtM5ix68smakjFLPQtQFwZJ4Y1DVwf34TjYFSfgyAY=; b=Ky5VY5glXIrLYJQRFMKp9exTWSykVQALDETpbnbzCa10znwgkO5EgmjvLmnNLpT3Um NQYZ3agPRyiymI2LF0I9NnEGaoWYpuPktol/yl51Aougzqke/HY2Bji/OK1m+xppdMy/ OXxKgtIv4dZc60G+BbP+JRj5eiqJTKMEyEScoCRD2uqdzO0zpubNw8MKI31WWBfj9OJh v98myVxOo8OUiohZG/S9d1AD1GFsUhykQF0IjOin207gQps//ET59D4T1dX9ccG+xSvU dI88krVnGP0gvUVU9buB539iQENl5jQ47wK/0nR6dYbZlIQQMB5yASqcyhvTDeL9UO6q tPEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720622803; x=1721227603; 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=hGtM5ix68smakjFLPQtQFwZJ4Y1DVwf34TjYFSfgyAY=; b=GwX6IRT9HXswCfDbwVVOMaCYLWTmxKOOlg1jbVibDvQpoj67sPc3Jqc45Ie+Q3uUOx 6pTwANxsWPBmZ0t5I04J1QGDbB8weS2JF6XW05Jj9HcnZ6n54xdT1nWvZQDfjbDsF067 BwBVIQ2nibHi6c7a58E+xvK0IExJUg0JAs8ez6YeCkT1Gj3vV2kRW4rG9ruhB/A0DmT7 W5q7coKA/VvUNX2ENImIuONEH5+h216P9UUsyNKsmTVY4Pn5gyJvi1sYGNQlIewy+pW7 rI98hA9/WIo0DTSREh2d97epYJBrDm3uzs/oeS5Kyl1hxdo6zqWC8xyRCmnYpHjK9zaw jjsQ== X-Forwarded-Encrypted: i=1; AJvYcCUeytrvy94uyyrXIapnAMWGKbf2/jF4bAQmTl5IiP2zLye8KPRgmAwLYTaJmerJrLiD6ZS6UtfxTndChB1lcqddUrnXwBwMGtVEn+K/4+vJu1xw X-Gm-Message-State: AOJu0YzSfQRswd+avpNhY0vuUixbAz0i4f9j6D3lRv8rt3o98wY6A2ty a2H6CnIi4bdlbez1B1zz7uuaikdvJkDFsk7lxIoPJVlwlyzz1dzq X-Google-Smtp-Source: AGHT+IFlEiGgSz97SLYjBjJ66KHfgdk+ruGjAgTK+/CdOjZDEV00GV79O59/5h+hXjQ4gFjgbZv3ag== X-Received: by 2002:a05:6602:164b:b0:7fa:e54a:ab3c with SMTP id ca18e2360f4ac-800023b5d18mr827061839f.13.1720622803513; Wed, 10 Jul 2024 07:46:43 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id ca18e2360f4ac-7ffea46eca7sm120418639f.26.2024.07.10.07.46.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jul 2024 07:46:43 -0700 (PDT) Date: Wed, 10 Jul 2024 09:46:41 -0500 From: Nathan Bossart To: Jelte Fennema-Nio Cc: Robert Haas , Fujii Masao , 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jul 10, 2024 at 04:29:14PM +0200, Jelte Fennema-Nio wrote: > On Wed, 10 Jul 2024 at 16: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' > > I think that issue can be solved fairly easily by making the guc > check_hook always pass during postmaster startup (by e.g. checking > pmState), and relying on the previous startup check instead during > startup. I was actually just thinking about doing something similar in a different thread [0]. Do we actually need to look at pmState? Or could we just skip it if the context is <= PGC_S_ARGV? [0] https://postgr.es/m/Zow-DBaDY2IzAzA2%40nathan -- nathan