pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Krishnamurthy Radhakrishnan <kradhak@cisco.com>
To: Craig James <craig_james@emolecules.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Dumping data using pg_dump after chrooting to a different partition
Date: Mon, 24 Oct 2011 21:01:46 -0600
Message-ID: <4EA6269A.7040803@cisco.com> (raw)
In-Reply-To: <4EA5EA8E.5090406@emolecules.com>
References: <4EA5E253.6020600@cisco.com>
	<4EA5EA8E.5090406@emolecules.com>

Thanks Craig.

After configuring to accept TCP connections on port 5432, I tried to 
specify the hostname as shown below and that didn't help. Is there 
anything else that needs to be configured?
pg_dump -h bldr-ccm36.cisco.com -p 5432 -a -U postgres
pg_dump: [archiver (db)] connection to database "postgres" failed: could 
not connect to server: Connection refused
     Is the server running on host "bldr-ccm36.cisco.com" and accepting
     TCP/IP connections on port 5432?

Radha

On 10/24/11 4:45 PM, Craig James wrote:
> On 10/24/11 3:10 PM, Krishnamurthy Radhakrishnan wrote:
>> Hi,
>>
>> I am new to PostgreSQL. We are using PostgreSQL 9.0.2 on our linux 
>> server. We have an instance of PostgreSQL 9.0 running using the 
>> primary partition on the server.
>>
>> We want to use the pg_dump and psql programs to migrate the data 
>> during our software upgrade process. For upgrade, we plan to do the 
>> following:
>>
>>   * chroot to a secondary partition on the server.
>>   * install the software RPMs including PostgreSQL RPMs
>>   * start a secondary instance of PostgreSQL DB server using a
>>     different port and data directory.
>>   * run pg_dump to dump the data from the primary instance to a file.
>>   * run psql to import the data from the file into the secondary
>>     instance.
>>
>> However when I tried to perform the pg_dump as mentioned above, I get 
>> the following error:
>> pg_dump: [archiver (db)] connection to database "TestDB" failed: 
>> could not connect to server: No such file or directory|<LVL::Debug>
>> Is the server running locally and accepting|<LVL::Debug>
>> connections on Unix domain socket "/tmp/.s.PGSQL.5432"?|<LVL::Debug>
> I suspect the problem is that localhost sockets on Unix/Linux are 
> actual implemented as file-system sockets rather than TCP/IP sockets.  
> If you do chroot, those files won't exist.  Try connecting using a "-h 
> hostname (e.g. -h myserver.domain.com) rather than the default 
> localhost.  You may have to reconfigure your server to listen on port 80.
>
> Craig

view thread (7+ messages)  latest in thread

Message-ID: <4EA6269A.7040803@cisco.com>
Permalink:  ../4EA6269A.7040803@cisco.com/
Also on:    postgresql.org/message-id/4EA6269A.7040803@cisco.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: kradhak@cisco.com, craig_james@emolecules.com
  Subject: Re: Dumping data using pg_dump after chrooting to a different partition
  In-Reply-To: <4EA6269A.7040803@cisco.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox