Re: pgbouncer best practices

2023-07-07 Thread Gurjeet Singh
On Fri, Jul 7, 2023 at 9:24 AM Rita wrote: > > My question are: is there a ratio of max connections and pool i should use in > my pgbouncer config? Short answer: No, there's no recommended ratio for PG max_connections and pgbouncer pool size. In pgbouncer, a client connection is matched (forwar

Re: pgbouncer best practices

2023-07-07 Thread Ben Chobot
Rita wrote on 7/7/23 9:23 AM: I have an  application that does many db calls  from a server farm. I've increased my max connections on postgresql to 1000 and tuned the server accordingly. However, I still get can't connect to postgresql some times. I installed pgbouncer on few servers in the fa

pgbouncer best practices

2023-07-07 Thread Rita
I have an application that does many db calls from a server farm. I've increased my max connections on postgresql to 1000 and tuned the server accordingly. However, I still get can't connect to postgresql some times. I installed pgbouncer on few servers in the farm. I pointed the traffic to pgbou

Re: track_activity_query_size max practical size?

2023-07-07 Thread Adrian Klaver
On 7/7/23 08:27, Ron wrote: Restarting is something I can do during a quiet point after the bulk of the day's work is complete, but before the nightly backups. For completeness there is the auto_explain module: https://www.postgresql.org/docs/current/auto-explain.html -- Adrian Klaver ad

Re: temp table security labels

2023-07-07 Thread Ted Toth
seems to me that sepgsql_schema_post_create should be doing a selabel_lookup and using that default label if one exists instead of computing the label ... hmm I'll have to think about it On Fri, Jul 7, 2023 at 10:44 AM Ted Toth wrote: > > I see it now sepgsql_schema_post_create is doing it ... it

Re: temp table security labels

2023-07-07 Thread Ted Toth
I see it now sepgsql_schema_post_create is doing it ... it's just not doing what I think it should :( On Fri, Jul 7, 2023 at 8:05 AM Ted Toth wrote: > > Also AFAICT the schema created for the temp table does not get deleted > at the end of the session which also causes issues. > > On Fri, Jul 7,

Re: track_activity_query_size max practical size?

2023-07-07 Thread Ron
On 7/7/23 10:13, Adrian Klaver wrote: On 7/7/23 07:58, Ron wrote: On 7/7/23 09:55, Adrian Klaver wrote: On 7/7/23 07:51, Adrian Klaver wrote: On 7/7/23 07:42, Ron wrote: We've got some Very Large Queries that take a long time. An EXPLAIN(ANALYZE BUFFERS) would go a long way here. Even sett

Re: track_activity_query_size max practical size?

2023-07-07 Thread Adrian Klaver
On 7/7/23 07:58, Ron wrote: On 7/7/23 09:55, Adrian Klaver wrote: On 7/7/23 07:51, Adrian Klaver wrote: On 7/7/23 07:42, Ron wrote: We've got some Very Large Queries that take a long time. An EXPLAIN(ANALYZE BUFFERS) would go a long way here. Even setting taqs to 10KB isn't adequate, so I w

Re: track_activity_query_size max practical size?

2023-07-07 Thread Ron
On 7/7/23 09:55, Adrian Klaver wrote: On 7/7/23 07:51, Adrian Klaver wrote: On 7/7/23 07:42, Ron wrote: We've got some Very Large Queries that take a long time. An EXPLAIN(ANALYZE BUFFERS) would go a long way here. Even setting taqs to 10KB isn't adequate, so I want to significantly bump it

Re: track_activity_query_size max practical size?

2023-07-07 Thread Ron
On 7/7/23 09:51, Adrian Klaver wrote: On 7/7/23 07:42, Ron wrote: We've got some Very Large Queries that take a long time. An EXPLAIN(ANALYZE BUFFERS) would go a long way here. You can't run EXPLAIN(ANALYZE BUFFERS) if you don't have a query to run.  That's what track_activity_query_size is

Re: track_activity_query_size max practical size?

2023-07-07 Thread Adrian Klaver
On 7/7/23 07:51, Adrian Klaver wrote: On 7/7/23 07:42, Ron wrote: We've got some Very Large Queries that take a long time. An EXPLAIN(ANALYZE BUFFERS) would go a long way here. Even setting taqs to 10KB isn't adequate, so I want to significantly bump it, but am It is before coffee here, so

Re: track_activity_query_size max practical size?

2023-07-07 Thread Adrian Klaver
On 7/7/23 07:42, Ron wrote: We've got some Very Large Queries that take a long time. An EXPLAIN(ANALYZE BUFFERS) would go a long way here. Even setting taqs to 10KB isn't adequate, so I want to significantly bump it, but am It is before coffee here, so you will need to spell out what taqs

track_activity_query_size max practical size?

2023-07-07 Thread Ron
We've got some Very Large Queries that take a long time.  Even setting taqs to 10KB isn't adequate, so I want to significantly bump it, but am concerned about side effects of setting it to 48KB or even 64KB. -- Born in Arizona, moved to Babylonia.

Re: temp table security labels

2023-07-07 Thread Ted Toth
Also AFAICT the schema created for the temp table does not get deleted at the end of the session which also causes issues. On Fri, Jul 7, 2023 at 7:43 AM Ted Toth wrote: > > I'm seeing security labels set on db objects when a temporary table is > created but they don't match the labels I've confi

temp table security labels

2023-07-07 Thread Ted Toth
I'm seeing security labels set on db objects when a temporary table is created but they don't match the labels I've configured in my sepgsql_contexts file. Our code doesn't actually execute a "SECURITY LABEL ..." command for the temp tables but something else must be doing so because I see pg_temp_

Re: [bug]? insert returning composite type fails

2023-07-07 Thread Lorusso Domenico
Adrian come on 🤭 This is a reduced example. The real usecase involves many tables with the bitemporal record However I solved using a record type ... Il ven 7 lug 2023, 01:20 Adrian Klaver ha scritto: > On 7/6/23 14:52, Lorusso Domenico wrote: > > Hello guys, > > In my db (version 15) I've d