Re: BUG #6548: NOWAIT does not work in Select statement if table is locked using "Lock " command
| От | Kevin Grittner |
|---|---|
| Тема | Re: BUG #6548: NOWAIT does not work in Select statement if table is locked using "Lock " command |
| Дата | |
| Msg-id | 4F69A55802000025000464E4@gw.wicourts.gov обсуждение исходный текст |
| Ответ на | BUG #6548: NOWAIT does not work in Select statement if table is locked using "Lock " command (neeraj.punmiya@securetogether.com) |
| Список | pgsql-bugs |
<neeraj.punmiya@securetogether.com> wrote: =20 > Create Table Test (x integer,y integer); >=20 > Insert Into Test Values(1,100); > Insert Into Test Values(2,200); >=20 > First database session: > --------------------------- > start transaction; > Lock table Test; >=20 > Second database session > ----------------------- > start transaction; >=20 > Select y from Test where x=3D1 for update nowait; >=20 > select query waits until first session releases table lock.=20 > Nowait does not have any effect in select statement.=20 =20 That is all functioning as designed and documented. From the docs at: =20 http://www.postgresql.org/docs/9.1/interactive/sql-select.html#SQL-FOR-UPDA= TE-SHARE =20 | Note that NOWAIT applies only to the row-level lock(s) * the | required ROW SHARE table-level lock is still taken in the ordinary | way (see Chapter 13). You can use LOCK with the NOWAIT option | first, if you need to acquire the table-level lock without waiting. =20 This is not a bug. =20 -Kevin
В списке pgsql-bugs по дате отправления: