Re: [GENERAL] The curious case of two inserts, a shrinking xmax, and a ShareLock on transaction

2015-09-23 Thread Jeff Dik
On Wed, Sep 23, 2015 at 11:26 AM, Alvaro Herrera wrote: > Jeff Dik wrote: > > > Is there any way to inspect a multixact via psql to see what transaction > ID > > values it has? I wasn't able to find anything while searching for an > hour > &

Re: [GENERAL] The curious case of two inserts, a shrinking xmax, and a ShareLock on transaction

2015-09-23 Thread Jeff Dik
On Tue, Sep 22, 2015 at 10:44 PM, Alvaro Herrera wrote: > Jeff Dik wrote: > > > I'd really love to learn: > > > > 1. Why the xmax for foo_id1 goes from 696 to 1 and what does that > >mean? > > When two transactions want to lock the same row, the xmax

[GENERAL] The curious case of two inserts, a shrinking xmax, and a ShareLock on transaction

2015-09-22 Thread Jeff Dik
Hi, I've been trying to understand this curious case of a shrinking xmax. Suppose we have two tables: foo and bar. CREATE TABLE foo ( foo_id text PRIMARY KEY NOT NULL ); CREATE TABLE bar ( bar_id text NOT NULL, foo_id text NOT NULL REFERENCES foo (foo_id) ON DELETE CASCADE ); ... a