Re: Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?

2021-07-22 Thread Marcin Barczynski
On Thu, Jul 22, 2021 at 5:08 PM Marcin Barczynski < mbarczyn...@starfishstorage.com> wrote: > On Thu, Jul 22, 2021 at 3:51 PM Laurenz Albe > wrote: > > > > On Thu, 2021-07-22 at 12:55 +0200, Marcin Barczynski wrote: > > > There was a long-running transaction consisting of two queries: > > > > > >

Re: Doubt on pgbouncer

2021-07-22 Thread Rama Krishnan
Ok, thank you sir On Thu, 22 Jul, 2021, 20:23 Ninad Shah, wrote: > Pgbouncer doesn't provide such a functionality. Kindly consider using > pgpool. > > On Thu, 22 Jul 2021 at 15:58, Ganesh Korde wrote: > >> Try using HAProxy. >> >> Regards, >> Ganesh Korde. >> >> On Sat, 3 Jul 2021, 9:06 pm Rama

Re: version 0 calling convention

2021-07-22 Thread Pavel Stehule
čt 22. 7. 2021 v 18:21 odesílatel Adrian Klaver napsal: > On 7/22/21 9:18 AM, Mark Lybarger wrote: > > i have some sql functions written in c code using version 0 calling > > convention. it's working fine on postgresql 9.6, but i'm migrating to > > v13. has this calling convention been removed?

Re: version 0 calling convention

2021-07-22 Thread Adrian Klaver
On 7/22/21 9:18 AM, Mark Lybarger wrote: i have some sql functions written in c code using version 0 calling convention.  it's working fine on postgresql 9.6, but i'm migrating to v13.  has this calling convention been removed? https://www.postgresql.org/docs/13/xfunc-c.html#id-1.8.3.13.7 "Cu

version 0 calling convention

2021-07-22 Thread Mark Lybarger
i have some sql functions written in c code using version 0 calling convention. it's working fine on postgresql 9.6, but i'm migrating to v13. has this calling convention been removed? my function creation give an error, SQL Error [42883]: ERROR: could not find function information for function

Re: Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?

2021-07-22 Thread Marcin Barczynski
On Thu, Jul 22, 2021 at 3:51 PM Laurenz Albe wrote: > > On Thu, 2021-07-22 at 12:55 +0200, Marcin Barczynski wrote: > > There was a long-running transaction consisting of two queries: > > > > CREATE TEMPORARY TABLE abc AS SELECT * FROM def_view; > > INSERT INTO xyz_table SELECT * FROM abc;

Re: Doubt on pgbouncer

2021-07-22 Thread Ninad Shah
Pgbouncer doesn't provide such a functionality. Kindly consider using pgpool. On Thu, 22 Jul 2021 at 15:58, Ganesh Korde wrote: > Try using HAProxy. > > Regards, > Ganesh Korde. > > On Sat, 3 Jul 2021, 9:06 pm Rama Krishnan, wrote: > >> >> Hi Team, >> >> How can I split read and write queries u

Re: Obsolete or dead serverconnections after reboot

2021-07-22 Thread Ninad Shah
Factually, Windows itself has a number of issues. Hence, it is always suggested to use Linux with it. It can be explored further by querying the table from which pg_stat_activity gathers data. Regards, Ninad Shah On Thu, 22 Jul 2021 at 12:51, WR wrote: > Hello Ninad Shah, > > I think, nobody

Re: Fwd: Postgres.exe crashes and tears down all apps, recovers and is running again

2021-07-22 Thread Julien Rouhaud
On Thu, Jul 22, 2021 at 09:21:56AM -0500, Ron wrote: > On 7/22/21 4:52 AM, Beat Hoedl wrote: > [snip] > > BTW: There is no virus scanner on the postgres folder and it's a > > productive system, I cant just update. > > > > There's *always* a maintenance window, even if it's just once a year on > C

Re: Fwd: Postgres.exe crashes and tears down all apps, recovers and is running again

2021-07-22 Thread Ron
On 7/22/21 4:52 AM, Beat Hoedl wrote: [snip] BTW: There is no virus scanner on the postgres folder and it's a productive system, I cant just update. There's *always* a maintenance window, even if it's just once a year on Christmas.  Or are you saying that Windows isn't being patched either?

Re: Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?

