* Allocate an empty shared memory hash table for a given batch. */
| 3811 | * Allocate an empty shared memory hash table for a given batch. |
| 3812 | */ |
| 3813 | void |
| 3814 | ExecParallelHashTableAlloc(HashJoinTable hashtable, int batchno) |
| 3815 | { |
| 3816 | ParallelHashJoinBatch *batch = hashtable->batches[batchno].shared; |
| 3817 | dsa_pointer_atomic *buckets; |
| 3818 | int nbuckets = hashtable->parallel_state->nbuckets; |
| 3819 | int i; |
| 3820 | |
| 3821 | batch->buckets = |
| 3822 | dsa_allocate(hashtable->area, sizeof(dsa_pointer_atomic) * nbuckets); |
| 3823 | buckets = (dsa_pointer_atomic *) |
| 3824 | dsa_get_address(hashtable->area, batch->buckets); |
| 3825 | for (i = 0; i < nbuckets; ++i) |
| 3826 | dsa_pointer_atomic_init(&buckets[i], InvalidDsaPointer); |
| 3827 | } |
| 3828 | |
| 3829 | /* |
| 3830 | * If we are currently attached to a shared hash join batch, detach. If we |
no test coverage detected