Bug #722: SELECT FOR UPDATE bug
От | paviles@its.co.cr |
---|---|
Тема | Bug #722: SELECT FOR UPDATE bug |
Дата | |
Msg-id | OF3C9258F8.63F97B74-ON06256C03.005F7479-06256C03.005FA0C7@its.co.cr обсуждение исходный текст |
Ответы |
Re: Bug #722: SELECT FOR UPDATE bug
|
Список | pgsql-bugs |
Pablo Aviles 27/07/2002 10:58 To: Tom Lane <tgl@sss.pgh.pa.us> cc:=20 Subject: Re: [BUGS] Bug #722: SELECT FOR UPDATE bug =20 Hi, we are use Postgresql 7.3. The case in questions is: we have many clients (pc's) of postgresql. Every= =20 client try to block an employee to display at user. The user make change=20 in the employee, but nobody can take the same employee at same time.=20 Before changes, the next step is update the record (Record blocked) But, when I use=20 > SELECT * FROM employees=20 > WHERE status =3D 'A'=20 > LIMIT 1=20 > FOR UPDATE;=20 to catch the employee, only the first user select a record. Other users=20 can`t select any employee until the first user release the record. The=20 first conclusion here, is that Postgresql block all employee table. When we try to use the LOCK sentence, the result don=B4t have change. regards,=20 Pablo Avil=E9s Cisneros Technology, ITS=20 Software Development Area Technology, ITS=20 San Jos=E9, Costa Rica email: paviles@its.co.cr =20 =20 Tom Lane <tgl@sss.pgh.pa.us> 27/07/2002 09:58 =20 To: paviles@its.co.cr, pgsql-bugs@postgresql.org cc:=20 Subject: Re: [BUGS] Bug #722: SELECT FOR UPDATE bug pgsql-bugs@postgresql.org writes: > SELECT * FROM employees=20 > WHERE status =3D 'A'=20 > LIMIT 1=20 > FOR UPDATE;=20 > The problem, in the previous sentence, is block every record on > employees, although we want one record, we want limit 1. I do not believe that. Could you give a more complete example of your problem? It would also help if you'd state which Postgres version you're using. regards, tom lane
В списке pgsql-bugs по дате отправления: