Re: vacuum_defer_cleanup_age inconsistently applied on replicas - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: vacuum_defer_cleanup_age inconsistently applied on replicas
Date
Msg-id CAH2-Wz=G92OsMyOeskye3D9QbuJjkoO05_7ntn+AGqBnkDf66g@mail.gmail.com
Whole thread Raw
In response to vacuum_defer_cleanup_age inconsistently applied on replicas  (Andres Freund <andres@anarazel.de>)
Responses Re: vacuum_defer_cleanup_age inconsistently applied on replicas  (Peter Geoghegan <pg@bowt.ie>)
List pgsql-hackers
On Fri, Apr 3, 2020 at 3:53 PM Andres Freund <andres@anarazel.de> wrote:
> GetOldestXmin() applies vacuum_defer_cleanup_age only when
> !RecoveryInProgress(). In contrast to that GetSnapshotData() applies it
> unconditionally.
>
> I'm not actually clear whether including vacuum_defer_cleanup_age on a
> replica is meaningful. But it strikes me as odd to have that behavioural
> difference between GetOldestXmin() and GetSnapshotData() - without any
> need, as far as I can tell?

Did you notice the comments added by Tom in b4a0223d008, which repeat
the claim that it isn't used on standbys? I think that this is
probably just an oversight in bca8b7f1, as you suggested. It's not
that hard to imagine how this oversight might have happened: Hot
standby feedback was introduced, and nobody cared about
vacuum_defer_cleanup_age anymore. It was always very difficult to
tune.

OTOH, I wonder if it's possible that vacuum_defer_cleanup_age was
deliberately intended to affect the behavior of
XLogWalRcvSendHSFeedback(), which is probably one of the most common
reasons why GetOldestXmin() is called on standbys.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Restricting maximum keep segments by repslots
Next
From: Peter Geoghegan
Date:
Subject: Re: vacuum_defer_cleanup_age inconsistently applied on replicas