dbTalk Databases Forums  

CREATEDB failure

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss CREATEDB failure in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
April Carvalho
 
Posts: n/a

Default Re: Problem with pg_hba.conf file in Postgres 7.3 - 01-26-2004 , 03:30 PM






Yes, that would help. <feeling stupid>

The files in question were the ones referenced in pg_hba.conf:

host db1 @db1_users 10.0.0.0 255.255.255.0 md5

There are actually several lines (and several user lists) in this file.
Files like @db1_users, were in /etc/postgresql/, since pg_hba.conf was
there. This made sense at the time, because, according to the postgres
docs, they should be in the same folder as pg_hba.conf.
However, the debian package has $PGDATA/pg_hba.conf has a link
to /etc/postgresql/pg_hba.conf. Postgres is probably expecting
pg_hba.conf to be in $PGDATA, and Debain expects it in /etc/postgresql.
If I knew nothing of Debian, perhaps this wouldn't have happened.

Funny huh?

Btw, the $PGDATA variable *was* set after all, but just for user postgres.

Thanks for all your help.

April

On Mon, 26 Jan 2004, Oliver Elphick wrote:

Quote:
On Mon, 2004-01-26 at 20:18, April Carvalho wrote:
Btw, thanks for all the help. :-)

I think that permissions are ok, since it was working fine when
the files were moved; it would still be broken if the perms were
not right.

Where were the files when it didn't work, and where did you move them
to?

However $PGDATA was not set, assuming that the debconf (the debian
package configuration program) had already set it properly.

In the environment of the 'postgres' login, it should be set. This is
the user under which the postmaster is (should be) run. If it weren't
set, the postmaster couldn't start, because it wouldn't know where to
find the database. If an ordinary user needs it set, he should source
/etc/postgresql/postgresql.env in his .bashrc or other startup script.

--
Oliver Elphick Oliver.Elphick (AT) lfix (DOT) co.uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Wash me thoroughly from mine iniquity, and cleanse me
from my sin. For I acknowledge my transgressions; and
my sin is ever before me. Against thee, thee only,
have I sinned, and done this evil in thy sight..."
Psalms 51:2-4


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org



Reply With Quote
  #12  
Old   
Oliver Elphick
 
Posts: n/a

Default Re: Problem with pg_hba.conf file in Postgres 7.3 - 01-26-2004 , 03:53 PM






On Mon, 2004-01-26 at 21:30, April Carvalho wrote:
Quote:
The files in question were the ones referenced in pg_hba.conf:

host db1 @db1_users 10.0.0.0 255.255.255.0 md5

There are actually several lines (and several user lists) in this file.
Files like @db1_users, were in /etc/postgresql/, since pg_hba.conf was
there. This made sense at the time, because, according to the postgres
docs, they should be in the same folder as pg_hba.conf.
However, the debian package has $PGDATA/pg_hba.conf has a link
to /etc/postgresql/pg_hba.conf. Postgres is probably expecting
pg_hba.conf to be in $PGDATA, and Debain expects it in /etc/postgresql.
If I knew nothing of Debian, perhaps this wouldn't have happened.

Funny huh?
I need to add some documentation about this.

--
Oliver Elphick Oliver.Elphick (AT) lfix (DOT) co.uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Wash me thoroughly from mine iniquity, and cleanse me
from my sin. For I acknowledge my transgressions; and
my sin is ever before me. Against thee, thee only,
have I sinned, and done this evil in thy sight..."
Psalms 51:2-4


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly



Reply With Quote
  #13  
Old   
April Carvalho
 
Posts: n/a

Default Another issue with pg_hba.conf file & dumpall - 01-26-2004 , 04:26 PM



Can't thank you all enough for the help. :-)

Here's another problem I'm having. I'm using pg_dumpall
in a micro sized perl script to dump the entire db cluster.
(All it did was save the password to an environment variable,
and modified the backup file's name to include the date.)

This script has been working on our old server for over a
year. We're trying to get it to work with our new one, but
with stricter security measures. (Our older one used ident,
which our boss has now banned for the new one.) Unfortunately,
I'm getting the following message back when trying to run it
manually:

pg_dump: [archiver (db)] connection to database "db1" failed: FATAL:
No pg_hba.conf entry for host localhost, user postgres, database db1

and dies on the first database:

pg_dumpall: pg_dump failed on db1, exiting


The script is owned by postgres, pg_dumpall is owned by postgres,
and is being run as user postgres with postgres' environment
variables (i.e., su - postgres before execution.). So if it is
a permissions issue with a file, it isn't obvious.

Here's part of my pg_hba.conf file:

local template1 postgres md5
local template1 all reject
host all postgres 127.0.0.1 255.0.0.0 md5
hostssl template1 all 0.0.0.0 0.0.0.0 reject

line #3 should be the one that pg_dumpall should be using.

What am I doing wrong? The docs give examples, but not enough
to get a handle on this problem.

Again, any help would be greatly appreciated.

April Carvalho











---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.