Re: PostgreSQL on Webmin

From: John R Pierce <pierce(at)hogranch(dot)com>
To: Kostadin Solakov <kostadin(dot)solakov(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL on Webmin
Date: 2009-03-16 20:43:15
Message-ID: 49BEB9E3.3040003@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Kostadin Solakov wrote:
> Anyway I managed to connect to localhost, but after I made changes to
> pg_connect and I removed the host name
> FROM
>
> 1. pg_pconnect("host=localhost dbname=mydb user=myuser
> password=mypassword");
>
> TO
>
> 1. pg_pconnect("dbname=mydb user=myuser password=mypassword");
>
>
> Now it works, but VERY SLOWER than before.
> One of the scripts I'm running on the previous host took below 2 sec for
> 1000 entries and now it takes 1 sec for 100 entries.
>

thats odd, as a domain socket should be slightly -faster- than a tcp/ip
socket. now, since you say 'previous host' I could wonder if other
configuration items are impacting this, such as buffer sizes in
postgresql.conf, relative speed of disk controllers, etc. or perhaps
this new database hasn't been analyzed since it was populated, or its
indexes need rebuilding, or something similar...

> working pg_hba.conf looks like this:
>
> 1. # IPv4 local connections:
> 2. local all all trust
> 3. local all my_user ident sameuser
> 4. local my_db my_user password
>
line 2 masks lines 3,4 as it accepts any connection to any database over
'local' (unix domain socket), so it would never bother to try the others.

> 5. host my_db my_user 0.0.0.0/0 password
>

that line would allow anyone anywhere (assuming listen_address = '*' in
postgresql.conf, and no firewalls intervene) to connect as myuser to
mydb with a password

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joachim Tranvåg 2009-03-16 21:03:11 Re: (0x0000274D/10061) on Install
Previous Message Dann Corbit 2009-03-16 20:42:19 Re: (0x0000274D/10061) on Install