Re: logging connections

Поиск
Список
Период
Сортировка
От Nikola Ivanov
Тема Re: logging connections
Дата
Msg-id 66182b050601200611w6a090652j21b3d85f4256fb7c@mail.gmail.com
обсуждение исходный текст
Ответ на logging connections  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
Список pgsql-general
You need to edit your postgresql.conf file and in the "Error reporting and logging" section set "log_connections=true", "log_disconnections=true", and "log_hostname=true"

On 1/20/06, surabhi.ahuja <surabhi.ahuja@iiitb.ac.in> wrote:

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@postgresql.org on behalf of Tom Lane
Sent: Fri 1/20/2006 3:13 AM
To: Nik
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Connections not closing

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


"Nik" <XLPizza@gmail.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@postgresql.org so that your
       message can get through to the mailing list cleanly




В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: standard normal cumulative distribution function
Следующее
От: Tony Caduto
Дата:
Сообщение: Re: [HACKERS] Need help in installing postgresql 8.1.2 on Windows