Replication sequence

From: Paolo Saudin <paolosaudin(at)gmail(dot)com>
To: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Replication sequence
Date: 2021-02-15 17:55:14
Message-ID: CADtZQgnz9AvzigpeSBAyT53TrZRF42DqZVN7SscpN2DMkJDTYQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(at)db-srv1:~$ psql
psql (9.5.19)
cf-db-srv1:5432 postgres(at)rete_llpp=# SELECT last_value FROM
bobo.menu_pages_mp_id_seq;
┌────────────┐
│ last_value │
├────────────┤
│ 74 │
└────────────┘
cf-db-srv1:5432 postgres(at)rete_llpp=# select count(*) from bobo.menu_pages;
┌───────┐
│ count │
├───────┤
│ 74 │
└───────┘

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marc Millas 2021-02-15 17:55:26 Re: prepare in a do loop
Previous Message Adrian Klaver 2021-02-15 17:30:55 Re: How to post to this mailing list from a web based interface