Skip site navigation (1) Skip section navigation (2)

Re: Dumping data using pg_dump after chrooting to a different partition

From: Craig Ringer <ringerc(at)ringerc(dot)id(dot)au>
To: Krishnamurthy Radhakrishnan <kradhak(at)cisco(dot)com>
Cc: Craig James <craig_james(at)emolecules(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Dumping data using pg_dump after chrooting to a different partition
Date: 2011-10-25 03:45:39
Message-ID: 4EA630E3.6090606@ringerc.id.au (view raw or flat)
Thread:
Lists: pgsql-admin
On 25/10/11 11:01, Krishnamurthy Radhakrishnan wrote:
> 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?

Use "localhost" or "127.0.0.1" if it's on the same machine to simplify
things. If you try to connect to your host's public IP but
postgresql.conf has listen_addresses='127.0.0.1' or
listen_addresses='localhost' then you won't be able to connect because
Pg isn't listening on your public IP, only your loopback IP. A chroot
won't affect tcp/ip, so it's still localhost when you're chrooted into
another FS.

Also, you may have firewall rules in place that prevent the connection,
check for that.

--
Craig Ringer

In response to

Responses

pgsql-admin by date

Next:From: RaghavendraDate: 2011-10-25 12:54:16
Subject: Re: Create Temp tables on SLave
Previous:From: Krishnamurthy RadhakrishnanDate: 2011-10-25 03:01:46
Subject: Re: Dumping data using pg_dump after chrooting to a different partition

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group