From: meskill (@meskill) <noreply+meskill@github.com>
To: pgdogdev/pgdog <noreply+pgdogdev-pgdog@github.com>
Subject: Re: [pgdogdev/pgdog] PR #2058: feat(resharding): add initial setup for resumable resharding tasks
Date: Wed, 18 Nov 2026 23:46:08 +0000
Message-ID: <gh-pgdogdev-pgdog-2058-c6995026293@github.com> (raw)
In-Reply-To: <gh-pgdogdev-pgdog-2058@github.com>
References: <gh-pgdogdev-pgdog-2058@github.com>
> I think this is a fine first draft, but there are a lot of Claude-isms in here which we should start pushing back on. I think you can achieve a similar outcome in a lot less code.
>
> I'm not entirely sold on the `pgdog.resharding` table as an architectural choice as well. I get that you can write to it transactionally, but it's not clear to me, yet, if that's strictly necessary. For example, if a table contains data and a record for the `COPY_DATA` task doesn't exist in whatever store, you can assume the copy for that table succeeded, since `COPY` runs inside a transaction itself.
>
> I think it's also totally legitimate to mark that table copy as failed if we don't have a record of it.
>
> This is something I would want for us to integrate with the control plane short term, since it will be used to track and control this operation ultimately.
That's a lot of code, right, and mostly written by claude, but I assure you it was refactored and reviewed dozens of time to make sense and introduce minimal set of changes (though, I accept that I missed some code complexity and especially tests overload). The pr looks big, but it's actually a lot of support code, new structures, options, tests and temporal documentation.
We've reverted the changes for now, because we found the issue here and to address the concerns actually before reaching main.
About the approach:
- I picked the postgres table, because the postgres is what actually always present, gives as durability, transactionality, doesn't require new dependencies and could be implemented as OS part only
- for the copy the transaction is necessary to just be sure about that the data and the info about write was written together, since otherwise any errors during one of the processes could lead to undefined state and since we handle it separately we should run some parallel retries systems with waits especially if that would be different targets to update
- there are some docs and diagram here https://github.com/pgdogdev/pgdog/blob/e0a6ffe0e095c11e41e0e5987e3cb25a4371de06/docs/RESUMABLE_RESHA... that will maybe expand the design, but it's total ai mess, and I will attempt to give better design overview in new pr