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

Commitbcdfa5f

Browse files
committed
Rename SLRU elements in view pg_stat_slru
The new names are intended to match those in an upcoming patch that addsa few GUCs to configure the SLRU buffer sizes.Backwards compatibility concern: this changes the accepted names forfunction pg_stat_slru_rest(). Since this function recognizes "any otherstring" as a request to reset the entry for "other", this means thatcalling it with the old names would silently reset "other" instead ofdoing nothing or throwing an error.Reviewed-by: Andrey M. Borodin <x4mmm@yandex-team.ru>Discussion:https://postgr.es/m/202402261616.dlriae7b6emv@alvherre.pgsql
1 parent4892047 commitbcdfa5f

File tree

13 files changed

+81
-81
lines changed

13 files changed

+81
-81
lines changed

‎doc/src/sgml/monitoring.sgml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4853,13 +4853,13 @@ description | Waiting for a newly initialized WAL file to reach durable storage
48534853
<literal>NULL</literal> or is not specified, all the counters shown in
48544854
the <structname>pg_stat_slru</structname> view for all SLRU caches are
48554855
reset. The argument can be one of
4856-
<literal>CommitTs</literal>,
4857-
<literal>MultiXactMember</literal>,
4858-
<literal>MultiXactOffset</literal>,
4859-
<literal>Notify</literal>,
4860-
<literal>Serial</literal>,
4861-
<literal>Subtrans</literal>, or
4862-
<literal>Xact</literal>
4856+
<literal>commit_timestamp</literal>,
4857+
<literal>multixact_member</literal>,
4858+
<literal>multixact_offset</literal>,
4859+
<literal>notify</literal>,
4860+
<literal>serializable</literal>,
4861+
<literal>subtransaction</literal>, or
4862+
<literal>transaction</literal>
48634863
to reset the counters for only that entry.
48644864
If the argument is <literal>other</literal> (or indeed, any
48654865
unrecognized name), then the counters for all other SLRU caches, such

