Thread: [HACKERS] CREATE SUBSCRIPTION log noise

[HACKERS] CREATE SUBSCRIPTION log noise

From
Jeff Janes
Date:
I think this should go away:

                ereport(NOTICE,
                      (errmsg("created replication slot \"%s\" on publisher",
                              slotname)));


It doesn't appear to be contingent on anything other than the content of the command you just gave it.  I don't think we need a NOTICE saying that it did that thing I just told it to do--that should be implicit by the lack of an ERROR.

Cheers,

Jeff

Re: [HACKERS] CREATE SUBSCRIPTION log noise

From
Peter Eisentraut
Date:
On 6/20/17 22:54, Jeff Janes wrote:
> I think this should go away:
> 
>                 ereport(NOTICE,
>                       (errmsg("created replication slot \"%s\" on
> publisher",
>                               slotname)));
> 
> It doesn't appear to be contingent on anything other than the content of
> the command you just gave it.  I don't think we need a NOTICE saying
> that it did that thing I just told it to do--that should be implicit by
> the lack of an ERROR.

I'm appreciative of this complaint.  The point is that we are allocating
resources on a remote host that should not be forgotten.  I could go
either way.

Other opinions?

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Re: [HACKERS] CREATE SUBSCRIPTION log noise

From
Euler Taveira
Date:
2017-06-21 15:14 GMT-03:00 Peter Eisentraut <peter.eisentraut@2ndquadrant.com>:
> It doesn't appear to be contingent on anything other than the content of
> the command you just gave it.  I don't think we need a NOTICE saying
> that it did that thing I just told it to do--that should be implicit by
> the lack of an ERROR.

I'm appreciative of this complaint.  The point is that we are allocating
resources on a remote host that should not be forgotten.  I could go
either way.

It is documented that subscription can create a replication slot on remote host as mentioned in section "Replication Slot Management". If we want to maintain the message let's downgrade it to DEBUG1 (as we do with "create implicit index for table") but I prefer to rip it out.


--
   Euler Taveira                                   Timbira - http://www.timbira.com.br/
   PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento

Re: [HACKERS] CREATE SUBSCRIPTION log noise

From
Petr Jelinek
Date:
On 21/06/17 23:32, Euler Taveira wrote:
> 2017-06-21 15:14 GMT-03:00 Peter Eisentraut
> <peter.eisentraut@2ndquadrant.com
> <mailto:peter.eisentraut@2ndquadrant.com>>:
> 
>     > It doesn't appear to be contingent on anything other than the content of
>     > the command you just gave it.  I don't think we need a NOTICE saying
>     > that it did that thing I just told it to do--that should be implicit by
>     > the lack of an ERROR.
> 
>     I'm appreciative of this complaint.  The point is that we are allocating
>     resources on a remote host that should not be forgotten.  I could go
>     either way.
> 
> 
> It is documented that subscription can create a replication slot on
> remote host as mentioned in section "Replication Slot Management". If we
> want to maintain the message let's downgrade it to DEBUG1 (as we do with
> "create implicit index for table") but I prefer to rip it out.
> 

I agree with Peter here, the reason why we show this is that there is
implicit action which reserves resources on different server and is not
transactional. If we only did it when explicitly asked for, I would
agree it's not needed but given that it's default behavior I prefer to
inform the user.

--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services