Search Postgresql Archives

logging connections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Title: logging connections

i want to know, how i can log connections to postgres.

the sample log file is:
LOG:  shutting down
LOG:  database system is shut down
LOG:  database system was shut down at 2006-01-17 18:18:24 CST
LOG:  checkpoint record is at 0/B035D0
LOG:  redo record is at 0/B035D0; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 1267; next OID: 17728
LOG:  database system is ready
LOG:  unexpected EOF on client connection
LOG:  unexpected EOF on client connection
LOG:  unexpected EOF on client connection
LOG:  received fast shutdown request
LOG:  aborting any active transactions
FATAL:  terminating connection due to administrator command
LOG:  shutting down
LOG:  database system is shut down
LOG:  database system was shut down at 2006-01-20 11:00:00 CST
LOG:  checkpoint record is at 0/3C339CB4
LOG:  redo record is at 0/3C339CB4; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 2283381; next OID: 1159413
LOG:  database system is ready
LOG:  unexpected EOF on client connection
LOG:  unexpected EOF on client connection
LOG:  unexpected EOF on client connection
LOG:  unexpected EOF on client connection
LOG:  unexpected EOF on client connection



however, i am still not able to know how to log into the above file,
who has connected etc


if i can log something like " LOG:  connection received: host=client1
> port=3775"

and also if i shut down postmaster, using pg_ctl stop, no logging takes place to the above log file.

How to enable the above,

thanks,
regards
Surabhi



-----Original Message-----
From: pgsql-general-owner@xxxxxxxxxxxxxx on behalf of Tom Lane
Sent: Fri 1/20/2006 3:13 AM
To: Nik
Cc: pgsql-general@xxxxxxxxxxxxxx
Subject: Re: [GENERAL] Connections not closing

***********************
Your mail has been scanned by iiitb VirusWall.
***********-***********


"Nik" <XLPizza@xxxxxxxxx> writes:
> Ok, I simplified the problem. I tried just running psql from the
> command line, and I noticed that it opens two connection on two
> different ports, and it closes only one.
> For example I do the following in the command prompt:

> C:\> psql -h host_name -p 5432 -d db_name -U user_name
> Password:

> 2006-01-19 09:50:29 [unknown] LOG:  connection received: host=client1
> port=3775

> 2006-01-19 09:50:31 [unknown] LOG:  connection received: host=client1
> port=3778

> 2006-01-19 09:50:31 test LOG:  connection authorized: user=user_name
> database=db_name

It tries to connect, gets told it needs a password (the log verbosity
level is not high enough to record the rejection), asks you for the
password, and connects again.  I don't see anything funny here.

                        regards, tom lane

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




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux