Re: AutoVacuum and growing transaction XID's

2020-05-08 Thread Michael Lewis
autovacuum_naptime being only 5 seconds seems too frequent. A lock_timeout might be 1-5 seconds depending on your system. Usually, DDL can fail and wait a little time rather than lock the table for minutes and have all reads back up behind the DDL. Given you have autovacuum_vacuum_cost_limit set t

Re: pg_attribute, pg_class, pg_depend grow huge in count and size with multiple tenants.

2020-05-08 Thread Jeff Janes
On Thu, May 7, 2020 at 5:17 PM Avinash Kumar wrote: > Hi, > > On Thu, May 7, 2020 at 6:08 PM Rory Campbell-Lange < > r...@campbell-lange.net> wrote: > >> One of our clusters has well over 500 databases fronted by pg_bouncer. >> >> We get excellent connection "flattening" using pg_bouncer with >>

Re: pg_attribute, pg_class, pg_depend grow huge in count and size with multiple tenants.

2020-05-08 Thread Jeff Janes
On Thu, May 7, 2020 at 4:05 PM samhitha g wrote: > Hi experts, > > Our application serves multiple tenants. Each tenant has the schema with a > few hundreds of tables and few functions. > We have 2000 clients so we have to create 2000 schemas in a single > database. > > While doing this, i observ

Re: pg_attribute, pg_class, pg_depend grow huge in count and size with multiple tenants.

2020-05-08 Thread MichaelDBA
Hi all, Since we are talking about multi-tenant databases, the citus extension fits in neatly with that using horizontal partitioning/shards. Regards, Michael Vitale Avinash Kumar wrote on 5/8/2020 6:14 AM: Hi, On Fri, May 8, 2020 at 3:53 AM La

Re: pg_attribute, pg_class, pg_depend grow huge in count and size with multiple tenants.

2020-05-08 Thread Avinash Kumar
Hi, On Fri, May 8, 2020 at 3:53 AM Laurenz Albe wrote: > On Fri, 2020-05-08 at 03:47 -0300, Avinash Kumar wrote: > > > Just set "autovacuum_max_workers" higher. > > > > No, that wouldn't help. If you just increase autovacuum_max_workers, the > total cost limit of > > autovacuum_vacuum_cost_limit