diff options
author | Fujii Masao <fujii@postgresql.org> | 2015-06-11 22:31:18 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2015-06-11 22:31:18 +0900 |
commit | 966c37fdb5ed9b87f3e91eace4dbbed7909f6769 (patch) | |
tree | 65304d1c1ddc9b0aaeebf933e168221d2a1d77ae /src/bin/pg_rewind/libpq_fetch.c | |
parent | aacb8b9277ec63ee848442ccc1aa4b3f6eab1893 (diff) | |
download | postgresql-966c37fdb5ed9b87f3e91eace4dbbed7909f6769.tar.gz postgresql-966c37fdb5ed9b87f3e91eace4dbbed7909f6769.zip |
Fix some issues in pg_rewind.
* Remove invalid option character "N" from the third argument (valid option
string) of getopt_long().
* Use pg_free() or pfree() to free the memory allocated by pg_malloc() or
palloc() instead of always using free().
* Assume problem is no disk space if write() fails but doesn't set errno.
* Fix several typos.
Patch by me. Review by Michael Paquier.
Diffstat (limited to 'src/bin/pg_rewind/libpq_fetch.c')
-rw-r--r-- | src/bin/pg_rewind/libpq_fetch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c index 14a861006da..6ffd24e9f19 100644 --- a/src/bin/pg_rewind/libpq_fetch.c +++ b/src/bin/pg_rewind/libpq_fetch.c @@ -69,7 +69,7 @@ libpqConnect(const char *connstr) pg_free(str); /* - * Also check that full_page-writes are enabled. We can get torn pages if + * Also check that full_page_writes is enabled. We can get torn pages if * a page is modified while we read it with pg_read_binary_file(), and we * rely on full page images to fix them. */ @@ -465,5 +465,5 @@ execute_pagemap(datapagemap_t *pagemap, const char *path) fetch_file_range(path, offset, offset + BLCKSZ); } - free(iter); + pg_free(iter); } |