RE: Improve error handling for invalid slots and ensure a same 'inactive_since' time for inactive slots

Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>

From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Nisha Moond' <nisha.moond412@gmail.com>
Cc: Peter Smith <smithpb2250@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, vignesh C <vignesh21@gmail.com>, Amit Kapila <amit.kapila16@gmail.com>
Date: 2025-01-30T07:08:51Z
Lists: pgsql-hackers
Dear Nisha,

Thanks for creating a patch!

> Removed patch v1-0001. Please find the attached version 2 of 0002,
> which is now v2-0001.

ISMT error_if_invalid is set to true when the slot is using and set to false when dropping.
One exception is the slot_sync, but it has already had mechanism to handle such a slot.

I confirmed RaiseSlotInvalidationError() is removed based on comments.
I ran regression tests on my env and passed.

In total the patch looks good to me.

----------
Best regards,
Haato Kuroda

Commits

  1. Raise an error while trying to acquire an invalid slot.