Add promote file to pg_basebackup exclude list.
If primary has promote file and pg_basebackup copies over the same,
then due to existency of the same mirror gets auto-promoted which is
very dangerous. Hence avoid copying over promote file.
@@ -289,6 +289,8 @@ class PgBaseBackup(Command):
cmd_tokens.append('./gpperfmon/data')
cmd_tokens.append('-E')
cmd_tokens.append('./gpperfmon/logs')
+ cmd_tokens.append('-E')
+ cmd_tokens.append('./promote')
else:
for path in excludePaths:
cmd_tokens.append('-E')
