Re: [GENERAL] Inconsistent behaviour calling pg_try_advisory_xact_lock with sub-query and when JOIN'ing

2015-08-07 Thread David G. Johnston
On Fri, Aug 7, 2015 at 1:51 PM, Andreas Joseph Krogh wrote: > På fredag 07. august 2015 kl. 20:55:28, skrev Tom Lane >: > > Andreas Joseph Krogh writes: > > The following query returns and locks 1 row as expected (only one row in > > pg_locks with locktype='advisory' and objid=sequence_id): > >

Re: [GENERAL] Inconsistent behaviour calling pg_try_advisory_xact_lock with sub-query and when JOIN'ing

2015-08-07 Thread Andreas Joseph Krogh
På fredag 07. august 2015 kl. 20:55:28, skrev Tom Lane mailto:t...@sss.pgh.pa.us>>: Andreas Joseph Krogh writes: > The following query returns and locks 1 row as expected (only one row in > pg_locks with locktype='advisory' and objid=sequence_id): > begin; select qe.entity_id, qe.version, qe.q

Re: [GENERAL] Inconsistent behaviour calling pg_try_advisory_xact_lock with sub-query and when JOIN'ing

2015-08-07 Thread Tom Lane
Andreas Joseph Krogh writes: > The following query returns and locks 1 row as expected (only one row in > pg_locks with locktype='advisory' and objid=sequence_id): > begin; select qe.entity_id, qe.version, qe.queue_id, qe.sequence_id, qe.tx_id > fromorigo_queue_entry qe WHERE qe.queue_id = (SEL

[GENERAL] Inconsistent behaviour calling pg_try_advisory_xact_lock with sub-query and when JOIN'ing

2015-08-07 Thread Andreas Joseph Krogh
Hi all.   The following query returns and locks 1 row as expected (only one row in pg_locks with locktype='advisory' and objid=sequence_id):   begin; select qe.entity_id, qe.version, qe.queue_id, qe.sequence_id, qe.tx_id fromorigo_queue_entry qe WHERE qe.queue_id = (SELECT q.entity_id FROM origo

Re: [GENERAL] pg_start_backup: file has vanished from pg_subtrans/

2015-08-07 Thread Alvaro Herrera
Adrian Klaver wrote: > On 08/07/2015 07:20 AM, Alvaro Herrera wrote: > >Leo Baltus wrote: > >>Hi, > >> > >>While backing up some postgresql-8.4.2 instances using > >>pg_start_backup()/pg_stop_backup() > > > >8.4.2 was released in 2009, so you're missing all the bugfixes till July > >2014 which is w

Re: [GENERAL] Strange deadlock in foreign key check

2015-08-07 Thread Adrian Klaver
On 08/06/2015 04:24 PM, Sophia Wright wrote: On Fri, Aug 7, 2015 at 2:46 AM, Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote: I would also take a look at Alvaro's explanation. My understanding is that for locking purposes the UNIQUE index is considered sort of like a FK, as it

Re: [GENERAL] pg_start_backup: file has vanished from pg_subtrans/

2015-08-07 Thread Adrian Klaver
On 08/07/2015 07:20 AM, Alvaro Herrera wrote: Leo Baltus wrote: Hi, While backing up some postgresql-8.4.2 instances using pg_start_backup()/pg_stop_backup() 8.4.2 was released in 2009, so you're missing all the bugfixes till July 2014 which is when the 8.4 branch was dropped out of support -

Re: [GENERAL] pg_start_backup: file has vanished from pg_subtrans/

2015-08-07 Thread Alvaro Herrera
Leo Baltus wrote: > Hi, > > While backing up some postgresql-8.4.2 instances using > pg_start_backup()/pg_stop_backup() 8.4.2 was released in 2009, so you're missing all the bugfixes till July 2014 which is when the 8.4 branch was dropped out of support -- which means you're also missing bugfixes

Re: [GENERAL] Exclusively locking parent tables while disinheriting children.

2015-08-07 Thread Thom Brown
On 30 July 2015 at 13:35, Rowan Collins wrote: > Hi, > > When working with partition sets, we're seeing occasional errors of "could > not find inherited attribute..." in Select queries. This is apparently > caused when an "ALTER TABLE ... NO INHERIT" runs concurrently with another > transaction s

[GENERAL] pg_start_backup: file has vanished from pg_subtrans/

2015-08-07 Thread Leo Baltus
Hi, While backing up some postgresql-8.4.2 instances using pg_start_backup()/pg_stop_backup() We noticed that sometimes rsync complains: file has vanished: "./data/pg_subtrans/3A37" rsync warning: some files vanished before they could be transferred (code 24) at main.c(1039) [sender