1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-13 07:41:39 +03:00

Disable elog(ERROR|FATAL) in signal handlers in

critical sections of code.
This commit is contained in:
Vadim B. Mikheev
2000-12-03 10:27:29 +00:00
parent 5e3bc5ebcd
commit 65b362fae1
12 changed files with 94 additions and 29 deletions

View File

@ -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");
}
/*