Re: -1/0 virtualtransaction

2021-05-01 Thread Mike Beachy
In case this helps anyone else, I found a simple way to get a rough idea of what's going on, which is to run: select (select count(distinct virtualtransaction) from pg_locks) as tx_with_locks, (select count(*) from pg_stat_activity where state = 'active') as active_tx, (select count(*) from

Re: -1/0 virtualtransaction

2021-04-30 Thread Mike Beachy
On Fri, Apr 30, 2021 at 7:12 AM Thomas Munro wrote: > But do you have lots of short overlapping transactions so that there > is never a moment where there are zero transactions running? Yeah, that almost certainly explains it. Thanks very much for the explanation about the summarized locks. >

Re: -1/0 virtualtransaction

2021-04-30 Thread Thomas Munro
On Wed, Apr 28, 2021 at 2:25 AM Mike Beachy wrote: > 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

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

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

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 |

Re: -1/0 virtualtransaction

2021-04-26 Thread Mike Beachy
On Mon, Apr 26, 2021 at 6:16 PM Tom Lane wrote: > Hmm, that's an invalid VXID, which would ordinarily mean that nothing > is holding the lock. There is a passing mention in mvcc.sgml that > SIRead locks sometimes need to be held past transaction end, so maybe > what you're looking at is such a

Re: -1/0 virtualtransaction

2021-04-26 Thread Tom Lane
Mike Beachy writes: > 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 | virtualtransaction | pid | > mode| granted |

-1/0 virtualtransaction

2021-04-26 Thread Mike Beachy
Hi - 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 | virtualtransaction | pid | mode| granted | fastpath