From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Avoid call MaintainOldSnapshotTimeMapping, if old_snapshot_threshold is disabled. |
Date: | 2021-06-18 01:14:45 |
Message-ID: | CAEudQAp4URJ=VUtkkr6UDJO9z1Pzy6EXdD1-Qx_G6XwmAf4t9w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Em qui., 17 de jun. de 2021 às 22:08, Andres Freund <andres(at)anarazel(dot)de>
escreveu:
> Hi,
>
> On 2021-06-17 21:27:15 -0300, Ranier Vilela wrote:
> > While another long thread discusses the situation of
> old_snapshot_threshold,
> > I believe we can improve procarray.c by avoiding calling
> > MaintainOldSnapshotTimeMapping (src/backend/utils/time/snapmgr.c).
> >
> > There's a very explicit comment there, which says (line 1866):
> > "Never call this function when old snapshot checking is disabled."
> >
> > Well, assert should never be used to validate a condition that certainly
> > occurs at runtime.
>
> I don't see how it can happen at runtime currently?
>
> > Since old_snapshot_threshold is -1, it is disabled, so
> > MaintainOldSnapshotTimeMapping doesn't need to be run, right?
>
> It *isn't* run, the caller checks OldSnapshotThresholdActive() first.
>
True. My mistake.
I didn't check GetSnapshotDataInitOldSnapshot correctly.
regards,
Ranier Vilela
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Smith | 2021-06-18 02:12:58 | Re: [HACKERS] logical decoding of two-phase transactions |
Previous Message | Jeff Davis | 2021-06-18 01:13:57 | Re: Outdated replication protocol error? |