postgresql/src/backend
Tom Lane 04e9678614 Code review for nodeGatherMerge.c.
Comment the fields of GatherMergeState, and organize them a bit more
sensibly.  Comment GMReaderTupleBuffer more usefully too.  Improve
assorted other comments that were obsolete or just not very good English.

Get rid of the use of a GMReaderTupleBuffer for the leader process;
that was confusing, since only the "done" field was used, and that
in a way redundant with need_to_scan_locally.

In gather_merge_init, avoid calling load_tuple_array for
already-known-exhausted workers.  I'm not sure if there's a live bug there,
but the case is unlikely to be well tested due to timing considerations.

Remove some useless code, such as duplicating the tts_isempty test done by
TupIsNull.

Remove useless initialization of ps.qual, replacing that with an assertion
that we have no qual to check.  (If we did, the code would fail to check
it.)

Avoid applying heap_copytuple to a null tuple.  While that fails to crash,
it's confusing and it makes the code less legible not more so IMO.

Propagate a couple of these changes into nodeGather.c, as well.

Back-patch to v10, partly because of the possibility that the
gather_merge_init change is fixing a live bug, but mostly to keep
the branches in sync to ease future bug fixes.
2017-08-30 17:21:08 -04:00
..
access Separate reinitialization of shared parallel-scan state from ExecReScan. 2017-08-30 13:18:16 -04:00
bootstrap Change tupledesc->attrs[n] to TupleDescAttr(tupledesc, n). 2017-08-20 11:19:07 -07:00
catalog Change tupledesc->attrs[n] to TupleDescAttr(tupledesc, n). 2017-08-20 11:19:07 -07:00
commands Propagate sort instrumentation from workers back to leader. 2017-08-29 13:26:33 -04:00
executor Code review for nodeGatherMerge.c. 2017-08-30 17:21:08 -04:00
foreign Abstract logic to allow for multiple kinds of child rels. 2017-04-03 22:41:31 -04:00
lib Consolidate the function pointer types used by dshash.c. 2017-08-24 17:01:36 -07:00
libpq Tweak some SCRAM error messages and code comments 2017-08-23 12:29:38 -04:00
main Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
nodes Force rescanning of parallel-aware scan nodes below a Gather[Merge]. 2017-08-30 09:29:55 -04:00
optimizer Force rescanning of parallel-aware scan nodes below a Gather[Merge]. 2017-08-30 09:29:55 -04:00
parser Improve plural handling in error message 2017-08-23 13:56:59 -04:00
po Translation updates 2017-08-07 13:55:34 -04:00
port Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
postmaster Simplify autovacuum work-item implementation 2017-08-15 18:14:07 -03:00
regex Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
replication Change tupledesc->attrs[n] to TupleDescAttr(tupledesc, n). 2017-08-20 11:19:07 -07:00
rewrite Change tupledesc->attrs[n] to TupleDescAttr(tupledesc, n). 2017-08-20 11:19:07 -07:00
snowball Initial pgindent run with pg_bsd_indent version 2.0. 2017-06-21 14:39:04 -04:00
statistics Remove obsolete comments about functional dependencies 2017-07-26 11:40:39 -04:00
storage Fix outdated comment 2017-08-23 14:19:35 -04:00
tcop Remove uses of "slave" in replication contexts 2017-08-10 22:55:41 -04:00
tsearch Improve make_tsvector() to handle empty input, and simplify its callers. 2017-07-18 13:13:47 -04:00
utils Propagate sort instrumentation from workers back to leader. 2017-08-29 13:26:33 -04:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
Makefile Inject $(ICU_LIBS) regardless of platform. 2017-08-20 21:22:18 -07:00
common.mk Add ICU_CFLAGS to global CPPFLAGS 2017-06-12 15:57:22 -04:00
nls.mk Translation updates 2017-05-15 12:19:54 -04:00