| From: | Bruce Momjian <bruce(at)momjian(dot)us> |
|---|---|
| To: | Bernice Southey <bernice(dot)southey(at)gmail(dot)com> |
| Cc: | pgsql-docs(at)lists(dot)postgresql(dot)org |
| Subject: | Re: More guidance on ctid |
| Date: | 2025-12-24 15:44:08 |
| Message-ID: | aUwKSGHaZAd5_xKl@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
On Wed, Dec 24, 2025 at 03:26:23PM +0000, Bernice Southey wrote:
> > Okay, let's give it another 12 hours and I will apply it tomorrow,
> > thanks.
> I had a new thought. Perhaps the root problem is trying to put too
> many things into one example. We can use the two examples to show
> different things.
>
> I've kept batching - with skip lock, limit and ctid - in DELETE. Other
> than switching out skip lock for order by, this is much the same as
> currently, but with all the existing update explanatory text moved
> here. Skip lock makes ctid safe, and this is a good use of it.
>
> I've used UPDATE to show how to prevent deadlocks with order by, for
> update, and an immutable key. This meant explaining why an immutable
> key matters, conveniently ruling out ctid without even mentioning it.
>
> I think this now covers how to order by and limit with update and
> delete, how and why to batch, how to safely avoid deadlocks, how to
> use for update (with and without skip lock) and when and when not to
> use ctid.
>
> But if you don't like this approach, I'm still happy if you go with
> your patch. I expect my patch needs quite a bit more work, even if you
> do like it.
We could go in the direction you suggested, but it seems out-of-place in
the UPDATE/DELETE docs since it gets into a lot of details. Maybe in
the locking chapter?
--
Bruce Momjian <bruce(at)momjian(dot)us> https://momjian.us
EDB https://enterprisedb.com
Do not let urgent matters crowd out time for investment in the future.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bernice Southey | 2025-12-24 17:46:57 | Re: More guidance on ctid |
| Previous Message | Bernice Southey | 2025-12-24 15:26:23 | Re: More guidance on ctid |