Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf48fa2b

Browse files
committed
Message style improvements
Fix one untranslatable string concatenation in pg_rewind.Fix one message in pg_verify_checksums to use a style use elsewhereand avoid plural issues.Fix one gratuitous abbreviation in psql.
1 parent240d40d commitf48fa2b

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

‎src/bin/pg_rewind/filemap.c

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static char *datasegpath(RelFileNode rnode, ForkNumber forknum,
3030
staticintpath_cmp(constvoid*a,constvoid*b);
3131
staticintfinal_filemap_cmp(constvoid*a,constvoid*b);
3232
staticvoidfilemap_list_to_array(filemap_t*map);
33-
staticboolcheck_file_excluded(constchar*path,constchar*type);
33+
staticboolcheck_file_excluded(constchar*path,boolis_source);
3434

3535
/*
3636
* 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,
148148
Assert(map->array==NULL);
149149

150150
/* ignore any path matching the exclusion filters */
151-
if (check_file_excluded(path,"source"))
151+
if (check_file_excluded(path,true))
152152
return;
153153

154154
/*
@@ -338,7 +338,7 @@ process_target_file(const char *path, file_type_t type, size_t oldsize,
338338
* mandatory for target files, but this does not hurt and let's be
339339
* consistent with the source processing.
340340
*/
341-
if (check_file_excluded(path,"target"))
341+
if (check_file_excluded(path,false))
342342
return;
343343

344344
snprintf(localpath,sizeof(localpath),"%s/%s",datadir_target,path);
@@ -490,7 +490,7 @@ process_block_change(ForkNumber forknum, RelFileNode rnode, BlockNumber blkno)
490490
* Is this the path of file that pg_rewind can skip copying?
491491
*/
492492
staticbool
493-
check_file_excluded(constchar*path,constchar*type)
493+
check_file_excluded(constchar*path,boolis_source)
494494
{
495495
charlocalpath[MAXPGPATH];
496496
intexcludeIdx;
@@ -506,8 +506,12 @@ check_file_excluded(const char *path, const char *type)
506506
filename++;
507507
if (strcmp(filename,excludeFiles[excludeIdx])==0)
508508
{
509-
pg_log(PG_DEBUG,"entry \"%s\" excluded from %s file list\n",
510-
path,type);
509+
if (is_source)
510+
pg_log(PG_DEBUG,"entry \"%s\" excluded from source file list\n",
511+
path);
512+
else
513+
pg_log(PG_DEBUG,"entry \"%s\" excluded from target file list\n",
514+
path);
511515
return true;
512516
}
513517
}
@@ -522,8 +526,12 @@ check_file_excluded(const char *path, const char *type)
522526
excludeDirContents[excludeIdx]);
523527
if (strstr(path,localpath)==path)
524528
{
525-
pg_log(PG_DEBUG,"entry \"%s\" excluded from %s file list\n",
526-
path,type);
529+
if (is_source)
530+
pg_log(PG_DEBUG,"entry \"%s\" excluded from source file list\n",
531+
path);
532+
else
533+
pg_log(PG_DEBUG,"entry \"%s\" excluded from target file list\n",
534+
path);
527535
return true;
528536
}
529537
}

‎src/bin/pg_verify_checksums/pg_verify_checksums.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ scan_file(const char *fn, BlockNumber segmentno)
9999
break;
100100
if (r!=BLCKSZ)
101101
{
102-
fprintf(stderr,_("%s:shortreadofblock %u in file \"%s\", got only%dbytes\n"),
103-
progname,blockno,fn,r);
102+
fprintf(stderr,_("%s:could notread block %u in file \"%s\": read%dof %d\n"),
103+
progname,blockno,fn,r,BLCKSZ);
104104
exit(1);
105105
}
106106
blocks++;

‎src/bin/psql/help.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ helpVariables(unsigned short int pager)
369369
fprintf(output,_(" HISTFILE\n"
370370
" file name used to store the command history\n"));
371371
fprintf(output,_(" HISTSIZE\n"
372-
"max number of commands to store in the command history\n"));
372+
"maximum number of commands to store in the command history\n"));
373373
fprintf(output,_(" HOST\n"
374374
" the currently connected database server host\n"));
375375
fprintf(output,_(" IGNOREEOF\n"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp