pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mindaugas Žakšauskas <mindas@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Establishing remote connections is slow
Date: Tue, 17 Jan 2012 10:41:12 -0500
Message-ID: <16644.1326814872@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKTEH82c3hJxerDSSaC-9yK4yNrwPcV_z2pxfr9noBHrCPmUfQ@mail.gmail.com>
References: <CAKTEH83nqC5NBZjWJ2ZAW8eBMWjW3N6G3RhbsWy68rMgf=MF1Q@mail.gmail.com>
	<15697.1326812982@sss.pgh.pa.us>
	<CAKTEH82c3hJxerDSSaC-9yK4yNrwPcV_z2pxfr9noBHrCPmUfQ@mail.gmail.com>

=?UTF-8?Q?Mindaugas_=C5=BDak=C5=A1auskas?= <mindas@gmail.com> writes:
>> What about "psql -h localhost", ie physically local connection but
>> via TCP not unix socket?

> user@dbserver> psql -h 127.0.0.1 -p5432 -U user -W db

> This works fast. But

> user@dbserver> psql -h <IP> -p5432 -U user -W db

> (where <IP> is the multipath interface)

> This is slow! So it is definitely something network-related or
> something how PostgreSQL deals with multipath interface.

Hm.  AFAIR postgres doesn't know anything particular about multipath
interfaces --- it just listens where you tell it to.  So I'm thinking
this is a system-level issue.  It still seems like it could be DNS
lookup related though.  Do you have log_hostname turned on, and if so
does turning it off make a difference?

			regards, tom lane



view thread (13+ messages)  latest in thread

Message-ID: <16644.1326814872@sss.pgh.pa.us>
Permalink:  ../16644.1326814872@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/16644.1326814872@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, mindas@gmail.com
  Subject: Re: Establishing remote connections is slow
  In-Reply-To: <16644.1326814872@sss.pgh.pa.us>

* 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