Fix the error hint message and test for reset_shared with unknown stats type
<div><div><div>Hi hackers,</div><div> </div><div>The errhint() in pg_stat_reset_shared() were missing the fact that recently added in [1] new lock stats kind.</div><div>The patch fixes error hint message and regress test for reset_shared with unknown stats type.</div><div> </div><div>[1]: /messages/by-id/aIyNxBWFCybgBZBS@ip-10-97-1-34.eu-west-3.compute.internal</div><div>%C2%A0</div><div>Best regards,</div><div>Maksim Logvinenko</div><div>Postgres Professional: http://postgrespro.com</div></div></div>
Attachments:
0001-Fix-the-error-hint-message-and-test-for-reset_shared.patchtext/x-diff; name=0001-Fix-the-error-hint-message-and-test-for-reset_shared.patchDownload+2-3
On Tue, Apr 28, 2026 at 08:18:21PM +0500, Maksim Logvinenko wrote:
The existing error hint message and test were missing the fact that
recently added new lock stats kind.@@ -1987,7 +1987,7 @@ pg_stat_reset_shared(PG_FUNCTION_ARGS) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("unrecognized reset target: \"%s\"", target), - errhint("Target must be \"archiver\", \"bgwriter\", \"checkpointer\", \"io\", \"recovery_prefetch\", \"slru\", or \"wal\"."))); + errhint("Target must be \"archiver\", \"bgwriter\", \"checkpointer\", \"io\", \"lock\", \"recovery_prefetch\", \"slru\", or \"wal\".")));
Right, thanks for the report, Maksim. I'll fix it later.
--
Michael