Re: logging of Logical Decoding - Mailing list pgsql-general

From Adrian Klaver
Subject Re: logging of Logical Decoding
Date
Msg-id 549AD8E7.9020401@aklaver.com
Whole thread Raw
In response to logging of Logical Decoding  (Andrey Lizenko <lizenko79@gmail.com>)
Responses Re: logging of Logical Decoding
List pgsql-general
On 12/24/2014 02:29 AM, Andrey Lizenko wrote:
> Hello,
> every execute of 'pg_logical_slot_get_changes'  is logged by
>
>     2014-12-23 11:41:53 EST STATEMENT:  SELECT * FROM
>     pg_logical_slot_get_changes('regression_slot', NULL, NULL);
>     2014-12-23 11:42:21 EST LOG:  starting logical decoding for slot
>     "regression_slot"
>     2014-12-23 11:42:21 EST DETAIL:  streaming transactions committing
>     after A/4E026FD8, reading WAL from A/4E026ED0
>
>
>
> logs settings are almost default:
>
>     postgres=# select name, setting from pg_settings where name like
>     ('log%');
>                  name             |            setting
>     -----------------------------+--------------------------------
>       log_autovacuum_min_duration | -1
>       log_checkpoints             | off
>       log_connections             | off
>       log_destination             | stderr
>       log_directory               | pg_log
>       log_disconnections          | off
>       log_duration                | off
>       log_error_verbosity         | default
>       log_executor_stats          | off
>       log_file_mode               | 0600
>       log_filename                | postgresql-%Y-%m-%d_%H%M%S.log
>       log_hostname                | off
>       log_line_prefix             |  %t
>       log_lock_waits              | off
>       log_min_duration_statement  | -1
>       log_min_error_statement     | error
>       log_min_messages            | warning
>       log_parser_stats            | off
>       log_planner_stats           | off
>       log_rotation_age            | 1440
>       log_rotation_size           | 10240
>       log_statement               | none
>       log_statement_stats         | off
>       log_temp_files              | -1
>       log_timezone                | US/Eastern
>       log_truncate_on_rotation    | off
>       logging_collector           | off
>     (27 rows)
>
>
> Is it possible to reduce verbose level for this?

Set log_error_verbosity to terse:

http://www.postgresql.org/docs/9.4/interactive/runtime-config-logging.html

log_error_verbosity (enum)

     Controls the amount of detail written in the server log for each
message that is logged. Valid values are TERSE, DEFAULT, and VERBOSE,
each adding more fields to displayed messages. TERSE excludes the
logging of DETAIL, HINT, QUERY, and CONTEXT error information. VERBOSE
output includes the SQLSTATE error code (see also Appendix A) and the
source code file name, function name, and line number that generated the
error. Only superusers can change this setting.


Sort of surprised that the SELECT showed up when log_statement = none.

Did you reload Postgres after making changes to the config?

>
> Server version is 9.4.0, OS is Ubuntu 12.04 LTS
>
>
>
> --
> Regards, Andrey Lizenko


--
Adrian Klaver
adrian.klaver@aklaver.com


pgsql-general by date:

Previous
From: Andrey Lizenko
Date:
Subject: logging of Logical Decoding
Next
From: Andrey Lizenko
Date:
Subject: Re: logging of Logical Decoding