Re: Per backend relation statistics tracking

2025-09-03 Thread Bertrand Drouvot
Hi, On Tue, Aug 26, 2025 at 06:38:41AM +, Bertrand Drouvot wrote: > On Mon, Aug 25, 2025 at 08:28:04PM -0400, Andres Freund wrote: > > FWIW, I think this was done wrongly for the per-backend IO stats too. I've > > seen the increased overhead in profiles > > That's indeed something that could

Re: Per backend relation statistics tracking

2025-08-28 Thread Bertrand Drouvot
Amazon Web Services: https://aws.amazon.com >From ceeb61fffdccfb0f7b06dbe0767b77aa2191c082 Mon Sep 17 00:00:00 2001 From: Bertrand Drouvot Date: Mon, 4 Aug 2025 08:14:02 +0000 Subject: [PATCH v3 1/2] Adding per backend relation statistics tracking This commit introduces per backend relation stats tracking and ad

Re: Per backend relation statistics tracking

2025-08-27 Thread Bertrand Drouvot
Hi, On Tue, Aug 26, 2025 at 04:55:09PM -0500, Sami Imseih wrote: > I worry that a single view will grow very wide, and we will have to eventually > split it. So we may as well start thinking about having multiple views > in advance. I gave it more thoughts and I now think that multiple views is b

Re: Per backend relation statistics tracking

2025-08-27 Thread Bertrand Drouvot
Hi, On Tue, Aug 26, 2025 at 07:18:10AM -0400, Andres Freund wrote: > Hi, > > On 2025-08-26 06:38:41 +, Bertrand Drouvot wrote: > > > and IO related counters aren't > > > incremented remotely as often as the scan related counters are. > > > > You mean the flush are not triggered as often? If

Re: Per backend relation statistics tracking

2025-08-26 Thread Sami Imseih
> > That is why I think we should be careful about naming. pg_stat_backend feels > > very generic, but right now it only shows relation stats. Maybe we call it > > pg_stat_backend_tables to start? Then if we later add I/O, we could have > > pg_stat_backend_io, or for conflicts, pg_stat_backend_conf

Re: Per backend relation statistics tracking

2025-08-26 Thread Andres Freund
Hi, On 2025-08-26 06:38:41 +, Bertrand Drouvot wrote: > > and IO related counters aren't > > incremented remotely as often as the scan related counters are. > > You mean the flush are not triggered as often? If so, yeah that's also > something > you've mentioned ([1]) and that I've in mind t

Re: Per backend relation statistics tracking

2025-08-26 Thread Bertrand Drouvot
Hi, On Mon, Aug 25, 2025 at 05:51:38PM -0500, Sami Imseih wrote: > Thanks for the patches. > > I have not gone through them in detail yet, but +1 on adding backend activity > stats. Thanks for sharing your thoughts. > This provides another level of drill down to spot anomalous sessions or > dif

Re: Per backend relation statistics tracking

2025-08-26 Thread Bertrand Drouvot
r per backend relations stats. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com >From 5be3ea4753db28cf0c15da65bd6263e0b9f964a4 Mon Sep 17 00:00:00 2001 From: Bertrand Drouvot Date: Mon, 4 Aug 2025 08:14:02 +0000 Subjec

Re: Per backend relation statistics tracking

2025-08-25 Thread Bertrand Drouvot
2 + > > Subject: [PATCH v1 01/10] Adding per backend relation statistics tracking > > > > This commit introduces per backend relation stats tracking and adds a > > new PgStat_BackendRelPending struct to store the pending statistics. To > > begin with, > > thi

Re: Per backend relation statistics tracking

2025-08-25 Thread Bertrand Drouvot
Hi, On Mon, Aug 25, 2025 at 07:22:43PM -0500, Sami Imseih wrote: > > Adding these fields to the backend level stats spread based on the > > backend PID without the knowledge of the relation they're related with > > makes it much less interesting IMO, because we lose a lot of > > granularity value

Re: Per backend relation statistics tracking

2025-08-25 Thread Bertrand Drouvot
Hi, On Tue, Aug 26, 2025 at 08:12:45AM +0900, Michael Paquier wrote: > On Mon, Aug 25, 2025 at 05:51:38PM -0500, Sami Imseih wrote: > > I have not gone through them in detail yet, but +1 on adding backend > > activity > > stats. This provides another level of drill down to spot anomalous sessions

Re: Per backend relation statistics tracking

2025-08-25 Thread Andres Freund
Hi, On 2025-08-12 07:48:10 +, Bertrand Drouvot wrote: > From 9e2f8cb9a87f1d9be91f2f39ef25fbb254944968 Mon Sep 17 00:00:00 2001 > From: Bertrand Drouvot > Date: Mon, 4 Aug 2025 08:14:02 + > Subject: [PATCH v1 01/10] Adding per backend relation statistics tracking >

Re: Per backend relation statistics tracking

2025-08-25 Thread Sami Imseih
> Adding these fields to the backend level stats spread based on the > backend PID without the knowledge of the relation they're related with > makes it much less interesting IMO, because we lose a lot of > granularity value that we have with the pg_statio_* relations, at the > cost of more bloat,

Re: Per backend relation statistics tracking

2025-08-25 Thread Michael Paquier
On Mon, Aug 25, 2025 at 05:51:38PM -0500, Sami Imseih wrote: > I have not gone through them in detail yet, but +1 on adding backend activity > stats. This provides another level of drill down to spot anomalous sessions or > different patterns across applications. I also think we will want more than

Re: Per backend relation statistics tracking

2025-08-25 Thread Sami Imseih
Thanks for the patches. I have not gone through them in detail yet, but +1 on adding backend activity stats. This provides another level of drill down to spot anomalous sessions or different patterns across applications. I also think we will want more than just relation stats. For example, columns

Per backend relation statistics tracking

2025-08-12 Thread Bertrand Drouvot
://aws.amazon.com >From 9e2f8cb9a87f1d9be91f2f39ef25fbb254944968 Mon Sep 17 00:00:00 2001 From: Bertrand Drouvot Date: Mon, 4 Aug 2025 08:14:02 + Subject: [PATCH v1 01/10] Adding per backend relation statistics tracking This commit introduces per backend relation stats tracking and adds a ne