From: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com> |
---|---|
To: | 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com>, Zane Duffield <duffieldzane(at)gmail(dot)com> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | RE: Check for existing replication slot in pg_createsubscriber |
Date: | 2025-06-30 12:43:01 |
Message-ID: | OSCPR01MB1496638193FB2705CD34EEC4BF546A@OSCPR01MB14966.jpnprd01.prod.outlook.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Dear Amit, Zane,
> Okay, I find your case a good reason to add such a check, apart from
> making the code consistent in terms of these checks. One thing I was
> thinking is whether it makes sense to add these checks only in
> --dry-run mode because we normally don't expect such conflicts.
> Otherwise, each such check adds an additional network round-trip.
I think there are two things which can be checked on the command side. One task is
to see the duplication of names. It can be done by connecting to nodes once and
run SQLs. To avoid the round-trip, this could be added for dry run mode.
Another one is slot-name validation. For now, it completely relies on the publisher
side, but it is better to detect earlier. Currently ReplicationSlotValidateName()
does the validation, and we can move it to under common/ directory to allow
server/client side can use the function. This does very fundamental validation
for the string and may be able to do in both dry run/normal mode.
Best regards,
Hayato Kuroda
FUJITSU LIMITED
From | Date | Subject | |
---|---|---|---|
Next Message | Nazir Bilal Yavuz | 2025-06-30 13:01:04 | Improve error reporting in 027_stream_regress test |
Previous Message | Sami Imseih | 2025-06-30 12:37:08 | Re: Improve explicit cursor handling in pg_stat_statements |