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 1sTS1f-00GOSM-8l for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Jul 2024 20:10:23 +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 1sTS1d-00D5Xu-QF for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Jul 2024 20:10:21 +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 1sTS1d-00D5XO-GI for pgsql-hackers@lists.postgresql.org; Mon, 15 Jul 2024 20:10:21 +0000 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sTS1b-002Dm7-4B for pgsql-hackers@lists.postgresql.org; Mon, 15 Jul 2024 20:10:20 +0000 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-8076cee8088so146987839f.0 for ; Mon, 15 Jul 2024 13:10:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721074218; x=1721679018; darn=lists.postgresql.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=lIDmTIDXdgepWZ2fmjMlqOoQugQLLOJq/eNbsSKMsjQ=; b=lOHVgaqVuy3TV48xu7WxqDfwJ+MABi+z7T6d1cpkeZeXVbNxfaeNjqeDDhSyMeOlsR acxh80WX0SSDtjILz2d+JhuDbkAor9bLqg8w3UIejJUTVr0Xvi0/PfmmqOMCSVJ+joBP wyndYjBc742vkMghlWH545AvEaC2Aw629ex4kQTQGO6C3kP4qCHBfVuurrgdEYfnySpa EdfUJXQ2rg5QPABOK3c94jYVQG5v2NmOwGxKuEPty8yJk+EX59/71WnUNSvqk9LsXy8Y FYFHU0EVrxYM2PUl2W11qG2Nnu6hMXSfFGRZVH01i+D4YflusRwTiDUaY75F+oMq6u9T X3Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721074218; x=1721679018; h=in-reply-to:content-transfer-encoding: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=lIDmTIDXdgepWZ2fmjMlqOoQugQLLOJq/eNbsSKMsjQ=; b=fgzkT6aKTtV41G6c9A/IU6pnp8+oE1htpw5suUZf6WeMSY2XejnRgmoRdn3nSt3eQ+ jibkV5AFXWvL7w0+9goPJBdvdIBBTy23TPTm/psvZxTiiGjNw2wVadAPluqTkZcqy/Bo NF427ZmRsHL0TOS0txfe5IcKeLRGGCRr8xvmK/I+2xHBWBDp3tZuUcYscZ3k/319yGqu L3drkN+ZY6oWedKklCS0xE0iJHM+9vENqz6qhvDsA7aWykWi2cILKUu08OW2URHGHOX8 kKmn8+iqLrVIUoZrwSEKeG1jDjNLS+R4oPnjaf/AcPH7HtfnnleJW4FkRzj/X7Inj4hT ZvIw== X-Forwarded-Encrypted: i=1; AJvYcCWQoQKPNOztAulHcaCnApzQEbsy4yYMeB6OWtk1dkg8mWcE+zRlM433snlX5HmDI+4TOoPc6CA0MxD9EcyVpYEzK+CzWwN19KsGzQBZ80534ynP X-Gm-Message-State: AOJu0Yw7mSiXlLvg7Pj53xxJk96C8pmdSAV/GGCfVT6Vlggeb94HF614 UItqJciEo2Fpdvegeve+Qy9YuK8KoHFOmq87r9OkHsbzRSpT3KJP9hfqEQ== X-Google-Smtp-Source: AGHT+IG3UqGycKA6Kjldo7/MkE+csD1HUDAuTigMXRxhmFy+KCsuBDp5zz/5nhMQHNXCPiVN1K9M8g== X-Received: by 2002:a05:6602:2d8c:b0:7f6:85e8:3ced with SMTP id ca18e2360f4ac-81574639ef3mr27697339f.2.1721074217780; Mon, 15 Jul 2024 13:10:17 -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-4c1e1b0c355sm1390198173.9.2024.07.15.13.10.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 13:10:17 -0700 (PDT) Date: Mon, 15 Jul 2024 15:10:15 -0500 From: Nathan Bossart To: Robert Haas Cc: 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: <7c1b48d8-0f08-4733-a4e6-d55f04581db7@oss.nttdata.com> <8a668c51-c6af-4744-a978-c6a2ce3b1d83@oss.nttdata.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jul 15, 2024 at 04:03:13PM -0400, Robert Haas wrote: > On Mon, Jul 15, 2024 at 2:47 PM Nathan Bossart wrote: >> My understanding is that the correctness of this GUC check hook depends on >> wal_level being a PGC_POSTMASTER GUC. The check hook would always return >> true during startup, and there'd be an additional cross-check in >> PostmasterMain() that would fail startup if necessary. After that point, >> we know that wal_level cannot change, so the GUC check hook for >> summarize_wal can depend on wal_level. If it fails, my expectation would >> be that the server would just ignore that change and continue. > > But how do you know that, during startup, the setting for > summarize_wal is processed after the setting for wal_level? You don't, but the GUC check hook should always return true when summarize_wal is processed first. We'd rely on the PostmasterMain() check to fail in that case. -- nathan