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.96) (envelope-from ) id 1vgF9s-009qDW-02 for pgsql-pkg-debian@arkaria.postgresql.org; Thu, 15 Jan 2026 04:40:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vgF9r-00Efzt-0i for pgsql-pkg-debian@arkaria.postgresql.org; Thu, 15 Jan 2026 04:40:31 +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.96) (envelope-from ) id 1vgF9r-00Efzl-01 for pgsql-pkg-debian@lists.postgresql.org; Thu, 15 Jan 2026 04:40:31 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vgF9o-000YSQ-1O for pgsql-pkg-debian@lists.postgresql.org; Thu, 15 Jan 2026 04:40:30 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-47edd6111b4so4479735e9.1 for ; Wed, 14 Jan 2026 20:40:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1768452027; x=1769056827; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=sG6Q60y2QK9Vfpdpg4TYwCEMzV5WvWOXBt1RP+jLojo=; b=A3+WTCM81+fYwfRCbuyzTZFk+XKdo805vI2XlcrlqKKrIyKIe8piaiG/dnKXIDyo6E ZQrl0F4Drtzp4AEOxo4Xij7NwaMJJcrrowoVC2PB9PrNRCaygHIPXKTOOLTO3JGrxmJK nRVnAAkeLNhwlIXt2D73dyW53E8KvOTbSKb0zcpQVkAB6aoEMcZXAimKmZOoECjTLNy+ 9UYZ9OJvRBJJYZecLpNyzmtvqaJTp0Uy02x5ni/QODEoICWWYr4YusVT5htYIi8S1hr2 JaUANAuN5atBW7xFkH2naPgx4sRQyUaMlsALfUeENjzKjTmDAKFKHvbg9msq+wflxKgf iE0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768452027; x=1769056827; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sG6Q60y2QK9Vfpdpg4TYwCEMzV5WvWOXBt1RP+jLojo=; b=kXyjUnNylVniomzbohvFBXsazlx1lxuKgva63HwpZxSGOk+QIzkZqTvGu+Y16uMJwk KXvczzk9WGuCR1dh8QRYhQ/3DRpLYOzd4A60WCDyjPIt9GYe62jvCODBpYP54+5fNRlp +5X+1C6bO+2Gl9cvoAwYEeA708jgxXuDeKDYBfwVepQYJ4Maf9fqj7rjkBuprax10oAl mMXtHvMPg5u0iwwGaNOj47MqKmqHUDFKo1uBagrsee2eiLnBBZCrfhQQhbDgk4MzXgJ7 CrHSi/atz2Ar5H4LBwqOzp66PxOWQvivwCT/9D5udQn+isMuEVZDbzPlgmPpr7clgAu+ 8cEQ== X-Gm-Message-State: AOJu0YwkVwnD4XfbAwf6k7qDjegbIEpmPOHRuJ7DyTAu8n0b0Afg27P7 wNskC1Vkmvk61yFSJJ3lL2qYBtMnUiHprd5gy4xQcWZJnGus0kAQHR5NQB/5Ze4wHAE= X-Gm-Gg: AY/fxX7Wh4GVRSDfIooGFWJtoeY1h8zeL7rkcIOeqJWcLotc+a4J8UK/oX771rcQHCt DzzWNVp65+jfICoVirEBnI9K8PMJ2C1RkCe6EE8lVy/xl4A/gafvF83n+92Vf2j1aSXF/hUZx/g HpMaO/Gr7elE3LnD9ogLal8gdb98tQdumMQcJctmu0pRJRLOcq7WkVg8TPOArqt3iTHaqLv6j/I U55hL7WHFOJ4p2aYRWbKJDIa9iD6XIjwapdMQm0FOGfsmBHrDaP7+Z6rU34F6rgnLPd+W8p2AzQ 8pjf9Zx9V4KRZYrZ4LWNBd8pm7k/Y70wZ5Yz23jhdSYoqj+ToIC52uEySb9p8JQbcWWNPkQQVTk VmR4Zzl9YjlCvlby487iEI0/TSI3Z++eecQ76wa4wg1R8o+MfPmn3lOtxnJQNIBcXArWKsRfYzO BG2BxP1ZjV+pFopI6+apD1N2SBv3I0IvszmDEqY2J3 X-Received: by 2002:a05:600c:4e8d:b0:477:9caa:1a26 with SMTP id 5b1f17b1804b1-47ee483ea83mr20061535e9.29.1768452027130; Wed, 14 Jan 2026 20:40:27 -0800 (PST) Received: from laurenz.albe-K4N0CV00F97414D ([46.151.204.202]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47f428cebdcsm24303135e9.12.2026.01.14.20.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jan 2026 20:40:26 -0800 (PST) Message-ID: Subject: Re: pg_upgradecluster and synchronous replication From: Laurenz Albe To: Christoph Berg Cc: pgsql-pkg-debian@lists.postgresql.org Date: Thu, 15 Jan 2026 05:40:26 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.2 (3.58.2-1.fc43) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 2026-01-14 at 20:54 +0100, I wrote: > On Wed, 2026-01-14 at 20:39 +0100, Christoph Berg wrote: > >=20 > > Maybe we should instead change the analyze hook script to do that > > internally? Setting PGOPTIONS should be enough: > >=20 > > =C2=A0=C2=A0=C2=A0 PGOPTIONS=3D"-csynchronous_commit=3Dlocal" > >=20 > >=20 > > There is already some code in pg_upgradecluster that works around > > black magic problems: > >=20 > > =C2=A0=C2=A0=C2=A0 # ensure we can upgrade DBs with default read-only t= ransactions > > =C2=A0=C2=A0=C2=A0 $ENV{PGOPTIONS} .=3D " -cdefault_transaction_read_on= ly=3Doff"; > >=20 > > This would just add one more wart of that kind. >=20 > That looks like a better way to do it, I agree. >=20 >=20 > at makes me wonder. I don't think that it is a great idea to start the c= luster for > production with "synchronous_commit" set to a non-standard value. That w= ould mask the > problem initially, but whenever the cluster is restarted, the parameter i= s back to its > original value, and suddenly things will stop working. Forget that: I missed that with PGOPTIONS, the setting is only changed for the database session that performs the ANALYZE, not for the entire server runtime. Yes, I think that is the proper solution! Yours, Laurenz Albe