From: | Antonin Houska <ah(at)cybertec(dot)at> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Possible gaps/garbage in the output of XLOG reader |
Date: | 2015-04-09 10:05:52 |
Message-ID: | 2363.1428573952@localhost |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
xlogreader_9.4.1.diff | text/x-diff | 2.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | David Rowley | 2015-04-09 10:07:10 | Re: Parallel Seq Scan |
Previous Message | Simon Riggs | 2015-04-09 09:37:19 | Re: TABLESAMPLE patch |