diff options
author | Vadim B. Mikheev <vadim4o@yahoo.com> | 2000-12-03 10:27:29 +0000 |
---|---|---|
committer | Vadim B. Mikheev <vadim4o@yahoo.com> | 2000-12-03 10:27:29 +0000 |
commit | 65b362fae15aba68d5cd7d4204b8224c3e1c2c07 (patch) | |
tree | a601515ed9642733b646cb5a9f0a8f0671494c50 /src/backend/tcop/postgres.c | |
parent | 5e3bc5ebcddf00ba33d1483bab2a5a2d62c65120 (diff) | |
download | postgresql-65b362fae15aba68d5cd7d4204b8224c3e1c2c07.tar.gz postgresql-65b362fae15aba68d5cd7d4204b8224c3e1c2c07.zip |
Disable elog(ERROR|FATAL) in signal handlers in
critical sections of code.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 9b1728a9dfe..3d74d187ff9 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.193 2000/11/30 01:27:19 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.194 2000/12/03 10:27:27 vadim Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -921,6 +921,11 @@ finish_xact_command(void) void handle_warn(SIGNAL_ARGS) { + if (StopIfError) + { + QueryCancel = true; + return; + } siglongjmp(Warn_restart, 1); } @@ -953,14 +958,14 @@ die(SIGNAL_ARGS) { PG_SETMASK(&BlockSig); - /* - * If ERROR/FATAL is in progress... - */ - if (InError) + ExitAfterAbort = true; + if (StopIfError) { - ExitAfterAbort = true; + QueryCancel = true; return; } + if (InError) /* If ERROR/FATAL is in progress... */ + return; elog(FATAL, "The system is shutting down"); } @@ -1631,7 +1636,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.193 $ $Date: 2000/11/30 01:27:19 $\n"); + puts("$Revision: 1.194 $ $Date: 2000/12/03 10:27:27 $\n"); } /* |