‎src/backend/access/transam/clog.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ void
706706
CLOGShmemInit(void)
707707
{
708708
XactCtl->PagePrecedes=CLOGPagePrecedes;
709-
SimpleLruInit(XactCtl,"Xact",CLOGShmemBuffers(),CLOG_LSNS_PER_PAGE,
709+
SimpleLruInit(XactCtl,"transaction",CLOGShmemBuffers(),CLOG_LSNS_PER_PAGE,
710710
XactSLRULock,"pg_xact",LWTRANCHE_XACT_BUFFER,
711711
SYNC_HANDLER_CLOG, false);
712712
SlruPagePrecedesUnitTests(XactCtl,CLOG_XACTS_PER_PAGE);

‎src/backend/access/transam/commit_ts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ CommitTsShmemInit(void)
529529
boolfound;
530530

531531
CommitTsCtl->PagePrecedes=CommitTsPagePrecedes;
532-
SimpleLruInit(CommitTsCtl,"CommitTs",CommitTsShmemBuffers(),0,
532+
SimpleLruInit(CommitTsCtl,"commit_timestamp",CommitTsShmemBuffers(),0,
533533
CommitTsSLRULock,"pg_commit_ts",
534534
LWTRANCHE_COMMITTS_BUFFER,
535535
SYNC_HANDLER_COMMIT_TS,

‎src/backend/access/transam/multixact.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,14 +1851,14 @@ MultiXactShmemInit(void)
18511851
MultiXactMemberCtl->PagePrecedes=MultiXactMemberPagePrecedes;
18521852

18531853
SimpleLruInit(MultiXactOffsetCtl,
1854-
"MultiXactOffset",NUM_MULTIXACTOFFSET_BUFFERS,0,
1854+
"multixact_offset",NUM_MULTIXACTOFFSET_BUFFERS,0,
18551855
MultiXactOffsetSLRULock,"pg_multixact/offsets",
18561856
LWTRANCHE_MULTIXACTOFFSET_BUFFER,
18571857
SYNC_HANDLER_MULTIXACT_OFFSET,
18581858
false);
18591859
SlruPagePrecedesUnitTests(MultiXactOffsetCtl,MULTIXACT_OFFSETS_PER_PAGE);
18601860
SimpleLruInit(MultiXactMemberCtl,
1861-
"MultiXactMember",NUM_MULTIXACTMEMBER_BUFFERS,0,
1861+
"multixact_member",NUM_MULTIXACTMEMBER_BUFFERS,0,
18621862
MultiXactMemberSLRULock,"pg_multixact/members",
18631863
LWTRANCHE_MULTIXACTMEMBER_BUFFER,
18641864
SYNC_HANDLER_MULTIXACT_MEMBER,

‎src/backend/access/transam/subtrans.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ void
200200
SUBTRANSShmemInit(void)
201201
{
202202
SubTransCtl->PagePrecedes=SubTransPagePrecedes;
203-
SimpleLruInit(SubTransCtl,"Subtrans",NUM_SUBTRANS_BUFFERS,0,
203+
SimpleLruInit(SubTransCtl,"subtransaction",NUM_SUBTRANS_BUFFERS,0,
204204
SubtransSLRULock,"pg_subtrans",
205205
LWTRANCHE_SUBTRANS_BUFFER,SYNC_HANDLER_NONE,
206206
false);

‎src/backend/commands/async.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ AsyncShmemInit(void)
541541
* names are used in order to avoid wraparound.
542542
*/
543543
NotifyCtl->PagePrecedes=asyncQueuePagePrecedes;
544-
SimpleLruInit(NotifyCtl,"Notify",NUM_NOTIFY_BUFFERS,0,
544+
SimpleLruInit(NotifyCtl,"notify",NUM_NOTIFY_BUFFERS,0,
545545
NotifySLRULock,"pg_notify",LWTRANCHE_NOTIFY_BUFFER,
546546
SYNC_HANDLER_NONE, true);
547547

‎src/backend/storage/lmgr/predicate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ SerialInit(void)
812812
* Set up SLRU management of the pg_serial data.
813813
*/
814814
SerialSlruCtl->PagePrecedes=SerialPagePrecedesLogically;
815-
SimpleLruInit(SerialSlruCtl,"Serial",
815+
SimpleLruInit(SerialSlruCtl,"serializable",
816816
NUM_SERIAL_BUFFERS,0,SerialSLRULock,"pg_serial",
817817
LWTRANCHE_SERIAL_BUFFER,SYNC_HANDLER_NONE,
818818
false);

‎src/include/utils/pgstat_internal.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -269,13 +269,13 @@ typedef struct PgStat_KindInfo
269269
* definitions.
270270
*/
271271
staticconstchar*constslru_names[]= {
272-
"CommitTs",
273-
"MultiXactMember",
274-
"MultiXactOffset",
275-
"Notify",
276-
"Serial",
277-
"Subtrans",
278-
"Xact",
272+
"commit_timestamp",
273+
"multixact_member",
274+
"multixact_offset",
275+
"notify",
276+
"serializable",
277+
"subtransaction",
278+
"transaction",
279279
"other"/* has to be last */
280280
};
281281

‎src/test/isolation/expected/stats.out

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3039,8 +3039,8 @@ pg_stat_force_next_flush
30393039
(1 row)
30403040

30413041
step s1_slru_save_stats:
3042-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3043-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3042+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3043+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
30443044

30453045
step s1_listen: LISTEN stats_test_nothing;
30463046
step s1_begin: BEGIN;
@@ -3093,8 +3093,8 @@ pg_stat_force_next_flush
30933093
(1 row)
30943094

30953095
step s1_slru_save_stats:
3096-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3097-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3096+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3097+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
30983098

30993099
step s1_listen: LISTEN stats_test_nothing;
31003100
step s2_big_notify: SELECT pg_notify('stats_test_use',
@@ -3133,8 +3133,8 @@ pg_stat_force_next_flush
31333133
(1 row)
31343134

31353135
step s1_slru_save_stats:
3136-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3137-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3136+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3137+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
31383138

31393139
step s1_listen: LISTEN stats_test_nothing;
31403140
step s2_begin: BEGIN;
@@ -3176,8 +3176,8 @@ pg_stat_force_next_flush
31763176

31773177
step s1_fetch_consistency_none: SET stats_fetch_consistency = 'none';
31783178
step s1_slru_save_stats:
3179-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3180-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3179+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3180+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
31813181

31823182
step s1_listen: LISTEN stats_test_nothing;
31833183
step s1_begin: BEGIN;
@@ -3243,8 +3243,8 @@ pg_stat_force_next_flush
32433243

32443244
step s1_fetch_consistency_cache: SET stats_fetch_consistency = 'cache';
32453245
step s1_slru_save_stats:
3246-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3247-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3246+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3247+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
32483248

32493249
step s1_listen: LISTEN stats_test_nothing;
32503250
step s1_begin: BEGIN;
@@ -3310,8 +3310,8 @@ pg_stat_force_next_flush
33103310

33113311
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
33123312
step s1_slru_save_stats:
3313-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3314-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3313+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3314+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
33153315

33163316
step s1_listen: LISTEN stats_test_nothing;
33173317
step s1_begin: BEGIN;
@@ -3377,8 +3377,8 @@ pg_stat_force_next_flush
33773377

33783378
step s1_fetch_consistency_none: SET stats_fetch_consistency = 'none';
33793379
step s1_slru_save_stats:
3380-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3381-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3380+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3381+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
33823382

33833383
step s1_listen: LISTEN stats_test_nothing;
33843384
step s1_begin: BEGIN;
@@ -3450,8 +3450,8 @@ pg_stat_force_next_flush
34503450

34513451
step s1_fetch_consistency_cache: SET stats_fetch_consistency = 'cache';
34523452
step s1_slru_save_stats:
3453-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3454-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3453+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3454+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
34553455

34563456
step s1_listen: LISTEN stats_test_nothing;
34573457
step s1_begin: BEGIN;
@@ -3523,8 +3523,8 @@ pg_stat_force_next_flush
35233523

35243524
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
35253525
step s1_slru_save_stats:
3526-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3527-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3526+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3527+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
35283528

35293529
step s1_listen: LISTEN stats_test_nothing;
35303530
step s1_begin: BEGIN;
@@ -3596,8 +3596,8 @@ pg_stat_force_next_flush
35963596

35973597
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
35983598
step s1_slru_save_stats:
3599-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3600-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3599+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3600+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
36013601

36023602
step s1_listen: LISTEN stats_test_nothing;
36033603
step s1_begin: BEGIN;
@@ -3653,8 +3653,8 @@ pg_stat_force_next_flush
36533653

36543654
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
36553655
step s1_slru_save_stats:
3656-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3657-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3656+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3657+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
36583658

36593659
step s1_listen: LISTEN stats_test_nothing;
36603660
step s1_begin: BEGIN;

‎src/test/isolation/expected/stats_1.out

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3063,8 +3063,8 @@ pg_stat_force_next_flush
30633063
(1 row)
30643064

30653065
step s1_slru_save_stats:
3066-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3067-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3066+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3067+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
30683068

30693069
step s1_listen: LISTEN stats_test_nothing;
30703070
step s1_begin: BEGIN;
@@ -3117,8 +3117,8 @@ pg_stat_force_next_flush
31173117
(1 row)
31183118

31193119
step s1_slru_save_stats:
3120-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3121-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3120+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3121+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
31223122

31233123
step s1_listen: LISTEN stats_test_nothing;
31243124
step s2_big_notify: SELECT pg_notify('stats_test_use',
@@ -3157,8 +3157,8 @@ pg_stat_force_next_flush
31573157
(1 row)
31583158

31593159
step s1_slru_save_stats:
3160-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3161-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3160+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3161+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
31623162

31633163
step s1_listen: LISTEN stats_test_nothing;
31643164
step s2_begin: BEGIN;
@@ -3200,8 +3200,8 @@ pg_stat_force_next_flush
32003200

32013201
step s1_fetch_consistency_none: SET stats_fetch_consistency = 'none';
32023202
step s1_slru_save_stats:
3203-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3204-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3203+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3204+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
32053205

32063206
step s1_listen: LISTEN stats_test_nothing;
32073207
step s1_begin: BEGIN;
@@ -3267,8 +3267,8 @@ pg_stat_force_next_flush
32673267

32683268
step s1_fetch_consistency_cache: SET stats_fetch_consistency = 'cache';
32693269
step s1_slru_save_stats:
3270-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3271-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3270+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3271+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
32723272

32733273
step s1_listen: LISTEN stats_test_nothing;
32743274
step s1_begin: BEGIN;
@@ -3334,8 +3334,8 @@ pg_stat_force_next_flush
33343334

33353335
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
33363336
step s1_slru_save_stats:
3337-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3338-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3337+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3338+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
33393339

33403340
step s1_listen: LISTEN stats_test_nothing;
33413341
step s1_begin: BEGIN;
@@ -3401,8 +3401,8 @@ pg_stat_force_next_flush
34013401

34023402
step s1_fetch_consistency_none: SET stats_fetch_consistency = 'none';
34033403
step s1_slru_save_stats:
3404-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3405-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3404+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3405+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
34063406

34073407
step s1_listen: LISTEN stats_test_nothing;
34083408
step s1_begin: BEGIN;
@@ -3474,8 +3474,8 @@ pg_stat_force_next_flush
34743474

34753475
step s1_fetch_consistency_cache: SET stats_fetch_consistency = 'cache';
34763476
step s1_slru_save_stats:
3477-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3478-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3477+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3478+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
34793479

34803480
step s1_listen: LISTEN stats_test_nothing;
34813481
step s1_begin: BEGIN;
@@ -3547,8 +3547,8 @@ pg_stat_force_next_flush
35473547

35483548
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
35493549
step s1_slru_save_stats:
3550-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3551-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3550+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3551+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
35523552

35533553
step s1_listen: LISTEN stats_test_nothing;
35543554
step s1_begin: BEGIN;
@@ -3620,8 +3620,8 @@ pg_stat_force_next_flush
36203620

36213621
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
36223622
step s1_slru_save_stats:
3623-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3624-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3623+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3624+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
36253625

36263626
step s1_listen: LISTEN stats_test_nothing;
36273627
step s1_begin: BEGIN;
@@ -3677,8 +3677,8 @@ pg_stat_force_next_flush
36773677

36783678
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
36793679
step s1_slru_save_stats:
3680-
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
3681-
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
3680+
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
3681+
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
36823682

36833683
step s1_listen: LISTEN stats_test_nothing;
36843684
step s1_begin: BEGIN;

‎src/test/isolation/specs/stats.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ step s1_table_stats {
107107

108108
# SLRU stats steps
109109
steps1_slru_save_stats {
110-
INSERTINTOtest_slru_statsVALUES('Notify','blks_zeroed',
111-
(SELECTblks_zeroedFROMpg_stat_slruWHEREname='Notify'));
110+
INSERTINTOtest_slru_statsVALUES('notify','blks_zeroed',
111+
(SELECTblks_zeroedFROMpg_stat_slruWHEREname='notify'));
112112
}
113113
steps1_listen {LISTENstats_test_nothing; }
114114
steps1_big_notify {SELECTpg_notify('stats_test_use',

‎src/test/regress/expected/stats.out

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -866,35 +866,35 @@ WHERE pg_stat_get_backend_pid(beid) = pg_backend_pid();
866866
-- Test that resetting stats works for reset timestamp
867867
-----
868868
-- Test that reset_slru with a specified SLRU works.
869-
SELECT stats_reset AS slru_commit_ts_reset_ts FROM pg_stat_slru WHERE name = 'CommitTs' \gset
870-
SELECT stats_reset AS slru_notify_reset_ts FROM pg_stat_slru WHERE name = 'Notify' \gset
871-
SELECT pg_stat_reset_slru('CommitTs');
869+
SELECT stats_reset AS slru_commit_ts_reset_ts FROM pg_stat_slru WHERE name = 'commit_timestamp' \gset
870+
SELECT stats_reset AS slru_notify_reset_ts FROM pg_stat_slru WHERE name = 'notify' \gset
871+
SELECT pg_stat_reset_slru('commit_timestamp');
872872
pg_stat_reset_slru
873873
--------------------
874874

875875
(1 row)
876876

877-
SELECT stats_reset > :'slru_commit_ts_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'CommitTs';
877+
SELECT stats_reset > :'slru_commit_ts_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'commit_timestamp';
878878
?column?
879879
----------
880880
t
881881
(1 row)
882882

883-
SELECT stats_reset AS slru_commit_ts_reset_ts FROM pg_stat_slru WHERE name = 'CommitTs' \gset
883+
SELECT stats_reset AS slru_commit_ts_reset_ts FROM pg_stat_slru WHERE name = 'commit_timestamp' \gset
884884
-- Test that multiple SLRUs are reset when no specific SLRU provided to reset function
885885
SELECT pg_stat_reset_slru();
886886
pg_stat_reset_slru
887887
--------------------
888888

889889
(1 row)
890890

891-
SELECT stats_reset > :'slru_commit_ts_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'CommitTs';
891+
SELECT stats_reset > :'slru_commit_ts_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'commit_timestamp';
892892
?column?
893893
----------
894894
t
895895
(1 row)
896896

897-
SELECT stats_reset > :'slru_notify_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'Notify';
897+
SELECT stats_reset > :'slru_notify_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'notify';
898898
?column?
899899
----------
900900
t

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp