Re: speed up a logical replica setup - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: speed up a logical replica setup
Date
Msg-id e866a9dd-a783-4100-a152-dc3992474fb6@eisentraut.org
Whole thread Raw
In response to Re: speed up a logical replica setup  (vignesh C <vignesh21@gmail.com>)
List pgsql-hackers
On 19.03.24 16:24, vignesh C wrote:
> The problem with this failure is that standby has been promoted
> already and we will have to re-create the physica replica again.
> 
> If you are not planning to have the checks for name length, this could
> alternatively be fixed by including database id also while querying
> pg_subscription like below in set_replication_progress function:
> appendPQExpBuffer(str,
> "SELECT oid FROM pg_catalog.pg_subscription \n"
> "WHERE subname = '%s' AND subdbid = (SELECT oid FROM
> pg_catalog.pg_database WHERE datname = '%s')",
> dbinfo->subname,
> dbinfo->dbname);

Yes, this is more correct anyway, because subscription names are 
per-database, not global.  So you should be able to make 
pg_createsubscriber use the same subscription name for each database.





pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Reducing output size of nodeToString
Next
From: Sushrut Shivaswamy
Date:
Subject: Re: Read data from Postgres table pages