!1834 修改将max_sync_workers_per_subscription存放到u_sess中
Merge pull request !1834 from chenxiaobin/initial_data
This commit is contained in:
@ -2238,7 +2238,7 @@ static void InitStorageConfigureNamesInt()
|
||||
REPLICATION,
|
||||
gettext_noop("Maximum number of table synchronization workers per subscription."),
|
||||
NULL},
|
||||
&g_instance.attr.attr_storage.max_sync_workers_per_subscription,
|
||||
&u_sess->attr.attr_storage.max_sync_workers_per_subscription,
|
||||
2,
|
||||
0,
|
||||
MAX_BACKENDS,
|
||||
|
@ -513,7 +513,7 @@ static void process_syncing_tables_for_apply(XLogRecPtr current_lsn)
|
||||
* If there are free sync worker slot(s), start a new sync
|
||||
* worker for the table.
|
||||
*/
|
||||
if (nsyncworkers < g_instance.attr.attr_storage.max_sync_workers_per_subscription) {
|
||||
if (nsyncworkers < u_sess->attr.attr_storage.max_sync_workers_per_subscription) {
|
||||
logicalrep_worker_launch(t_thrd.applyworker_cxt.curWorker->dbid,
|
||||
t_thrd.applyworker_cxt.mySubscription->oid,
|
||||
t_thrd.applyworker_cxt.mySubscription->name,
|
||||
|
@ -154,7 +154,6 @@ typedef struct knl_instance_attr_storage {
|
||||
int wal_flush_timeout;
|
||||
int wal_flush_delay;
|
||||
int max_logical_replication_workers;
|
||||
int max_sync_workers_per_subscription;
|
||||
char *redo_bind_cpu_attr;
|
||||
} knl_instance_attr_storage;
|
||||
|
||||
|
@ -248,6 +248,7 @@ typedef struct knl_session_attr_storage {
|
||||
bool reserve_space_for_nullable_atts;
|
||||
knl_session_attr_dcf dcf_attr;
|
||||
int catchup2normal_wait_time;
|
||||
int max_sync_workers_per_subscription;
|
||||
} knl_session_attr_storage;
|
||||
|
||||
#endif /* SRC_INCLUDE_KNL_KNL_SESSION_ATTR_STORAGE */
|
||||
|
Reference in New Issue
Block a user