pgsql: Fix race in parallel hash join batch cleanup, take II.

2023-03-20 Thread Thomas Munro
Fix race in parallel hash join batch cleanup, take II. With unlucky timing and parallel_leader_participation=off (not the default), PHJ could attempt to access per-batch shared state just as it was being freed. There was code intended to prevent that by checking for a cleared pointer, but it was

pgsql: Fix race in parallel hash join batch cleanup, take II.

2023-03-20 Thread Thomas Munro
Fix race in parallel hash join batch cleanup, take II. With unlucky timing and parallel_leader_participation=off (not the default), PHJ could attempt to access per-batch shared state just as it was being freed. There was code intended to prevent that by checking for a cleared pointer, but it was

pgsql: Fix race in parallel hash join batch cleanup, take II.

2023-03-20 Thread Thomas Munro
Fix race in parallel hash join batch cleanup, take II. With unlucky timing and parallel_leader_participation=off (not the default), PHJ could attempt to access per-batch shared state just as it was being freed. There was code intended to prevent that by checking for a cleared pointer, but it was

pgsql: Fix race in parallel hash join batch cleanup, take II.

2023-03-20 Thread Thomas Munro
Fix race in parallel hash join batch cleanup, take II. With unlucky timing and parallel_leader_participation=off (not the default), PHJ could attempt to access per-batch shared state just as it was being freed. There was code intended to prevent that by checking for a cleared pointer, but it was

pgsql: Fix race in parallel hash join batch cleanup, take II.

2023-03-20 Thread Thomas Munro
Fix race in parallel hash join batch cleanup, take II. With unlucky timing and parallel_leader_participation=off (not the default), PHJ could attempt to access per-batch shared state just as it was being freed. There was code intended to prevent that by checking for a cleared pointer, but it was

pgsql: Fix race in parallel hash join batch cleanup, take II.

2023-03-20 Thread Thomas Munro
Fix race in parallel hash join batch cleanup, take II. With unlucky timing and parallel_leader_participation=off (not the default), PHJ could attempt to access per-batch shared state just as it was being freed. There was code intended to prevent that by checking for a cleared pointer, but it was