DB problem
DB problem
От:
vinayakr@vmoksha.com
Дата:
Hi,
We are using PostgreSQL 7.3 version, installed in linux system. Only DB is getting shut down 3-4 times a day. From my application end I get "Sorry too many clients" error.
Refering the FAQ I maximized the DB session limit to 200.
Refering the FAQ I maximized the DB session limit to 200.
I think the logs are not enabled in my DB. So I set the following options in postgresql.con file
log_timestamp= true
log_directory=pg_log
log_filename=%Y-%m-%d_%H%M%S.log
log_disconnections=true
log_hostname=true
log_timestamp= true
log_directory=pg_log
log_filename=%Y-%m-%d_%H%M%S.log
log_disconnections=true
log_hostname=true
log_statement=true
After restarting the system got the following error :
[root@localhost root]# su postgres bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: postgresql.conf:131: syntax error,
token="%" bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: postgresql.conf:131: syntax error, token="%" bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: postgresql.conf:131: syntax error, token="%" bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: 'log_directory' is not a valid option name bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: 'log_directory' is not a valid option name bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: 'log_filename' is not a valid option name bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: 'log_disconnections' is not a valid option name bash-2.05b$ postmaster -i -D /var/lib/pg
token="%" bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: postgresql.conf:131: syntax error, token="%" bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: postgresql.conf:131: syntax error, token="%" bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: 'log_directory' is not a valid option name bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: 'log_directory' is not a valid option name bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: 'log_filename' is not a valid option name bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: 'log_disconnections' is not a valid option name bash-2.05b$ postmaster -i -D /var/lib/pg
When you install the DB, the logs are enabled by default?
Would you pls tell me still what setting need to be done?
Thanks,
Vinayak V. Raikar
Extn : 143
Vinayak V. Raikar
Extn : 143
Re: [pgadmin-support] DB problem
От:
"Harald Armin Massa" <haraldarminmassa@gmail.com>
Дата:
Vinayakr, > We are using PostgreSQL 7.3 version, installed in linux system. Only DB is > getting shut down 3-4 times a day. From my application end I get "Sorry too > many clients" error. Maybe you should rise the maximum connections? > log_timestamp= true > log_directory=pg_log > log_filename=%Y-%m-%d_%H%M%S.log > log_disconnections=true > log_hostname=true > log_statement=true Your error clearly states that PostgreSQL cannot accept your postgresql.conf >FATAL: 'log_directory' is > not a valid option name bash-2.05b$ postmaster -i -D /var/lib/pgsql/data strange ... within my config there is # These are only used if redirect_stderr is on: log_directory = 'pg_log' # Directory where log files are written # Can be absolute or relative to PGDATA log_filename = 'postgresql-%Y-%m-%d_%H%M%S.log' # Log file name pattern. # Can include strftime() escapes What I see that is missing within yours are the ' around the option values. > When you install the DB, the logs are enabled by default? That belongs to the packager. If he is reasonable sane, they will be enabled. Best wishes, Harald -- GHUM Harald Massa persuadere et programmare Harald Armin Massa Reinsburgstraße 202b 70197 Stuttgart 0173/9409607 - Python: the only language with more web frameworks than keywords.