mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-27 07:21:09 +08:00
Rename SLRU elements in view pg_stat_slru
The new names are intended to match those in an upcoming patch that adds a few GUCs to configure the SLRU buffer sizes. Backwards compatibility concern: this changes the accepted names for function pg_stat_slru_rest(). Since this function recognizes "any other string" as a request to reset the entry for "other", this means that calling it with the old names would silently reset "other" instead of doing nothing or throwing an error. Reviewed-by: Andrey M. Borodin <x4mmm@yandex-team.ru> Discussion: https://postgr.es/m/202402261616.dlriae7b6emv@alvherre.pgsql
This commit is contained in:
parent
48920476b4
commit
bcdfa5f2e2
@ -4853,13 +4853,13 @@ description | Waiting for a newly initialized WAL file to reach durable storage
|
|||||||
<literal>NULL</literal> or is not specified, all the counters shown in
|
<literal>NULL</literal> or is not specified, all the counters shown in
|
||||||
the <structname>pg_stat_slru</structname> view for all SLRU caches are
|
the <structname>pg_stat_slru</structname> view for all SLRU caches are
|
||||||
reset. The argument can be one of
|
reset. The argument can be one of
|
||||||
<literal>CommitTs</literal>,
|
<literal>commit_timestamp</literal>,
|
||||||
<literal>MultiXactMember</literal>,
|
<literal>multixact_member</literal>,
|
||||||
<literal>MultiXactOffset</literal>,
|
<literal>multixact_offset</literal>,
|
||||||
<literal>Notify</literal>,
|
<literal>notify</literal>,
|
||||||
<literal>Serial</literal>,
|
<literal>serializable</literal>,
|
||||||
<literal>Subtrans</literal>, or
|
<literal>subtransaction</literal>, or
|
||||||
<literal>Xact</literal>
|
<literal>transaction</literal>
|
||||||
to reset the counters for only that entry.
|
to reset the counters for only that entry.
|
||||||
If the argument is <literal>other</literal> (or indeed, any
|
If the argument is <literal>other</literal> (or indeed, any
|
||||||
unrecognized name), then the counters for all other SLRU caches, such
|
unrecognized name), then the counters for all other SLRU caches, such
|
||||||
|
@ -706,7 +706,7 @@ void
|
|||||||
CLOGShmemInit(void)
|
CLOGShmemInit(void)
|
||||||
{
|
{
|
||||||
XactCtl->PagePrecedes = CLOGPagePrecedes;
|
XactCtl->PagePrecedes = CLOGPagePrecedes;
|
||||||
SimpleLruInit(XactCtl, "Xact", CLOGShmemBuffers(), CLOG_LSNS_PER_PAGE,
|
SimpleLruInit(XactCtl, "transaction", CLOGShmemBuffers(), CLOG_LSNS_PER_PAGE,
|
||||||
XactSLRULock, "pg_xact", LWTRANCHE_XACT_BUFFER,
|
XactSLRULock, "pg_xact", LWTRANCHE_XACT_BUFFER,
|
||||||
SYNC_HANDLER_CLOG, false);
|
SYNC_HANDLER_CLOG, false);
|
||||||
SlruPagePrecedesUnitTests(XactCtl, CLOG_XACTS_PER_PAGE);
|
SlruPagePrecedesUnitTests(XactCtl, CLOG_XACTS_PER_PAGE);
|
||||||
|
@ -529,7 +529,7 @@ CommitTsShmemInit(void)
|
|||||||
bool found;
|
bool found;
|
||||||
|
|
||||||
CommitTsCtl->PagePrecedes = CommitTsPagePrecedes;
|
CommitTsCtl->PagePrecedes = CommitTsPagePrecedes;
|
||||||
SimpleLruInit(CommitTsCtl, "CommitTs", CommitTsShmemBuffers(), 0,
|
SimpleLruInit(CommitTsCtl, "commit_timestamp", CommitTsShmemBuffers(), 0,
|
||||||
CommitTsSLRULock, "pg_commit_ts",
|
CommitTsSLRULock, "pg_commit_ts",
|
||||||
LWTRANCHE_COMMITTS_BUFFER,
|
LWTRANCHE_COMMITTS_BUFFER,
|
||||||
SYNC_HANDLER_COMMIT_TS,
|
SYNC_HANDLER_COMMIT_TS,
|
||||||
|
@ -1851,14 +1851,14 @@ MultiXactShmemInit(void)
|
|||||||
MultiXactMemberCtl->PagePrecedes = MultiXactMemberPagePrecedes;
|
MultiXactMemberCtl->PagePrecedes = MultiXactMemberPagePrecedes;
|
||||||
|
|
||||||
SimpleLruInit(MultiXactOffsetCtl,
|
SimpleLruInit(MultiXactOffsetCtl,
|
||||||
"MultiXactOffset", NUM_MULTIXACTOFFSET_BUFFERS, 0,
|
"multixact_offset", NUM_MULTIXACTOFFSET_BUFFERS, 0,
|
||||||
MultiXactOffsetSLRULock, "pg_multixact/offsets",
|
MultiXactOffsetSLRULock, "pg_multixact/offsets",
|
||||||
LWTRANCHE_MULTIXACTOFFSET_BUFFER,
|
LWTRANCHE_MULTIXACTOFFSET_BUFFER,
|
||||||
SYNC_HANDLER_MULTIXACT_OFFSET,
|
SYNC_HANDLER_MULTIXACT_OFFSET,
|
||||||
false);
|
false);
|
||||||
SlruPagePrecedesUnitTests(MultiXactOffsetCtl, MULTIXACT_OFFSETS_PER_PAGE);
|
SlruPagePrecedesUnitTests(MultiXactOffsetCtl, MULTIXACT_OFFSETS_PER_PAGE);
|
||||||
SimpleLruInit(MultiXactMemberCtl,
|
SimpleLruInit(MultiXactMemberCtl,
|
||||||
"MultiXactMember", NUM_MULTIXACTMEMBER_BUFFERS, 0,
|
"multixact_member", NUM_MULTIXACTMEMBER_BUFFERS, 0,
|
||||||
MultiXactMemberSLRULock, "pg_multixact/members",
|
MultiXactMemberSLRULock, "pg_multixact/members",
|
||||||
LWTRANCHE_MULTIXACTMEMBER_BUFFER,
|
LWTRANCHE_MULTIXACTMEMBER_BUFFER,
|
||||||
SYNC_HANDLER_MULTIXACT_MEMBER,
|
SYNC_HANDLER_MULTIXACT_MEMBER,
|
||||||
|
@ -200,7 +200,7 @@ void
|
|||||||
SUBTRANSShmemInit(void)
|
SUBTRANSShmemInit(void)
|
||||||
{
|
{
|
||||||
SubTransCtl->PagePrecedes = SubTransPagePrecedes;
|
SubTransCtl->PagePrecedes = SubTransPagePrecedes;
|
||||||
SimpleLruInit(SubTransCtl, "Subtrans", NUM_SUBTRANS_BUFFERS, 0,
|
SimpleLruInit(SubTransCtl, "subtransaction", NUM_SUBTRANS_BUFFERS, 0,
|
||||||
SubtransSLRULock, "pg_subtrans",
|
SubtransSLRULock, "pg_subtrans",
|
||||||
LWTRANCHE_SUBTRANS_BUFFER, SYNC_HANDLER_NONE,
|
LWTRANCHE_SUBTRANS_BUFFER, SYNC_HANDLER_NONE,
|
||||||
false);
|
false);
|
||||||
|
@ -541,7 +541,7 @@ AsyncShmemInit(void)
|
|||||||
* names are used in order to avoid wraparound.
|
* names are used in order to avoid wraparound.
|
||||||
*/
|
*/
|
||||||
NotifyCtl->PagePrecedes = asyncQueuePagePrecedes;
|
NotifyCtl->PagePrecedes = asyncQueuePagePrecedes;
|
||||||
SimpleLruInit(NotifyCtl, "Notify", NUM_NOTIFY_BUFFERS, 0,
|
SimpleLruInit(NotifyCtl, "notify", NUM_NOTIFY_BUFFERS, 0,
|
||||||
NotifySLRULock, "pg_notify", LWTRANCHE_NOTIFY_BUFFER,
|
NotifySLRULock, "pg_notify", LWTRANCHE_NOTIFY_BUFFER,
|
||||||
SYNC_HANDLER_NONE, true);
|
SYNC_HANDLER_NONE, true);
|
||||||
|
|
||||||
|
@ -812,7 +812,7 @@ SerialInit(void)
|
|||||||
* Set up SLRU management of the pg_serial data.
|
* Set up SLRU management of the pg_serial data.
|
||||||
*/
|
*/
|
||||||
SerialSlruCtl->PagePrecedes = SerialPagePrecedesLogically;
|
SerialSlruCtl->PagePrecedes = SerialPagePrecedesLogically;
|
||||||
SimpleLruInit(SerialSlruCtl, "Serial",
|
SimpleLruInit(SerialSlruCtl, "serializable",
|
||||||
NUM_SERIAL_BUFFERS, 0, SerialSLRULock, "pg_serial",
|
NUM_SERIAL_BUFFERS, 0, SerialSLRULock, "pg_serial",
|
||||||
LWTRANCHE_SERIAL_BUFFER, SYNC_HANDLER_NONE,
|
LWTRANCHE_SERIAL_BUFFER, SYNC_HANDLER_NONE,
|
||||||
false);
|
false);
|
||||||
|
@ -269,13 +269,13 @@ typedef struct PgStat_KindInfo
|
|||||||
* definitions.
|
* definitions.
|
||||||
*/
|
*/
|
||||||
static const char *const slru_names[] = {
|
static const char *const slru_names[] = {
|
||||||
"CommitTs",
|
"commit_timestamp",
|
||||||
"MultiXactMember",
|
"multixact_member",
|
||||||
"MultiXactOffset",
|
"multixact_offset",
|
||||||
"Notify",
|
"notify",
|
||||||
"Serial",
|
"serializable",
|
||||||
"Subtrans",
|
"subtransaction",
|
||||||
"Xact",
|
"transaction",
|
||||||
"other" /* has to be last */
|
"other" /* has to be last */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -3039,8 +3039,8 @@ pg_stat_force_next_flush
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3093,8 +3093,8 @@ pg_stat_force_next_flush
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s2_big_notify: SELECT pg_notify('stats_test_use',
|
step s2_big_notify: SELECT pg_notify('stats_test_use',
|
||||||
@ -3133,8 +3133,8 @@ pg_stat_force_next_flush
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s2_begin: BEGIN;
|
step s2_begin: BEGIN;
|
||||||
@ -3176,8 +3176,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_none: SET stats_fetch_consistency = 'none';
|
step s1_fetch_consistency_none: SET stats_fetch_consistency = 'none';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3243,8 +3243,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_cache: SET stats_fetch_consistency = 'cache';
|
step s1_fetch_consistency_cache: SET stats_fetch_consistency = 'cache';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3310,8 +3310,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3377,8 +3377,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_none: SET stats_fetch_consistency = 'none';
|
step s1_fetch_consistency_none: SET stats_fetch_consistency = 'none';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3450,8 +3450,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_cache: SET stats_fetch_consistency = 'cache';
|
step s1_fetch_consistency_cache: SET stats_fetch_consistency = 'cache';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3523,8 +3523,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3596,8 +3596,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3653,8 +3653,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
|
@ -3063,8 +3063,8 @@ pg_stat_force_next_flush
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3117,8 +3117,8 @@ pg_stat_force_next_flush
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s2_big_notify: SELECT pg_notify('stats_test_use',
|
step s2_big_notify: SELECT pg_notify('stats_test_use',
|
||||||
@ -3157,8 +3157,8 @@ pg_stat_force_next_flush
|
|||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s2_begin: BEGIN;
|
step s2_begin: BEGIN;
|
||||||
@ -3200,8 +3200,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_none: SET stats_fetch_consistency = 'none';
|
step s1_fetch_consistency_none: SET stats_fetch_consistency = 'none';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3267,8 +3267,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_cache: SET stats_fetch_consistency = 'cache';
|
step s1_fetch_consistency_cache: SET stats_fetch_consistency = 'cache';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3334,8 +3334,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3401,8 +3401,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_none: SET stats_fetch_consistency = 'none';
|
step s1_fetch_consistency_none: SET stats_fetch_consistency = 'none';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3474,8 +3474,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_cache: SET stats_fetch_consistency = 'cache';
|
step s1_fetch_consistency_cache: SET stats_fetch_consistency = 'cache';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3547,8 +3547,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3620,8 +3620,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
@ -3677,8 +3677,8 @@ pg_stat_force_next_flush
|
|||||||
|
|
||||||
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
step s1_fetch_consistency_snapshot: SET stats_fetch_consistency = 'snapshot';
|
||||||
step s1_slru_save_stats:
|
step s1_slru_save_stats:
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
|
|
||||||
step s1_listen: LISTEN stats_test_nothing;
|
step s1_listen: LISTEN stats_test_nothing;
|
||||||
step s1_begin: BEGIN;
|
step s1_begin: BEGIN;
|
||||||
|
@ -107,8 +107,8 @@ step s1_table_stats {
|
|||||||
|
|
||||||
# SLRU stats steps
|
# SLRU stats steps
|
||||||
step s1_slru_save_stats {
|
step s1_slru_save_stats {
|
||||||
INSERT INTO test_slru_stats VALUES('Notify', 'blks_zeroed',
|
INSERT INTO test_slru_stats VALUES('notify', 'blks_zeroed',
|
||||||
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'Notify'));
|
(SELECT blks_zeroed FROM pg_stat_slru WHERE name = 'notify'));
|
||||||
}
|
}
|
||||||
step s1_listen { LISTEN stats_test_nothing; }
|
step s1_listen { LISTEN stats_test_nothing; }
|
||||||
step s1_big_notify { SELECT pg_notify('stats_test_use',
|
step s1_big_notify { SELECT pg_notify('stats_test_use',
|
||||||
|
@ -866,21 +866,21 @@ WHERE pg_stat_get_backend_pid(beid) = pg_backend_pid();
|
|||||||
-- Test that resetting stats works for reset timestamp
|
-- Test that resetting stats works for reset timestamp
|
||||||
-----
|
-----
|
||||||
-- Test that reset_slru with a specified SLRU works.
|
-- Test that reset_slru with a specified SLRU works.
|
||||||
SELECT stats_reset AS slru_commit_ts_reset_ts FROM pg_stat_slru WHERE name = 'CommitTs' \gset
|
SELECT stats_reset AS slru_commit_ts_reset_ts FROM pg_stat_slru WHERE name = 'commit_timestamp' \gset
|
||||||
SELECT stats_reset AS slru_notify_reset_ts FROM pg_stat_slru WHERE name = 'Notify' \gset
|
SELECT stats_reset AS slru_notify_reset_ts FROM pg_stat_slru WHERE name = 'notify' \gset
|
||||||
SELECT pg_stat_reset_slru('CommitTs');
|
SELECT pg_stat_reset_slru('commit_timestamp');
|
||||||
pg_stat_reset_slru
|
pg_stat_reset_slru
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT stats_reset > :'slru_commit_ts_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'CommitTs';
|
SELECT stats_reset > :'slru_commit_ts_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'commit_timestamp';
|
||||||
?column?
|
?column?
|
||||||
----------
|
----------
|
||||||
t
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT stats_reset AS slru_commit_ts_reset_ts FROM pg_stat_slru WHERE name = 'CommitTs' \gset
|
SELECT stats_reset AS slru_commit_ts_reset_ts FROM pg_stat_slru WHERE name = 'commit_timestamp' \gset
|
||||||
-- Test that multiple SLRUs are reset when no specific SLRU provided to reset function
|
-- Test that multiple SLRUs are reset when no specific SLRU provided to reset function
|
||||||
SELECT pg_stat_reset_slru();
|
SELECT pg_stat_reset_slru();
|
||||||
pg_stat_reset_slru
|
pg_stat_reset_slru
|
||||||
@ -888,13 +888,13 @@ SELECT pg_stat_reset_slru();
|
|||||||
|
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT stats_reset > :'slru_commit_ts_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'CommitTs';
|
SELECT stats_reset > :'slru_commit_ts_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'commit_timestamp';
|
||||||
?column?
|
?column?
|
||||||
----------
|
----------
|
||||||
t
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
SELECT stats_reset > :'slru_notify_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'Notify';
|
SELECT stats_reset > :'slru_notify_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'notify';
|
||||||
?column?
|
?column?
|
||||||
----------
|
----------
|
||||||
t
|
t
|
||||||
|
@ -447,16 +447,16 @@ WHERE pg_stat_get_backend_pid(beid) = pg_backend_pid();
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
-- Test that reset_slru with a specified SLRU works.
|
-- Test that reset_slru with a specified SLRU works.
|
||||||
SELECT stats_reset AS slru_commit_ts_reset_ts FROM pg_stat_slru WHERE name = 'CommitTs' \gset
|
SELECT stats_reset AS slru_commit_ts_reset_ts FROM pg_stat_slru WHERE name = 'commit_timestamp' \gset
|
||||||
SELECT stats_reset AS slru_notify_reset_ts FROM pg_stat_slru WHERE name = 'Notify' \gset
|
SELECT stats_reset AS slru_notify_reset_ts FROM pg_stat_slru WHERE name = 'notify' \gset
|
||||||
SELECT pg_stat_reset_slru('CommitTs');
|
SELECT pg_stat_reset_slru('commit_timestamp');
|
||||||
SELECT stats_reset > :'slru_commit_ts_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'CommitTs';
|
SELECT stats_reset > :'slru_commit_ts_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'commit_timestamp';
|
||||||
SELECT stats_reset AS slru_commit_ts_reset_ts FROM pg_stat_slru WHERE name = 'CommitTs' \gset
|
SELECT stats_reset AS slru_commit_ts_reset_ts FROM pg_stat_slru WHERE name = 'commit_timestamp' \gset
|
||||||
|
|
||||||
-- Test that multiple SLRUs are reset when no specific SLRU provided to reset function
|
-- Test that multiple SLRUs are reset when no specific SLRU provided to reset function
|
||||||
SELECT pg_stat_reset_slru();
|
SELECT pg_stat_reset_slru();
|
||||||
SELECT stats_reset > :'slru_commit_ts_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'CommitTs';
|
SELECT stats_reset > :'slru_commit_ts_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'commit_timestamp';
|
||||||
SELECT stats_reset > :'slru_notify_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'Notify';
|
SELECT stats_reset > :'slru_notify_reset_ts'::timestamptz FROM pg_stat_slru WHERE name = 'notify';
|
||||||
|
|
||||||
-- Test that reset_shared with archiver specified as the stats type works
|
-- Test that reset_shared with archiver specified as the stats type works
|
||||||
SELECT stats_reset AS archiver_reset_ts FROM pg_stat_archiver \gset
|
SELECT stats_reset AS archiver_reset_ts FROM pg_stat_archiver \gset
|
||||||
|
Loading…
Reference in New Issue
Block a user