aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/logical/tablesync.c
Commit message (Collapse)AuthorAge
...
* Spelling fixes in code commentsPeter Eisentraut2017-04-26
| | | | Author: Euler Taveira <euler@timbira.com.br>
* Don't call the function that may raise an error while holding spinlock.Fujii Masao2017-04-20
| | | | | | | | | | | | | It's not safe to raise an error while holding spinlock. But previously logical replication worker for table sync called the function which reads the system catalog and may raise an error while it's holding spinlock. Which could lead to the trouble where spinlock will never be released and the server gets stuck infinitely. Author: Petr Jelinek Reviewed-by: Kyotaro Horiguchi and Fujii Masao Reported-by: Fujii Masao Discussion: http://postgr.es/m/CAHGQGwFDWh_Qr-q_GEMpD+qH=vYPMdVqw=ZOSY3kX_Pna9R9SA@mail.gmail.com
* Set range table for CopyFrom() in tablesyncPeter Eisentraut2017-04-17
| | | | | | | | | | | | | | CopyFrom() needs a range table for formatting certain errors for constraint violations. This changes the mechanism of how the range table is passed to the CopyFrom() executor state. We used to generate the range table and one entry for the relation manually inside DoCopy(). Now we use addRangeTableEntryForRelation() to setup the range table and relation entry for the ParseState, which is then passed down by BeginCopyFrom(). Author: Petr Jelinek <petr.jelinek@2ndquadrant.com> Reported-by: Euler Taveira <euler@timbira.com.br>
* Report statistics in logical replication workersPeter Eisentraut2017-04-14
| | | | | | Author: Stas Kelvich <s.kelvich@postgrespro.ru> Author: Petr Jelinek <petr.jelinek@2ndquadrant.com> Reported-by: Fujii Masao <masao.fujii@gmail.com>
* Remove pstrdup of TextDatumGetCStringPeter Eisentraut2017-04-14
| | | | The result of TextDatumGetCString is already palloc'ed.
* Fix typo in commentPeter Eisentraut2017-04-10
|
* Update copyright year in recently added filesPeter Eisentraut2017-03-29
| | | | Author: Masahiko Sawada <sawada.mshk@gmail.com>
* Logical replication support for initial data copyPeter Eisentraut2017-03-23
Add functionality for a new subscription to copy the initial data in the tables and then sync with the ongoing apply process. For the copying, add a new internal COPY option to have the COPY source data provided by a callback function. The initial data copy works on the subscriber by receiving COPY data from the publisher and then providing it locally into a COPY that writes to the destination table. A WAL receiver can now execute full SQL commands. This is used here to obtain information about tables and publications. Several new options were added to CREATE and ALTER SUBSCRIPTION to control whether and when initial table syncing happens. Change pg_dump option --no-create-subscription-slots to --no-subscription-connect and use the new CREATE SUBSCRIPTION ... NOCONNECT option for that. Author: Petr Jelinek <petr.jelinek@2ndquadrant.com> Tested-by: Erik Rijkers <er@xs4all.nl>