Properly determine the waiting backends in an isolation2 test
The method used in reader_waits_for_lock test to identify a reader backend that is waiting and belongs to the desired session was wrong. It used a separate distributed table to record the desired session ID, and later queried that table in utility mode. However, the utility mode connection was established with the segment that didn't receive the session ID tuple. Fix it by identifying the reader that is waiting on a lock from pg_locks and the session it belongs to based on query string in pg_stat_activity, as suggested by Heikki. Fixes GitHub issue #8830. Reviewed thoroughly and patiently by Heikki Linnakangas.
Showing
想要评论请 注册 或 登录