postgresql/src
Tom Lane c7654f6a37 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/12222.1586223974@sss.pgh.pa.us
2020-04-06 22:22:13 -04:00
..
backend Fix representation of SORT_TYPE_STILL_IN_PROGRESS. 2020-04-06 22:22:13 -04:00
bin Add the option to report WAL usage in EXPLAIN and auto_explain. 2020-04-06 08:02:15 +05:30
common Add checksum helper functions. 2020-04-03 11:52:43 -04:00
fe_utils Add SQL type xid8 to expose FullTransactionId to users. 2020-04-07 12:03:59 +12:00
include Fix representation of SORT_TYPE_STILL_IN_PROGRESS. 2020-04-06 22:22:13 -04:00
interfaces Allow ecpg to be built stand-alone, allow parallel libpq make 2020-03-31 14:17:32 -04:00
makefiles
pl Improve user control over truncation of logged bind-parameter values. 2020-04-02 15:04:51 -04:00
port Be more careful about extracting encoding from locale strings on Windows. 2020-03-30 11:14:58 -04:00
template
test Introduce xid8-based functions to replace txid_XXX. 2020-04-07 12:04:32 +12:00
timezone
tools Introduce xid8-based functions to replace txid_XXX. 2020-04-07 12:04:32 +12:00
tutorial
.gitignore
DEVELOPERS
Makefile
Makefile.global.in
Makefile.shlib
nls-global.mk