Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dzq1a-0001ht-Dw for pgsql-admin@arkaria.postgresql.org; Wed, 04 Oct 2017 20:12:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dzq1Z-0004pt-Hr for pgsql-admin@arkaria.postgresql.org; Wed, 04 Oct 2017 20:12:09 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dzpzl-0001NR-81 for pgsql-admin@postgresql.org; Wed, 04 Oct 2017 20:10:17 +0000 Received: from resqmta-po-11v.sys.comcast.net ([2001:558:fe16:19:96:114:154:170]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dzpzi-0004Mg-Cx for pgsql-admin@postgresql.org; Wed, 04 Oct 2017 20:10:16 +0000 Received: from resomta-po-16v.sys.comcast.net ([96.114.154.240]) by resqmta-po-11v.sys.comcast.net with ESMTP id zpzfdD1kYK4Y3zpzgdjHlZ; Wed, 04 Oct 2017 20:10:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1507147812; bh=pU8iDnQt7wHMpYE/x97hAYjFq88BHEJleDltJ9or40w=; h=Received:Received:Received:From:To:Subject:Date:Message-ID: MIME-Version:Content-Type; b=FuyY8bHmqzOlarp5/Go7fa7kABaGBm+HhhX6429Hvg8Jo5Lf/03imjMlqDNAeW9mn 3TwrjtUxHQTdQyD9tiGGPJnvH11VPI7PCQSQ+eWU9bObU76Kwc2Yed5mISfKDcaIWW zP89W9oVo0CfRegJoHxttQ3gd30JFlgOXUT6CiLtW+v1/dV7wtT/GVXqXHUZ9fdxKH QA+51DiBmqnVhexSxu2gKagbrxO7NixJHX1gMIvrupJIGccAfMEC26SLjecw4tbn3Z 0KjT21JDlfbiv5bwgcyuky5bxLAMwNBJigpkzamNK9ec6/aQlccfQCDwbHTta4qboG Kq5JkNW12qkGQ== Received: from jsievers.comcast.net ([12.30.159.20]) by resomta-po-16v.sys.comcast.net with SMTP id zpzTdCPudLKGOzpzWdd5mm; Wed, 04 Oct 2017 20:10:10 +0000 Received: from jsievers.enova.com (localhost [127.0.0.1]) by jsievers.comcast.net (Postfix) with ESMTP id 3063C26005E; Wed, 4 Oct 2017 15:09:59 -0500 (CDT) From: Jerry Sievers To: Don Seiler Cc: pgsql-admin Subject: Re: psql can't connect to old DB after installing new binaries References: Date: Wed, 04 Oct 2017 15:09:59 -0500 In-Reply-To: (Don Seiler's message of "Wed, 4 Oct 2017 14:26:15 -0500") Message-ID: <878tgqptd4.fsf@jsievers.enova.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-CMAE-Envelope: MS4wfFhnZImXn71muX8ulFck7PUWvF5Py9w9LKcVQfTPL52DVhAF7KNY5akAYBFBYB7HsGNeocQGDHqaFTIK716Q8OdO7FjwtdFyEmWIVmVYiQkEEILxLEAm tINVdr6t61rAgsANJNe7BzwOL4u0gKAAKA/kHqIpl6QLvvpdwAZ2W029OhozXWHUNJvDaLPq7f4ZuS3wjZ0gZAeYB0pf30P/OO0= List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org Don Seiler writes: > CentOS 6. I have a box with 9.2 installed and running, planning to > upgrade to 9.6. All packages are from the postgresql yum repos, not > the CentOS base repos. > > However, after installing the 9.6 binaries, psql complains about the > socket file: > > psql: could not connect to server: No such file or directory > Is the server running locally and accepting > connections on Unix domain socket "/var/run/postgresql > /.s.PGSQL.5432"? Try PGHOST=/tmp psql ... Or psql -h /tmp -p $port... ISTM your newer libpq is now being used and as seen above it's built with a different default socket file location. > > My postgres 9.2 database has a socket file in /tmp/.s.PGSQL.5432. > What's interesting is that I get this error even when running the 9.2 > psql as well: > > $ /usr/pgsql-9.2/bin/psql > psql: could not connect to server: No such file or directory > Is the server running locally and accepting > connections on Unix domain socket "/var/run/postgresql > /.s.PGSQL.5432"? > > $ /usr/pgsql-9.2/bin/psql --version > psql (PostgreSQL) 9.2.22 > > However I can connect if I specify "-h /tmp": > > $ /usr/pgsql-9.2/bin/psql -h /tmp > psql (9.2.22) > Type "help" for help. > > postgres=# > > Also when if I remove the 9.6 binaries (yum remove postgresql96*), > then psql works as expected as well. > > I can sort of understand the socket thing from the 9.6 psql binary, > but not the 9.2 binary. Either way it would break scripts for the > existing DB, maybe some other backwards compatibility issues. Is > there something else to change (other than unix_socket_directory, > which would require a restart as well) so that installing the 9.6 > binaries wouldn't affect the 9.2 environment? > > -- > Don Seiler > www.seiler.us > > -- Jerry Sievers Postgres DBA/Development Consulting e: postgres.consulting@comcast.net p: 312.241.7800 -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin