Debian Bug report logs - #678626
php5-pgsql: can't connect to PostgreSQL 9.x

Package: php5-pgsql; Maintainer for php5-pgsql is (unknown);

Reported by: Vincent Bernat <bernat@luffy.cx>

Date: Sat, 23 Jun 2012 10:21:21 UTC

Severity: important

Done: Vincent Bernat <bernat@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, bernat@debian.org, pkg-postgresql-public@lists.alioth.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#678626; Package php5-pgsql. (Sat, 23 Jun 2012 10:21:24 GMT) (full text, mbox, link).


Acknowledgement sent to Vincent Bernat <bernat@luffy.cx>:
New Bug report received and forwarded. Copy sent to bernat@debian.org, pkg-postgresql-public@lists.alioth.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Sat, 23 Jun 2012 10:21:25 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Vincent Bernat <bernat@luffy.cx>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: php5-pgsql: can't connect to PostgreSQL 9.x
Date: Sat, 23 Jun 2012 12:19:26 +0200
[Message part 1 (text/plain, inline)]
Package: php5-pgsql
Version: 5.4.4-2
Severity: important

Hi!

PostgreSQL 9.x in Debian now defaults to port 5433 (in postgresql.conf:
port = 5433). php5-pgsql still defaults to 5432. An application that
does not specify port won't be allowed to connect to a PostgreSQL
database.

I don't know if this should be fixed in php5-pgsql or if the bug lies in
PostgreSQL itself. Before 9.x, we were able to use SSL on port 5432
without any problem. Feel free to relocate the bug to src:postgresql-9.1
if needed.

I have put PostgreSQL maintainers in copy of this report.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages php5-pgsql depends on:
ii  dpkg                                   1.16.4.3
ii  libapache2-mod-php5 [phpapi-20100525]  5.4.4-2
ii  libc6                                  2.13-33
ii  libpq5                                 9.1.4-2
ii  php5-cgi [phpapi-20100525]             5.4.4-2
ii  php5-cli [phpapi-20100525]             5.4.4-2
ii  php5-common                            5.4.4-2
ii  ucf                                    3.0025+nmu3

php5-pgsql recommends no packages.

php5-pgsql suggests no packages.

-- no debconf information

-- 
HARDFAIL("Not enough magic.");
        2.4.0-test2 /usr/src/linux/drivers/block/nbd.c
[Message part 2 (application/pgp-signature, inline)]

Added indication that bug 678626 blocks 678541 Request was from Vincent Bernat <bernat@debian.org> to control@bugs.debian.org. (Sat, 23 Jun 2012 10:24:19 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#678626; Package php5-pgsql. (Sat, 23 Jun 2012 10:43:11 GMT) (full text, mbox, link).


Acknowledgement sent to cedric@2ndquadrant.com:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (Sat, 23 Jun 2012 10:43:21 GMT) (full text, mbox, link).


Message #12 received at 678626@bugs.debian.org (full text, mbox, reply):

From: Cédric Villemain <cedric@2ndquadrant.com>
To: pkg-postgresql-public@lists.alioth.debian.org, Vincent Bernat <bernat@luffy.cx>, 678626@bugs.debian.org
Cc: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Re: [Pkg-postgresql-public] Bug#678626: php5-pgsql: can't connect to PostgreSQL 9.x
Date: Sat, 23 Jun 2012 12:41:09 +0200
[Message part 1 (text/plain, inline)]
Le samedi 23 juin 2012 12:19:26, Vincent Bernat a écrit :
> Package: php5-pgsql
> Version: 5.4.4-2
> Severity: important
> 
> Hi!
> 
> PostgreSQL 9.x in Debian now defaults to port 5433 (in postgresql.conf:
> port = 5433). php5-pgsql still defaults to 5432. An application that
> does not specify port won't be allowed to connect to a PostgreSQL
> database.

If you had a previous version of PostgreSQL installed and then install the new 
one, the port number is incremented so you can run both simultaneously.

For ex:
$ pg_lsclusters 
Version Cluster   Port Status Owner    Data directory                     Log 
file
9.0     main      5433 online postgres /var/lib/postgresql/9.0/main       
/var/log/postgresql/postgresql-9.0-main.log
9.1     main      5432 online postgres /var/lib/postgresql/9.1/main       
/var/log/postgresql/postgresql-9.1-main.log

PostgreSQL itself still defaults to 5432.

I don't know how pg_upgradecluster handle the case, if you used it.

> I don't know if this should be fixed in php5-pgsql or if the bug lies in
> PostgreSQL itself. Before 9.x, we were able to use SSL on port 5432
> without any problem. Feel free to relocate the bug to src:postgresql-9.1
> if needed.
> 
> I have put PostgreSQL maintainers in copy of this report.
> 
> -- System Information:
> Debian Release: wheezy/sid
>   APT prefers unstable
>   APT policy: (500, 'unstable'), (500, 'testing'), (101, 'experimental')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores)
> Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> 
> Versions of packages php5-pgsql depends on:
> ii  dpkg                                   1.16.4.3
> ii  libapache2-mod-php5 [phpapi-20100525]  5.4.4-2
> ii  libc6                                  2.13-33
> ii  libpq5                                 9.1.4-2
> ii  php5-cgi [phpapi-20100525]             5.4.4-2
> ii  php5-cli [phpapi-20100525]             5.4.4-2
> ii  php5-common                            5.4.4-2
> ii  ucf                                    3.0025+nmu3
> 
> php5-pgsql recommends no packages.
> 
> php5-pgsql suggests no packages.
> 
> -- no debconf information

-- 
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation
[signature.asc (application/pgp-signature, inline)]

Reply sent to Vincent Bernat <bernat@debian.org>:
You have taken responsibility. (Sat, 23 Jun 2012 11:06:23 GMT) (full text, mbox, link).


Notification sent to Vincent Bernat <bernat@luffy.cx>:
Bug acknowledged by developer. (Sat, 23 Jun 2012 11:06:27 GMT) (full text, mbox, link).


Message #17 received at 678626-done@bugs.debian.org (full text, mbox, reply):

From: Vincent Bernat <bernat@debian.org>
To: cedric@2ndquadrant.com
Cc: pkg-postgresql-public@lists.alioth.debian.org, 678626-done@bugs.debian.org
Subject: Re: [Pkg-postgresql-public] Bug#678626: php5-pgsql: can't connect to PostgreSQL 9.x
Date: Sat, 23 Jun 2012 13:02:58 +0200
[Message part 1 (text/plain, inline)]
 ❦ 23 juin 2012 12:41 CEST, Cédric Villemain <cedric@2ndquadrant.com> :

>> PostgreSQL 9.x in Debian now defaults to port 5433 (in postgresql.conf:
>> port = 5433). php5-pgsql still defaults to 5432. An application that
>> does not specify port won't be allowed to connect to a PostgreSQL
>> database.
>
> If you had a previous version of PostgreSQL installed and then install the new 
> one, the port number is incremented so you can run both
> simultaneously.
[...]
> PostgreSQL itself still defaults to 5432.

Thanks for the tip!

My bug report is therefore invalid. This behaviour is a bit disturbing
since 5433 is still used if the other version is removed afterwards (I
usually remove the older version of PostgreSQL when I notice I have
installed the new one) but I think there is no universal solution for
this.
-- 
Make sure your code "does nothing" gracefully.
            - The Elements of Programming Style (Kernighan & Plauger)
[Message part 2 (application/pgp-signature, inline)]

No longer marked as found in versions php5/5.4.4-2. Request was from Ondřej Surý <ondrej@debian.org> to control@bugs.debian.org. (Sat, 23 Jun 2012 11:21:27 GMT) (full text, mbox, link).


Message #20 received at 678626-done@bugs.debian.org (full text, mbox, reply):

From: Ondřej Surý <ondrej@debian.org>
To: Vincent Bernat <bernat@luffy.cx>, 678626-done@bugs.debian.org
Subject: Re: [php-maint] Bug#678626: php5-pgsql: can't connect to PostgreSQL 9.x
Date: Sat, 23 Jun 2012 13:18:22 +0200
Yes, you need to connect to the port you run your postgresql instance.

There's no bug here.

O.

On Sat, Jun 23, 2012 at 12:19 PM, Vincent Bernat <bernat@luffy.cx> wrote:
> Package: php5-pgsql
> Version: 5.4.4-2
> Severity: important
>
> Hi!
>
> PostgreSQL 9.x in Debian now defaults to port 5433 (in postgresql.conf:
> port = 5433). php5-pgsql still defaults to 5432. An application that
> does not specify port won't be allowed to connect to a PostgreSQL
> database.
>
> I don't know if this should be fixed in php5-pgsql or if the bug lies in
> PostgreSQL itself. Before 9.x, we were able to use SSL on port 5432
> without any problem. Feel free to relocate the bug to src:postgresql-9.1
> if needed.
>
> I have put PostgreSQL maintainers in copy of this report.
>
> -- System Information:
> Debian Release: wheezy/sid
>  APT prefers unstable
>  APT policy: (500, 'unstable'), (500, 'testing'), (101, 'experimental')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
>
> Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores)
> Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
>
> Versions of packages php5-pgsql depends on:
> ii  dpkg                                   1.16.4.3
> ii  libapache2-mod-php5 [phpapi-20100525]  5.4.4-2
> ii  libc6                                  2.13-33
> ii  libpq5                                 9.1.4-2
> ii  php5-cgi [phpapi-20100525]             5.4.4-2
> ii  php5-cli [phpapi-20100525]             5.4.4-2
> ii  php5-common                            5.4.4-2
> ii  ucf                                    3.0025+nmu3
>
> php5-pgsql recommends no packages.
>
> php5-pgsql suggests no packages.
>
> -- no debconf information
>
> --
> HARDFAIL("Not enough magic.");
>        2.4.0-test2 /usr/src/linux/drivers/block/nbd.c
>
> _______________________________________________
> pkg-php-maint mailing list
> pkg-php-maint@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-php-maint



-- 
Ondřej Surý <ondrej@sury.org>




Message #21 received at 678626-done@bugs.debian.org (full text, mbox, reply):

From: Cédric Villemain <cedric@2ndquadrant.com>
To: Vincent Bernat <bernat@debian.org>
Cc: pkg-postgresql-public@lists.alioth.debian.org, 678626-done@bugs.debian.org
Subject: Re: [Pkg-postgresql-public] Bug#678626: php5-pgsql: can't connect to PostgreSQL 9.x
Date: Sat, 23 Jun 2012 14:34:45 +0200
[Message part 1 (text/plain, inline)]
Le samedi 23 juin 2012 13:02:58, Vincent Bernat a écrit :
>  ❦ 23 juin 2012 12:41 CEST, Cédric Villemain <cedric@2ndquadrant.com> :
> >> PostgreSQL 9.x in Debian now defaults to port 5433 (in postgresql.conf:
> >> port = 5433). php5-pgsql still defaults to 5432. An application that
> >> does not specify port won't be allowed to connect to a PostgreSQL
> >> database.
> > 
> > If you had a previous version of PostgreSQL installed and then install
> > the new one, the port number is incremented so you can run both
> > simultaneously.
> 
> [...]
> 
> > PostgreSQL itself still defaults to 5432.
> 
> Thanks for the tip!
> 
> My bug report is therefore invalid. This behaviour is a bit disturbing
> since 5433 is still used if the other version is removed afterwards (I
> usually remove the older version of PostgreSQL when I notice I have
> installed the new one) but I think there is no universal solution for
> this.

I suppose this pattern is frequent:

 1. install postgresql X.Y
 2. work
 3. install postgresql X.Y+1 (major release)
 4. upgrade
 5. check things
 6. remove old one

It might be good enough if pg_upgradecluster can change the port in 4. (new 
option, I believe) and/or have a special feature to upgrade configuration to 
recover the previous 'main' parameters (port,socket, listen_adress, ...) in 
step 6.
(this is ignoring the case where you have multiple clusters defined, but 'main' 
is usually the default one)

Anyway, those are new features suggestions. They need their own bug report if 
someone trust in them.
-- 
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 22 Jul 2012 07:27:10 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 02:24:58 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.