From: | Yumiko Izumi <izumi-yumiko(at)scnet(dot)co(dot)jp> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | PostgreSQL Novice Mailing Group <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: pq_flush: send() failed: Broken pipe |
Date: | 2007-02-28 08:24:42 |
Message-ID: | 20070228172408.9195.IZUMI-YUMIKO@scnet.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hello Tom.
I carry out a SQL sentence file with psql command.
% psql -d gyomuDB -f 003.sql
In 003.sql, I create various tables and indexes, but the following SQL sentences terminated abnormally.
(There are 1500 lines in the whole file, and it is the extract as follows.)
#######################
CREATE FUNCTION mon_CreateTable_WbemMonitorLog( text ) RETURNS integerAS'
DECLARE
str_basename ALIAS FOR $1;
str_sql text;
str_tablename text;
nb integer;
nb_end integer;
BEGIN
nb := 0;
nb_end := 999;
while nb <= nb_end loop
-- table
str_tablename := str_basename || CAST( nb AS text );
str_sql := ''CREATE TABLE '' || str_tablename
|| ''(''
|| ''MonID int NOT NULL ,''
|| ''CategoryID int NOT NULL ,''
|| ''ExtensionID int NOT NULL ,''
|| ''SummaryID int NOT NULL ,''
|| ''KeyValue varchar (256) NULL ,''
|| ''Data varchar (512) NULL ,''
|| ''GetDate timestamp NOT NULL ,''
|| ''Status int NOT NULL ,''
|| ''Summarized int NOT NULL);'';
execute str_sql;
nb := nb + 1;
end loop;
RETURN ( 0 );
END;
'
LANGUAGE 'plpgsql';
SELECT mon_CreateTable_WbemMonitorLog( 'WbemMonitorLogMinute_' );
SELECT mon_CreateTable_WbemMonitorLog( 'WbemMonitorLogHour_' );
SELECT mon_CreateTable_WbemMonitorLog( 'WbemMonitorLogDay_' );
DROP FUNCTION mon_CreateTable_WbemMonitorLog( text );
#######################
In other words I carry out this function after I create a function to make 1,000 tables.
This function worked with various servers normally.
But this function terminated abnormally only with a certain server.
A difference is only that server that this function terminates abnormally with has high-speed multiprocessor.
Besides this, there is not remarkable difference.
When this function worked normally, this function outputs as follows.
#######################
CREATE FUNCTION
mon_createtable_wbemmonitorlog
--------------------------------
0
(1 row)
mon_createtable_wbemmonitorlog
--------------------------------
0
(1 row)
mon_createtable_wbemmonitorlog
--------------------------------
0
(1 row)
DROP FUNCTION
#######################
When this function terminated abnormally, this function outputs only "CREATE FUNCTION".
And psql command terminated.
In other words I suppose that I fall in practice (SELECT) of the first function.
At this time, PostgreSQL outputs the following error messages.
#######################
Dec 19 13:50:32 gyomu01 postgres[807]: [11] LOG: pq_flush: send() failed: Broken pipe
Dec 19 13:50:33 gyomu01 postgres[807]: [12] LOG: pq_recvbuf: unexpected EOF on client connection
#######################
Besides, if there is necessary information, please point it out.
Thank you in advance.
****************************************
Yumiko Izumi
E-mail:izumi-yumiko(at)scnet(dot)co(dot)jp
****************************************
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Stalewski | 2007-02-28 14:18:35 | Re: Crappy performance even though not swapping |
Previous Message | Keith Worthington | 2007-02-28 04:26:45 | automatically dump a table when it is updated |