pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>
Cc: Shlok Kyal <shlok.kyal.oss@gmail.com>
Cc: Noah Misch <noah@leadboat.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc.
Date: Mon, 10 Aug 2026 11:11:27 -0400
Message-ID: <1927407.1786374687@sss.pgh.pa.us> (raw)
In-Reply-To: <68d2a8e0e373294cb04910dd080ad1d04421fde8.camel@j-davis.com>
References: <20260710195902.4f.noahmisch@microsoft.com>
	<65960c946d048687a254501dcfedf23956968620.camel@j-davis.com>
	<CAA4eK1KEnEAW8UWEwxf5UGxE7Qttf3=AnobuxVZUr9e9TiQnqg@mail.gmail.com>
	<d7d168cb94fb5543fd603a4deb79e4a253a5725a.camel@j-davis.com>
	<CANhcyEWRTw6-eD94q2e=MuwUYDqpkmaVQsOK8ZE1L2t+NjoDFg@mail.gmail.com>
	<CAA4eK1LpnhyRA2-CuHTPQZG_kXnhi8PegEHdinv=iEQ-pHZYaQ@mail.gmail.com>
	<95a4a0d1f9b1a2e9d2e339b41b532131571150af.camel@j-davis.com>
	<1787286.1786328153@sss.pgh.pa.us>
	<68d2a8e0e373294cb04910dd080ad1d04421fde8.camel@j-davis.com>

Jeff Davis <pgsql@j-davis.com> writes:
> On Sun, 2026-08-09 at 22:15 -0400, Tom Lane wrote:
>> AFAICS, it's right: if stmt->servername is set while opts.connect is
>> not, we'll arrive at this step with serverid filled in but conninfo
>> still NULL.  Even if there's some upstream reason why that
>> combination can't occur, this is pretty fragile-looking code.

> The code relies on the grammar setting either stmt->servername or stmt-
> >conninfo, but not both. I agree that the control flow shouldn't rely
> on that, and the code could be more clear anyway. Patch attached.

Looks good to me, I guess we'll have to see whether it satisfies
Coverity.  (But if not, we can just dismiss that complaint.)

			regards, tom lane






view thread (27+ messages)  latest in thread

Message-ID: <1927407.1786374687@sss.pgh.pa.us>
Permalink:  ../1927407.1786374687@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1927407.1786374687@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql@j-davis.com, amit.kapila16@gmail.com, shlok.kyal.oss@gmail.com, noah@leadboat.com
  Subject: Re: CREATE SUBSCRIPTION ... SERVER vs. pg_dump, etc.
  In-Reply-To: <1927407.1786374687@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox