postgresql/src/include
Tom Lane 07ee62ce9e Propagate xactStartTimestamp and stmtStartTimestamp to parallel workers.
Previously, a worker process would establish values for these based on
its own start time.  In v10 and up, this can trivially be shown to cause
misbehavior of transaction_timestamp(), timestamp_in(), and related
functions which are (perhaps unwisely?) marked parallel-safe.  It seems
likely that other behaviors might diverge from what happens in the parent
as well.

It's not as trivial to demonstrate problems in 9.6 or 9.5, but I'm sure
it's still possible, so back-patch to all branches containing parallel
worker infrastructure.

In HEAD only, mark now() and statement_timestamp() as parallel-safe
(other affected functions already were).  While in theory we could
still squeeze that change into v11, it doesn't seem important enough
to force a last-minute catversion bump.

Konstantin Knizhnik, whacked around a bit by me

Discussion: https://postgr.es/m/6406dbd2-5d37-4cb6-6eb2-9c44172c7e7c@postgrespro.ru
2018-10-06 12:00:09 -04:00
..
access Propagate xactStartTimestamp and stmtStartTimestamp to parallel workers. 2018-10-06 12:00:09 -04:00
bootstrap Rationalize handling of array type names in bootstrap data. 2018-04-17 18:29:11 -04:00
catalog Propagate xactStartTimestamp and stmtStartTimestamp to parallel workers. 2018-10-06 12:00:09 -04:00
commands Fix issues around EXPLAIN with JIT. 2018-10-03 12:48:37 -07:00
common Add application_name to connection authorized msg 2018-09-28 19:04:50 -04:00
datatype Update copyright for 2018 2018-01-02 23:30:12 -05:00
executor In the executor, use an array of pointers to access the rangetable. 2018-10-04 15:48:17 -04:00
fe_utils Add semicolons to end of internally run queries 2018-08-30 19:23:22 +02:00
foreign Allow insert and update tuple routing and COPY for foreign tables. 2018-04-06 19:22:03 -04:00
jit Collect JIT instrumentation from workers. 2018-09-25 13:12:44 -07:00
lib Code review for simplehash.h. 2018-08-28 12:32:22 +12:00
libpq Add application_name to connection authorized msg 2018-09-28 19:04:50 -04:00
mb Fix a boatload of typos in C comments. 2018-04-01 15:01:28 -04:00
nodes In the executor, use an array of pointers to access the rangetable. 2018-10-04 15:48:17 -04:00
optimizer Don't allow LIMIT/OFFSET clause within sub-selects to be pushed to workers. 2018-09-14 09:36:30 +05:30
parser In the executor, use an array of pointers to access the rangetable. 2018-10-04 15:48:17 -04:00
partitioning Centralize executor's opening/closing of Relations for rangetable entries. 2018-10-04 14:03:42 -04:00
port Convert elog.c's useful_strerror() into a globally-used strerror wrapper. 2018-09-26 11:06:42 -04:00
portability Update copyright for 2018 2018-01-02 23:30:12 -05:00
postmaster Implement "pg_ctl logrotate" command 2018-09-01 19:46:49 +03:00
regex Update copyright for 2018 2018-01-02 23:30:12 -05:00
replication Fix memory leak in TRUNCATE decoding 2018-09-03 02:10:24 +02:00
rewrite Revert MERGE patch 2018-04-12 11:22:56 +01:00
snowball Sync our Snowball stemmer dictionaries with current upstream. 2018-09-24 17:29:38 -04:00
statistics Update copyright for 2018 2018-01-02 23:30:12 -05:00
storage Add assertions that we hold some relevant lock during relation open. 2018-10-01 12:43:21 -04:00
tcop Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
tsearch Post-feature-freeze pgindent run. 2018-04-26 14:47:16 -04:00
utils Allow btree comparison functions to return INT_MIN. 2018-10-05 16:01:29 -04:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Allow btree comparison functions to return INT_MIN. 2018-10-05 16:01:29 -04:00
fmgr.h Add expression compilation support to LLVM JIT provider. 2018-03-22 14:45:59 -07:00
funcapi.h Clean up in the wake of TupleDescGetSlot() removal / 10763358c3. 2018-09-27 11:38:11 -07:00
getaddrinfo.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
getopt_long.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
Makefile Refactor dlopen() support 2018-09-06 11:33:04 +02:00
miscadmin.h Switch flags tracking pending interrupts to sig_atomic_t 2018-09-27 07:47:20 +09:00
pg_config.h.in Make assorted performance improvements in snprintf.c. 2018-10-03 10:18:15 -04:00
pg_config.h.win32 Make assorted performance improvements in snprintf.c. 2018-10-03 10:18:15 -04:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Improve error reporting for unsupported effective_io_concurrency setting. 2018-09-28 16:12:13 -04:00
pg_getopt.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pg_trace.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pgstat.h Add wait event for fsync of WAL segments 2018-07-02 22:19:46 +09:00
pgtar.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
pgtime.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
port.h Clean up *printf macros to avoid conflict with format archetypes. 2018-09-26 17:35:01 -04:00
postgres.h Detoast plpgsql variables if they might live across a transaction boundary. 2018-05-16 14:56:52 -04:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
rusagestub.h Update copyright for 2018 2018-01-02 23:30:12 -05:00
windowapi.h Update copyright for 2018 2018-01-02 23:30:12 -05:00