[ADMIN] 6.5.3/doesn't recognize localhost in pg_hba.conf (fwd)

Поиск
Список
Период
Сортировка
Искать

[ADMIN] 6.5.3/doesn't recognize localhost in pg_hba.conf (fwd)

От:
Larry Rosenman <ler@lerami.lerctr.org>
Дата:
Just trying to get answers....

LER
----- Forwarded message from Larry Rosenman -----

Re: [GENERAL] [ADMIN] 6.5.3/doesn't recognize localhost in pg_hba.conf (fwd)

От:
"Patrick Welche" <prlw1@newn.cam.ac.uk>
Дата:
Larry Rosenman wrote:
> 
> Just trying to get answers....
> 
> LER

> HELP!
> 
> Just recompiled PostgreSQL 6.5.3 on UnixWare 7.1.0 on a P-III. 
> 
> Followed all the steps, but when I try to connect, it says
> that there is NO pg_hba.conf entry, but there is. 
> 
> Anyone else see this?

Does $PGDATA/pg_hba.conf exist on your system? Did you run initdb?

Cheers,

Patrick

Re: [GENERAL] [ADMIN] 6.5.3/doesn't recognize localhost in pg_hba.conf (fwd)

От:
Larry Rosenman <ler@lerami.lerctr.org>
Дата:
Yes, and Yes. 

# su - postgres

$ id -a
uid=400(postgres) gid=400(postgres) groups=400(postgres)
$ ls -l $PGDATA/pg_hba.conf
-r--------    1 postgres postgres       5192 Nov 13 15:59 /usr/local/pgsql/data/pg_hba.conf
$ postmaster -i&
[1]     28410
$ psql
No pg_hba.conf entry for host localhost, user postgres, database postgres
Connection to database 'postgres' failed.
No pg_hba.conf entry for host localhost, user postgres, database postgres
$ ls -laR $PGDATA
total 92
drwx------    3 postgres postgres       1024 Nov 13 15:59 .
drwxr-xr-x    8 postgres postgres       1024 Nov 13 16:01 ..
-rw-------    1 postgres postgres          4 Nov 13 15:59 PG_VERSION
drwx------    3 postgres postgres         96 Nov 13 15:58 base
-rw-------    1 postgres postgres       8192 Nov 13 15:59 pg_database
-r--------    1 postgres postgres       3407 Nov 13 15:59 pg_geqo.sample
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_group
-r--------    1 postgres postgres       5192 Nov 13 15:59 pg_hba.conf
-rw-------    1 postgres postgres       8192 Nov 13 15:59 pg_log
-rw-rw-rw-    1 postgres postgres         53 Nov 13 15:59 pg_pwd
-rw-------    1 postgres postgres       8192 Nov 13 15:59 pg_shadow
-rw-------    1 postgres postgres       8192 Nov 13 15:59 pg_variable

/usr/local/pgsql/data/base:
total 6
drwx------    3 postgres postgres         96 Nov 13 15:58 .
drwx------    3 postgres postgres       1024 Nov 13 15:59 ..
drwx------    2 postgres postgres       2048 Nov 13 15:59 template1

