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

Commit320545b

Browse files
committed
Add information about WAL buffers being full to EXPLAIN (WAL)
This is similar toce5bcc4, relying on the addition ofwal_buffers_full to WalUsage. This time, the information is added tothe output generated by EXPLAIN (WAL).Author: Bertrand DrouvotReviewed-by: Ilia EvdokimovDiscussion:https://postgr.es/m/Z6SOha5YFFgvpwQY@ip-10-97-1-34.eu-west-3.compute.internal
1 parentce5bcc4 commit320545b

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

‎doc/src/sgml/ref/explain.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,9 @@ ROLLBACK;
242242
<listitem>
243243
<para>
244244
Include information on WAL record generation. Specifically, include the
245-
number of records, number of full page images (fpi) and the amount of WAL
246-
generated in bytes. In text format, only non-zero values are printed.
245+
number of records, number of full page images (fpi), the amount of WAL
246+
generated in bytes and the number of times the WAL buffers became full.
247+
In text format, only non-zero values are printed.
247248
This parameter may only be used when <literal>ANALYZE</literal> is also
248249
enabled. It defaults to <literal>FALSE</literal>.
249250
</para>

‎src/backend/commands/explain.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4242,7 +4242,7 @@ show_wal_usage(ExplainState *es, const WalUsage *usage)
42424242
{
42434243
/* Show only positive counter values. */
42444244
if ((usage->wal_records>0)|| (usage->wal_fpi>0)||
4245-
(usage->wal_bytes>0))
4245+
(usage->wal_bytes>0)|| (usage->wal_buffers_full>0))
42464246
{
42474247
ExplainIndentText(es);
42484248
appendStringInfoString(es->str,"WAL:");
@@ -4256,6 +4256,9 @@ show_wal_usage(ExplainState *es, const WalUsage *usage)
42564256
if (usage->wal_bytes>0)
42574257
appendStringInfo(es->str," bytes="UINT64_FORMAT,
42584258
usage->wal_bytes);
4259+
if (usage->wal_buffers_full>0)
4260+
appendStringInfo(es->str," buffers full=%lld",
4261+
(long long)usage->wal_buffers_full);
42594262
appendStringInfoChar(es->str,'\n');
42604263
}
42614264
}
@@ -4267,6 +4270,8 @@ show_wal_usage(ExplainState *es, const WalUsage *usage)
42674270
usage->wal_fpi,es);
42684271
ExplainPropertyUInteger("WAL Bytes",NULL,
42694272
usage->wal_bytes,es);
4273+
ExplainPropertyInteger("WAL Buffers Full",NULL,
4274+
usage->wal_buffers_full,es);
42704275
}
42714276
}
42724277

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp