pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paolo Saudin <paolosaudin@gmail.com>
To: PostgreSQL <pgsql-general@postgresql.org>
Subject: Replication sequence
Date: Mon, 15 Feb 2021 18:55:14 +0100
Message-ID: <CADtZQgnz9AvzigpeSBAyT53TrZRF42DqZVN7SscpN2DMkJDTYQ@mail.gmail.com> (raw)

Hi all,
I have two servers, a primary and a secondary one with a streaming replica
setup.
Today I noticed that some sequences are not lined-up, the replica ones are
well ahead, while the records number is the same. How is it possible?

Thanks,
Paolo

--
-- primary server
--
postgres@db-srv1:~$ psql
psql (9.5.19)
cf-db-srv1:5432 postgres@rete_llpp=# SELECT last_value FROM
bobo.menu_pages_mp_id_seq;
┌────────────┐
│ last_value │
├────────────┤
│         74 │
└────────────┘
  cf-db-srv1:5432 postgres@rete_llpp=# select count(*) from bobo.menu_pages;
┌───────┐
│ count │
├───────┤
│    74 │
└───────┘

--
-- replica server
--
postgres@db-srv2:~$ psql
psql (9.5.24)
cf-db-srv2:5433 postgres@rete_llpp=# SELECT last_value FROM
bobo.menu_pages_mp_id_seq;
┌────────────┐
│ last_value │
├────────────┤
│        105 │
└────────────┘
cf-db-srv2:5433 postgres@rete_llpp=# select count(*) from bobo.menu_pages;
┌───────┐
│ count │
├───────┤
│    74 │
└───────┘


view thread (7+ messages)  latest in thread

Message-ID: <CADtZQgnz9AvzigpeSBAyT53TrZRF42DqZVN7SscpN2DMkJDTYQ@mail.gmail.com>
Permalink:  ../CADtZQgnz9AvzigpeSBAyT53TrZRF42DqZVN7SscpN2DMkJDTYQ@mail.gmail.com/
Also on:    postgresql.org/message-id/CADtZQgnz9AvzigpeSBAyT53TrZRF42DqZVN7SscpN2DMkJDTYQ@mail.gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: paolosaudin@gmail.com
  Subject: Re: Replication sequence
  In-Reply-To: <CADtZQgnz9AvzigpeSBAyT53TrZRF42DqZVN7SscpN2DMkJDTYQ@mail.gmail.com>
  References: <CADtZQgnz9AvzigpeSBAyT53TrZRF42DqZVN7SscpN2DMkJDTYQ@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox