diff options
author | Tom Lane | 2020-04-07 02:22:13 +0000 |
---|---|---|
committer | Tom Lane | 2020-04-07 02:22:13 +0000 |
commit | c7654f6a37792ab9525ff98b710c23b27c7868a5 (patch) | |
tree | 38b482ac8386739b6dd2893564d1ab9443036bf0 /contrib/postgres_fdw/postgres_fdw.c | |
parent | 4c04be9b05ad2ec5acd27c3417bf075c13cab134 (diff) |
Fix representation of SORT_TYPE_STILL_IN_PROGRESS.
It turns out that the code did indeed rely on a zeroed
TuplesortInstrumentation.sortMethod field to indicate
"this worker never did anything", although it seems the
issue only comes up during certain race-condition-y cases.
Hence, rearrange the TuplesortMethod enum to restore
SORT_TYPE_STILL_IN_PROGRESS to having the value zero,
and add some comments reinforcing that that isn't optional.
Also future-proof a loop over the possible values of the enum.
sizeof(bits32) happened to be the correct limit value,
but only by purest coincidence.
Per buildfarm and local investigation.
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'contrib/postgres_fdw/postgres_fdw.c')
0 files changed, 0 insertions, 0 deletions