| From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
|---|---|
| To: | Rémi Cura <remi(dot)cura(at)gmail(dot)com>, John R Pierce <pierce(at)hogranch(dot)com> |
| Cc: | PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: pg_advisory_lock problem |
| Date: | 2014-08-11 14:49:02 |
| Message-ID: | 1407768542.20334.YahooMailNeo@web122301.mail.ne1.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Rémi Cura <remi(dot)cura(at)gmail(dot)com> wrote:
> 2014-08-11 5:33 GMT+02:00 John R Pierce <pierce(at)hogranch(dot)com>:
>> 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David Carpio | 2014-08-11 15:37:08 | Re: pgcluu |
| Previous Message | Ramesh T | 2014-08-11 13:52:42 | Re: pgcluu |