2021-07-22 Thread Laurenz Albe
On Thu, 2021-07-22 at 12:55 +0200, Marcin Barczynski wrote: > There was a long-running transaction consisting of two queries: > > CREATE TEMPORARY TABLE abc AS SELECT * FROM def_view; > INSERT INTO xyz_table SELECT * FROM abc; > > When I ran VACUUM FULL pg_class, it waited for ShareLo

Re: Fwd: Postgres.exe crashes and tears down all apps, recovers and is running again

2021-07-22 Thread Thomas Kellerer
Beat Hoedl schrieb am 22.07.2021 um 11:52: > BTW: There is no virus scanner on the postgres folder and it's a productive > system, I cant just update. Quote from the Postgres homepage https://www.postgresql.org/support/versioning/ > For minor releases, the community considers not upgrading to

Re: Obsolete or dead serverconnections after reboot

2021-07-22 Thread WR
Hello Vijaykumar Jain, it really seems that the reason for the problem is the not executed shutdown of the service. I also sent a message to EDB. Maybe they will answer although I'm not a registered customer. In some earier logfiles I can find the shutdown messages like yours, but not in all

Why does VACUUM FULL pg_class sometimes wait for ShareLock on another transaction after getting AccessExclusiveLock on pg_class?

2021-07-22 Thread Marcin Barczynski
There was a long-running transaction consisting of two queries: CREATE TEMPORARY TABLE abc AS SELECT * FROM def_view; INSERT INTO xyz_table SELECT * FROM abc; When I ran VACUUM FULL pg_class, it waited for ShareLock on that transaction: postgres=# select * from pg_locks where pid = 29563

Re: Doubt on pgbouncer

2021-07-22 Thread Ganesh Korde
Try using HAProxy. Regards, Ganesh Korde. On Sat, 3 Jul 2021, 9:06 pm Rama Krishnan, wrote: > > Hi Team, > > How can I split read and write queries using pgbouncer > > Regards > > A.Rama Krishnan > > >

Re: Fwd: Postgres.exe crashes and tears down all apps, recovers and is running again

2021-07-22 Thread Julien Rouhaud
On Thu, Jul 22, 2021 at 11:52:55AM +0200, Beat Hoedl wrote: > > Have a bunch of processes connected to Postgres (10.0) [...] > > So the problem leaves me puzzled. > Would be great if somebody has some ideas how to continue investigation. The first thing you need to do is to update to 10.17 and g

Fwd: Postgres.exe crashes and tears down all apps, recovers and is running again

2021-07-22 Thread Beat Hoedl
Hi Have a bunch of processes connected to Postgres (10.0) on windows server 2016. The software was running without problems for at least a year. Each process is doing different actions. Every about 5-10 days a postgres.exe running for one of the application processes crashes, tears down ev

Re: Obsolete or dead serverconnections after reboot

2021-07-22 Thread Vijaykumar Jain
On Thu, 22 Jul 2021 at 12:41, WR wrote: > Hello Vijaykumar Jain, > > at first: select pg_stat_reset(); doesn't help, the pg_stat_activity is > the same after it. > one thing, i forgot to mention. After a pg_stat_reset(), I would run, *vacuum analyze* on the dbs, so that stats are rebuilt. else q

Re: Obsolete or dead serverconnections after reboot

2021-07-22 Thread WR
I also looked for the shutdown mode: since there is no -m parameter in the commandline for starting the windows-postgres-service, the shutdown mode seems to be the default: fast Am 21.07.2021 um 15:14 schrieb Vijaykumar Jain: select pg_stat_reset(); Can you run above function, to check if

Re: Obsolete or dead serverconnections after reboot

2021-07-22 Thread WR
Hello Ninad Shah, I think, nobody holds the connections, because the state is idle. But I'm not shure what means: the connection is idle. One interesting fact was: when I dont stop the psql commandline on the client (and dont start another query, wht ends up in a connection reset, while the

Re: Obsolete or dead serverconnections after reboot

2021-07-22 Thread WR
Hello Vijaykumar Jain, at first: select pg_stat_reset(); doesn't help, the pg_stat_activity is the same after it. I added some interesting rows after two reboots (which have been complete power cycles) artea=# select pid ,application_name , client_addr ,client_port ,backend_start ,query_st