summaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorPavan Deolasee2015-06-05 13:35:08 +0000
committerPavan Deolasee2015-06-05 13:35:08 +0000
commitbbf2fec2f194a40b25561c2d2d62c432b49bdd1a (patch)
treeaef582c5cba2ab7b111c0e20e9ebf71dab32c91f /src/backend/tcop/postgres.c
parent633da80d8080348ae59dcdd1404a061abc8d0ead (diff)
parent38d500ac2e5d4d4f3468b505962fb85850c1ff4b (diff)
Merge remote-tracking branch 'remotes/PGSQL/master' into XL_NEW_MASTER
Conflicts: .gitignore contrib/Makefile src/backend/access/common/heaptuple.c src/backend/access/transam/rmgr.c src/backend/access/transam/xact.c src/backend/catalog/Makefile src/backend/catalog/catalog.c src/backend/catalog/genbki.pl src/backend/catalog/namespace.c src/backend/commands/sequence.c src/backend/executor/execMain.c src/backend/executor/functions.c src/backend/executor/nodeAgg.c src/backend/executor/nodeModifyTable.c src/backend/nodes/copyfuncs.c src/backend/nodes/outfuncs.c src/backend/nodes/readfuncs.c src/backend/optimizer/plan/createplan.c src/backend/optimizer/plan/planner.c src/backend/optimizer/plan/setrefs.c src/backend/optimizer/util/pathnode.c src/backend/parser/gram.y src/backend/parser/parse_agg.c src/backend/parser/parse_utilcmd.c src/backend/postmaster/postmaster.c src/backend/replication/logical/decode.c src/backend/storage/file/fd.c src/backend/storage/ipc/procsignal.c src/backend/tcop/utility.c src/backend/utils/adt/lockfuncs.c src/backend/utils/adt/ruleutils.c src/backend/utils/sort/tuplesort.c src/backend/utils/time/snapmgr.c src/include/access/rmgrlist.h src/include/catalog/pg_aggregate.h src/include/catalog/pg_proc.h src/include/nodes/execnodes.h src/include/nodes/plannodes.h src/include/nodes/primnodes.h src/include/nodes/relation.h src/include/storage/lwlock.h src/include/storage/procsignal.h src/include/utils/plancache.h src/include/utils/snapshot.h src/test/regress/expected/foreign_key.out src/test/regress/expected/triggers.out src/test/regress/expected/with.out src/test/regress/input/constraints.source src/test/regress/output/constraints.source src/test/regress/pg_regress.c src/test/regress/serial_schedule src/test/regress/sql/returning.sql
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 66174c02a4..f85916adb0 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -42,6 +42,7 @@
#include "rusagestub.h"
#endif
+#include "access/parallel.h"
#include "access/printtup.h"
#include "access/xact.h"
#include "catalog/pg_type.h"
@@ -728,10 +729,10 @@ ProcessClientWriteInterrupt(bool blocked)
/*
* We only want to process the interrupt here if socket writes are
- * blocking to increase the chance to get an error message to the
- * client. If we're not blocked there'll soon be a
- * CHECK_FOR_INTERRUPTS(). But if we're blocked we'll never get out of
- * that situation if the client has died.
+ * blocking to increase the chance to get an error message to the client.
+ * If we're not blocked there'll soon be a CHECK_FOR_INTERRUPTS(). But if
+ * we're blocked we'll never get out of that situation if the client has
+ * died.
*/
if (ProcDiePending && blocked)
{
@@ -3072,9 +3073,9 @@ die(SIGNAL_ARGS)
/*
* If we're in single user mode, we want to quit immediately - we can't
- * rely on latches as they wouldn't work when stdin/stdout is a
- * file. Rather ugly, but it's unlikely to be worthwhile to invest much
- * more effort just for the benefit of single user mode.
+ * rely on latches as they wouldn't work when stdin/stdout is a file.
+ * Rather ugly, but it's unlikely to be worthwhile to invest much more
+ * effort just for the benefit of single user mode.
*/
if (DoingCommandRead && whereToSendOutput != DestRemote)
ProcessInterrupts();
@@ -3326,13 +3327,13 @@ ProcessInterrupts(void)
*/
if (RecoveryConflictPending && DoingCommandRead)
{
- QueryCancelPending = false; /* this trumps QueryCancel */
+ QueryCancelPending = false; /* this trumps QueryCancel */
RecoveryConflictPending = false;
LockErrorCleanup();
pgstat_report_recovery_conflict(RecoveryConflictReason);
ereport(FATAL,
(errcode(ERRCODE_T_R_SERIALIZATION_FAILURE),
- errmsg("terminating connection due to conflict with recovery"),
+ errmsg("terminating connection due to conflict with recovery"),
errdetail_recovery_conflict(),
errhint("In a moment you should be able to reconnect to the"
" database and repeat your command.")));
@@ -3409,7 +3410,8 @@ ProcessInterrupts(void)
}
}
- /* If we get here, do nothing (probably, QueryCancelPending was reset) */
+ if (ParallelMessagePending)
+ HandleParallelMessages();
}
@@ -4454,7 +4456,7 @@ PostgresMain(int argc, char *argv[],
if (pq_is_reading_msg())
ereport(FATAL,
(errcode(ERRCODE_PROTOCOL_VIOLATION),
- errmsg("terminating connection because protocol sync was lost")));
+ errmsg("terminating connection because protocol sync was lost")));
/* Now we can allow interrupts again */
RESUME_INTERRUPTS();