From: Pavan Deolasee Date: Wed, 18 Nov 2015 08:07:54 +0000 (+0530) Subject: Do not try to initialise multi-executor if we are running as a wal sender X-Git-Tag: XL9_5_R1BETA1~156 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=2aaf52e68d97b6869527b7aace883317950a2e10;p=postgres-xl.git Do not try to initialise multi-executor if we are running as a wal sender pg_basebackup had stopped working because of this issue. Should be fixed now --- diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 5632beb44e..9bc1ad8034 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -4258,13 +4258,15 @@ PostgresMain(int argc, char *argv[], xc_lockForBackupKey1 = Int32GetDatum(XC_LOCK_FOR_BACKUP_KEY_2); #ifdef XCP - if (IsUnderPostmaster) + /* + * Prepare to handle distributed requests. Do that after sending down + * ReadyForQuery, to avoid pooler blocking. + * + * Also do this only when we can access the catalogs. For example, a + * wal-sender can't do that since its not connected to a specific database + */ + if (IsUnderPostmaster && !am_walsender) { - /* - * Prepare to handle distributed requests. - * Do that after sending down ReadyForQuery, to avoid pooler - * blocking. - */ start_xact_command(); InitMultinodeExecutor(false); finish_xact_command();