/usr/local/pgsql/data/base/template1:
total 1878
drwx------    2 postgres postgres       2048 Nov 13 15:59 .
drwx------    3 postgres postgres         96 Nov 13 15:58 ..
-rw-------    1 postgres postgres          4 Nov 13 15:59 PG_VERSION
-rw-------    1 postgres postgres       8192 Nov 13 15:59 pg_aggregate
-rw-------    1 postgres postgres       8192 Nov 13 15:59 pg_am
-rw-------    1 postgres postgres      16384 Nov 13 15:59 pg_amop
-rw-------    1 postgres postgres       8192 Nov 13 15:59 pg_amproc
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_attrdef
-rw-------    1 postgres postgres      16384 Nov 13 15:59 pg_attrdef_adrelid_index
-rw-------    1 postgres postgres      49152 Nov 13 15:59 pg_attribute
-rw-------    1 postgres postgres      16384 Nov 13 15:59 pg_attribute_attrelid_index
-rw-------    1 postgres postgres      49152 Nov 13 15:59 pg_attribute_relid_attnam_index
-rw-------    1 postgres postgres      32768 Nov 13 15:59 pg_attribute_relid_attnum_index
-rw-------    1 postgres postgres       8192 Nov 13 15:59 pg_class
-rw-------    1 postgres postgres      16384 Nov 13 15:59 pg_class_oid_index
-rw-------    1 postgres postgres      16384 Nov 13 15:59 pg_class_relname_index
-rw-------    1 postgres postgres      65536 Nov 13 15:59 pg_description
-rw-------    1 postgres postgres      40960 Nov 13 15:59 pg_description_objoid_index
-rw-------    1 postgres postgres       8192 Nov 13 15:59 pg_index
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_indexes
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_inheritproc
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_inherits
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_ipl
-rw-------    1 postgres postgres       8192 Nov 13 15:59 pg_language
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_listener
-rw-------    1 postgres postgres       8192 Nov 13 15:59 pg_opclass
-rw-------    1 postgres postgres      65536 Nov 13 15:59 pg_operator
-rw-------    1 postgres postgres     172032 Nov 13 15:59 pg_proc
-rw-------    1 postgres postgres      40960 Nov 13 15:59 pg_proc_oid_index
-rw-------    1 postgres postgres     139264 Nov 13 15:59 pg_proc_proname_narg_type_index
-rw-------    1 postgres postgres      57344 Nov 13 15:59 pg_proc_prosrc_index
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_relcheck
-rw-------    1 postgres postgres      16384 Nov 13 15:59 pg_relcheck_rcrelid_index
-rw-------    1 postgres postgres      24576 Nov 13 15:59 pg_rewrite
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_rules
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_statistic
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_tables
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_trigger
-rw-------    1 postgres postgres      16384 Nov 13 15:59 pg_trigger_tgrelid_index
-rw-------    1 postgres postgres      16384 Nov 13 15:59 pg_type
-rw-------    1 postgres postgres      16384 Nov 13 15:59 pg_type_oid_index
-rw-------    1 postgres postgres      16384 Nov 13 15:59 pg_type_typname_index
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_user
-rw-------    1 postgres postgres          0 Nov 13 15:59 pg_views
$ tail -10 $PGDATA/pg_hba.conf
# The above would allow users from 192.168.0.x hosts to connect to any
# database, but if Ident says the user is "bryanh" and he requests to
# connect as PostgreSQL user "guest1", the connection is only allowed if
# there is an entry for map "omicron" in pg_ident.conf that says "bryanh" is 
# allowed to connect as "guest1".

# By default, allow anything over UNIX domain sockets and localhost.

local        all                                         trust
host         all         127.0.0.1     255.255.255.255   trust
$ 

Patrick Welche wrote:
> Larry Rosenman wrote:
> > 
> > Just trying to get answers....
> > 
> > LER
> 
> > HELP!
> > 
> > Just recompiled PostgreSQL 6.5.3 on UnixWare 7.1.0 on a P-III. 
> > 
> > Followed all the steps, but when I try to connect, it says
> > that there is NO pg_hba.conf entry, but there is. 
> > 
> > Anyone else see this?
> 
> Does $PGDATA/pg_hba.conf exist on your system? Did you run initdb?
> 
> Cheers,
> 
> Patrick
> 


-- 
Larry Rosenman                      http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Re: [GENERAL] [ADMIN] 6.5.3/doesn't recognize localhost in pg_hba.conf (fwd)

От:
"Patrick Welche" <prlw1@newn.cam.ac.uk>
Дата:
Larry Rosenman wrote:
> 
> Yes, and Yes. 
...
> $ psql
> No pg_hba.conf entry for host localhost, user postgres, database postgres
> Connection to database 'postgres' failed.
> No pg_hba.conf entry for host localhost, user postgres, database postgres
...
> $ ls -laR $PGDATA
...
> /usr/local/pgsql/data/base:
> total 6
> drwx------    3 postgres postgres         96 Nov 13 15:58 .
> drwx------    3 postgres postgres       1024 Nov 13 15:59 ..
> drwx------    2 postgres postgres       2048 Nov 13 15:59 template1


How about

psql template1

?

Cheers,

Patrick

Re: [GENERAL] [ADMIN] 6.5.3/doesn't recognize localhost in pg_hba.conf (fwd)

От:
Larry Rosenman <ler@lerami.lerctr.org>
Дата:
Same result.


