Fix the error hint message and test for reset_shared with unknown stats type

  • Jump to comment-1
    Maksim Logvinenko<logvinenko-ms@yandex.ru>
    Apr 28, 2026, 3:13 PM UTC
    Hi hackers,
    The errhint() in pgstatreset_shared() were missing the fact that recently
    added in [1] new lock stats kind.
    The patch fixes error hint message and regress test for reset_shared with
    unknown stats type.
    [1]:
    https://www.postgresql.org/message-id/aIyNxBWFCybgBZBS%40ip-10-97-1-34.eu-west-3.compute.internal
    Best regards,
    Maksim Logvinenko
    Postgres Professional: http://postgrespro.com
    • Jump to comment-1
      Maksim Logvinenko<logvinenko-ms@yandex.ru>
      Apr 28, 2026, 3:18 PM UTC
      • Jump to comment-1
        Michael Paquier<michael@paquier.xyz>
        Apr 28, 2026, 11:12 PM UTC
        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 @@ pgstatresetshared(PGFUNCTION_ARGS)
        ereport(ERROR,
        (errcode(ERRCODEINVALIDPARAMETER_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
        • Jump to comment-1
          Michael Paquier<michael@paquier.xyz>
          Apr 30, 2026, 2:33 AM UTC
          On Wed, Apr 29, 2026 at 08:12:04AM +0900, Michael Paquier wrote:
          Right, thanks for the report, Maksim. I'll fix it later.
          And done.
          --
          Michael