Skip to content

Commit d64e646

Browse files
author
Amit Kapila
committed
Reload configuration more frequently in apply worker.
The apply worker was not reloading the configuration while processing messages if there is a continuous flow of messages from upstream. It was also not reloading the configuration if there is a change in the configuration after it has waited for the message and before receiving the new replication message. This can lead to failure in tests because we expect that after reload, the behavior of apply worker to respect the changed GUCs. We found this while analyzing a rare buildfarm failure. Author: Hou Zhijie Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/OS0PR01MB5716AF9079CC0755CD015322947E9@OS0PR01MB5716.jpnprd01.prod.outlook.com
1 parent 95f0340 commit d64e646

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/backend/replication/logical/worker.c

+6
Original file line numberDiff line numberDiff line change
@@ -3562,6 +3562,12 @@ LogicalRepApplyLoop(XLogRecPtr last_received)
35623562
int c;
35633563
StringInfoData s;
35643564

3565+
if (ConfigReloadPending)
3566+
{
3567+
ConfigReloadPending = false;
3568+
ProcessConfigFile(PGC_SIGHUP);
3569+
}
3570+
35653571
/* Reset timeout. */
35663572
last_recv_timestamp = GetCurrentTimestamp();
35673573
ping_sent = false;

0 commit comments

Comments
 (0)