Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6bdbe4c

Browse files
committed
Move alarm timers to proper location.
1 parentc2d0ebc commit6bdbe4c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎src/backend/tcop/postgres.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.274 2002/07/30 05:13:06 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.275 2002/07/30 05:35:53 momjian Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -577,6 +577,9 @@ pg_exec_query_string(StringInfo query_string,/* string to execute */
577577
start_xact_command();
578578
xact_started= true;
579579

580+
if (StatementTimeout)
581+
enable_sig_alarm(StatementTimeout, true);
582+
580583
/*
581584
* parse_context *must* be different from the execution memory
582585
* context, else the context reset at the bottom of the loop will
@@ -704,9 +707,6 @@ pg_exec_query_string(StringInfo query_string,/* string to execute */
704707
*/
705708
MemoryContextSwitchTo(oldcontext);
706709

707-
if (StatementTimeout)
708-
enable_sig_alarm(StatementTimeout, true);
709-
710710
/*
711711
* Inner loop handles the individual queries generated from a
712712
* single parsetree by analysis and rewrite.
@@ -828,8 +828,6 @@ pg_exec_query_string(StringInfo query_string,/* string to execute */
828828
}
829829
}/* end loop over queries generated from a parsetree */
830830

831-
disable_sig_alarm(true);
832-
833831
/*
834832
* If this is the last parsetree of the query string, close down
835833
* transaction statement before reporting command-complete. This is
@@ -871,6 +869,8 @@ pg_exec_query_string(StringInfo query_string,/* string to execute */
871869
EndCommand(commandTag,dest);
872870
}/* end loop over parsetrees */
873871

872+
disable_sig_alarm(true);
873+
874874
/*
875875
* Close down transaction statement, if one is open.
876876
* (Note that this will only happen if the querystring was empty.)
@@ -1693,7 +1693,7 @@ PostgresMain(int argc, char *argv[], const char *username)
16931693
if (!IsUnderPostmaster)
16941694
{
16951695
puts("\nPOSTGRES backend interactive interface ");
1696-
puts("$Revision: 1.274 $ $Date: 2002/07/30 05:13:06 $\n");
1696+
puts("$Revision: 1.275 $ $Date: 2002/07/30 05:35:53 $\n");
16971697
}
16981698

16991699
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp