Thread: DB problem
<font face="Default Sans Serif, Verdana, Arial, Helvetica, sans-serif" size="2"><div><div><font face="Default Sans Serif,Verdana, Arial, Helvetica, sans-serif" size="2"><div>Hi,</div><div> </div><div>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 toomany clients" error. <br />Refering the FAQ I maximized the DB session limit to 200. </div><div> </div><div>I think thelogs are not enabled in my DB. So I set the following options in postgresql.con file<br /> <br />log_timestamp= true<br/>log_directory=pg_log <br />log_filename=%Y-%m-%d_%H%M%S.log <br />log_disconnections=true <br />log_hostname=true </div><div>log_statement=true</div><div> </div><div> </div><div>After restartingthe system got the following error : </div><div>[root@localhostroot]# su postgres bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: postgresql.conf:131:syntax error, <br />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 nota valid option name bash-2.05b$ postmaster -i -D /var/lib/pgsql/data FATAL: 'log_directory' is not a valid option namebash-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</div><div><br/>When you install the DB, the logs are enabled by default?</div><div> </div><div>Would you plstell me still what setting need to be done?</div><div> </div><div>Thanks,<br />Vinayak V. Raikar<br />Extn : 143<br /><br/></div></font></div></div></font>
I am not sure if these option were supported with 7.3 (never used it) for logging but that does go good with 8.1 and onwards...
Why don't you install the latest PostgreSQL release and test that out?
-----------------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
Why don't you install the latest PostgreSQL release and test that out?
-----------------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
On 12/26/06, vinayakr@vmoksha.com <vinayakr@vmoksha.com> wrote:
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.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=truelog_statement=trueAfter 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
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
On 12/26/06, vinayakr@vmoksha.com <vinayakr@vmoksha.com> wrote:
Vinay,
Although its not an answer to your question, but you should upgrade to 8.2.0 version
unless you have specific reason of not doing it.
Regds
mallah.
Hi,We are using PostgreSQL 7.3 version, installed in linux system. Only DB is getting shut down 3-4 times a day.
Vinay,
Although its not an answer to your question, but you should upgrade to 8.2.0 version
unless you have specific reason of not doing it.
Regds
mallah.
From my application end I get "Sorry too many clients" error.
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=truelog_statement=trueAfter 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
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, Please don't post twice to two different lists (four of the same posts to both pgsql-admin and pgadmin-support.) This clearly isn't a problem with PG Admin - so don't clutter that list up, and don't multiple-post - it won't change anything posting twice, and if anything you'll only end up annoying people so they won't feel obliged to help you anyway. In answer to your question, it took me 3 minutes to find this manual page: http://www.postgresql.org/docs/7.3/static/runtime-config.html There is no log_directory setting, but it is in 8.x (http://www.postgresql.org/docs/8.0/static/runtime-config.html), so your version doesn't support it. It would be helpful if you consult the manual for your running version, not the current release, as features inevitably get added and others change. And, as someone's already said, you should be thinking of upgrading to at minimum 8.1. Andy. vinayakr@vmoksha.com wrote: > 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. > > 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_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 > > 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 > > !DSPAM:37,4590b56931941914011633! -- Andy Shellam NetServe Support Team the Mail Network "an alternative in a standardised world" p: +44 (0) 121 288 0832/0839 m: +44 (0) 7818 000834