Обсуждение: can you please share sample Postgres config file to enable max logging with syslog support?

Поиск
Список
Период
Сортировка

can you please share sample Postgres config file to enable max logging with syslog support?

От
M Tarkeshwar Rao
Дата:

Hello friends,

 

can you please share sample Postgres config file to enable max logging with syslog support?

 

Actually we are facing some issues. We need to enable maximum logging.

 

Regards

Tarkeshwar

 

Re: can you please share sample Postgres config file to enable max logging with syslog support?

От
Adrian Klaver
Дата:
On 12/18/2014 09:00 PM, M Tarkeshwar Rao wrote:
> Hello friends,
>
> can you please share sample Postgres config file to enable max logging
> with syslog support?
>
> Actually we are facing some issues. We need to enable maximum logging.

Might be better to work this from the other end, as it is easy to drown
in logging information that has nothing to do with the problem.

What are the issues?

>
> Regards
>
> Tarkeshwar
>


--
Adrian Klaver
adrian.klaver@aklaver.com


Re: can you please share sample Postgres config file to enable max logging with syslog support?

От
Steve Crawford
Дата:
On 12/18/2014 09:00 PM, M Tarkeshwar Rao wrote:

Hello friends,

 

can you please share sample Postgres config file to enable max logging with syslog support?

 

Actually we are facing some issues. We need to enable maximum logging.

 


The "# ERROR REPORTING AND LOGGING" section in postgresql.conf fairly self-explanatory and commented. To get started just do the following:

Route to syslog:
log_destination = 'syslog'
syslog_facility = 'LOCAL2'
syslog_ident = 'postgres'

(Set facility and ident as appropriate for your syslogging.)

To log all statements:
log_min_duration_statement = 0

There are a number of other things you can log (connections, disconnections, checkpoints, ...) as well as some tweaks you can make to the log formats but it's all laid out in a reasonably straightforward way in the config file.

If you described the issues you are facing the community could offer better advice on what information to capture and possible solutions. The PostgreSQL log is not your only source of troubleshooting information. SAR and other sources of system information can be important as well.

Cheers,
Steve

Re: can you please share sample Postgres config file to enable max logging with syslog support?

От
M Tarkeshwar Rao
Дата:
Hi Steve,

Thanks for your useful information.

We are getting missing chunk issue.
ERROR:  missing chunk number 0 for toast value 54787 in pg_toast_2619

we want to set the logging level so that we can capture debug information and the statements which cause this issue. We need any sample postgresql.conf for setting log info for reference purpose.

Can you please provide us this sample postgresql.conf?

we already gone through all the suggested things on google and on mailing list.

We are now planned to upgrade the postgresql version to 9.3.5. Presently we are using 9.1.3.

As our customer facing this issue we planned to upgrade it to new version and enable some logging so that we can capture the debug information regarding the issue. Please help us..

Regards
Tarkeshwar

From: Steve Crawford [scrawford@pinpointresearch.com]
Sent: Friday, December 19, 2014 5:16 PM
To: M Tarkeshwar Rao; pgsql-general@postgresql.org
Subject: Re: [GENERAL] can you please share sample Postgres config file to enable max logging with syslog support?

On 12/18/2014 09:00 PM, M Tarkeshwar Rao wrote:
BODY {direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;}P {margin-top:0;margin-bottom:0;}BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}BODY {scrollbar-base-color:undefined;scrollbar-highlight-color:undefined;scrollbar-darkshadow-color:undefined;scrollbar-track-color:undefined;scrollbar-arrow-color:undefined}

Hello friends,

 

can you please share sample Postgres config file to enable max logging with syslog support?

 

Actually we are facing some issues. We need to enable maximum logging.

 


The "# ERROR REPORTING AND LOGGING" section in postgresql.conf fairly self-explanatory and commented. To get started just do the following:

Route to syslog:
log_destination = 'syslog'
syslog_facility = 'LOCAL2'
syslog_ident = 'postgres'

(Set facility and ident as appropriate for your syslogging.)

To log all statements:
log_min_duration_statement = 0

There are a number of other things you can log (connections, disconnections, checkpoints, ...) as well as some tweaks you can make to the log formats but it's all laid out in a reasonably straightforward way in the config file.

If you described the issues you are facing the community could offer better advice on what information to capture and possible solutions. The PostgreSQL log is not your only source of troubleshooting information. SAR and other sources of system information can be important as well.

Cheers,
Steve

Re: can you please share sample Postgres config file to enable max logging with syslog support?

От
John R Pierce
Дата:
On 12/21/2014 10:17 PM, M Tarkeshwar Rao wrote:
> ERROR:  missing chunk number 0 for toast value 54787 in pg_toast_2619

this error means you have at least one corrupted file. pg_toast data is
used to store fields too large for simple tuple storage.   a postgres
expert could track down which table this toast value belongs to.

until you fix this, and identify the missing data, you should not do
anything to this database, or risk further data corruption.  in
particular  you won't be able to do the required pg_dumpall that you
need to do a major version upgrade.



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast