Re: Add pg_accept_connections_start_time() for better uptime calculation

2025-03-15 Thread Fujii Masao
On 2025/03/06 21:55, Robins Tharakan wrote: Hi, Thanks for taking a look at the patch, and for your feedback. On Wed, 5 Mar 2025 at 03:22, Fujii Masao mailto:masao.fu...@oss.nttdata.com>> wrote: On 2025/02/16 16:05, Robins Tharakan wrote: > This patch introduces a new function pg_a

Re: Add pg_accept_connections_start_time() for better uptime calculation

2025-03-11 Thread Robins Tharakan
Hi, Thanks for taking a look at the patch, and for your feedback. On Wed, 5 Mar 2025 at 03:22, Fujii Masao wrote: > On 2025/02/16 16:05, Robins Tharakan wrote: > > This patch introduces a new function pg_accept_connections_start_time(). > Shouldn't this function also handle the time when the p

Re: Add pg_accept_connections_start_time() for better uptime calculation

2025-03-04 Thread Fujii Masao
On 2025/02/16 16:05, Robins Tharakan wrote: Hi, This patch introduces a new function pg_accept_connections_start_time(). Currently, pg_postmaster_start_time() is used to determine when the database started. However, this is not accurate since the postmaster process can sometimes be up wherea

Re: Add pg_accept_connections_start_time() for better uptime calculation

2025-02-16 Thread Michael Paquier
On Sun, Feb 16, 2025 at 07:53:06PM -0500, Tom Lane wrote: > Yeah. Making that happen would require extending the contents of > postmaster.pid, which is likely to break assorted peoples' tooling. > I doubt that this feature clears the bar for justifying that. Sure, agreed to not touch postmaster.p

Re: Add pg_accept_connections_start_time() for better uptime calculation

2025-02-16 Thread Tom Lane
Michael Paquier writes: > On Sun, Feb 16, 2025 at 11:47:46AM +0100, Laurenz Albe wrote: >> Would it make sense to add that information to the output of >> "pg_ctl status" as well? Perhaps as a new option, so that default output >> format doesn't change. > A separate function that only returns th

Re: Add pg_accept_connections_start_time() for better uptime calculation

2025-02-16 Thread Michael Paquier
On Sun, Feb 16, 2025 at 11:47:46AM +0100, Laurenz Albe wrote: > I myself have never felt the need for such a function - but perhaps it > can be useful in these times of hosted database services, when accessing > the log file might be difficult. Yeah. I'm not surprised by that. > I would probably

Re: Add pg_accept_connections_start_time() for better uptime calculation

2025-02-16 Thread Laurenz Albe
On Sun, 2025-02-16 at 17:35 +1030, Robins Tharakan wrote: > This patch introduces a new function pg_accept_connections_start_time(). > > Currently, pg_postmaster_start_time() is used to determine when the > database started. However, this is not accurate since the postmaster > process can sometime