Re: Adding column "mem_usage" to view pg_prepared_statements

2019-09-03 Thread Alvaro Herrera
Hello Daniel, This patch no longer applies. Please submit an updated version. Also, there's voluminous discussion that doesn't seem to have resulted in any revision of the code. Please fix that too. Thanks, -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Development,

Re: Adding column "mem_usage" to view pg_prepared_statements

2019-08-06 Thread Konstantin Knizhnik
On 05.08.2019 22:35, Daniel Migowski wrote: . I think that including in pg_prepared_statements information about memory used this statement is very useful. CachedPlanMemoryUsage function may be useful not only for this view, but for example it is also need in my autoprepare patch. I would lo

Re: Adding column "mem_usage" to view pg_prepared_statements

2019-08-05 Thread Andres Freund
Hi, On 2019-08-05 22:46:47 +0200, Daniel Migowski wrote: > > Arguably the proposed owning_object field would be a bit redundant with > > the already existing ident/MemoryContextSetIdentifier field, which > > e.g. already associates the query string with the contexts used for a > > prepared stateme

Re: Adding column "mem_usage" to view pg_prepared_statements

2019-08-05 Thread Daniel Migowski
Am 05.08.2019 um 19:16 schrieb Andres Freund: On 2019-07-28 06:20:40 +, Daniel Migowski wrote: how do you want to generalize it? Are you thinking about a view solely for the display of the memory usage of different objects? I'm not quite sure. I'm just not sure that adding separate infrastr

Re: Adding column "mem_usage" to view pg_prepared_statements

2019-08-05 Thread Daniel Migowski
Am 05.08.2019 um 18:30 schrieb Konstantin Knizhnik: On 31.07.2019 1:38, Daniel Migowski wrote: Am 31.07.2019 um 00:29 schrieb Tom Lane: Daniel Migowski writes: Ok, just have read about the commitfest thing. Is the patch OK for that? Or is there generally no love for a mem_usage column here? I

Re: Adding column "mem_usage" to view pg_prepared_statements

2019-08-05 Thread Andres Freund
Hi, On 2019-07-28 06:20:40 +, Daniel Migowski wrote: > how do you want to generalize it? Are you thinking about a view solely > for the display of the memory usage of different objects? I'm not quite sure. I'm just not sure that adding separate infrastructure for various objects is a sutainab

Re: Adding column "mem_usage" to view pg_prepared_statements

2019-08-05 Thread Konstantin Knizhnik
On 31.07.2019 1:38, Daniel Migowski wrote: Am 31.07.2019 um 00:29 schrieb Tom Lane: Daniel Migowski writes: Ok, just have read about the commitfest thing. Is the patch OK for that? Or is there generally no love for a mem_usage column here? If it was, I really would add some memory monitor

Re: Adding column "mem_usage" to view pg_prepared_statements

2019-07-30 Thread David Fetter
On Tue, Jul 30, 2019 at 10:01:09PM +, Daniel Migowski wrote: > Hello, > > Will my patch be considered for 12.0? The calculation of the > mem_usage value might be improved later on but because the system > catalog is changed I would love to add it before 12.0 becomes > stable. Feature freeze

Re: Adding column "mem_usage" to view pg_prepared_statements

2019-07-30 Thread Daniel Migowski
Am 31.07.2019 um 00:29 schrieb Tom Lane: Daniel Migowski writes: Ok, just have read about the commitfest thing. Is the patch OK for that? Or is there generally no love for a mem_usage column here? If it was, I really would add some memory monitoring in our app regarding this. You should ce

Re: Adding column "mem_usage" to view pg_prepared_statements

2019-07-30 Thread Daniel Migowski
Am 31.07.2019 um 00:17 schrieb Tomas Vondra: FWIW not sure what mail client you're using, but it seems to be breaking the threads for some reason, splitting it into two - see [1]. Also, please stop top-posting. It makes it way harder to follow the discussion. Was using Outlook because it's my

Re: AW: AW: Adding column "mem_usage" to view pg_prepared_statements

2019-07-30 Thread Tom Lane
Daniel Migowski writes: > Ok, just have read about the commitfest thing. Is the patch OK for that? Or > is there generally no love for a mem_usage column here? If it was, I really > would add some memory monitoring in our app regarding this. You should certainly put it into the next commitfest.

Re: Adding column "mem_usage" to view pg_prepared_statements

2019-07-30 Thread Tomas Vondra
On Tue, Jul 30, 2019 at 10:01:09PM +, Daniel Migowski wrote: Hello, Will my patch be considered for 12.0? The calculation of the mem_usage value might be improved later on but because the system catalog is changed I would love to add it before 12.0 becomes stable. Nope. Code freeze for PG

AW: AW: Adding column "mem_usage" to view pg_prepared_statements

2019-07-30 Thread Daniel Migowski
00:09 An: Daniel Migowski Cc: Andres Freund ; pgsql-hackers@lists.postgresql.org Betreff: Re: AW: Adding column "mem_usage" to view pg_prepared_statements Daniel Migowski writes: > Will my patch be considered for 12.0? The calculation of the mem_usage value > might be impro

Re: AW: Adding column "mem_usage" to view pg_prepared_statements

2019-07-30 Thread Tom Lane
Daniel Migowski writes: > Will my patch be considered for 12.0? The calculation of the mem_usage value > might be improved later on but because the system catalog is changed I would > love to add it before 12.0 becomes stable. v12 has been feature-frozen for months, and it's pretty hard to pai

AW: Adding column "mem_usage" to view pg_prepared_statements

2019-07-30 Thread Daniel Migowski
Gesendet: Sonntag, 28. Juli 2019 08:21 An: Andres Freund Cc: pgsql-hackers@lists.postgresql.org Betreff: Re: Adding column "mem_usage" to view pg_prepared_statements Hello Andres, how do you want to generalize it? Are you thinking about a view solely for the display of the memory usage of

Re: Adding column "mem_usage" to view pg_prepared_statements

2019-07-27 Thread Daniel Migowski
1:12 An: Daniel Migowski Cc: pgsql-hackers@lists.postgresql.org Betreff: Re: Adding column "mem_usage" to view pg_prepared_statements Hi, On 2019-07-27 18:29:23 +, Daniel Migowski wrote: > I just implemented a small change that adds another column "mem_usage" > to the

Re: Adding column "mem_usage" to view pg_prepared_statements

2019-07-27 Thread Andres Freund
Hi, On 2019-07-27 18:29:23 +, Daniel Migowski wrote: > I just implemented a small change that adds another column "mem_usage" > to the system view "pg_prepared_statements". It returns the memory > usage total of CachedPlanSource.context, > CachedPlanSource.query_content and if available > Cach

Adding column "mem_usage" to view pg_prepared_statements

2019-07-27 Thread Daniel Migowski
Hello, I just implemented a small change that adds another column "mem_usage" to the system view "pg_prepared_statements". It returns the memory usage total of CachedPlanSource.context, CachedPlanSource.query_content and if available CachedPlanSource.gplan.context. Looks like this: IKOffice_D