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

Commit15d13e8

Browse files
committed
Make vacuum buffer counters 64 bits wide
Using 32 bit counters means they can now realistically wrap around whenvacuuming extremely large tables. Because they're signed integers,stats printed by vacuum look very odd when they do.We'd love to backpatch this, but refrain because the variables areexported and could cause third-party code to break.Reviewed-by: Julien Rouhaud, Tom Lane, Michael PaquierDiscussion:https://postgr.es/m/20200131205926.GA16367@alvherre.pgsql
1 parent75cdf24 commit15d13e8

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

‎src/backend/access/heap/vacuumlazy.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,10 +614,10 @@ heap_vacuum_rel(Relation onerel, VacuumParams *params,
614614
vacrelstats->new_dead_tuples,
615615
OldestXmin);
616616
appendStringInfo(&buf,
617-
_("buffer usage: %d hits, %d misses, %d dirtied\n"),
618-
VacuumPageHit,
619-
VacuumPageMiss,
620-
VacuumPageDirty);
617+
_("buffer usage: %lld hits, %lld misses, %lld dirtied\n"),
618+
(long long)VacuumPageHit,
619+
(long long)VacuumPageMiss,
620+
(long long)VacuumPageDirty);
621621
appendStringInfo(&buf,_("avg read rate: %.3f MB/s, avg write rate: %.3f MB/s\n"),
622622
read_rate,write_rate);
623623
appendStringInfo(&buf,_("system usage: %s"),pg_rusage_show(&ru0));

‎src/backend/utils/init/globals.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ intVacuumCostPageDirty = 20;
140140
intVacuumCostLimit=200;
141141
doubleVacuumCostDelay=0;
142142

143-
intVacuumPageHit=0;
144-
intVacuumPageMiss=0;
145-
intVacuumPageDirty=0;
143+
int64VacuumPageHit=0;
144+
int64VacuumPageMiss=0;
145+
int64VacuumPageDirty=0;
146146

147147
intVacuumCostBalance=0;/* working state for vacuum */
148148
boolVacuumCostActive= false;

‎src/include/miscadmin.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ extern intVacuumCostPageDirty;
252252
externintVacuumCostLimit;
253253
externdoubleVacuumCostDelay;
254254

255-
externintVacuumPageHit;
256-
externintVacuumPageMiss;
257-
externintVacuumPageDirty;
255+
externint64VacuumPageHit;
256+
externint64VacuumPageMiss;
257+
externint64VacuumPageDirty;
258258

259259
externintVacuumCostBalance;
260260
externboolVacuumCostActive;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp