postgresql/src/include/replication/logicallauncher.h
Robert Haas 9ec9f8f683 Add subtransaction handling for table synchronization workers.
Since the old logic was completely unaware of subtransactions, a
change made in a subsequently-aborted subtransaction would still cause
workers to be stopped at toplevel transaction commit.  Fix that by
managing a stack of worker lists rather than just one.

Amit Khandekar and Robert Haas

Discussion: http://postgr.es/m/CAJ3gD9eaG_mWqiOTA2LfAug-VRNn1hrhf50Xi1YroxL37QkZNg@mail.gmail.com
2018-07-16 17:33:35 -04:00

31 lines
975 B
C

/*-------------------------------------------------------------------------
*
* logicallauncher.h
* Exports for logical replication launcher.
*
* Portions Copyright (c) 2016-2018, PostgreSQL Global Development Group
*
* src/include/replication/logicallauncher.h
*
*-------------------------------------------------------------------------
*/
#ifndef LOGICALLAUNCHER_H
#define LOGICALLAUNCHER_H
extern int max_logical_replication_workers;
extern int max_sync_workers_per_subscription;
extern void ApplyLauncherRegister(void);
extern void ApplyLauncherMain(Datum main_arg);
extern Size ApplyLauncherShmemSize(void);
extern void ApplyLauncherShmemInit(void);
extern void ApplyLauncherWakeupAtCommit(void);
extern bool XactManipulatesLogicalReplicationWorkers(void);
extern void AtEOXact_ApplyLauncher(bool isCommit);
extern void AtEOSubXact_ApplyLauncher(bool isCommit, int nestDepth);
extern bool IsLogicalLauncher(void);
#endif /* LOGICALLAUNCHER_H */