From df9e539ea2c434c73d724234e792536789fd97b8 Mon Sep 17 00:00:00 2001 From: "Vadim B. Mikheev" Date: Sat, 29 May 1999 10:25:33 +0000 Subject: 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. --- src/backend/tcop/postgres.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/backend/tcop/postgres.c') 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"); } /* ---------------- -- cgit v1.2.3