On Thu, Mar 10, 2016 at 3:44 PM, Pavel Stehule <pavel.steh...@gmail.com> wrote: > I am trying to test this feature, and there I see not actual data. Maybe > this behave is not related to this patch: > > create table foo(a int); > insert into foo values(10); > > session one: > > begin; select * from foo for update; > > session two: > > begin; select * from foo for update; > session two is waiting > > session one: > select * from pg_stat_activity -- I don't see correct information about > session two
At this point, I get: rhaas=# select query, state, wait_event, wait_event_type from pg_stat_activity; query | state | wait_event | wait_event_type -------------------------------------------------------------------------+--------+---------------+----------------- select query, state, wait_event, wait_event_type from pg_stat_activity; | active | | select * from foo for update; | active | transactionid | Lock (2 rows) ...which looks right to me. > session two: > rollback; begin; select * from foo where a = 10 for update; > session two is waiting again I don't see how you can do this here - the session is blocked. There could well be a bug here, but I need a little more help to find it. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers