pgsql: Fix multiple bugs and infelicities in pg_rewind.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix multiple bugs and infelicities in pg_rewind.
Date: 2015-03-30 00:02:19
Message-ID: E1YcN9n-0007YE-9m@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix multiple bugs and infelicities in pg_rewind.

Bugs all spotted by Coverity, including wrong realloc() size request
and memory leaks. Cosmetic improvements by me.

The usage of the global variable "filemap" here is still pretty awful,
but at least I got rid of the gratuitous aliasing in several routines
(which was helping to annoy Coverity, as well as being a bug risk).

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/c67f366fa9f748257861ee233b47b80eb5ffa857

Modified Files
--------------
src/bin/pg_rewind/filemap.c | 60 +++++++++++++++++++++------------------
src/bin/pg_rewind/filemap.h | 24 ++++++----------
src/bin/pg_rewind/libpq_fetch.c | 4 +++
src/bin/pg_rewind/pg_rewind.c | 2 +-
4 files changed, 46 insertions(+), 44 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-03-30 00:54:42 pgsql: Clean up all the cruft after a pg_rewind test run.
Previous Message Tom Lane 2015-03-29 19:05:55 pgsql: Add vacuum_delay_point call in compute_index_stats's per-sample-