Re: pgsql: walreceiver uses a temporary replication slot by default

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Sergei Kornilov <sk(at)zsrv(dot)org>
Subject: Re: pgsql: walreceiver uses a temporary replication slot by default
Date: 2020-02-12 05:13:06
Message-ID: 20200212051306.GB1464@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Mon, Feb 10, 2020 at 01:46:04PM -0800, Andres Freund wrote:
> I still architecturally don't find it attractive that the active
> configuration between walreceiver and startup process can diverge
> though. Imagine if we e.g. added the ability to receive WAL over
> multiple connections from one host, or from multiple hosts (e.g. to be
> able to get the bulk of the WAL from a cascading node, but also to
> provide syncrep acknowledgements directly to the primary), or to allow
> for logical replication without needing all WAL locally on a standby
> doing decoding. It seems not great if there's potentially diverging
> configuration (hot standby feedback, temporary slots, ... ) between
> those walreceivers, just depending on when they started. Here the model
> e.g. parallel workers use, which explicitly ensure that the GUC state is
> the same in workers and the leader, is considerably better, imo.

Yes, I still think that we should fix that inconsistency, mark the new
GUC wal_receiver_create_temp_slot as PGC_POSTMASTER, and add a note at
the top of RequestXLogStreaming() and walreceiver.c about the
assumptions we'd prefer rely to for the GUCs starting a WAL receiver.

> So I think adding more of these parameters affecting walreceivers
> without coordination is not going quite in the right direction.

Indeed. Adding more comments would be one way to prevent the
situation to happen here, I fear that others may forget this stuff in
the future.
--
Michael

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2020-02-12 05:19:01 pgsql: Try to harden insert-conflict-specconflict against autovacuum.
Previous Message Andres Freund 2020-02-12 05:10:38 Re: pgsql: Test additional speculative conflict scenarios.

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-02-12 05:28:19 Re: client-side fsync() error handling
Previous Message Masahiko Sawada 2020-02-12 05:10:17 Re: [HACKERS] Moving relation extension locks out of heavyweight lock manager