postgresql/src/backend/postmaster
Amit Kapila 464824323e Add support for streaming to built-in logical replication.
To add support for streaming of in-progress transactions into the
built-in logical replication, we need to do three things:

* Extend the logical replication protocol, so identify in-progress
transactions, and allow adding additional bits of information (e.g.
XID of subtransactions).

* Modify the output plugin (pgoutput) to implement the new stream
API callbacks, by leveraging the extended replication protocol.

* Modify the replication apply worker, to properly handle streamed
in-progress transaction by spilling the data to disk and then
replaying them on commit.

We however must explicitly disable streaming replication during
replication slot creation, even if the plugin supports it. We
don't need to replicate the changes accumulated during this phase,
and moreover we don't have a replication connection open so we
don't have where to send the data anyway.

Author: Tomas Vondra, Dilip Kumar and Amit Kapila
Reviewed-by: Amit Kapila, Kuntal Ghosh and Ajin Cherian
Tested-by: Neha Sharma, Mahendra Singh Thalor and Ajin Cherian
Discussion: https://postgr.es/m/688b0b7f-2f6c-d827-c27b-216a8e3ea700@2ndquadrant.com
2020-09-03 07:54:07 +05:30
..
autovacuum.c Redefine pg_class.reltuples to be -1 before the first VACUUM or ANALYZE. 2020-08-30 12:21:51 -04:00
bgworker.c Fix collection of typos and grammar mistakes in the tree 2020-04-10 11:18:39 +09:00
bgwriter.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
checkpointer.c Spelling adjustments 2020-06-07 15:06:51 +02:00
fork_process.c Use RAND_poll() for seeding randomness after fork(). 2020-07-25 14:50:59 -07:00
interrupt.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00
Makefile Partially deduplicate interrupt handling for background processes. 2019-12-17 13:14:28 -05:00
pgarch.c Unify several ways to tracking backend type 2020-03-13 14:01:10 +01:00
pgstat.c Add support for streaming to built-in logical replication. 2020-09-03 07:54:07 +05:30
postmaster.c Fix postmaster's behavior during smart shutdown. 2020-08-14 13:26:57 -04:00
startup.c Allow walreceiver configuration to change on reload 2020-03-27 19:51:37 -03:00
syslogger.c Remove am_syslogger global variable 2020-03-13 14:01:15 +01:00
walwriter.c Update copyrights for 2020 2020-01-01 12:21:45 -05:00