aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorVadim B. Mikheev <vadim4o@yahoo.com>1999-05-29 10:25:33 +0000
committerVadim B. Mikheev <vadim4o@yahoo.com>1999-05-29 10:25:33 +0000
commitdf9e539ea2c434c73d724234e792536789fd97b8 (patch)
tree55d8ed607ceada0f4ca515b0e56f2fa900ed4285 /src/backend/tcop/postgres.c
parentbbbc211ed13c5b42a4d0589c3df24f170cfeeda9 (diff)
downloadpostgresql-df9e539ea2c434c73d724234e792536789fd97b8.tar.gz
postgresql-df9e539ea2c434c73d724234e792536789fd97b8.zip
1. Run all pg_dump queries in single serializable transaction.
2. Get rid of locking when updating statistics in vacuum. 3. Use QuerySnapshot in COPY TO and call SetQuerySnashot in main tcop loop before FETCH and COPY TO.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index cbed22b8c42..b89cc20af8b 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.117 1999/05/26 12:55:55 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.118 1999/05/29 10:25:30 vadim Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@@ -73,6 +73,8 @@
#include "utils/rel.h"
#include "utils/ps_status.h"
#include "utils/temprel.h"
+#include "nodes/parsenodes.h"
+#include "../backend/parser/parse.h"
#ifdef NOT_USED
#include "nodes/relation.h"
@@ -715,6 +717,13 @@ pg_exec_query_dest(char *query_string, /* string to execute */
else if (Verbose)
TPRINTF(TRACE_VERBOSE, "ProcessUtility");
+ /*
+ * We have to set query SnapShot in the case of FETCH or COPY TO.
+ */
+ if (nodeTag(querytree->utilityStmt) == T_FetchStmt ||
+ (nodeTag(querytree->utilityStmt) == T_CopyStmt &&
+ ((CopyStmt *)(querytree->utilityStmt))->direction != FROM))
+ SetQuerySnapshot();
ProcessUtility(querytree->utilityStmt, dest);
}
else
@@ -1527,7 +1536,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
if (!IsUnderPostmaster)
{
puts("\nPOSTGRES backend interactive interface ");
- puts("$Revision: 1.117 $ $Date: 1999/05/26 12:55:55 $\n");
+ puts("$Revision: 1.118 $ $Date: 1999/05/29 10:25:30 $\n");
}
/* ----------------