Re: replication commands and log_statements

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: replication commands and log_statements
Дата
Msg-id CAHGQGwHM-tdo=siXmE20XjVzLpxJzsJuBarO4UmkuxBV5AjEmw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: replication commands and log_statements  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: replication commands and log_statements
Список pgsql-hackers
On Wed, Jun 11, 2014 at 11:55 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
>> Your wish just seems like a separate feature to me. Including
>> replication commands in 'all' seems correct independent of the desire
>> for a more granular control.
>
> No, I think I've got to vote with the other side on that.
>
> The reason we can have log_statement as a scalar progression
> "none < ddl < mod < all" is that there's little visible use-case
> for logging DML but not DDL, nor for logging SELECTS but not
> INSERT/UPDATE/DELETE.  However, logging replication commands seems
> like something people would reasonably want an orthogonal control for.
> There's no nice way to squeeze such a behavior into log_statement.
>
> I guess you could say that log_statement treats replication commands
> as if they were DDL, but is that really going to satisfy users?
>
> I think we should consider log_statement to control logging of
> SQL only, and invent a separate GUC (or, in the future, likely
> more than one GUC?) for logging of replication activity.

Seems reasonable. OK. The attached patch adds log_replication_command
parameter which causes replication commands to be logged. I added this to
next CF.

Regards,

--
Fujii Masao

Вложения

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: Few observations in replication slots related code
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Inaccuracy in VACUUM's tuple count estimates