pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
LogicalChanges* and LogicalSubxact* wait events are never reported
6+ messages / 3 participants
[nested] [flat]

* LogicalChanges* and LogicalSubxact* wait events are never reported
@ 2021-10-20 05:12  Masahiro Ikeda <ikedamsh@oss.nttdata.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Masahiro Ikeda @ 2021-10-20 05:12 UTC (permalink / raw)
  To: pgsql-hackers

Hi,

When I read the documents and source code of wait evens,
I found that the following wait events are never reported.

* LogicalChangesRead: Waiting for a read from a logical changes file.
* LogicalChangesWrite: Waiting for a write to a logical changes file.
* LogicalSubxactRead: Waiting for a read from a logical subxact file.
* LogicalSubxactWrite: Waiting for a write to a logical subxact file.


The wait events are introduced in the following patch.

 Add support for streaming to built-in logical replication.
 Amit Kapila on 2020/9/3 11:24:07
 464824323e57dc4b397e8b05854d779908b55304

I read the above discussion and found the wait events were reported at first.
But they seemed to be removed because they are not necessary because
BufFileWrite/BufFileRead are enough([1]).


If my understanding is right, it's better to remove them since they make
users confused. Please see the attached patch. I confirmed that to make
check-world passes all tests.

[1]
https://www.postgresql.org/message-id/CAA4eK1JV37jXUT5LeWzkBDNNnSntwQbLUZAj6m82QMiR1ZuuHQ%40mail.gma...

Regards,
-- 
Masahiro Ikeda
NTT DATA CORPORATION

Attachments:

  [text/x-patch] v1_remove_unreported_wait_events.patch (2.3K, ../../ff077840-3ab2-04dd-bbe4-4f5dfd2ad481@oss.nttdata.com/2-v1_remove_unreported_wait_events.patch)
  download | inline diff:
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 7355835202..3173ec2566 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -1549,22 +1549,6 @@ postgres   27093  0.0  0.0  30096  2752 ?        Ss   11:34   0:00 postgres: ser
       <entry><literal>WALWrite</literal></entry>
       <entry>Waiting for a write to a WAL file.</entry>
      </row>
-     <row>
-      <entry><literal>LogicalChangesRead</literal></entry>
-      <entry>Waiting for a read from a logical changes file.</entry>
-     </row>
-     <row>
-      <entry><literal>LogicalChangesWrite</literal></entry>
-      <entry>Waiting for a write to a logical changes file.</entry>
-     </row>
-     <row>
-      <entry><literal>LogicalSubxactRead</literal></entry>
-      <entry>Waiting for a read from a logical subxact file.</entry>
-     </row>
-     <row>
-      <entry><literal>LogicalSubxactWrite</literal></entry>
-      <entry>Waiting for a write to a logical subxact file.</entry>
-     </row>
     </tbody>
    </tgroup>
   </table>
diff --git a/src/backend/utils/activity/wait_event.c b/src/backend/utils/activity/wait_event.c
index ef7e6bfb77..4a5b7502f5 100644
--- a/src/backend/utils/activity/wait_event.c
+++ b/src/backend/utils/activity/wait_event.c
@@ -717,18 +717,6 @@ pgstat_get_wait_io(WaitEventIO w)
 		case WAIT_EVENT_WAL_WRITE:
 			event_name = "WALWrite";
 			break;
-		case WAIT_EVENT_LOGICAL_CHANGES_READ:
-			event_name = "LogicalChangesRead";
-			break;
-		case WAIT_EVENT_LOGICAL_CHANGES_WRITE:
-			event_name = "LogicalChangesWrite";
-			break;
-		case WAIT_EVENT_LOGICAL_SUBXACT_READ:
-			event_name = "LogicalSubxactRead";
-			break;
-		case WAIT_EVENT_LOGICAL_SUBXACT_WRITE:
-			event_name = "LogicalSubxactWrite";
-			break;
 
 			/* no default case, so that compiler will warn */
 	}
