Re: Add support for specifying tables in pg_createsubscriber.
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Euler Taveira <euler@eulerto.com>
Cc: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>,
Peter Smith <smithpb2250@gmail.com>, Shubham Khanna <khannashubham1197@gmail.com>,
vignesh C <vignesh21@gmail.com>, "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-09-12T05:05:09Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Support existing publications in pg_createsubscriber.
- 85ddcc2f4cde 19 (unreleased) landed
On Thu, Sep 11, 2025 at 6:34 PM Euler Taveira <euler@eulerto.com> wrote: > > On Tue, Sep 9, 2025, at 11:34 PM, Zhijie Hou (Fujitsu) wrote: > > On Wednesday, September 3, 2025 9:58 AM Peter Smith > > <smithpb2250@gmail.com> wrote: > >> > >> AFAICT, these problems don't happen if you allow a reinterpretation of > >> --publication switch like Euler had suggested [1]. The dry-run logs > >> should make it clear whether an existing publication will be reused or > >> not, so I'm not sure even that the validation code (checking if the > >> publication exists) is needed. > >> > >> Finally, I think the implementation might be simpler too -- e.g. fewer > >> rules/docs needed, no option conflict code needed. > > > > I'm hesitant to directly change the behavior of --publication, as it seems > > unexpected for the command in the new version to silently use an existing > > publication when it previously reported an ERROR. Although the number of users > > relying on the ERROR may be small, the change still appears risky to me. > > > > I don't buy this argument. Every feature that is not supported emits an error. > You can interpret it as (a) we don't support using existing publications until > v18 but we will start support it from now on or (b) it is a hard error that we > shouldn't allow, hence, stop now. I would say this case is (a) rather than (b). > Yeah, I am also not sure that it is worth adding a new option to save backward compatibility for this option. It seems intuitive to use existing publications when they exist, though we should clearly document it. -- With Regards, Amit Kapila.