Re: Failing streaming replication on PostgreSQL 14

From: Ron Johnson <ronljohnsonjr(at)gmail(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Failing streaming replication on PostgreSQL 14
Date: 2024-04-15 12:36:42
Message-ID: CANzqJaCYMiFCdy2hd7ZVhhspB6Y4CiWPFyVdLY36vxSX+NSfCQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Apr 15, 2024 at 2:53 AM Nicolas Seinlet <nicolas(at)seinlet(dot)com> wrote:

> Hello everyone,
>
> Since I moved some clusters from PostgreSQL 12 to 14, I noticed random
> failures in streaming replication. I say "random" mostly because I haven't
> got the source of the issue.
>
> I'm using the Ubuntu/cyphered ZFS/PostgreSQL combination. I'm using Ubuntu
> LTS (20.04 22.04) and provided ZFS/PostgreSQL with LTS (PostgreSQL 12 on
> Ubuntu 20.04 and 14 on 22.04).
>
> The streaming replication of PostgreSQL is configured with
> `primary_conninfo 'host=main_server port=5432 user=replicant
> password=a_very_secure_password sslmode=require
> application_name=replication_postgresql_app' ` , no replication slot nor
> restore command, and the wal is configured with `full_page_writes = off
> wal_init_zero = off wal_recycle = off`
>
> If this works like a charm on PostgreSQL 12, it's sometimes failing with
> PostgreSQL 14. As we also changed the OS, maybe the issue relies somewhere
> else.
>
> When the issue is detected, the WAL on the primary is correct. A piece of
> the WAL is wrong on the secondary. Only some bytes. Some bytes later, the
> wal is again correct. Stopping PostgreSQL on the secondary, removing the
> wrong WAL file, and restarting PostgreSQL solves the issue.
>
> We've added another secondary and noticed the issue can appear on one of
> the secondaries, not both at the same time.
>
> What can I do to detect the origin of this issue?
>

1. Minor version number?
2. Using replication_slots?
3. Error message(s)?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2024-04-15 12:48:58 Re: efficiency random values / sequential ID values in indexes
Previous Message Sanjay Minni 2024-04-15 10:04:21 efficiency random values / sequential ID values in indexes