Re: Record Lock details

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Denis P Gohel" <sqllist(at)coralindia(dot)com>, <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Record Lock details
Date: 2004-04-23 10:03:01
Message-ID: 200404231203.01835.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Am Freitag, 23. April 2004 10:43 schrieb Denis P Gohel:
> Is there a data dictionary in Postgres from where i can get the info about
> locked rows of any table ? If possible the value of those locked record ?

No, this information is not available for end users.

> I have an ODBC application working on Postgres. There are Master child
> tables. I want, if a user A is editing any document ( one master and set of
> child records) in front-end application, the same should not be available
> to other user for editing.
>
> I thought of using SELECT FOR UPDATE. But, in my case, i need to display
> the name of application user and other details about the locked row.

Keeping in mind that long-running transactions are not a good idea anyway, you
should probably consider a user-space cooperative locking model. There is
something in contrib/userlock, but I'm not sure whether that fits what you
need.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Alexei Chetroi 2004-04-23 10:17:16 Re: converting unix seconds to timestamp
Previous Message Janning Vygen 2004-04-23 09:37:21 Re: Is there an easy way to normalize-space with given string functions