diff --git a/src/include/utils/wait_event.h b/src/include/utils/wait_event.h
index 6007827b44..c22142365f 100644
--- a/src/include/utils/wait_event.h
+++ b/src/include/utils/wait_event.h
@@ -221,11 +221,7 @@ typedef enum
 	WAIT_EVENT_WAL_READ,
 	WAIT_EVENT_WAL_SYNC,
 	WAIT_EVENT_WAL_SYNC_METHOD_ASSIGN,
-	WAIT_EVENT_WAL_WRITE,
-	WAIT_EVENT_LOGICAL_CHANGES_READ,
-	WAIT_EVENT_LOGICAL_CHANGES_WRITE,
-	WAIT_EVENT_LOGICAL_SUBXACT_READ,
-	WAIT_EVENT_LOGICAL_SUBXACT_WRITE
+	WAIT_EVENT_WAL_WRITE
 } WaitEventIO;
 
 

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: LogicalChanges* and LogicalSubxact* wait events are never reported
@ 2021-10-20 05:20  Michael Paquier <michael@paquier.xyz>
  parent: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Michael Paquier @ 2021-10-20 05:20 UTC (permalink / raw)
  To: Masahiro Ikeda <ikedamsh@oss.nttdata.com>; +Cc: pgsql-hackers

On Wed, Oct 20, 2021 at 02:12:20PM +0900, Masahiro Ikeda wrote:
> If my understanding is right, it's better to remove them since they make
> users confused. Please see the attached patch. I confirmed that to make
> check-world passes all tests.

Yeah, I don't see the point in keeping these events around if they are
not used.  Perhaps Amit has some plans for them, though.
--
Michael

Attachments:

  [application/pgp-signature] signature.asc (832B, ../../YW+nFebbUI9%2FLuLw@paquier.xyz/2-signature.asc)
  download

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: LogicalChanges* and LogicalSubxact* wait events are never reported
@ 2021-10-20 09:17  Amit Kapila <amit.kapila16@gmail.com>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 6+ messages in thread

From: Amit Kapila @ 2021-10-20 09:17 UTC (permalink / raw)
  To: Michael Paquier <michael@paquier.xyz>; +Cc: Masahiro Ikeda <ikedamsh@oss.nttdata.com>; pgsql-hackers

On Wed, Oct 20, 2021 at 10:50 AM Michael Paquier <michael@paquier.xyz> wrote:
>
> On Wed, Oct 20, 2021 at 02:12:20PM +0900, Masahiro Ikeda wrote:
> > If my understanding is right, it's better to remove them since they make
> > users confused. Please see the attached patch. I confirmed that to make
> > check-world passes all tests.
>
> Yeah, I don't see the point in keeping these events around if they are
> not used.  Perhaps Amit has some plans for them, though.
>

No, there is no plan for these. As far as I remember, during
development, we have decided to use BufFile interface and forgot to
remove these events which were required by the previous versions of
the patch. I'll take care of this.

Thanks for the report and patch!

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: LogicalChanges* and LogicalSubxact* wait events are never reported
@ 2021-10-20 10:16  Masahiro Ikeda <ikedamsh@oss.nttdata.com>
  parent: Amit Kapila <amit.kapila16@gmail.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Masahiro Ikeda @ 2021-10-20 10:16 UTC (permalink / raw)
  To: pgsql-hackers@lists.postgresql.org



On 2021/10/20 18:17, Amit Kapila wrote:
> On Wed, Oct 20, 2021 at 10:50 AM Michael Paquier <michael@paquier.xyz> wrote:
>>
>> On Wed, Oct 20, 2021 at 02:12:20PM +0900, Masahiro Ikeda wrote:
>>> If my understanding is right, it's better to remove them since they make
>>> users confused. Please see the attached patch. I confirmed that to make
>>> check-world passes all tests.
>>
>> Yeah, I don't see the point in keeping these events around if they are
>> not used.  Perhaps Amit has some plans for them, though.
>>
> 
> No, there is no plan for these. As far as I remember, during
> development, we have decided to use BufFile interface and forgot to
> remove these events which were required by the previous versions of
> the patch. I'll take care of this.
> 
> Thanks for the report and patch!
Thanks for your replies and for handling it!

Regards,
-- 
Masahiro Ikeda
NTT DATA CORPORATION





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: LogicalChanges* and LogicalSubxact* wait events are never reported
@ 2021-10-21 08:40  Amit Kapila <amit.kapila16@gmail.com>
  parent: Masahiro Ikeda <ikedamsh@oss.nttdata.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Amit Kapila @ 2021-10-21 08:40 UTC (permalink / raw)
  To: Masahiro Ikeda <ikedamsh@oss.nttdata.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>

On Wed, Oct 20, 2021 at 3:46 PM Masahiro Ikeda <ikedamsh@oss.nttdata.com> wrote:
>
> On 2021/10/20 18:17, Amit Kapila wrote:
> > On Wed, Oct 20, 2021 at 10:50 AM Michael Paquier <michael@paquier.xyz> wrote:
> >>
> >> On Wed, Oct 20, 2021 at 02:12:20PM +0900, Masahiro Ikeda wrote:
> >>> If my understanding is right, it's better to remove them since they make
> >>> users confused. Please see the attached patch. I confirmed that to make
> >>> check-world passes all tests.
> >>
> >> Yeah, I don't see the point in keeping these events around if they are
> >> not used.  Perhaps Amit has some plans for them, though.
> >>
> >
> > No, there is no plan for these. As far as I remember, during
> > development, we have decided to use BufFile interface and forgot to
> > remove these events which were required by the previous versions of
> > the patch. I'll take care of this.
> >
> > Thanks for the report and patch!
> Thanks for your replies and for handling it!
>

Pushed!

-- 
With Regards,
Amit Kapila.





^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: LogicalChanges* and LogicalSubxact* wait events are never reported
@ 2021-10-22 00:38  Masahiro Ikeda <ikedamsh@oss.nttdata.com>
  parent: Amit Kapila <amit.kapila16@gmail.com>
  0 siblings, 0 replies; 6+ messages in thread

From: Masahiro Ikeda @ 2021-10-22 00:38 UTC (permalink / raw)
  To: Amit Kapila <amit.kapila16@gmail.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>



On 2021/10/21 17:40, Amit Kapila wrote:
> On Wed, Oct 20, 2021 at 3:46 PM Masahiro Ikeda <ikedamsh@oss.nttdata.com> wrote:
>>
>> On 2021/10/20 18:17, Amit Kapila wrote:
>>> On Wed, Oct 20, 2021 at 10:50 AM Michael Paquier <michael@paquier.xyz> wrote:
>>>>
>>>> On Wed, Oct 20, 2021 at 02:12:20PM +0900, Masahiro Ikeda wrote:
>>>>> If my understanding is right, it's better to remove them since they make
>>>>> users confused. Please see the attached patch. I confirmed that to make
>>>>> check-world passes all tests.
>>>>
>>>> Yeah, I don't see the point in keeping these events around if they are
>>>> not used.  Perhaps Amit has some plans for them, though.
>>>>
>>>
>>> No, there is no plan for these. As far as I remember, during
>>> development, we have decided to use BufFile interface and forgot to
>>> remove these events which were required by the previous versions of
>>> the patch. I'll take care of this.
>>>
>>> Thanks for the report and patch!
>> Thanks for your replies and for handling it!
>>
> 
> Pushed!

Thanks!

Regards,
-- 
Masahiro Ikeda
NTT DATA CORPORATION





^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2021-10-22 00:38 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 05:12 LogicalChanges* and LogicalSubxact* wait events are never reported Masahiro Ikeda <ikedamsh@oss.nttdata.com>
2021-10-20 05:20 ` Michael Paquier <michael@paquier.xyz>
2021-10-20 09:17   ` Amit Kapila <amit.kapila16@gmail.com>
2021-10-20 10:16     ` Masahiro Ikeda <ikedamsh@oss.nttdata.com>
2021-10-21 08:40       ` Amit Kapila <amit.kapila16@gmail.com>
2021-10-22 00:38         ` Masahiro Ikeda <ikedamsh@oss.nttdata.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox