pgbouncer configuration

2021-04-27 Thread Chris Stephens
I'm trying to run pgbouncer but am having trouble with what looks like a very simple configuration. centos 7 postgres 12 pgbouncer 1.15 we are already using pam for database auth. pgbouncer was compiled with --with-pam. there is a /etc/pam.d/pgbouncer config file copied from the one currently

Re: very long secondary->primary switch time

2021-04-27 Thread Tom Lane
Tomas Pospisek writes: > I maintain a postgresql cluster that does failover via patroni. The > problem is that after a failover happens it takes the secondary too long > (that is about 35min) to come up and answer queries. The log of the > secondary looks like this: > 04:00:29.777 [9679] LOG:

Re: -1/0 virtualtransaction

2021-04-27 Thread Vijaykumar Jain
Hi, I am just trying to jump in, but ignore if not relevant. when you said*Eventually this results in an "out of shared memory" error * Can you rule out the below two scenarios (wrt /dev/shm too low in docker or query requesting for too many locks either due to parallellism/partition

very long secondary->primary switch time

2021-04-27 Thread Tomas Pospisek
Hello all, I maintain a postgresql cluster that does failover via patroni. The problem is that after a failover happens it takes the secondary too long (that is about 35min) to come up and answer queries. The log of the secondary looks like this: 04:00:29.777 [9679] LOG: received promote

Re: Approach to creating users in Database

2021-04-27 Thread Stephen Frost
Greetings, * Sanjay Minni (sanjay.mi...@gmail.com) wrote: > what is the usual approach in creating users / role in a postgresql > database serving as the data repository to a hosted multi-tenanted > application with a large number of users. > > the 2 approaches I can think of is > A. The user

Re: -1/0 virtualtransaction

2021-04-27 Thread Mike Beachy
Hi Laurenz - On Tue, Apr 27, 2021 at 2:56 AM Laurenz Albe wrote: > Not sure, but do you see prepared transactions in "pg_prepared_xacts"? > No, the -1 in the virtualtransaction ( https://www.postgresql.org/docs/11/view-pg-locks.html) for pg_prepared_xacts was another clue I saw! But, it seems

[UPDATE 1] How to Easily Set Up a Full-Featured Linux Mail Server on Ubuntu 18.04.5 LTS with iRedMail 1.4.0

2021-04-27 Thread Turritopsis Dohrnii Teo En Ming
Subject: [UPDATE 1] How to Easily Set Up a Full-Featured Linux Mail Server on Ubuntu 18.04.5 LTS with iRedMail 1.4.0 Good day from Singapore, I followed linuxbabe.com's Xiao Guoan's guide and successfully setup a full featured Linux mail server on Ubuntu 18.04.5 LTS with IRedMail 1.4.0. Author:

Re: DB size

2021-04-27 Thread luis . roberto
- Mensagem original - > De: "Magnus Hagander" > Para: "Laurenz Albe" > Cc: "Alvaro Herrera" , "luis.roberto" > , "pgsql-general" > > Enviadas: Terça-feira, 27 de abril de 2021 4:05:42 > Assunto: Re: DB size > Yeah, you want to use pg_relation_filenode(oid) rather than looking >

Approach to creating users in Database

2021-04-27 Thread Sanjay Minni
Hi, what is the usual approach in creating users / role in a postgresql database serving as the data repository to a hosted multi-tenanted application with a large number of users. the 2 approaches I can think of is A. The user stays and is controlled only in the application level, the

Streaming replica failure

2021-04-27 Thread Aleš Zelený
Hello, we are using PostgreSQL 12.4 on CentOS 7. The hot standby failed: 2021-04-24 09:19:27 CEST [20956]: [747-1] user=,db=,host=,app= LOG: recovery restart point at 3D8C/352B4CE8 2021-04-24 09:19:27 CEST [20956]: [748-1] user=,db=,host=,app= DETAIL: Last completed transaction was at log time

Re: Temporary files usage in explain

2021-04-27 Thread Matteo Bonardi
Okay, I had a misconception of the buffers option. As I reread the documentation, I realized how stupid the question was. I confirm that with the buffers option I now see: Buffers: shared hit=9617011 read=1328356 dirtied=793 written=397, temp read=2996659 written=5956399 Thank you both, Matteo

Re: Temporary files usage in explain

2021-04-27 Thread David Rowley
On Tue, 27 Apr 2021 at 21:15, Matteo Bonardi wrote: > Explain plan: https://explain.depesz.com/s/BXGT > > Usually I'm looking for "external merge Disk" to see temp files usage but, in > this case, the only reference to that is 299,368kB in the last but one node > of explain. > Can anyone help

Re: Temporary files usage in explain

2021-04-27 Thread Laurenz Albe
On Tue, 2021-04-27 at 11:15 +0200, Matteo Bonardi wrote: > I have a query that creates a large number of temporary files, in this > example ~ 45GB. > Looking at the query plan I can't figure out where temporary files are being > generated. > > Explain plan: https://explain.depesz.com/s/BXGT >

Temporary files usage in explain

2021-04-27 Thread Matteo Bonardi
Hi everybody, I have a query that creates a large number of temporary files, in this example ~ 45GB. Looking at the query plan I can't figure out where temporary files are being generated. Explain plan: https://explain.depesz.com/s/BXGT Usually I'm looking for "external merge Disk" to see temp

Re: About to know the info of foreign table reference used in any of call ,views,functions

2021-04-27 Thread Charles Clavadetscher
Hi On 2021-04-27 09:15, Durgamahesh Manne wrote: Hi Team By using the system view and function "I need to get the info of foreign table reference used in any of call ,views,functions" I found info of views and functions and sprocs that are executed frequently through application using

About to know the info of foreign table reference used in any of call ,views,functions

2021-04-27 Thread Durgamahesh Manne
Hi Team By using the system view and function "I need to get the info of foreign table reference used in any of call ,views,functions" I found info of views and functions and sprocs that are executed frequently through application using pg_stat_user_functions view Please help for the info i

Re: DB size

2021-04-27 Thread Magnus Hagander
On Tue, Apr 27, 2021 at 8:59 AM Laurenz Albe wrote: > > On Mon, 2021-04-26 at 16:45 -0400, Alvaro Herrera wrote: > > I would guess that there are leftover files because of those crashes you > > mentioned. You can probably look for files in the database subdir in > > the data directory that do

Re: DB size

2021-04-27 Thread Laurenz Albe
On Mon, 2021-04-26 at 16:45 -0400, Alvaro Herrera wrote: > I would guess that there are leftover files because of those crashes you > mentioned. You can probably look for files in the database subdir in > the data directory that do not appear in the pg_class.relfilenode > listing for the

Re: DB size

2021-04-27 Thread Guillaume Lelarge
Hi, Le lun. 26 avr. 2021 à 22:59, a écrit : > > - Mensagem original - > > De: "Alvaro Herrera" > > Para: "luis.roberto" > > Cc: "pgsql-general" > > Enviadas: Segunda-feira, 26 de abril de 2021 17:45:34 > > Assunto: Re: DB size > > > I would guess that there are leftover files because

Re: -1/0 virtualtransaction

2021-04-27 Thread Laurenz Albe
On Mon, 2021-04-26 at 17:45 -0400, Mike Beachy wrote: > Does anyone have any pointers on what a virtualtransaction of '-1/0' means? > > I'm using SSI and an example is > > locktype | database | relation | page | tuple | virtualxid | > transactionid | classid | objid | objsubid |