| Lists: | pgsql-hackers |
|---|
| From: | MyungKyu LIM <myungkyu(dot)lim(at)samsung(dot)com> |
|---|---|
| To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | [Todo item] Add entry creation timestamp column to pg_stat_replication |
| Date: | 2018-07-31 08:56:57 |
| Message-ID: | 1657809367.407321.1533027417725.JavaMail.jboss@ep2ml404 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Hello hackers,
I have worked on following todo list item.
- Add entry creation timestamp column to pg_stat_replication
http://archives.postgresql.org/pgsql-hackers/2011-08/msg00694.php
This item looks like simple because necessary data was already exist.
So, I wrote a prototype patch.
test example>
postgres=# select pid, reply_time from pg_stat_replication;
-[ RECORD 1 ]-----------------------------
pid | 4817
reply_time | 2018-07-31 12:00:53.911198+09
-[ RECORD 2 ]-----------------------------
pid | 4819
reply_time | 2018-07-31 12:00:53.911154+09
Several candidates exist for the field name.
- reply_timestamp
- info_gen_timestamp
- stats_reset
- last_msg_send_time
Feedback and suggestion will be very welcome.
Thanks!
Best regards,
Myungkyu, Lim
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Implement-following-TODO-list-item.patch | application/octet-stream | 7.2 KB |
| From: | MyungKyu LIM <myungkyu(dot)lim(at)samsung(dot)com> |
|---|---|
| To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Woosung Sohn <woosung(dot)sohn(at)samsung(dot)com>, DoHyung HONG <don(dot)hong(at)samsung(dot)com> |
| Subject: | FW: [Todo item] Add entry creation timestamp column to pg_stat_replication |
| Date: | 2018-08-02 09:33:51 |
| Message-ID: | 1459102727.630179.1533202431977.JavaMail.jboss@ep2ml404 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
I changed field name from 'reply_time' to 'last_msg_send_time'.
Because 'last_msg_send_time' is used in pg_stat_wal_receiver/pg_stat_subsctiption view.
I think that field has the same meaning.
test example>
postgres=# select pid, last_msg_send_time from pg_stat_replication;
-[ RECORD 1 ]------+------------------------------
pid | 12015
last_msg_send_time | 2018-08-02 18:02:49.233049+09
-[ RECORD 2 ]------+------------------------------
pid | 12084
last_msg_send_time | 2018-08-02 18:02:48.583256+09
I Attached new patch file : 0001-Implement-following-TODO-list-item-v2.patch
Feedback and suggestion will be very welcome.
Thanks!
Best regards,
Myungkyu, Lim
--------- Original Message ---------
Date : 2018-07-31 17:56 (GMT+9)
Title : [Todo item] Add entry creation timestamp column to pg_stat_replication
Hello hackers,
I have worked on following todo list item.
- Add entry creation timestamp column to pg_stat_replication
http://archives.postgresql.org/pgsql-hackers/2011-08/msg00694.php
This item looks like simple because necessary data was already exist.
So, I wrote a prototype patch.
test example>
postgres=# select pid, reply_time from pg_stat_replication;
-[ RECORD 1 ]-----------------------------
pid | 4817
reply_time | 2018-07-31 12:00:53.911198+09
-[ RECORD 2 ]-----------------------------
pid | 4819
reply_time | 2018-07-31 12:00:53.911154+09
Several candidates exist for the field name.
- reply_timestamp
- info_gen_timestamp
- stats_reset
- last_msg_send_time
Feedback and suggestion will be very welcome.
Thanks!
Best regards,
Myungkyu, Lim
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Implement-following-TODO-list-item-v1.patch | application/octet-stream | 7.2 KB |
| 0001-Implement-following-TODO-list-item-v2.patch | application/octet-stream | 7.2 KB |
| From: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> |
|---|---|
| To: | myungkyu(dot)lim(at)samsung(dot)com, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [Todo item] Add entry creation timestamp column to pg_stat_replication |
| Date: | 2018-10-25 06:13:42 |
| Message-ID: | 5e6d20066860e079803db48bd6b969c741374f35.camel@cybertec.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
MyungKyu LIM wrote:
> I have worked on following todo list item.
>
> - Add entry creation timestamp column to pg_stat_replication
> http://archives.postgresql.org/pgsql-hackers/2011-08/msg00694.php
>
> This item looks like simple because necessary data was already exist.
> So, I wrote a prototype patch.
Thank you!
You should add this to the next commitfest:
https://commitfest.postgresql.org/20/
Please make sure to read the Developer FAQ if you haven't already done it:
https://wiki.postgresql.org/wiki/Developer_FAQ
Yours,
Laurenz Albe
| From: | MyungKyu LIM <myungkyu(dot)lim(at)samsung(dot)com> |
|---|---|
| To: | Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | RE: [Todo item] Add entry creation timestamp column to pg_stat_replication |
| Date: | 2018-10-25 07:28:13 |
| Message-ID: | 2037111623.586731.1540452493623.JavaMail.jboss@ep2ml404 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Thanks for your feedback!
Include documentation for new column.
Attached new patch file
: 0001-Implement-following-TODO-list-item-v3.patch
Best regards,
Myungkyu, Lim
--------- Original Message ---------
Sender : Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
Date : 2018-10-25 15:14 (GMT+9)
Title : Re: [Todo item] Add entry creation timestamp column to pg_stat_replication
MyungKyu LIM wrote:
> I have worked on following todo list item.
>
> - Add entry creation timestamp column to pg_stat_replication
> http://archives.postgresql.org/pgsql-hackers/2011-08/msg00694.php
>
> This item looks like simple because necessary data was already exist.
> So, I wrote a prototype patch.
Thank you!
You should add this to the next commitfest:
https://commitfest.postgresql.org/20/
Please make sure to read the Developer FAQ if you haven't already done it:
https://wiki.postgresql.org/wiki/Developer_FAQ
Yours,
Laurenz Albe
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Implement-following-TODO-list-item-v3.patch | application/octet-stream | 7.9 KB |
| From: | MyungKyu LIM <myungkyu(dot)lim(at)samsung(dot)com> |
|---|---|
| To: | "michael(at)paquier(dot)xyz" <michael(at)paquier(dot)xyz>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | MyungKyu LIM <myungkyu(dot)lim(at)samsung(dot)com> |
| Subject: | RE: [Todo item] Add entry creation timestamp column to pg_stat_replication |
| Date: | 2018-10-30 03:14:11 |
| Message-ID: | 20181030031411epcms4p8b59c6046930c7ee067252f8f5ba34949@epcms4p8 |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Thanks for your feedback and info!
I registered patch in commit fest.
https://commitfest.postgresql.org/20/1841/
For the record, replied on original thread.
Best regards,
Myungkyu, Lim
-----Original Message-----
From: Michael Paquier [mailto:michael(at)paquier(dot)xyz]
Sent: Thursday, October 25, 2018 8:50 PM
To: Laurenz Albe
Cc: myungkyu(dot)lim(at)samsung(dot)com; pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg_stat_replication vs StandbyReplyMessage
On Thu, Oct 25, 2018 at 08:13:53AM +0200, Laurenz Albe wrote:
> MyungKyu LIM wrote:
>> I saw this topic in todo list,
>>
>> so I implemented simple patch.
>>
>> https://www.postgresql.org/message-id/flat/1657809367.407321.15330274
>> 17725.JavaMail.jboss%40ep2ml404
>
> For the archives' sake, please always reply on the original thread.
And if you could add some documentation into the patch, and register it to the commit fest if you would like to get it reviewed, that would be nice. Here are some general guidelines on the matter:
https://wiki.postgresql.org/wiki/Submitting_a_Patch
--
Michael
| From: | Surafel Temesgen <surafel3000(at)gmail(dot)com> |
|---|---|
| To: | myungkyu(dot)lim(at)samsung(dot)com |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [Todo item] Add entry creation timestamp column to pg_stat_replication |
| Date: | 2018-11-14 10:48:36 |
| Message-ID: | CALAY4q_hmeqd+E1kGOvDX5c22_3ns3m9O5i7qnaYmNdGm7pTqA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Hi .
On Tue, Jul 31, 2018 at 11:57 AM MyungKyu LIM <myungkyu(dot)lim(at)samsung(dot)com>
wrote:
>
> Feedback and suggestion will be very welcome.
>
Can you explain the purpose of this feature more because now we have
columns to report replication delay times like write_lag ,flush_lag and
replay_lag that can use for similar purpose .
regards
Surafel
| From: | "myungkyu(dot)lim" <myungkyu(dot)lim(at)samsung(dot)com> |
|---|---|
| To: | "'Surafel Temesgen'" <surafel3000(at)gmail(dot)com> |
| Cc: | "'PostgreSQL Hackers'" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | RE: [Todo item] Add entry creation timestamp column to pg_stat_replication |
| Date: | 2018-11-15 05:10:21 |
| Message-ID: | 003001d47ca1$8282dc20$87889460$@samsung.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
Hi.
Thanks for your feedback.
> Can you explain the purpose of this feature more because now we have columns to report replication delay times like write_lag ,flush_lag and replay_lag that can use for similar purpose .
I think, time elapsed stats are very useful on DML query active system,
but not present that stats on idle system - not query, or only select.
sent_lsn | 0/5476C88
write_lsn | 0/5476C88
flush_lsn | 0/5476C88
replay_lsn | 0/5476C88
write_lag | 00:00:00.000055
flush_lag | 00:00:00.000855
replay_lag | 00:00:00.000914
sync_priority | 0
sync_state | async
last_msg_send_time | 2018-11-15 14:04:39.65889+09
state | streaming
sent_lsn | 0/5476CC0
write_lsn | 0/5476CC0
flush_lsn | 0/5476CC0
replay_lsn | 0/5476CC0
write_lag |
flush_lag |
replay_lag |
sync_priority | 0
sync_state | async
last_msg_send_time | 2018-11-15 14:05:02.935457+09
state | streaming
sent_lsn | 0/5476CC0
write_lsn | 0/5476CC0
flush_lsn | 0/5476CC0
replay_lsn | 0/5476CC0
write_lag |
flush_lag |
replay_lag |
sync_priority | 0
sync_state | async
last_msg_send_time | 2018-11-15 14:06:23.128947+09
This timestamp column is useful when react interval check and debugging on idle system.
Best regards,
Myungkyu, Lim
| From: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
|---|---|
| To: | myungkyu(dot)lim(at)samsung(dot)com |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>, woosung(dot)sohn(at)samsung(dot)com, don(dot)hong(at)samsung(dot)com |
| Subject: | Re: FW: [Todo item] Add entry creation timestamp column to pg_stat_replication |
| Date: | 2018-11-15 07:04:44 |
| Message-ID: | CAD21AoCg1UHpYEwp-poDxtpG0rfQpox-m6++tEEJ+0-=pXLhog@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Lists: | pgsql-hackers |
On Thu, Aug 2, 2018 at 6:34 PM MyungKyu LIM <myungkyu(dot)lim(at)samsung(dot)com> wrote:
>
> I changed field name from 'reply_time' to 'last_msg_send_time'.
> Because 'last_msg_send_time' is used in pg_stat_wal_receiver/pg_stat_subsctiption view.
> I think that field has the same meaning.
I got confused by the field name. If we have 'last_msg_send_time'
field in pg_stat_replciation which has information of wal senders
users would think it as a time when the wal sender sent a message last
time. However values of the fields actually shows a time when the wal
receiver sent a reply message last time. So perhaps
'last_reply_send_time' would be more clear.
Regards,
--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center