On Thu, 13 Mar 2003, Donald Fraser wrote: > I have a question regarding transactions.
> When updating a row of a table PostgreSQL obtains a RowExclusive lock, > which according to the docs means that no other transaction can obtain > a RowExclusive lock on this row in the same table until the existing > one is released. That seems fair enough when inserting, updating or > deleting rows from a table. > > But why does PostgreSQL need a RowExclusive lock on the foreign key > table when it is not going to update the row in the foreign key table? > Surely it only needs a sharable lock that stops other transactions > updating or deleting this row. There isn't currently such a lock in PostgreSQL, the row exclusive lock was what was available at the time. This has been discussed on -general and -hackers in the near past, you might want to look at the archives. ---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