Patrick Welche wrote:
> Larry Rosenman wrote:
> > 
> > Yes, and Yes. 
> ...
> > $ psql
> > No pg_hba.conf entry for host localhost, user postgres, database postgres
> > Connection to database 'postgres' failed.
> > No pg_hba.conf entry for host localhost, user postgres, database postgres
> ...
> > $ ls -laR $PGDATA
> ...
> > /usr/local/pgsql/data/base:
> > total 6
> > drwx------    3 postgres postgres         96 Nov 13 15:58 .
> > drwx------    3 postgres postgres       1024 Nov 13 15:59 ..
> > drwx------    2 postgres postgres       2048 Nov 13 15:59 template1
> 
> 
> How about
> 
> psql template1
> 
> ?
> 
> Cheers,
> 
> Patrick
> 


-- 
Larry Rosenman                      http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

Re: [GENERAL] [ADMIN] 6.5.3/doesn't recognize localhost in pg_hba.conf (fwd)

От:
"Patrick Welche" <prlw1@newn.cam.ac.uk>
Дата:
Larry Rosenman wrote:
> 
> Same result.

OK, still guessing... How about

psql -h 127.0.0.1 template1

?

Cheers,

Patrick

RPM 6.5.3

От:
"Alain TESIO" <tesio@easynet.fr>
Дата:
Hello,

I installed these RPM (all of the files available on the ftp site)
on RedHat 6.0 without any error reported and it looks like
some parts are missing.
No $PGDATA variable is set for the user postgres and most
usual files in this directory are missing are missing.
Is there any fix or should I get the tgz files ?

Alain



Re: [GENERAL] [ADMIN] 6.5.3/doesn't recognize localhost in pg_hba.conf (fwd)

От:
Larry Rosenman <ler@lerami.lerctr.org>
Дата:
That works.  The other gent traced it, and I placed a debug statement.

It appears that on AF_LOCAL sockets on this release/ptf level
sa_family is NOT set to AF_LOCAL. 

I'll file a bug with SCO. 

$ psql -h lerami2 -p 5432 template1
raddr->sa.sa_family = 2
Welcome to the POSTGRESQL interactive sql monitor:
  Please read the file COPYRIGHT for copyright terms of POSTGRESQL
[PostgreSQL 6.5.3 on i586-pc-unixware7.1.0, compiled by cc ]

   type \? for help on slash commands
   type \q to quit
   type \g or terminate with semicolon to execute query
 You are currently connected to the database: template1

template1=> EOF
$ psql
raddr->sa.sa_family = 0
No pg_hba.conf entry for host localhost, user postgres, database postgres
Connection to database 'postgres' failed.
No pg_hba.conf entry for host localhost, user postgres, database postgres
$ 



Patrick Welche wrote:
> Larry Rosenman wrote:
> > 
> > Same result.
> 
> OK, still guessing... How about
> 
> psql -h 127.0.0.1 template1
> 
> ?
> 
> Cheers,
> 
> Patrick
> 
> ************
> 


-- 
Larry Rosenman                      http://www.lerctr.org/~ler
Phone: +1 972-414-9812 (voice) Internet: ler@lerctr.org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

vacuum analyze works on tables, but not on entire database

От:
"Aaron J. Seigo" <aaron@gtv.ca>
Дата:
hi...

something bizarre (at least to my experience) has started occuring in our
production database:

i can run vacuum analyze on each and every table INDIVIDUALLY no problem.. but
when i vacume analyze the whole db (by going into psql and uttering 'vacuum
analyze;') it dies.

any thoughts? 

its not a huge problem, except that vacuum anlyzing each of the 40 tables is a
little cumbersome. 

 -- 
Aaron J. Seigo
Sys Admin

Re: [GENERAL] vacuum analyze works on tables, but not on entire database

От:
"Doran L. Barton" <fozz@iodynamics.com>
Дата:
Not long ago, Aaron J. Seigo proclaimed...
> something bizarre (at least to my experience) has started occuring in our
> production database:
> 
> i can run vacuum analyze on each and every table INDIVIDUALLY no problem.. but
> when i vacume analyze the whole db (by going into psql and uttering 'vacuum
> analyze;') it dies.
> 
> any thoughts? 
> 
> its not a huge problem, except that vacuum anlyzing each of the 40 tables is a
> little cumbersome. 

Would you care to mutter something about the PG version you're running and
the platform and OS on which you're operating?
-- 
Doran L. Barton 
Iodynamics LLC -- "Internetworking the masses"

Re: [GENERAL] vacuum analyze works on tables, but not on entire database

От:
"Aaron J. Seigo" <aaron@gtv.ca>
Дата:
On Mon, 15 Nov 1999, Doran L. Barton wrote:
> Not long ago, Aaron J. Seigo proclaimed...
> > something bizarre (at least to my experience) has started occuring in our
> > production database:
> > 
> > i can run vacuum analyze on each and every table INDIVIDUALLY no problem.. but
> > when i vacume analyze the whole db (by going into psql and uttering 'vacuum
> > analyze;') it dies.
> > 
> > any thoughts? 
> > 
> > its not a huge problem, except that vacuum anlyzing each of the 40 tables is a
> > little cumbersome. 
> 
> Would you care to mutter something about the PG version you're running and
> the platform and OS on which you're operating?

oops =)

PGSQL: 6.5.1
OS: Linux (Redhat 5.2)

-- 
Aaron J. Seigo
Sys Admin

Re: [GENERAL] vacuum analyze works on tables, but not on entire database

От:
Slavica Stefic <izvori@iname.com>
Дата:
you wrote:
> On Mon, 15 Nov 1999, Doran L. Barton wrote:
> > Not long ago, Aaron J. Seigo proclaimed...
> > > something bizarre (at least to my experience) has started occuring in our
> > > production database:
> > > 
> > > i can run vacuum analyze on each and every table INDIVIDUALLY no problem.. but
> > > when i vacume analyze the whole db (by going into psql and uttering 'vacuum
> > > analyze;') it dies.
> > > 
> > > any thoughts? 
> > > 
> > > its not a huge problem, except that vacuum anlyzing each of the 40 tables is a
> > > little cumbersome. 
> > 
> > Would you care to mutter something about the PG version you're running and
> > the platform and OS on which you're operating?
> 
> oops =)
> 
> PGSQL: 6.5.1
> OS: Linux (Redhat 5.2)
similar problem. But I have a table (big: 1.3MB, 7585 rows) on which the vacuum
analyze crash.

I use 6.5.2 also on redhat 5.2

---------
Marko Mikulicic

> 
> -- 
> Aaron J. Seigo
> Sys Admin
> 
> ************

Basic question about indexes (6.5.2)

От:
"Alain TESIO" <tesio@easynet.fr>
Дата:
create table T1 ( x int );
create table T2 ( y int );
< insert from 1 to 1000 in T1 and T2>
create index idx_t1 on T1 ( x );
create index idx_t2 on T2 ( y );
explain select T1.x from T1,T2 where T1.x=T2.y;
drop table T1;
drop table T2;

Hash Join  (cost=155.00 rows=1001 width=8)
  ->  Seq Scan on t2  (cost=43.00 rows=1000 width=4)
  ->  Hash  (cost=43.00 rows=1000 width=4)
        ->  Seq Scan on t1  (cost=43.00 rows=1000 width=4)

I'm surprised that this simple query can't use indexes, or
it does and it's not reported in the explain output ?

By the way, with these tables, why does this query return
1000 and not 1000000 ?

select count(*) from T1,T2;

count
-----
 1000
(1 row)


Alain


Re: [GENERAL] Basic question about indexes (6.5.2)

От:
"Aaron J. Seigo" <aaron@gtv.ca>
Дата:
Hi...

On Mon, 15 Nov 1999, Alain TESIO wrote:
> create table T1 ( x int );
> create table T2 ( y int );
> < insert from 1 to 1000 in T1 and T2>
> create index idx_t1 on T1 ( x );
> create index idx_t2 on T2 ( y );
> explain select T1.x from T1,T2 where T1.x=T2.y;

instead try:

 explain select T1.x from T1,T2 where T1.x=T2.y::int;

NOTICE:  QUERY PLAN:
 
Nested Loop  (cost=2093.00 rows=100001 width=8)
  ->  Seq Scan on t2  (cost=43.00 rows=1000 width=4)
  ->  Index Scan using idx_t1 on t1  (cost=2.05 rows=1000 width=4)
 
EXPLAIN     

the reason for this is that unless the input is specifically known to be of the
right type (and it almost never does unless you force a typecast) it won't use
the index(es) available.

-- 
Aaron J. Seigo
Sys Admin
FAQ