public inbox for pgsql-docs@postgresql.org
help / color / mirror / Atom feedFrom: Bernice Southey <bernice.southey@gmail.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: More guidance on ctid
Date: Wed, 24 Dec 2025 20:31:35 +0000
Message-ID: <CAEDh4nzHkqWCB1N67L7_mneiyp3CtaUDkqT9fffjWz1rJ0qzVg@mail.gmail.com> (raw)
In-Reply-To: <aUxDNWHaDLM3YhS0@momjian.us>
References: <aSTL3rgmztLq1UIH@momjian.us>
<CAEDh4nzDMoRDZMDGGxKHzJ5hZscmvT2FWioTzQ6A0aJVtCO8NQ@mail.gmail.com>
<aUnBfsbUbObEcY42@momjian.us>
<CAEDh4nz-6HeVGHEU1Pv7Z4y=j44wtkeMyyJ5tfqAT5FHT4sq=w@mail.gmail.com>
<aUsKZRmXgvI-k5Nb@momjian.us>
<CAEDh4nwv22R3WBC-JW96YWfrvgA9UN=rDx11T4+zNrGVpXg5BQ@mail.gmail.com>
<aUskW-srPCWXpi2R@momjian.us>
<CAEDh4nyStja3R4X6qW_zpKz2w8EPUTsHQ8S0k9_saPA7BT+quw@mail.gmail.com>
<aUwKSGHaZAd5_xKl@momjian.us>
<CAEDh4nyBQe8rc_OGwZW-pevAXc8r2sHW6EbYzCq40ZrudxJOng@mail.gmail.com>
<aUxDNWHaDLM3YhS0@momjian.us>
Bruce Momjian <bruce@momjian.us> wrote:
> 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.
Yes, you are right, this was one of the goals. The other initial goals
were to stop people complaining about no order by and limit, and to
encourage batching. Avoiding deadlocks was very much discussed, but
not listed as one of the primary initial goals by the patch writer, if
memory serves. I was just thinking I prefer keeping ctid in lock free
examples with your new warning. ctid is safe without concurrency and
for batching to completion. There's an argument for moving the
deadlock stuff into the locking chapter because as soon as one does a
select and then an update in a concurrent world, one is guaranteed to
lose rows with ctid or any mutable key. If you think I'm overly
concerned, and the examples are fine with the locking and ctid and a
warning, I concede. The locking chapter does have good guidance on
ordering already.
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: bernice.southey@gmail.com, bruce@momjian.us, pgsql-docs@lists.postgresql.org
Subject: Re: More guidance on ctid
In-Reply-To: <CAEDh4nzHkqWCB1N67L7_mneiyp3CtaUDkqT9fffjWz1rJ0qzVg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox