Thread

Commits

  1. Reword activity message to avoid truncation

  1. Unexpected message truncation in WaitForAllTransactionsToFinish

    cca5507 <cca5507@qq.com> — 2026-06-05T08:30:51Z

    Hi,
    
    In WaitForAllTransactionsToFinish():
    
    ```
    		char		activity[64];
    		int			rc;
    
    		/* Oldest running xid is older than us, so wait */
    		snprintf(activity,
    				 sizeof(activity),
    				 "Waiting for current transactions to finish (waiting for %u)",
    				 waitforxid);
    		pgstat_report_activity(STATE_RUNNING, activity);
    ```
    
    The buffer is not big enough to hold the message if the 'waitforxid' is too big.
    
    How about changing the message to this:
    
        "Waiting for transactions older than %u to finish"
    
    --
    Regards,
    ChangAo Chen
    
  2. Re: Unexpected message truncation in WaitForAllTransactionsToFinish

    Daniel Gustafsson <daniel@yesql.se> — 2026-06-05T09:45:28Z

    > On 5 Jun 2026, at 10:30, cca5507 <cca5507@qq.com> wrote:
    
    > The buffer is not big enough to hold the message if the 'waitforxid' is too big.
    
    Nice catch, will fix.
    
    --
    Daniel Gustafsson