Small doc improvement about spilled txn tracking

Started by Masahiko Sawadaover 5 years ago6 messages
#1Masahiko Sawada
masahiko.sawada@2ndquadrant.com
1 attachment(s)

Hi all,

When reading pg_stat_replication doc of PG13, I thought it's better to
mention that tracking of spilled transactions works only for logical
replication like we already mentioned about replication lag tracking:

<para>
Lag times work automatically for physical replication. Logical decoding
plugins may optionally emit tracking messages; if they do not, the tracking
mechanism will simply display NULL lag.
</para>

What do you think? Please find attached patch.

Regards,

--
Masahiko Sawada http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

spilled_txn_doc.patchapplication/octet-stream; name=spilled_txn_doc.patchDownload
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 321a0f4bb1..20b1c70ff9 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -2518,6 +2518,12 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
    mechanism will simply display NULL lag.
   </para>
 
+  <para>
+   Tracking of spilled transactions works for only logical replication.  In
+   physical replication the tracking mechanism will display 0.  Logical
+   decoding plugins may optionally emit tracking message.
+  </para>
+
   <note>
    <para>
     The reported lag times are not predictions of how long it will take for
#2Amit Kapila
amit.kapila16@gmail.com
In reply to: Masahiko Sawada (#1)
Re: Small doc improvement about spilled txn tracking

On Tue, Jun 2, 2020 at 9:10 AM Masahiko Sawada
<masahiko.sawada@2ndquadrant.com> wrote:

Hi all,

When reading pg_stat_replication doc of PG13, I thought it's better to
mention that tracking of spilled transactions works only for logical
replication like we already mentioned about replication lag tracking:

<para>
Lag times work automatically for physical replication. Logical decoding
plugins may optionally emit tracking messages; if they do not, the tracking
mechanism will simply display NULL lag.
</para>

What do you think?

+1.

Please find attached patch.

On a quick look, it seems fine but I will look in more detail and let
you know if I have any feedback.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#3Amit Kapila
amit.kapila16@gmail.com
In reply to: Amit Kapila (#2)
1 attachment(s)
Re: Small doc improvement about spilled txn tracking

On Tue, Jun 2, 2020 at 10:22 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jun 2, 2020 at 9:10 AM Masahiko Sawada
<masahiko.sawada@2ndquadrant.com> wrote:

Please find attached patch.

On a quick look, it seems fine but I will look in more detail and let
you know if I have any feedback.

I am not sure if we need to add "Logical decoding plugins may
optionally emit tracking message." as the stats behavior should be the
same for decoding plugin and logical replication. Apart from removing
this line, I have made a few other minor changes, see what you think
of attached?

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

Attachments:

0001-Doc-Update-the-documentation-for-spilled-transaction.patchapplication/octet-stream; name=0001-Doc-Update-the-documentation-for-spilled-transaction.patchDownload
From 590da691b9dba812d64aab5853b65e874324d98b Mon Sep 17 00:00:00 2001
From: Amit Kapila <akapila@postgresql.org>
Date: Tue, 2 Jun 2020 11:11:25 +0530
Subject: [PATCH] Doc: Update the documentation for spilled transaction
 statistics.

Reported-by: Sawada Masahiko
Author: Sawada Masahiko, Amit Kapila
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CA+fd4k4vNg7dRO5ECHdtQXXf1=Q4M98pfLW0dU7BKD8h79pkqA@mail.gmail.com
---
 doc/src/sgml/monitoring.sgml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 321a0f4..89662cc 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -2518,6 +2518,12 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
    mechanism will simply display NULL lag.
   </para>
 
+  <para>
+   Tracking of spilled transactions works only for logical replication.  In
+   physical replication, the tracking mechanism will display 0 for spilled
+   statistics.
+  </para>
+
   <note>
    <para>
     The reported lag times are not predictions of how long it will take for
-- 
1.8.3.1

#4Masahiko Sawada
masahiko.sawada@2ndquadrant.com
In reply to: Amit Kapila (#3)
Re: Small doc improvement about spilled txn tracking

On Tue, 2 Jun 2020 at 14:50, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jun 2, 2020 at 10:22 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jun 2, 2020 at 9:10 AM Masahiko Sawada
<masahiko.sawada@2ndquadrant.com> wrote:

Please find attached patch.

On a quick look, it seems fine but I will look in more detail and let
you know if I have any feedback.

I am not sure if we need to add "Logical decoding plugins may
optionally emit tracking message." as the stats behavior should be the
same for decoding plugin and logical replication. Apart from removing
this line, I have made a few other minor changes, see what you think
of attached?

I'm okay with removing that sentence. The patch looks good to me.

Regards,

--
Masahiko Sawada http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

#5Amit Kapila
amit.kapila16@gmail.com
In reply to: Masahiko Sawada (#4)
Re: Small doc improvement about spilled txn tracking

On Tue, Jun 2, 2020 at 11:30 AM Masahiko Sawada
<masahiko.sawada@2ndquadrant.com> wrote:

On Tue, 2 Jun 2020 at 14:50, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jun 2, 2020 at 10:22 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jun 2, 2020 at 9:10 AM Masahiko Sawada
<masahiko.sawada@2ndquadrant.com> wrote:

Please find attached patch.

On a quick look, it seems fine but I will look in more detail and let
you know if I have any feedback.

I am not sure if we need to add "Logical decoding plugins may
optionally emit tracking message." as the stats behavior should be the
same for decoding plugin and logical replication. Apart from removing
this line, I have made a few other minor changes, see what you think
of attached?

I'm okay with removing that sentence. The patch looks good to me.

Pushed.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

#6Masahiko Sawada
masahiko.sawada@2ndquadrant.com
In reply to: Amit Kapila (#5)
Re: Small doc improvement about spilled txn tracking

On Tue, 2 Jun 2020 at 15:15, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jun 2, 2020 at 11:30 AM Masahiko Sawada
<masahiko.sawada@2ndquadrant.com> wrote:

On Tue, 2 Jun 2020 at 14:50, Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jun 2, 2020 at 10:22 AM Amit Kapila <amit.kapila16@gmail.com> wrote:

On Tue, Jun 2, 2020 at 9:10 AM Masahiko Sawada
<masahiko.sawada@2ndquadrant.com> wrote:

Please find attached patch.

On a quick look, it seems fine but I will look in more detail and let
you know if I have any feedback.

I am not sure if we need to add "Logical decoding plugins may
optionally emit tracking message." as the stats behavior should be the
same for decoding plugin and logical replication. Apart from removing
this line, I have made a few other minor changes, see what you think
of attached?

I'm okay with removing that sentence. The patch looks good to me.

Pushed.

Thank you!

Regards,

--
Masahiko Sawada http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services