From: levkk (@levkk) <noreply+levkk@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 17:00:10 +0000
Message-ID: <gh-pgdogdev-pgdog-2058-rc4617789210@github.com> (raw)
In-Reply-To: <gh-pgdogdev-pgdog-2058@github.com>
References: <gh-pgdogdev-pgdog-2058@github.com>
(on pgdog/src/backend/replication/logical/run/store.rs:45)
You can make Postgres resolve the race condition here instead:
```sql
SET lock_timeout TO <lock timeout>;
SELECT pg_advisory_lock(X);
```
Postgres will return an error after <lock timeout> if the lock cannot be acquired.