pg.ddx.io pgsql-general@postgresql.org mailing list archivehelp / color / mirror / Atom feed
R: Problem with row-level lock 2+ messages / 2 participants [nested] [flat]
* R: Problem with row-level lock @ 2019-06-21 08:40 Job <Job@colliniconsulting.com> 2019-06-21 14:34 ` Re: R: Problem with row-level lock Adrian Klaver <adrian.klaver@aklaver.com> 0 siblings, 1 reply; 2+ messages in thread From: Job @ 2019-06-21 08:40 UTC (permalink / raw) To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general Dear Adrian, thank you for the reply! >> i am struggling with a problem due, sometime, to a double concurrent update on the same row of a table. >What is the error message you get? We have no error, but the two queries, in "Lock wait", keep stucked for some minutes before completed. Are there any parameters useful to "serialize" in some way two different Update queries - for the same field in the same row - arriving concurrently? I was looking at the lock_timeout parameter: could it be what i am looking for? Thank you! Franco ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: R: Problem with row-level lock 2019-06-21 08:40 R: Problem with row-level lock Job <Job@colliniconsulting.com> @ 2019-06-21 14:34 ` Adrian Klaver <adrian.klaver@aklaver.com> 0 siblings, 0 replies; 2+ messages in thread From: Adrian Klaver @ 2019-06-21 14:34 UTC (permalink / raw) To: Job <Job@colliniconsulting.com>; pgsql-general On 6/21/19 1:40 AM, Job wrote: > Dear Adrian, > > thank you for the reply! > >>> i am struggling with a problem due, sometime, to a double concurrent update on the same row of a table. > >> What is the error message you get? > > We have no error, but the two queries, in "Lock wait", keep stucked for some minutes before completed. > Are there any parameters useful to "serialize" in some way two different Update queries - for the same field in the same row - arriving concurrently? > > I was looking at the lock_timeout parameter: could it be what i am looking for? If I understood your OP you do not have control of what the client, correct? If that is the case it makes what you want to achieve more difficult. To understand what can be done you will want to take a look at: The locking choices in Postgres. https://www.postgresql.org/docs/11/mvcc.html The lock timeouts available(though I don't think they apply to your case) https://www.postgresql.org/docs/11/runtime-config-locks.html How to change the transaction modes https://www.postgresql.org/docs/11/sql-set-transaction.html > > Thank you! > Franco > -- Adrian Klaver adrian.klaver@aklaver.com ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-06-21 14:34 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-06-21 08:40 R: Problem with row-level lock Job <Job@colliniconsulting.com> 2019-06-21 14:34 ` Adrian Klaver <adrian.klaver@aklaver.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox