From: | "surabhi(dot)ahuja" <surabhi(dot)ahuja(at)iiitb(dot)ac(dot)in> |
---|---|
To: | "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Nik" <XLPizza(at)gmail(dot)com> |
Cc: | <pgsql-general(at)postgresql(dot)org> |
Subject: | logging connections |
Date: | 2006-01-20 12:08:34 |
Message-ID: | 967CFC4343BF2A4DAFACD026D33DC85118ECAD@jal.iiitb.ac.in |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(at)postgresql(dot)org on behalf of Tom Lane
Sent: Fri 1/20/2006 3:13 AM
To: Nik
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Connections not closing
***********************
Your mail has been scanned by iiitb VirusWall.
***********-***********
"Nik" <XLPizza(at)gmail(dot)com> 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(at)postgresql(dot)org so that your
message can get through to the mailing list cleanly
From | Date | Subject | |
---|---|---|---|
Next Message | Csaba Nagy | 2006-01-20 13:03:05 | autovacuum and temporary tables |
Previous Message | P.Rizzi Ag.Mobilità Ambiente | 2006-01-20 11:47:03 | R: JDBC query creates a suspended Linux process |