| 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 19:47:01 |
| Message-ID: | aUxDNWHaDLM3YhS0@momjian.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-docs |
On Wed, Dec 24, 2025 at 07:38:07PM +0000, Bernice Southey wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> > 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?
> How about if the UPDATE and DELETE examples only show how to get limit
> and order by with a cte, and remove all references to locking. No for
> update, deadlocks etc. The examples use primary keys and not ctid.
> Anyone just trying to do simple limit and order by without locking
> problems will get what they need, and won't be confused by the locking
> complexity. Anyone trying to solve lock contention needs to understand
> locking and should be looking at that chapter. The explanation for
> deadlock avoidance should be there as you suggest. Perhaps the update
> and delete examples can link to them. If you think this is the right
> approach I'm willing to give it a go?
I am not the author of the original ctid doc patch, but I believe the
goal was to use ctid so we don't need to use needless index lookups for
primary keys.
--
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 | Robert Treat | 2025-12-24 20:20:00 | Re: More guidance on ctid |
| Previous Message | Bernice Southey | 2025-12-24 19:38:07 | Re: More guidance on ctid |