Unexpected message truncation in WaitForAllTransactionsToFinish

Поиск
Список
Период
Сортировка
Искать

Unexpected message truncation in WaitForAllTransactionsToFinish

От:
"cca5507" <cca5507@qq.com>
Дата:
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
FAQ