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 1rB7ww-009Y5h-6L for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Dec 2023 06:33:30 +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 1rB7wu-00FNxO-S5 for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Dec 2023 06:33:28 +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 1rB7wu-00FNwu-IZ for pgsql-hackers@lists.postgresql.org; Thu, 07 Dec 2023 06:33:28 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rB7ws-00AVr3-2t for pgsql-hackers@postgresql.org; Thu, 07 Dec 2023 06:33:27 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-50bef9b7a67so327083e87.1 for ; Wed, 06 Dec 2023 22:33:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701930805; x=1702535605; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=FOJOZtInONum4GQVboOu3lTJYNMh8p8ObfQjFlXg8sE=; b=Oxoa9Vwhx5BOaVTyR+HHwmLoH78OiQHYAMrHWqXKRacsI8K7Bw5b86yf1XsV+cKnzV o7goFS8ZbZ+kH1BaF6FY54cmcfXhQoMv4aEbbASXk5E2i6kvPYhhlclfkwtPZ98tmqdg QU1WrNZRTh8cfPqUgX0x22K2Q0IwXLoVhq3W8WCXjzbGdTDLIel9zcVIiDIUPXIdtxSs 9denQUUc7sqkgP4xYuoC2EhMWTi4wcaHzSDy4HJXMAN+p+b9deuwRnI3x41VKnruoahb GqJ9ybclJsiDojm44l6qsQBNEtmH+z2NPoyo0eIbiQ9CRcs3T49fbgbFV7GDWCC2Fgeq dSFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701930805; x=1702535605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FOJOZtInONum4GQVboOu3lTJYNMh8p8ObfQjFlXg8sE=; b=Gj30FianOrNwcTBMRNcW+dIYq7C21xwy4+yt5MAwNMDSZUIf7KLQMFl2yFCHANxaqN ho4Uu2nW17KrGWnzRb02sqsKoFq2/z1UTH3MKq9hXlYOveD/04DMUz3pFOPPBh2BU8cI rNbqJeBDwbBWN5TLpxklgLet4Yy91u+mYBWQv4nux31PkSEEhDsIjlLX9s3geE6Ya+eQ 1QE7wENyDweX8qMIb9FMFM9IF3KZ++SNncnlM/xhfSrh0fipBhNkXfyKzbXBf/PBb5dA 1tJ1elRr2hS4TQ0Gj4LtLY/8d8PZpJXG6I1r/kjnLMuqymG2S6uv3G3GrmrVtYFDBU4n XSDg== X-Gm-Message-State: AOJu0Ywwfs0f8nCFWlfvXI1Pi9/11mT3QpqILhSKKDfNsLv3yXWkcs+W Sd6sTuFDXHFPmg7ojNQl44mW2vYdO5Pb565RQn5f0aJeb1k= X-Google-Smtp-Source: AGHT+IECyIwk0H1/LbWNE/8xklqJsgmKyyxufUTKyXfHg+aruSCjELXEbjVCRmVXpj9na34JOuIsSoHKtuPyEj6fj7I= X-Received: by 2002:ac2:5983:0:b0:50b:feb2:dac9 with SMTP id w3-20020ac25983000000b0050bfeb2dac9mr1054982lfn.2.1701930805025; Wed, 06 Dec 2023 22:33:25 -0800 (PST) MIME-Version: 1.0 References: <20220209231426.yngtrhioymltdblx@alap3.anarazel.de> <1521416.1644451001@sss.pgh.pa.us> <20220210003336.qi7voj352cpiymms@alap3.anarazel.de> In-Reply-To: <20220210003336.qi7voj352cpiymms@alap3.anarazel.de> From: David Rowley Date: Thu, 7 Dec 2023 19:33:13 +1300 Message-ID: Subject: Re: catalog access with reset GUCs during parallel worker startup To: Andres Freund Cc: Tom Lane , pgsql-hackers@postgresql.org, Robert Haas Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 10 Feb 2022 at 13:33, Andres Freund wrote: > Postmaster's GUC state will already be loaded via read_nondefault_variables(), > much earlier in startup. Well before bgworkers get control and before > transaction environment is up. > > Setting a watchpoint on enableFsync, in a parallel worker where postmaster > runs with enableFsync=off, shows the following: The following comment in RestoreGUCState() starting with "since the leader's" seems to indicate this step is required. > * but already have their default values. Thus, this ends up being the > * same test that SerializeGUCState uses, even though the sets of > * variables involved may well be different since the leader's set of > * variables-not-at-default-values can differ from the set that are > * not-default in this freshly started worker. I'm just not quite clear on which cases this could be. Looking at InitializeOneGUCOption(), the newval comes from conf->boot_val, which, for built-in GUCs just comes from the ConfigureNames* table in guc_tables.c. Perhaps there could be variances in values that are passed during the call to DefineCustom*Variable between the leader and the worker in some extension's code. David