Re: PostgreSQL on Webmin - Mailing list pgsql-general

From John R Pierce
Subject Re: PostgreSQL on Webmin
Date
Msg-id 49BEB9E3.3040003@hogranch.com
Whole thread Raw
In response to Re: PostgreSQL on Webmin  ("Kostadin Solakov" <kostadin.solakov@gmail.com>)
Responses Re: PostgreSQL on Webmin  ("Kostadin Solakov" <kostadin.solakov@gmail.com>)
List 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





pgsql-general by date:

Previous
From: "Dann Corbit"
Date:
Subject: Re: (0x0000274D/10061) on Install
Next
From: Stefan Kaltenbrunner
Date:
Subject: Re: Maximum transaction rate