X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id C110FD1BA90 for ; Fri, 30 Apr 2004 07:23:05 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 29983-07 for ; Fri, 30 Apr 2004 07:22:46 -0300 (ADT) Received: from wiproecmx1.wipro.com (wiproecmx1.wipro.com [164.164.31.5]) by svr1.postgresql.org (Postfix) with ESMTP id 5907ED1E749 for ; Fri, 30 Apr 2004 07:22:26 -0300 (ADT) Received: from ec-vwall-out2.wipro.com (ec-vwall-out2.wipro.com [10.200.52.14]) by wiproecmx1.wipro.com (8.12.9-20031013/8.12.9) with ESMTP id i3UAMA4m006898 for ; Fri, 30 Apr 2004 15:52:18 +0530 (IST) Received: from blr-m3-msg.wipro.com ([10.114.50.99]) by blr-ec-bh3.wipro.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 30 Apr 2004 15:52:09 +0530 Received: from wiproyh8yy0lmd ([10.114.59.80]) by blr-m3-msg.wipro.com with Microsoft SMTPSVC(5.0.2195.6713); Fri, 30 Apr 2004 15:52:09 +0530 Message-ID: <036e01c42e9b$b8235b70$503b720a@wiproyh8yy0lmd> From: "Prasad" To: Subject: Socket command type unknown Date: Fri, 30 Apr 2004 15:43:01 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_036B_01C42EC9.D1BFF920" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4927.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 X-OriginalArrivalTime: 30 Apr 2004 10:22:09.0427 (UTC) FILETIME=[FE968630:01C42E9C] X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.8 tagged_above=0.0 required=5.0 tests=HTML_30_40, HTML_MESSAGE, LINES_OF_YELLING X-Spam-Level: X-Archive-Number: 200405/15 X-Sequence-Number: 4907 This is a multi-part message in MIME format. ------=_NextPart_000_036B_01C42EC9.D1BFF920 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Al, I am sending this mail to Postgresql interface list as this involves libpq.= so. I am not very sure the problem lies in the library. But wanted to post=0D the query and know what needs to be done.=0D Postgresql: postgresql-7.2.1-5 Linux: 7.3 Kernel 2.4.19 DBD::Pg: DBD-Pg-1.22-0 DBI: DBI-1.30-0 eRserver: erserver-1.2-3 We are using eRserver for database replication. The erserver first needs to= be setup. The setup script creates the following table. create table _RSERV_TABLES_ (tname name, cname name, reloid oid, key int4) The table creation is exiting. Enabling syslog of Postgresql we found that postgres backend process is exiting with error "Socket command type N unkno= wn".=0D We know what the error means. But we are unable to trace the problem cause. NOTE that, this invalid command type problem comes only some times. Most of the time the create table succeeds. The following is the trace of DBD::Pg sender followed by the syslog message= s (We have put this messages in postgres and compiled the code) of postgres process.= =0D We can clearly see that postgres is receiving the NOTICE message back=0D which it sent to DBD::Pg. We have browsed both the sender and receiver code. Both have been written t= o follow the protocol of query sending i.e. Send "Q" followed by the query string.= =0D However, its surprise here as to how postgres socket recieved the NOTICE it= sent to DBD::Pg. If we look at the log of DBD::Pg sender. It does not show that it sent some= thing wrong to Postgres. This leaves the question as to how Postgres received it. We have visted the mail thread on such problem and DBD::Pg site suggests that it may be Pearl problem. However we could not guess how Pearl could impact it. PLEASE LET US KNOW HOW THIS SOCKET PROBLEM CAN BE RESOLVED. WE WOULD=0D BE THANKFUL FOR ALL THE REPLIES. DBD::Pg SENDER: -------------- dbd_st_preparse: statement =3D >create table _RSERV_TABLES_ (tname name, c= name name, reloid=0D oid, key int4)< 1 <- prepare=3D DBI::st=3DHASH(0x82355c8) at /usr/lib/perl5/site_perl/5.6= .1/i386-linux/DBI.pm=0D line 1212 via /usr/local/erserver/bin/ers_setup line 153 >> execute DISPATCH (DBI::st=3DHASH(0x82355c8) rc1/1 @1 g0 ima41 pi= d#20233) at=0D /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line 1213 via=0D /usr/local/erserver/bin/ers_setup line 153 -> execute for DBD::Pg::st (DBI::st=3DHASH(0x82355c8)~0x827deec) dbd_st_execute dbd_st_execute: statement =3D >create table _RSERV_TABLES_ (tname name, cn= ame name, reloid=0D oid, key int4)< FATAL 1: Socket command type N unknown error 7 recorded: FATAL 1: Socket = command type N=0D unknown !! ERROR: 7 'FATAL 1: Socket command type N unknown' <- execute=3D undef at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm= line 1213 via=0D /usr/local/erserver/bin/ers_setup line 153 !! ERROR: 7 'FATAL 1: Socket command type N unknown' <- do=3D undef at /usr/local/erserver/bin/ers_setup line 153 >> errstr DISPATCH (DBI::db=3DHASH(0x82173f8) rc1/1 @1 g1 ima4 pid= #20233) at=0D /usr/local/erserver/bin/ers_setup line 153 >> errstr DISPATCH (DBI::db=3DHASH(0x82173f8) rc1/1 @1 g1 ima4 pid= #20233) at=0D /usr/local/erserver/bin/ers_setup line 153 -> errstr in DBD::_::common for DBD::Pg::db (DBI::db=3DHASH(0x82173f8)~= 0x82174ac) <- errstr=3D ( 'FATAL 1: Socket command type N unknown' ) [1 items] at= =0D /usr/local/erserver/bin/ers_setup line 153 >> DESTROY DISPATCH (DBI::db=3DHASH(0x82173f8) rc1/1 @1 g0 ima0 pid= #20233) <> DESTROY ignored for outer handle DBI::db=3DHASH(0x82173f8) (inner=0D DBI::db=3DHASH(0x82174ac)) >> DESTROY DISPATCH (DBI::db=3DHASH(0x82683e8) rc1/1 @1 g0 ima0 pid= #20233) <> DESTROY ignored for outer handle DBI::db=3DHASH(0x82683e8) (inner=0D DBI::db=3DHASH(0x8208a4c)) Postgres RECEIVER ----------------- Apr 29 19:19:08 cp_node2 cpdb cpdb 10.1.1.2 idle in transaction: Postgres = Recv Apr 29 19:19:08 cp_node2 cpdb cpdb 10.1.1.2 idle in transaction: Postgres = Recv 124 Apr 29 19:19:08 cp_node2 cpdb cpdb 10.1.1.2 idle in transaction: Postgres = Recv Apr 29 19:19:08 cp_node2 cpdb cpdb 10.1.1.2 idle in transaction: Postgres = Recv 239 Apr 29 19:19:08 cp_node2 cpdb cpdb 10.1.1.2 idle in transaction: Postgres = Recv Apr 29 19:19:08 cp_node2 cpdb cpdb 10.1.1.2 idle in transaction: Postgres = Recv 9 Thanks Prasad Confidentiality Notice=0D The information contained in this electronic message and any attachments to= this message are intended for the exclusive use of the addressee(s) and may contain confidential or p= rivileged information. If you are not the intended recipient, please notify the sender at Wipro or Ma= iladmin@wipro.com immediately and destroy all copies of this message and any attachments. ------=_NextPart_000_036B_01C42EC9.D1BFF920 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
 
Hi Al,
 
I am sending this mail to Postgresql inter= face list=0D as this involves libpq.so.
I am not very sure the problem lies in the=0D library. But wanted to post
the query and know what needs to be done.= =0D
Postgresql: postgresql-7.2.1-5
Linux: 7.3 Kernel 2.4.19
DBD::Pg:  DBD-Pg-1.22-0
DBI: DBI-1.30-0
eRserver: erserver-1.2-3
 
 
We are using eRserver for database replica= tion. The=0D erserver first needs to be setup.
The setup script creates the following= =0D table.
 
create table _RSERV_TABLES_  (tname n= ame,=0D cname name, reloid oid, key int4)
 
The table creation is exiting. Enabling sy= slog of=0D Postgresql we found that
postgres backend process is exiting with error= =0D "Socket command type N unknown".
We know what the error means. But we a= re=0D unable to trace the problem cause.
 
NOTE that, this invalid command type probl= em comes=0D only some times. Most
of the time the create table succeeds.
 
The following is the trace of DBD::Pg send= er=0D followed by the syslog messages (We have
put this messages in postgres a= nd=0D compiled the code) of postgres process.
 
We can clearly see that postgres is receiv= ing the=0D NOTICE message back
which it sent to DBD::Pg.
 
We have browsed both the sender and receiv= er code.=0D Both have been written to follow
the protocol of query sending i.e. Send= "Q"=0D followed by the query string.
 
However, its surprise here as to how postg= res=0D socket recieved the NOTICE it sent
to DBD::Pg.
 
If we look at the log of DBD::Pg sender. I= t does=0D not show that it sent something
wrong to Postgres.
 
This leaves the question as to how Postgre= s=0D received it.
 
We have visted the mail thread on such pro= blem and=0D DBD::Pg site suggests
that it may be Pearl problem. However we could not= =0D guess how Pearl could
impact it.
 
PLEASE LET US KNOW HOW THIS SOCKET PROBLEM= CAN BE=0D RESOLVED. WE WOULD
BE THANKFUL FOR ALL THE REPLIES.
 
DBD::Pg=0D SENDER:
--------------
dbd_st_preparse: statement =3D >create tabl= e=0D _RSERV_TABLES_  (tname name, cname name, reloid
 
oid, key int4)<
1   <- = prepare=3D=0D DBI::st=3DHASH(0x82355c8) at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.= pm=0D
 
line 1212 via /usr/local/erserver/bin/ers_= setup=0D line 153
    >> execute     DIS= PATCH=0D (DBI::st=3DHASH(0x82355c8) rc1/1 @1 g0 ima41 pid#20233) at
 
/usr/lib/perl5/site_perl/5.6.1/i386-linux/= DBI.pm=0D line 1213 via
 
/usr/local/erserver/bin/ers_setup line=0D 153
    -> execute for DBD::Pg::st=0D (DBI::st=3DHASH(0x82355c8)~0x827deec)
dbd_st_execute
dbd_st_execute:= =0D statement =3D >create table _RSERV_TABLES_  (tname name, cname name= ,=0D reloid
 
oid, key int4)<
FATAL 1:  Socke= t command=0D type N unknown error 7 recorded: FATAL 1:  Socket command type N=0D
 
unknown
    !! ERROR: 7 = 'FATAL=0D 1:  Socket command type N unknown'
    <- execute= =3D=0D undef at /usr/lib/perl5/site_perl/5.6.1/i386-linux/DBI.pm line 1213 via=0D
 
/usr/local/erserver/bin/ers_setup line=0D 153
    !! ERROR: 7 'FATAL 1:  Socket command type N= =0D unknown'
    <- do=3D undef at=0D /usr/local/erserver/bin/ers_setup line 153
    >>= =0D errstr      DISPATCH (DBI::db=3DHASH(0x82173f8) rc= 1/1 @1=0D g1 ima4 pid#20233) at
 
/usr/local/erserver/bin/ers_setup line=0D 153
    >> errstr      DIS= PATCH=0D (DBI::db=3DHASH(0x82173f8) rc1/1 @1 g1 ima4 pid#20233) at
 
/usr/local/erserver/bin/ers_setup line=0D 153
    -> errstr in DBD::_::common for DBD::Pg::db=0D (DBI::db=3DHASH(0x82173f8)~0x82174ac)
    <- errstr=3D= ( 'FATAL=0D 1:  Socket command type N unknown' ) [1 items] at
 
/usr/local/erserver/bin/ers_setup line=0D 153
    >> DESTROY     DISPATCH= =0D (DBI::db=3DHASH(0x82173f8) rc1/1 @1 g0 ima0 pid#20233)
   = ;=0D <> DESTROY ignored for outer handle DBI::db=3DHASH(0x82173f8) (inner= =0D
 
DBI::db=3DHASH(0x82174ac))
  =  =0D >> DESTROY     DISPATCH (DBI::db=3DHASH(0x82683e8= ) rc1/1=0D @1 g0 ima0 pid#20233)
    <> DESTROY ignored for ou= ter=0D handle DBI::db=3DHASH(0x82683e8) (inner
 
DBI::db=3DHASH(0x8208a4c))
 
 
 
Postgres RECEIVER
-----------------
= Apr 29=0D 19:19:08 cp_node2  cpdb cpdb 10.1.1.2 idle in transaction: Postgres Re= cv=0D <Q           =0D
 
           =             &nb= sp;        =0D create table _RSERV_SERVERS_ (server serial, host text,
 
post int4, dbase text)>
Apr 29 19:19= :08=0D cp_node2  cpdb cpdb 10.1.1.2 idle in transaction: Postgres=0D Recv 124
Apr 29 19:19:08 cp_node2  cpdb cpdb 10.1.1.2 idle in= =0D transaction: Postgres Recv <NOTICE: 
 
CREATE TABLE will create implicit sequence= =0D '_rserv_servers__server_seq' for SERIAL column
 
'_rserv_servers_.server' NOTICE:  CRE= ATE TABLE=0D / UNIQUE will create implicit index
 
'_rserv_servers__server_key' for table=0D '_rserv_servers_' >
Apr 29 19:19:08 cp_node2  cpdb cpdb 10.1.1.2= idle=0D in transaction: Postgres Recv 239
Apr 29 19:19:08 cp_node2  cpdb cp= db=0D 10.1.1.2 idle in transaction: Postgres Recv  <Qrollback>Apr=0D 29 19:19:08 cp_node2  cpdb cpdb 10.1.1.2 idle in transaction: Pos= tgres=0D Recv  9
 
Thanks
Prasad
Confidentiality=
 Notice=0D

The information contained in this electronic message and any attachments to=
 this message are intended
for the exclusive use of the addressee(s) and may contain confidential or p=
rivileged information. If
you are not the intended recipient, please notify the sender at Wipro or Ma=
iladmin@wipro.com immediately
and destroy all copies of this message and any attachments.
------=_NextPart_000_036B_01C42EC9.D1BFF920--