Thread

Commits

  1. Remove trailing period from errmsg in subscriptioncmds.c.

  1. [PATCH] Remove trailing period from errmsg in subscriptioncmds.c

    Sahitya Chandra <sahityajb@gmail.com> — 2026-03-08T14:28:06Z

    Hi,
    
    While reading the subscription code I noticed one error message that doesn't follow the project's style: in check_remote_recovery_state() in subscriptioncmds.c, the errmsg() for the "publisher is in recovery" case ends with a period. The convention elsewhere (including the similar message a few lines above in the same file) is no trailing period.
    
    The attached one-line patch removes the trailing period from that string. No behavior change.
    
    Thanks,
    
    Sahitya Chandra
    ---
     src/backend/commands/subscriptioncmds.c | 2 +-
     1 file changed, 1 insertion(+), 1 deletion(-)
    
    diff --git a/src/backend/commands/subscriptioncmds.c b/src/backend/commands/subscriptioncmds.c
    index 9e21d7a7df9..724637cff5b 100644
    --- a/src/backend/commands/subscriptioncmds.c
    +++ b/src/backend/commands/subscriptioncmds.c
    @@ -2993,7 +2993,7 @@ check_pub_dead_tuple_retention(WalReceiverConn *wrconn)
     	if (remote_in_recovery)
     		ereport(ERROR,
     				errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
    -				errmsg("cannot enable retain_dead_tuples if the publisher is in recovery."));
    +				errmsg("cannot enable retain_dead_tuples if the publisher is in recovery"));
     
     	ExecDropSingleTupleTableSlot(slot);
     
    -- 
    2.43.0
    
    
    
    
    
  2. Re: [PATCH] Remove trailing period from errmsg in subscriptioncmds.c

    Amit Kapila <amit.kapila16@gmail.com> — 2026-03-09T07:45:38Z

    On Sun, Mar 8, 2026 at 7:58 PM Sahitya Chandra <sahityajb@gmail.com> wrote:
    >
    > While reading the subscription code I noticed one error message that doesn't follow the project's style: in check_remote_recovery_state() in subscriptioncmds.c, the errmsg() for the "publisher is in recovery" case ends with a period. The convention elsewhere (including the similar message a few lines above in the same file) is no trailing period.
    >
    > The attached one-line patch removes the trailing period from that string. No behavior change.
    >
    
    LGTM.
    
    -- 
    With Regards,
    Amit Kapila.
    
    
    
    
  3. Re: [PATCH] Remove trailing period from errmsg in subscriptioncmds.c

    yangyz <1197620467@qq.com> — 2026-03-09T08:51:34Z

    LGTM, according to https://www.postgresql.org/docs/18/error-style-guide.html
    
    
    Primary error messages: Do not capitalize the first letter. Do not end a message with a period. Do not even think about ending a message with an exclamation point.
    
    
    regards,
    Yuanzhuo Yang
    
    
             Original
             
           
    From: Sahitya Chandra <sahityajb@gmail.com&gt;
    Date: 2026-03-08 22:28
    To: pgsql-hackers <pgsql-hackers@lists.postgresql.org&gt;
    Cc: Sahitya Chandra <sahityajb@gmail.com&gt;
    Subject: [PATCH] Remove trailing period from errmsg in subscriptioncmds.c
    
    
    
           Hi,
    
    While&nbsp;reading&nbsp;the&nbsp;subscription&nbsp;code&nbsp;I&nbsp;noticed&nbsp;one&nbsp;error&nbsp;message&nbsp;that&nbsp;doesn't&nbsp;follow&nbsp;the&nbsp;project's&nbsp;style:&nbsp;in&nbsp;check_remote_recovery_state()&nbsp;in&nbsp;subscriptioncmds.c,&nbsp;the&nbsp;errmsg()&nbsp;for&nbsp;the&nbsp;"publisher&nbsp;is&nbsp;in&nbsp;recovery"&nbsp;case&nbsp;ends&nbsp;with&nbsp;a&nbsp;period.&nbsp;The&nbsp;convention&nbsp;elsewhere&nbsp;(including&nbsp;the&nbsp;similar&nbsp;message&nbsp;a&nbsp;few&nbsp;lines&nbsp;above&nbsp;in&nbsp;the&nbsp;same&nbsp;file)&nbsp;is&nbsp;no&nbsp;trailing&nbsp;period.
    
    The&nbsp;attached&nbsp;one-line&nbsp;patch&nbsp;removes&nbsp;the&nbsp;trailing&nbsp;period&nbsp;from&nbsp;that&nbsp;string.&nbsp;No&nbsp;behavior&nbsp;change.
    
    Thanks,
    
    Sahitya&nbsp;Chandra
    ---
    &nbsp;src/backend/commands/subscriptioncmds.c&nbsp;|&nbsp;2&nbsp;+-
    &nbsp;1&nbsp;file&nbsp;changed,&nbsp;1&nbsp;insertion(+),&nbsp;1&nbsp;deletion(-)
    
    diff&nbsp;--git&nbsp;a/src/backend/commands/subscriptioncmds.c&nbsp;b/src/backend/commands/subscriptioncmds.c
    index&nbsp;9e21d7a7df9..724637cff5b&nbsp;100644
    ---&nbsp;a/src/backend/commands/subscriptioncmds.c
    +++&nbsp;b/src/backend/commands/subscriptioncmds.c
    @@&nbsp;-2993,7&nbsp;+2993,7&nbsp;@@&nbsp;check_pub_dead_tuple_retention(WalReceiverConn&nbsp;*wrconn)
    &nbsp;	if&nbsp;(remote_in_recovery)
    &nbsp;		ereport(ERROR,
    &nbsp;				errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
    -				errmsg("cannot&nbsp;enable&nbsp;retain_dead_tuples&nbsp;if&nbsp;the&nbsp;publisher&nbsp;is&nbsp;in&nbsp;recovery."));
    +				errmsg("cannot&nbsp;enable&nbsp;retain_dead_tuples&nbsp;if&nbsp;the&nbsp;publisher&nbsp;is&nbsp;in&nbsp;recovery"));
    &nbsp;
    &nbsp;	ExecDropSingleTupleTableSlot(slot);
    &nbsp;
    --&nbsp;
    2.43.0