Possible gaps/garbage in the output of XLOG reader - Mailing list pgsql-hackers

From Antonin Houska
Subject Possible gaps/garbage in the output of XLOG reader
Date
Msg-id 2363.1428573952@localhost
Whole thread Raw
Responses Re: Possible gaps/garbage in the output of XLOG reader
List pgsql-hackers
While playing with xlogreader, I was lucky enough to see one of the many
record validations to fail. After having some fun with gdb, I found out that
in some cases the reader does not enforce enough data to be in state->readBuf
before copying into state->readRecordBuf starts. This should not happen if the
callback always reads XLOG_BLCKSZ bytes, but in fact only *reqLen* is the
mandatory size of the chunk delivered.

There are probably various ways to fix this problem. Attached is what I did in
my environment. I hit the problem on 9.4.1, but the patch seems to apply to
master too.

--
Antonin Houska
Cybertec Schönig & Schönig GmbH
Gröhrmühlgasse 26
A-2700 Wiener Neustadt
Web: http://www.postgresql-support.de, http://www.cybertec.at


Attachment

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: TABLESAMPLE patch
Next
From: David Rowley
Date:
Subject: Re: Parallel Seq Scan