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

Commit2c96b0b

Browse files
committed
Fix assorted confusion between Oid and int32.
In passing, also make some debugging elog's in pgstat.c a bit moreconsistently worded.Back-patch as far as applicable (9.3 or 9.4; none of these mistakes arereally old).Mark Dilger identified and patched the type violations; the messagerewordings are mine.
1 parent2df66f0 commit2c96b0b

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

‎src/backend/postmaster/pgstat.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3514,7 +3514,7 @@ pgstat_write_statsfiles(bool permanent, bool allDbs)
35143514
constchar*statfile=permanent ?PGSTAT_STAT_PERMANENT_FILENAME :pgstat_stat_filename;
35153515
intrc;
35163516

3517-
elog(DEBUG2,"writingstatsfile '%s'",statfile);
3517+
elog(DEBUG2,"writingstats file \"%s\"",statfile);
35183518

35193519
/*
35203520
* Open the statistics temp file to write out the current values.
@@ -3685,7 +3685,7 @@ pgstat_write_db_statsfile(PgStat_StatDBEntry *dbentry, bool permanent)
36853685
get_dbstat_filename(permanent, true,dbid,tmpfile,MAXPGPATH);
36863686
get_dbstat_filename(permanent, false,dbid,statfile,MAXPGPATH);
36873687

3688-
elog(DEBUG2,"writingstatsfile '%s'",statfile);
3688+
elog(DEBUG2,"writingstats file \"%s\"",statfile);
36893689

36903690
/*
36913691
* Open the statistics temp file to write out the current values.
@@ -3766,7 +3766,7 @@ pgstat_write_db_statsfile(PgStat_StatDBEntry *dbentry, bool permanent)
37663766
{
37673767
get_dbstat_filename(false, false,dbid,statfile,MAXPGPATH);
37683768

3769-
elog(DEBUG2,"removing temporarystat file'%s'",statfile);
3769+
elog(DEBUG2,"removing temporarystats file\"%s\"",statfile);
37703770
unlink(statfile);
37713771
}
37723772
}
@@ -3966,7 +3966,7 @@ pgstat_read_statsfiles(Oid onlydb, bool permanent, bool deep)
39663966
/* If requested to read the permanent file, also get rid of it. */
39673967
if (permanent)
39683968
{
3969-
elog(DEBUG2,"removing permanent stats file'%s'",statfile);
3969+
elog(DEBUG2,"removing permanent stats file\"%s\"",statfile);
39703970
unlink(statfile);
39713971
}
39723972

@@ -4124,7 +4124,7 @@ pgstat_read_db_statsfile(Oid databaseid, HTAB *tabhash, HTAB *funchash,
41244124

41254125
if (permanent)
41264126
{
4127-
elog(DEBUG2,"removing permanent stats file'%s'",statfile);
4127+
elog(DEBUG2,"removing permanent stats file\"%s\"",statfile);
41284128
unlink(statfile);
41294129
}
41304130

@@ -4423,7 +4423,7 @@ pgstat_recv_inquiry(PgStat_MsgInquiry *msg, int len)
44234423
DBWriteRequest*newreq;
44244424
PgStat_StatDBEntry*dbentry;
44254425

4426-
elog(DEBUG2,"received inquiry for%d",msg->databaseid);
4426+
elog(DEBUG2,"received inquiry fordatabase %u",msg->databaseid);
44274427

44284428
/*
44294429
* Find the last write request for this DB. If it's older than the
@@ -4481,7 +4481,7 @@ pgstat_recv_inquiry(PgStat_MsgInquiry *msg, int len)
44814481
writetime=pstrdup(timestamptz_to_str(dbentry->stats_timestamp));
44824482
mytime=pstrdup(timestamptz_to_str(cur_ts));
44834483
elog(LOG,
4484-
"stats_timestamp %s is later than collector's time %s fordb %d",
4484+
"stats_timestamp %s is later than collector's time %s fordatabase %u",
44854485
writetime,mytime,dbentry->databaseid);
44864486
pfree(writetime);
44874487
pfree(mytime);
@@ -4653,7 +4653,7 @@ pgstat_recv_dropdb(PgStat_MsgDropdb *msg, int len)
46534653

46544654
get_dbstat_filename(false, false,dbid,statfile,MAXPGPATH);
46554655

4656-
elog(DEBUG2,"removing%s",statfile);
4656+
elog(DEBUG2,"removingstats file \"%s\"",statfile);
46574657
unlink(statfile);
46584658

46594659
if (dbentry->tables!=NULL)

‎src/bin/pg_dump/parallel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ lockTableNoWait(ArchiveHandle *AH, TocEntry *te)
813813
" pg_class.relname "
814814
" FROM pg_class "
815815
" JOIN pg_namespace on pg_namespace.oid = relnamespace "
816-
" WHERE pg_class.oid = %d",te->catalogId.oid);
816+
" WHERE pg_class.oid = %u",te->catalogId.oid);
817817

818818
res=PQexec(AH->connection,query->data);
819819

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp