Re: Records count mismatch with logical replication - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Records count mismatch with logical replication
Date
Msg-id aa3168eb-f529-4e4a-bcb7-e01140ef5b3f@aklaver.com
Whole thread Raw
In response to Re: Records count mismatch with logical replication  (Durgamahesh Manne <maheshpostgres9@gmail.com>)
Responses Re: Records count mismatch with logical replication
List pgsql-general
On 1/22/25 18:53, Durgamahesh Manne wrote:
> 
> 
> 

>  > But records count varies with difference of more than 10 thousand
> 
> Have you looked at the I/0 statistics between the Postgres instances?
> 
> Seems everything looks good with pg replication slots

Except the subscriber is lagging behind the publisher.

'... everything looks good' is an opinion not actual data.

> 
> Does this pg logical slot get changes function help to pull pending 
> changes to subscription that can be sync with publication server for 
> real time sync ?

Are you referring to this?:

https://www.postgresql.org/docs/current/warm-standby.html#SYNCHRONOUS-REPLICATION

Though I am not sure you want to do this as from above:

"When requesting synchronous replication, each commit of a write 
transaction will wait until confirmation is received that the commit has 
been written to the write-ahead log on disk of both the primary and 
standby server. The only possibility that data can be lost is if both 
the primary and the standby suffer crashes at the same time. This can 
provide a much higher level of durability, though only if the sysadmin 
is cautious about the placement and management of the two servers. 
Waiting for confirmation increases the user's confidence that the 
changes will not be lost in the event of server crashes but it also 
necessarily increases the response time for the requesting transaction. 
The minimum wait time is the round-trip time between primary and standby."

If you are not referring to above then you will need to explain further.

> 
> Regards,
> Durgamahesh
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com




pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Return of the pg_wal issue..
Next
From: Adrian Klaver
Date:
Subject: Re: Return of the pg_wal issue..