public inbox for [email protected]  
help / color / mirror / Atom feed
From: Durgamahesh Manne <[email protected]>
To: Adrian Klaver <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Records count mismatch with logical replication
Date: Tue, 21 Jan 2025 23:36:50 +0530
Message-ID: <CAJCZkoLZb5ON_T-YecS3-1sQjiGUVLdgKjS93thQyzZKiaWuFQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAJCZko+gYNGiixGcqKAhjhLhUZ3QQg2rGs6nH7ZUNwTtjYLfGw@mail.gmail.com>
	<[email protected]>
	<CAJCZko+HhLFkiDLDPg3fscUEO4uWyEFT4_e6GBMeywnnwRC-rg@mail.gmail.com>
	<[email protected]>

On Tue, Jan 21, 2025 at 11:26 PM Adrian Klaver <[email protected]>
wrote:

> On 1/21/25 09:38, Durgamahesh Manne wrote:
> >
> >
>
> >
> > Hi Adrian Klaver
> >
> > Really Thanks for your quick response
> >
> > This happened during repack lag went to more than 350Gb then gradually
> > decreased to minimal lag after running pg_repack
>
> I don't use pg_repack so I don't know what effect it would have on the
> process.
> >
>
> > 3) Define how lag is being calculated and what 'minimal' is.
> >
> > postgres=> select
> > slot_name,pg_wal_lsn_diff(pg_current_wal_lsn(),restart_lsn) as
> bytes_behind,
> > pg_size_pretty(pg_wal_lsn_diff(pg_current_wal_lsn(), restart_lsn)) as
> > behind_size, active from pg_replication_slots;
> >    slot_name  | bytes_behind | behind_size | active
> > -------------+--------------+-------------+--------
> >   cls_eva_msa |     22906216 | 22 MB       | t
> >
> > 4) Define how the record counts are being derived.
> >    Source : archiving=> select count(*) from archiving.events_archive ;
> >    count
> > ---------
> >   1262908
> > (1 row)
> >
> > Destination : archiving=> select count(*) from archiving.events_archive ;
> >    count
> > ---------
> >   1252062
> > (1 row)
>
> 22,906,216 bytes/10,846 rows  works out to 2112 bytes per row.
>
> Is that a reasonable per row estimate?
>
> >
> > 5) The network distance between the servers.
> >
> >   Both are under same vpc security groups
> >
> > Regards
> > Durga Mahesh
>
> --
> Adrian Klaver
> [email protected]
>
>
Hi Adrian Klaver

22,906,216 bytes/10,846 rows  works out to 2112 bytes per row.

Is that a reasonable per row estimate?

Yes  sometimes would be vary

Regards,
Durga Mahesh


view thread (13+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Records count mismatch with logical replication
  In-Reply-To: <CAJCZkoLZb5ON_T-YecS3-1sQjiGUVLdgKjS93thQyzZKiaWuFQ@mail.gmail.com>

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

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