You are not logged in.

#1 2008-05-29 23:30:55

ReneVielma
Member
From: Chile
Registered: 2008-03-25
Posts: 8
Website

postgresql work without config files

Hello

After last upgrade of postgresql, I'm not config files of postgresql
(to this, I backup all databases, upgrade postresql to 8.3.1-1  and restore all databases without problem)

but

$  pacman -Ql postgresql postgresql-libs|grep etc
postgresql /etc/
postgresql /etc/conf.d/
postgresql /etc/conf.d/postgresql
postgresql /etc/rc.d/
postgresql /etc/rc.d/postgresql
postgresql /usr/share/man/man7/fetch.7.gz
$  locate postgres|grep etc
/etc/conf.d/postgresql
/etc/rc.d/postgresql
$

but the service work fine

where is config files hmm
any idea ?

thanks you big_smile


-rvm -rv- rv-

keyID: 3BFBD711
Fingerprint: 2CA5 0633 4D05 F9AB CA0B 2367 AA54 3486 3BFB D711

Offline

#2 2008-05-30 02:06:02

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: postgresql work without config files

I haven't used postgres in a while, but I remember some of the files were in /var/lib/postgres.  Could that be the directory you are looking for?

Offline

#3 2008-06-02 04:25:51

fukawi2
Forum Moderator
From: .vic.au
Registered: 2007-09-28
Posts: 4,705
Website

Re: postgresql work without config files

Config files reside in the PostgreSQL data directory, so it depends where you have set that to be using initdb.

Defaults are usually /usr/local/postgresql/data or /var/lib/postgresql/data

Offline

#4 2008-09-06 20:23:40

dextrose
Member
From: Portugal
Registered: 2008-08-20
Posts: 16
Website

Re: postgresql work without config files

I'm posting in this thread because I'm looking at it like a wiki. Perhaps we can make a wiki out of this also..

After installing the package with pacman, by initializing postgresql daemon for the first time, I am asked for a password I haven't been asked for.
I usually always use the same set of password, though after trying the standart ones, none of them really worked so I have no idea which password the service is asking for.

also, "postgres cannot access the server configuration file "/var/lib/postgres/data/postgresql.conf": Permission denied"

although before, I have quote:

 /etc/rc.d/postgresql restart
:: Stopping PostgreSQL                                                                                                                                [BUSY] su: user postgres does not exist
                                                                                                                                                      [FAIL] 
:: Starting PostgreSQL                                                                                                                                [BUSY] :: Adding postgres group                                                                                                                              [DONE] 
:: Adding postgres user                                                                                                                               [DONE] 
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale C.
The default database encoding has accordingly been set to SQL_ASCII.
The default text search configuration will be set to "english".

fixing permissions on existing directory /var/lib/postgres/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers/max_fsm_pages ... 24MB/153600
creating configuration files ... ok
creating template1 database in /var/lib/postgres/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok

Success. You can now start the database server using:

    /usr/bin/postgres -D /var/lib/postgres/data
or
    /usr/bin/pg_ctl -D /var/lib/postgres/data -l logfile start

server starting [DONE]

although, postgree post-installation claims to fix the permissions on the directory, by starting the database server:


]$ postgres -D /var/lib/postgres/data/
postgres cannot access the server configuration file "/var/lib/postgres/data/postgresql.conf": Permission denied
[jorge@arch64 postgresql]$ cd /var/lib/postgres/data/   
bash: cd: /var/lib/postgres/data/: Permission denied
[jorge@arch64 postgresql]$ /usr/bin/pg_ctl -D /var/lib/postgres/data -l logfile start
pg_ctl: could not open PID file "/var/lib/postgres/data/postmaster.pid": Permission denied

I went to have a look at the directory and :
]$ cd /var/lib/postgres/
[jorge@arch64 postgres]$ ls -l
total 0
drwx------ 10 postgres postgres 464 Sep  6 15:24 data
[jorge@arch64 postgres]$


What is going wrong with this? Any Ideas?

Kind Regards,
Jorge Nunes.

Offline

#5 2008-10-01 14:10:09

Forty
Member
From: Portugal
Registered: 2008-05-02
Posts: 3

Re: postgresql work without config files

I'm having the exact same problem as the poster above me. hmm

Offline

#6 2008-10-01 14:34:00

kett
Member
Registered: 2008-04-21
Posts: 104

Re: postgresql work without config files

My guess would be postgres is already started.  I just installed it, and got it to work fine, by just running /etc/rc.d/postgres start after the. Try running the following command:

 psql template1 -U postgres

If that works, it means your postgres server is already running.  psql is the client application to access a specific database.

Last edited by kett (2008-10-01 14:35:08)

Offline

Board footer

Powered by FluxBB