mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-09-01 08:47:21 +02:00
Message style improvements
Fix one untranslatable string concatenation in pg_rewind. Fix one message in pg_verify_checksums to use a style use elsewhere and avoid plural issues. Fix one gratuitous abbreviation in psql.
This commit is contained in:
parent
99ba795d98
commit
a2afcdab8a
@ -30,7 +30,7 @@ static char *datasegpath(RelFileNode rnode, ForkNumber forknum,
|
|||||||
static int path_cmp(const void *a, const void *b);
|
static int path_cmp(const void *a, const void *b);
|
||||||
static int final_filemap_cmp(const void *a, const void *b);
|
static int final_filemap_cmp(const void *a, const void *b);
|
||||||
static void filemap_list_to_array(filemap_t *map);
|
static void filemap_list_to_array(filemap_t *map);
|
||||||
static bool check_file_excluded(const char *path, const char *type);
|
static bool check_file_excluded(const char *path, bool is_source);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The contents of these directories are removed or recreated during server
|
* The contents of these directories are removed or recreated during server
|
||||||
@ -148,7 +148,7 @@ process_source_file(const char *path, file_type_t type, size_t newsize,
|
|||||||
Assert(map->array == NULL);
|
Assert(map->array == NULL);
|
||||||
|
|
||||||
/* ignore any path matching the exclusion filters */
|
/* ignore any path matching the exclusion filters */
|
||||||
if (check_file_excluded(path, "source"))
|
if (check_file_excluded(path, true))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -338,7 +338,7 @@ process_target_file(const char *path, file_type_t type, size_t oldsize,
|
|||||||
* mandatory for target files, but this does not hurt and let's be
|
* mandatory for target files, but this does not hurt and let's be
|
||||||
* consistent with the source processing.
|
* consistent with the source processing.
|
||||||
*/
|
*/
|
||||||
if (check_file_excluded(path, "target"))
|
if (check_file_excluded(path, false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
snprintf(localpath, sizeof(localpath), "%s/%s", datadir_target, path);
|
snprintf(localpath, sizeof(localpath), "%s/%s", datadir_target, path);
|
||||||
@ -490,7 +490,7 @@ process_block_change(ForkNumber forknum, RelFileNode rnode, BlockNumber blkno)
|
|||||||
* Is this the path of file that pg_rewind can skip copying?
|
* Is this the path of file that pg_rewind can skip copying?
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
check_file_excluded(const char *path, const char *type)
|
check_file_excluded(const char *path, bool is_source)
|
||||||
{
|
{
|
||||||
char localpath[MAXPGPATH];
|
char localpath[MAXPGPATH];
|
||||||
int excludeIdx;
|
int excludeIdx;
|
||||||
@ -506,8 +506,12 @@ check_file_excluded(const char *path, const char *type)
|
|||||||
filename++;
|
filename++;
|
||||||
if (strcmp(filename, excludeFiles[excludeIdx]) == 0)
|
if (strcmp(filename, excludeFiles[excludeIdx]) == 0)
|
||||||
{
|
{
|
||||||
pg_log(PG_DEBUG, "entry \"%s\" excluded from %s file list\n",
|
if (is_source)
|
||||||
path, type);
|
pg_log(PG_DEBUG, "entry \"%s\" excluded from source file list\n",
|
||||||
|
path);
|
||||||
|
else
|
||||||
|
pg_log(PG_DEBUG, "entry \"%s\" excluded from target file list\n",
|
||||||
|
path);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -522,8 +526,12 @@ check_file_excluded(const char *path, const char *type)
|
|||||||
excludeDirContents[excludeIdx]);
|
excludeDirContents[excludeIdx]);
|
||||||
if (strstr(path, localpath) == path)
|
if (strstr(path, localpath) == path)
|
||||||
{
|
{
|
||||||
pg_log(PG_DEBUG, "entry \"%s\" excluded from %s file list\n",
|
if (is_source)
|
||||||
path, type);
|
pg_log(PG_DEBUG, "entry \"%s\" excluded from source file list\n",
|
||||||
|
path);
|
||||||
|
else
|
||||||
|
pg_log(PG_DEBUG, "entry \"%s\" excluded from target file list\n",
|
||||||
|
path);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,8 +99,8 @@ scan_file(const char *fn, BlockNumber segmentno)
|
|||||||
break;
|
break;
|
||||||
if (r != BLCKSZ)
|
if (r != BLCKSZ)
|
||||||
{
|
{
|
||||||
fprintf(stderr, _("%s: short read of block %u in file \"%s\", got only %d bytes\n"),
|
fprintf(stderr, _("%s: could not read block %u in file \"%s\": read %d of %d\n"),
|
||||||
progname, blockno, fn, r);
|
progname, blockno, fn, r, BLCKSZ);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
blocks++;
|
blocks++;
|
||||||
|
@ -369,7 +369,7 @@ helpVariables(unsigned short int pager)
|
|||||||
fprintf(output, _(" HISTFILE\n"
|
fprintf(output, _(" HISTFILE\n"
|
||||||
" file name used to store the command history\n"));
|
" file name used to store the command history\n"));
|
||||||
fprintf(output, _(" HISTSIZE\n"
|
fprintf(output, _(" HISTSIZE\n"
|
||||||
" max number of commands to store in the command history\n"));
|
" maximum number of commands to store in the command history\n"));
|
||||||
fprintf(output, _(" HOST\n"
|
fprintf(output, _(" HOST\n"
|
||||||
" the currently connected database server host\n"));
|
" the currently connected database server host\n"));
|
||||||
fprintf(output, _(" IGNOREEOF\n"
|
fprintf(output, _(" IGNOREEOF\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user