pgsql: Fix a couple of error-handling bugs in the xlogreader patch.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix a couple of error-handling bugs in the xlogreader patch.
Date: 2013-01-17 17:28:48
Message-ID: E1TvtGi-0006HR-4l@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix a couple of error-handling bugs in the xlogreader patch.

XLogReadRecord should reset its state on every error, to make sure it
re-reads the page on next call. It was inconsistent in that some errors did
that, but some did not.

In ReadRecord(), don't give up on an error if we're in standby mode. The
loop was set up to retry, but the checks within the loop broke out of the
loop on any error.

Andres Freund, with some tweaking by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/1296d5c53cad26c775993d6c29e1311919202638

Modified Files
--------------
src/backend/access/transam/xlog.c | 31 +++++++++++++++++++++----------
src/backend/access/transam/xlogreader.c | 30 +++++++-----------------------
2 files changed, 28 insertions(+), 33 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-01-17 18:13:12 pgsql: Improve memory space management in tuplesort and tuplestore.
Previous Message Bruce Momjian 2013-01-17 16:39:43 pgsql: Add a latex-longtable output format to psql