From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgbf(at)twiska(dot)com, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, masao(dot)fujii(at)oss(dot)nttdata(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: min_safe_lsn column in pg_replication_slots view |
Date: | 2020-07-09 22:20:04 |
Message-ID: | 20200709222004.GA10331@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2020-Jul-09, Tom Lane wrote:
> and even the most cursory look at the code confirms that there's a
> real bug here. KeepLogSeg expects *logSegNo to be defined on entry,
> but GetWALAvailability hasn't bothered to initialize oldestSlotSeg.
> It is not clear to me which one is in the wrong; the comment for
> KeepLogSeg isn't particularly clear on this.
Oh, so I introduced the bug when I removed the initialization in this
fix. That one was using the wrong datatype, but evidently it achieved
the right effect. And KeepLogSeg is using the wrong datatype Invalid
macro also.
I think we should define InvalidXLogSegNo to be ~((uint64)0) and add a
macro to test for that.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2020-07-09 22:32:20 | Re: Default setting for enable_hashagg_disk |
Previous Message | Daniel Gustafsson | 2020-07-09 22:06:42 | Re: Stale external URL in doc? |