1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-28 18:48:04 +03:00

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.
This commit is contained in:
Fujii Masao
2015-06-11 22:31:18 +09:00
parent aacb8b9277
commit 966c37fdb5
7 changed files with 20 additions and 14 deletions

View File

@@ -114,7 +114,7 @@ process_source_file(const char *path, file_type_t type, size_t newsize,
case FILE_TYPE_DIRECTORY:
if (exists && !S_ISDIR(statbuf.st_mode))
{
/* it's a directory in target, but not in source. Strange.. */
/* it's a directory in source, but not in target. Strange.. */
pg_fatal("\"%s\" is not a directory\n", localpath);
}
@@ -135,7 +135,7 @@ process_source_file(const char *path, file_type_t type, size_t newsize,
)
{
/*
* It's a symbolic link in target, but not in source.
* It's a symbolic link in source, but not in target.
* Strange..
*/
pg_fatal("\"%s\" is not a symbolic link\n", localpath);
@@ -354,7 +354,7 @@ process_block_change(ForkNumber forknum, RelFileNode rnode, BlockNumber blkno)
entry = *e;
else
entry = NULL;
free(path);
pfree(path);
if (entry)
{
@@ -530,7 +530,7 @@ print_filemap(void)
* Does it look like a relation data file?
*
* For our purposes, only files belonging to the main fork are considered
* relation files. Other forks are alwayes copied in toto, because we cannot
* relation files. Other forks are always copied in toto, because we cannot
* reliably track changes to them, because WAL only contains block references
* for the main fork.
*/