On Thu, Jan 30, 2025 at 9:56 AM Amit Kapila <amit.kapil...@gmail.com> wrote:
>
> On Thu, Jan 30, 2025 at 5:23 AM Peter Smith <smithpb2...@gmail.com> wrote:
> >
> > My understanding was that the purpose of this patch was not anything
> > to do with "optimisations" per se, but rather it was (like the
> > $SUBJECT says) to ensure the *same* 'active_since' timestamp value
> > gets assigned.
> >
> > E.g the change to RestoreSlotFromDisk() was to prevent multiple slots
> > from all getting assigned different 'active_since' values that differ
> > by only 1 or 2 milliseconds because that would look strange to anyone
> > inspecting those 'active_since' values.
> >
>
> I see your point but not sure whether it will matter in practice
> unless the number of slots is large. I feel the second patch discussed
> here is a clear improvement as it helps centralize the logic to give
> ERRORs for invalid slots. This is useful especially when we are
> thinking of adding more reasons for slot invalidation. So, we should
> put our energy into getting the 0002 patch proposed here committed and
> the related patch to add a new reason for slot invalidation.
>

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

In v2, I have addressed all comments till now from [1] , [2] and [3].
  - With the proposed errdetail message in [3], the new function
RaiseSlotInvalidationError() is no longer required.
  - Updated the test files to match the new error message.

[1] 
https://www.postgresql.org/message-id/CAHut%2BPvS3rkwy6hr_awx1of4Se%2BqRsDo%3DjZyAjM9%3Dbbvr2GF9g%40mail.gmail.com
[2] 
https://www.postgresql.org/message-id/CAA4eK1KW_30TNG65iRDBMcqqcC2wGnK%2Bp4pbV7cLzHLTXn3-zQ%40mail.gmail.com
[3] 
https://www.postgresql.org/message-id/CAA4eK1KCYGMA-qWXBWRWKe%2B90fKw8gVMep3GuTvbRKdNG3OTMQ%40mail.gmail.com

--
Thanks,
Nisha

Attachment: v2-0001-Raise-Error-for-Invalid-Slots-in-ReplicationSlotA.patch
Description: Binary data

Reply via email to