Ah ok I had not noticed that before. Thanks Sent from my iPhone
On Feb 10, 2009, at 19:07, Tatsuo Ishii <[email protected]> wrote: > The begavior you are seeing with DROP DATABASE is, actually exactly > same as all version of pgpool-II. To process DROP DATABASE, postgres > requires that there's no connection to the database. To satify the > requirement in very wild way: pgpool child sends signal to parent > pgpool and it does a restarting all child pgpool processes. See around > line 293 in pool_proto_modules.c. > -- > Tatsuo Ishii > SRA OSS, Inc. Japan > >> Tatsuo, >> >> I'm starting to test some postgresql commands and I just saw this, >> besides commenting out the T_CreatedbStmt line in the >> pool_process_query.c file I also commented out T_DropdbStmt since the >> DROP database was also failing. So when I try to drop the database >> (although it works) pgpool log show the following: >> >> >> Feb 10 22:46:37 set2_pgpool pgpool: 2009-02-10 22:46:37 DEBUG: pid >> 23611: statement2: DROP DATABASE hello ; >> Feb 10 22:46:37 set2_pgpool pgpool: 2009-02-10 22:46:37 DEBUG: pid >> 23611: Query: sending SIGUSR1 signal to parent >> Feb 10 22:46:37 set2_pgpool pgpool: 2009-02-10 22:46:37 DEBUG: pid >> 32543: failover_handler called >> Feb 10 22:46:37 set2_pgpool pgpool: 2009-02-10 22:46:37 DEBUG: pid >> 32546: child receives close connection request >> Feb 10 22:46:37 set2_pgpool pgpool: 2009-02-10 22:46:37 DEBUG: pid >> 32547: child receives close connection request >> Feb 10 22:46:37 set2_pgpool pgpool: 2009-02-10 22:46:37 DEBUG: pid >> 32548: child receives close connection request >> Feb 10 22:46:37 set2_pgpool pgpool: 2009-02-10 22:46:37 DEBUG: pid >> 32549: child receives close connection request >> >> >> >> Marcelo >> PostgreSQL DBA >> Linux/Solaris System Administrator >> >> On Feb 9, 2009, at 4:21 AM, Tatsuo Ishii wrote: >> >>> 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 >> _______________________________________________ Pgpool-general mailing list [email protected] http://pgfoundry.org/mailman/listinfo/pgpool-general
