On Thu, 2009-11-19 at 10:13 +0200, Heikki Linnakangas wrote: > At backend start, we normally take > RowExclusiveLock on the database in postinit.c, but you had to modify > to acquire AccessShareLock instead in standby mode.
The consensus from earlier discussion was that allowing users to grab RowExclusiveLock during read only transactions was not a problem, since it allowed PREPARE. So there seems no need to prevent it in other places. So I suggest removing most of the changes in postinit.c, and changing the lock restrictions in lock.c to be + if (RecoveryInProgress() && + (locktag->locktag_type == LOCKTAG_OBJECT || + locktag->locktag_type == LOCKTAG_RELATION ) && + lockmode > RowExclusiveLock) then ERROR lockcmds.c would also be changed to allow LOCK TABLE of up to RowExclusiveLock. -- Simon Riggs www.2ndQuadrant.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers