Skip Menu |
 

This queue is for tickets about the DBD-Pg CPAN distribution.

Report information
The Basics
Id: 101390
Status: rejected
Priority: 0/
Queue: DBD-Pg

People
Owner: Nobody in particular
Requestors: ulrich [...] chirlu.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



MIME-Version: 1.0
X-DF-Sender: dWtsYXVlckBjaGlybHUuZGU=
X-Spam-Status: No, score=-1.901 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001] autolearn=ham
Content-Disposition: inline
X-Spam-Flag: NO
content-type: text/plain; charset="utf-8"; delsp="Yes"; format="flowed"
Message-ID: <20150108034109.Horde.lgLVeuVENnIPjYtNmaphyg1 [...] webmail.df.eu>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -1.901
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 3DE3524072D for <cpan-bug+DBD-Pg [...] hipster.bestpractical.com>; Wed, 7 Jan 2015 21:41:21 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qxl4VX+uoNkT for <cpan-bug+DBD-Pg [...] hipster.bestpractical.com>; Wed, 7 Jan 2015 21:41:19 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id DCB792401B7 for <bug-DBD-Pg [...] rt.cpan.org>; Wed, 7 Jan 2015 21:41:18 -0500 (EST)
Received: (qmail 6025 invoked by alias); 8 Jan 2015 02:41:17 -0000
Received: from smtprelay04.ispgateway.de (HELO smtprelay04.ispgateway.de) (80.67.31.38) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Wed, 07 Jan 2015 18:41:14 -0800
Received: from [80.67.16.118] (helo=webmailfront01.ispgateway.de) by smtprelay04.ispgateway.de with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.84) (envelope-from <ulrich [...] chirlu.de>) id 1Y9325-0004UH-4Z; Thu, 08 Jan 2015 03:41:09 +0100
Received: from ip4d154c58.dynamic.kabel-deutschland.de (ip4d154c58.dynamic.kabel-deutschland.de [77.21.76.88]) by webmail.df.eu (Horde Framework) with HTTP; Thu, 08 Jan 2015 03:41:09 +0100
Delivered-To: cpan-bug+DBD-Pg [...] hipster.bestpractical.com
User-Agent: Internet Messaging Program (IMP) H5 (6.0.4)
Subject: COPY FROM broken in 3.5.0
Return-Path: <ulrich [...] chirlu.de>
X-RT-Mail-Extension: dbd-pg
X-Original-To: cpan-bug+DBD-Pg [...] hipster.bestpractical.com
X-Spam-Check-BY: la.mx.develooper.com
Date: Thu, 08 Jan 2015 03:41:09 +0100
X-Spam-Level:
To: bug-DBD-Pg [...] rt.cpan.org
From: Ulrich Klauer <ulrich [...] chirlu.de>
X-RT-Original-Encoding: utf-8
X-RT-Interface: Email
Content-Length: 748
Download (untitled) / with headers
text/plain 748b
With 3.5.0, this COPY FROM no longer works: $sql->begin; $sql->do("COPY table FROM stdin"); my $dbh = $sql->dbh; while (<LOAD>) { $dbh->pg_putcopydata($_); } $dbh->pg_putcopyend(); (Simplified to just the database commands; see https://github.com/metabrainz/musicbrainz-server/blob/master/admin/MBImport.pl#L274 for the full story, if necessary.) The error message is: "DBD::Pg::db pg_putcopydata failed: no COPY in progress"; the Postgres server also logs this error: "COPY from stdin failed: COPY terminated by new PQexec" After downgrading to 3.4.2, it works again. I suspect it is related to the ping changes in 3.5.0 (RT #100648); possibly pg_putcopydata tries to ping the server, inadvertently terminating copy mode. Ulrich
MIME-Version: 1.0
X-Spam-Status: No, score=-3.901 tagged_above=-99.9 required=10 tests=[AWL=2.000, BAYES_00=-1.9, FROM_OUR_RT=-4, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001] autolearn=ham
In-Reply-To: <rt-4.0.18-21145-1420684882-908.101390-3-0 [...] rt.cpan.org>
X-DF-Sender: dWtsYXVlckBjaGlybHUuZGU=
Content-Disposition: inline
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-101390 [...] rt.cpan.org> <20150108034109.Horde.lgLVeuVENnIPjYtNmaphyg1 [...] webmail.df.eu> <rt-4.0.18-21145-1420684882-908.101390-3-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <20150108122853.Horde.BoqdRedgWnph0LwzvDS3nQ2 [...] webmail.df.eu>
content-type: text/plain; charset="utf-8"; delsp="Yes"; format="flowed"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -3.901
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id B57D124027A for <cpan-bug+DBD-Pg [...] hipster.bestpractical.com>; Thu, 8 Jan 2015 06:29:06 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iwYCQQBzf7jy for <cpan-bug+DBD-Pg [...] hipster.bestpractical.com>; Thu, 8 Jan 2015 06:29:04 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 8EB5D240261 for <bug-DBD-Pg [...] rt.cpan.org>; Thu, 8 Jan 2015 06:29:03 -0500 (EST)
Received: (qmail 13993 invoked by alias); 8 Jan 2015 11:29:00 -0000
Received: from smtprelay04.ispgateway.de (HELO smtprelay04.ispgateway.de) (80.67.29.8) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Thu, 08 Jan 2015 03:28:57 -0800
Received: from [80.67.16.118] (helo=webmailfront01.ispgateway.de) by smtprelay04.ispgateway.de with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.84) (envelope-from <ulrich [...] chirlu.de>) id 1Y9BGn-0007Ml-Q4; Thu, 08 Jan 2015 12:28:53 +0100
Received: from ip4d154c58.dynamic.kabel-deutschland.de (ip4d154c58.dynamic.kabel-deutschland.de [77.21.76.88]) by webmail.df.eu (Horde Framework) with HTTP; Thu, 08 Jan 2015 12:28:53 +0100
Delivered-To: cpan-bug+DBD-Pg [...] hipster.bestpractical.com
Subject: [rt.cpan.org #101390] Re: COPY FROM broken in 3.5.0
User-Agent: Internet Messaging Program (IMP) H5 (6.0.4)
Return-Path: <ulrich [...] chirlu.de>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: cpan-bug+DBD-Pg [...] hipster.bestpractical.com
X-RT-Mail-Extension: dbd-pg
Date: Thu, 08 Jan 2015 12:28:53 +0100
X-Spam-Level:
To: bug-DBD-Pg [...] rt.cpan.org
From: Ulrich Klauer <ulrich [...] chirlu.de>
RT-Message-ID: <rt-4.0.18-1289-1420716548-942.101390-0-0 [...] rt.cpan.org>
Content-Length: 708
Download (untitled) / with headers
text/plain 708b
I further looked into this; it seems the culprit is DBIx::Connector's dbh method, which "will use a an [sic] existing handle if there is one, if the process has not been forked or a new thread spawned, and if the database is pingable". Hence, in my code ... 1 $sql->do("COPY table FROM stdin"); 2 my $dbh = $sql->dbh; 3 while (<LOAD>) { $dbh->pg_putcopydata($_); } ... line 2 indirectly calls the ping method, which was a harmless no-op (mostly) up to DBD::Pg 3.4.2, but as of 3.5.0 really sends a command to the server, breaking COPY mode. I was able to fix it simply by swapping lines 1 and 2. So this bug should be closed as invalid, I guess. Sorry to have bothered you. :-) Ulrich


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.