From: Łukasz Jagiełło <[email protected]>
Subject: Re: [Pgpool-general] pgpool-II 2.2 beta2 released
Date: Mon, 9 Feb 2009 10:27:08 +0100
Message-ID: <[email protected]>

> 2009/2/7 Tatsuo Ishii <[email protected]>:
> > * pool_process_query.c: Start internal transaction if necessary.
> >  Before we only started transaction INSERT, UPDATE, DELETE and
> >  SELECT. Obviously we need to start transaction other than these, for
> >  example CREATE TABLE.  To avoid an overhead to look up large number
> >  of statements (currently 70), we use bsearch() now.
> 
> Top of dump file:
> #v+
> --
> -- PostgreSQL database dump
> --
> 
> SET client_encoding = 'UTF8';
> SET check_function_bodies = false;
> SET client_min_messages = warning;
> 
> --
> -- Name: db_name; Type: DATABASE; Schema: -; Owner: user
> --
> 
> CREATE DATABASE db_name WITH TEMPLATE = template0 ENCODING = 'UTF8';
> 
> 
> ALTER DATABASE db_name OWNER TO user;
> 
> \connect db_name
> #v-
> 
> With pgpool-II 2.2 beta2 when I try create db from that dump got such
> error in postgres log:
> 
> #v+
> ERROR:  syntax error at or near "send" at character 1
> STATEMENT:  send invalid query from pgpool to abort transaction
> #v-
> 
> With pgpool-II 2.2 beta1 everything works fine.
> 
> pgpool work as:
> replication_mode = true
> replication_strict = true
> load_balance_mode = true
> replication_stop_on_mismatch = true
> replicate_select = false
> master_slave_mode = false
> 
> Any idea why that happen ?

Oops. CREATE DATABASE does not seem to be transaction safe. Please
apply included patches.
--
Tatsuo Ishii
SRA OSS, Inc. Japan
Index: pool_process_query.c
===================================================================
RCS file: /cvsroot/pgpool/pgpool-II/pool_process_query.c,v
retrieving revision 1.137
diff -c -r1.137 pool_process_query.c
*** pool_process_query.c        6 Feb 2009 15:30:51 -0000       1.137
--- pool_process_query.c        9 Feb 2009 10:20:06 -0000
***************
*** 3910,3916 ****
                T_ViewStmt,             /* CREATE VIEW */
                T_LoadStmt,
                T_CreateDomainStmt,
!               T_CreatedbStmt,
                T_DropdbStmt,
                T_CreateSeqStmt,
                T_AlterSeqStmt,
--- 3910,3918 ----
                T_ViewStmt,             /* CREATE VIEW */
                T_LoadStmt,
                T_CreateDomainStmt,
!               /*
!                 T_CreatedbStmt,       CREATE DATABASE cannot execute inside a 
transaction block
!               */
                T_DropdbStmt,
                T_CreateSeqStmt,
                T_AlterSeqStmt,
_______________________________________________
Pgpool-general mailing list
[email protected]
http://pgfoundry.org/mailman/listinfo/pgpool-general

Reply via email to