Re: Add connection active, idle time to pg_stat_activity

2025-03-03 Thread Sergey Dudoladov
Hello, I've rebased the patch according to the CI bot's requirements. Please have a look. Regards, Sergey From 4974c8c9440bbd6d7f9e37e882990602d69b495f Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Mon, 3 Mar 2025 13:19:56 +0100 Subject: [PATCH] Adds pg_stat_session vie

Re: Introduce "log_connection_stages" setting.

2025-03-03 Thread Sergey Dudoladov
Hi all, I must admit I haven't seen the [1] either. Thank you for pointing that out, Bertrand. I agree the patch from Melanie is very close to this patch. Melanie, do you think it is realistic to merge the v8-0001-Modularize-log_connections-output.patch from [1] during the current commitfest ? I

Re: Introduce "log_connection_stages" setting.

2025-02-28 Thread Sergey Dudoladov
Hello hackers, here is the new rebased version of the patch. Regards, Sergey From 8a695aacfd9590737a6e10aca8ddf33181806937 Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Fri, 28 Feb 2025 10:33:11 +0100 Subject: [PATCH] Introduce log_connection_messages This patch removes

Re: Add connection active, idle time to pg_stat_activity

2024-11-26 Thread Sergey Dudoladov
_stat_* views exists for other backends. Regards, Sergey. From 54e4d85a6382fbb4baf4575c99310a6a61a738ac Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Thu, 1 Feb 2024 16:11:36 +0100 Subject: [PATCH] Add pg_stat_session Author: Sergey Dudoladov Adds pg_stat_session view to track statistics ac

Re: Add connection active, idle time to pg_stat_activity

2024-02-01 Thread Sergey Dudoladov
Hi again, > It looks like we can check increments in all fields playing with transactions in tests. I've added such tests. Regards, Sergey From 66ac1efe5424aa1385744a60047ffd44d42dd244 Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Thu, 1 Feb 2024 16:11:36 +0100 Subject: [PA

Re: Add connection active, idle time to pg_stat_activity

2024-02-01 Thread Sergey Dudoladov
ce for the relevant counters. With that I still would like to maintaint the focus on committing the "idle in transactions" part of pg_stat_session first. Regards, Sergey From 05f5117be52b613bb9d11114833eec38e152c6f9 Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Thu, 1 Feb 2024

Re: PATCH: Using BRIN indexes for sorted output

2023-08-02 Thread Sergey Dudoladov
ould not be empty at the ongoing development stage. Attached a small modification of the patch with a draft of the docs. Regards, Sergey Dudoladov From d4050be4bfd0a518eba0ff0a7b561f0420be9861 Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Wed, 2 Aug 2023 16:47:35 +0200 Subject: [PATCH] B

Re: Add connection active, idle time to pg_stat_activity

2023-06-13 Thread Sergey Dudoladov
ut initial connection time) Without pg_stat_session: latency average = 327.370 ms tps = 3.054651 (without initial connection time) Regards, Sergey From 329db9a594b96499135bcbfdfad674f6af7ae1dc Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Tue, 22 Nov 2022 09:23:32 +0100 Subject: [

Re: Introduce "log_connection_stages" setting.

2023-05-16 Thread Sergey Dudoladov
Hello, I have attached the fourth version of the patch. Regards, Sergey. From 0303df03496ec9aafd6e69fa798177ad06a85bee Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Tue, 8 Nov 2022 18:56:26 +0100 Subject: [PATCH] Introduce 'log_connection_messages' This patch removes '

Re: Add connection active, idle time to pg_stat_activity

2023-02-01 Thread Sergey Dudoladov
Hello hackers, I've sketched the first version of a patch to add pg_stat_session. Please review this early version. Regards, Sergey. From 31f781ecd69fc42aaadd9bcdbebaf8f72449946c Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Tue, 22 Nov 2022 09:23:32 +0100 Subject: [PATCH

Re: Introduce "log_connection_stages" setting.

2023-02-01 Thread Sergey Dudoladov
Hi again, Justin, thank you for the fast review. The new version is attached. Regards, Sergey Dudoladov From 994a86e6ac3abb647d93bdaf0f42be76f42b83a8 Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Tue, 8 Nov 2022 18:56:26 +0100 Subject: [PATCH] Introduce 'log_connection_messages&#

Re: Introduce "log_connection_stages" setting.

2023-01-30 Thread Sergey Dudoladov
memory properly in the special case log_connection_messages = 'all' + the GUC option is now only GUC_LIST_INPUT + typo fixes and line rewrapping in the docs Regards, Sergey From 4bf99bccb4b278188dbc679f00d506cd35b025f5 Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Tue, 8 Nov 20

Re: Introduce "log_connection_stages" setting.

2022-11-08 Thread Sergey Dudoladov
Hi hackers, I've sketched an initial patch version; feedback is welcome. Regards, Sergey Dudoladov From be2e6b5c2d6fff1021f52f150b4d849dfbd26ec7 Mon Sep 17 00:00:00 2001 From: Sergey Dudoladov Date: Tue, 8 Nov 2022 18:56:26 +0100 Subject: [PATCH] Introduce 'log_connection_messages&#x

Re: Add connection active, idle time to pg_stat_activity

2022-11-08 Thread Sergey Dudoladov
eal for us. Regards, Sergey Dudoladov

Re: Stats collector's idx_blks_hit value is highly misleading in practice

2022-08-10 Thread Sergey Dudoladov
Hi again, Having played with the task for a little while, I am no longer sure it completely justifies the effort involved. The reason being the task requires modifying the buffer pool in one way or the other, which implies (a) significant effort on performance testing and (b) changes in the buffe

Re: Add connection active, idle time to pg_stat_activity

2022-07-21 Thread Sergey Dudoladov
:00:00 2001 From: Sergey Dudoladov Date: Wed, 20 Apr 2022 23:47:37 +0200 Subject: [PATCH] pg_stat_activity: add 'total_active_time' and 'total_idle_in_transaction_time' catversion bump because of the change in the contents of pg_stat_activity Author: Sergey Dudoladov, based on

Re: Introduce "log_connection_stages" setting.

2022-07-14 Thread Sergey Dudoladov
Hello, Thank you for the constructive feedback. > Your proposal will add more confusion to the already-confused logging-related > GUCs. > I wouldn't introduce a new GUC that depends on the stage of other GUC as you > proposed. Agreed, coupling a new GUC with "log_connections" is likely to lead

Introduce "log_connection_stages" setting.

2022-07-12 Thread Sergey Dudoladov
Hello, The problem we face is excessive logging of connection information that clutters the logs and in corner cases with many short-lived connections leads to disk space exhaustion. Current connection log lines share significant parts of the information - host, port, very close timestamps etc. -

Re: Add connection active, idle time to pg_stat_activity

2022-07-11 Thread Sergey Dudoladov
Hello, thanks for the helpful review. I have incorporated most of the suggestions into the patch. I have also rebased and tested the patch on top of the current master (2cd2569c72b89200). > + int64 active_time_diff = 0; > + int64 transaction_idle_time_diff = 0; > >

Re: Stats collector's idx_blks_hit value is highly misleading in practice

2022-06-29 Thread Sergey Dudoladov
Hello, I would like to get some feedback on that task. > pg_statio_*_tables.idx_blks_hit are highly misleading in practice > because they fail to take account of the difference between internal > pages and leaf pages in B-Tree indexes. I see it is still the case, so the issue is relevant, isn't

Re: Add connection active, idle time to pg_stat_activity

2022-06-13 Thread Sergey Dudoladov
Hello, I've updated the patch in preparation for the upcoming commitfest. Regards, Sergey. diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index 4549c2560e..cf00685c96 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -979,6 +979,26 @@ postgr

Re: Add connection active, idle time to pg_stat_activity

2022-02-04 Thread Sergey Dudoladov
Hi, > > Could you please elaborate on this idea ? > > So we have pgStatActiveTime and pgStatIdleInTransactionTime ultimately > > used to report respective metrics in pg_stat_database. > > Now beentry's st_total_active_time / st_total_transaction_idle_time > > duplicates this info, so one may get r

Re: Add connection active, idle time to pg_stat_activity

2022-01-31 Thread Sergey Dudoladov
Hi, Thank you for the reviews. > > The write operation to beentry needs to be enclosed by > > PGSTAT_BEGIN/END_WRITE_ACTIVITY(). In that perspective, it would be > > better to move that writes to the PGSTAT_WRITE_ACTIVITY section just > > below. I have fixed it in the new version. > >

Re: Add connection active, idle time to pg_stat_activity

2022-01-27 Thread Sergey Dudoladov
Hello, > Without update in the next few > days this patch will be closed as Returned with Feedback, Thank you for the reminder, Julien. Per agreement with Rafia I have reworked the patch in the past days. The new version 6 is now ready for review. Regards, Sergey Dudoladov diff --git

Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?

2022-01-27 Thread Sergey Dudoladov
hitespace should remove the issue. [1] https://github.com/postgres/postgres/blob/410aa248e5a883fde4832999cc9b23c7ace0f2ff/src/include/pg_config_manual.h#L106 [2] https://github.com/postgres/postgres/blob/410aa248e5a883fde4832999cc9b23c7ace0f2ff/src/interfaces/libpq/fe-exec.c#L1078 [3] https://github.com/postgres/postgres/blob/27b77ecf9f4d5be211900eda54d8155ada50d696/src/backend/access/transam/xlog.c#L8851-L8859 Regards, Sergey Dudoladov