pgsql: Fix uninitialized value in segno calculation

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix uninitialized value in segno calculation
Date: 2020-07-13 17:50:44
Message-ID: E1jv2bE-0003WK-Bx@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix uninitialized value in segno calculation

Remove previous hack in KeepLogSeg that added a case to deal with a
(badly represented) invalid segment number. This was added for the sake
of GetWALAvailability. But it's not needed if in that function we
initialize the segment number to be retreated to the currently being
written segment, so do that instead.

Per valgrind-running buildfarm member skink, and some sparc64 animals.

Discussion: https://postgr.es/m/1724648.1594230917@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b5b4c0fef9fb905d98f93c1f455397449c6e63a8

Modified Files
--------------
src/backend/access/transam/xlog.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-07-13 19:39:38 Re: pgsql: Improvements to psql \dAo and \dAp commands
Previous Message Alexander Korotkov 2020-07-13 16:00:13 Re: pgsql: Improvements to psql \dAo and \dAp commands