From: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [BUG] failed assertion in EnsurePortalSnapshotExists() |
Date: | 2021-09-29 18:23:43 |
Message-ID: | CAEudQAqHpmqQ2snz8SD91gSny9mvyeb1J-V6eTaFsd9uQ5GbMw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Em qua., 29 de set. de 2021 às 15:01, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> escreveu:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> writes:
> > On 2021-Sep-29, Ranier Vilela wrote:
> >> Em qua., 29 de set. de 2021 às 08:12, Drouvot, Bertrand <
> bdrouvot(at)amazon(dot)com>
> >> escreveu:
> >> Duplicating functions is very bad for maintenance and bloats the code
> >> unnecessarily, IMHO.
>
> > Well, there are 42 calls of PushActiveSnapshot currently, and only 6 are
> > updated in the patch. Given that six sevenths of the calls continue to
> > use the existing function and that it is less verbose than the new one,
> > that seems sufficient argument to keep it.
>
> Seeing that we have to back-patch this, changing the ABI of
> PushActiveSnapshot seems like a complete non-starter.
>
> The idea I'd had to avoid code duplication was to make
> PushActiveSnapshot a wrapper for the extended function:
>
> void
> PushActiveSnapshot(Snapshot snap)
> {
> PushActiveSnapshotWithLevel(snap, GetCurrentTransactionNestLevel());
> }
>
> Much better.
regards,
Ranier Vilela
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2021-09-29 18:27:28 | Enabling deduplication with system catalog indexes |
Previous Message | Tom Lane | 2021-09-29 18:06:56 | Re: when the startup process doesn't (logging startup delays) |