Search Postgresql Archives

Re: pg_advisory_lock problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rémi Cura <remi.cura@xxxxxxxxx> wrote:

> 2014-08-11 5:33 GMT+02:00 John R Pierce <pierce@xxxxxxxxxxxx>:

>> ah, you're releasing the lock before the insert is committed,
>> since this is all within a function call, its entirely within a
>> single transaction.

> Oh no I hoped it was something fixable

Well, it might be.  Try using a transactional advisory lock and
letting it expire at the end of the transaction, rather than
explicitly releasing it before the transaction commits.  Depending 
on some other details, that might get it to do what you want.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux