diff options
Diffstat (limited to 'src/backend/tcop')
-rw-r--r-- | src/backend/tcop/postgres.c | 6 | ||||
-rw-r--r-- | src/backend/tcop/utility.c | 12 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 15d0808ad24..2ae15d5ce02 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.589 2010/02/16 20:15:14 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.590 2010/02/16 22:34:50 tgl Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -3779,7 +3779,8 @@ PostgresMain(int argc, char *argv[], const char *username) * collector, and to update the PS stats display. We avoid doing * those every time through the message loop because it'd slow down * processing of batched messages, and because we don't want to report - * uncommitted updates (that confuses autovacuum). + * uncommitted updates (that confuses autovacuum). The notification + * processor wants a call too, if we are not in a transaction block. */ if (send_ready_for_query) { @@ -3795,6 +3796,7 @@ PostgresMain(int argc, char *argv[], const char *username) } else { + ProcessCompletedNotifies(); pgstat_report_stat(false); set_ps_display("idle", false); diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index 4879970632a..07f4d0c57ad 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.332 2010/02/14 18:42:15 rhaas Exp $ + * $PostgreSQL: pgsql/src/backend/tcop/utility.c,v 1.333 2010/02/16 22:34:50 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -926,17 +926,17 @@ standard_ProcessUtility(Node *parsetree, case T_NotifyStmt: { NotifyStmt *stmt = (NotifyStmt *) parsetree; - PreventCommandDuringRecovery(); - Async_Notify(stmt->conditionname); + PreventCommandDuringRecovery(); + Async_Notify(stmt->conditionname, stmt->payload); } break; case T_ListenStmt: { ListenStmt *stmt = (ListenStmt *) parsetree; - PreventCommandDuringRecovery(); + PreventCommandDuringRecovery(); CheckRestrictedOperation("LISTEN"); Async_Listen(stmt->conditionname); } @@ -945,8 +945,8 @@ standard_ProcessUtility(Node *parsetree, case T_UnlistenStmt: { UnlistenStmt *stmt = (UnlistenStmt *) parsetree; - PreventCommandDuringRecovery(); + PreventCommandDuringRecovery(); CheckRestrictedOperation("UNLISTEN"); if (stmt->conditionname) Async_Unlisten(stmt->conditionname); @@ -1105,8 +1105,8 @@ standard_ProcessUtility(Node *parsetree, case T_ReindexStmt: { ReindexStmt *stmt = (ReindexStmt *) parsetree; - PreventCommandDuringRecovery(); + PreventCommandDuringRecovery(); switch (stmt->kind) { case OBJECT_INDEX: |