Re: Using CTID system column as a "temporary" primary key
Maciek Sakrejda <m.sakrejda@gmail.com>
From: Maciek Sakrejda <m.sakrejda@gmail.com>
To: Sebastien Flaesch <sebastien.flaesch@4js.com>
Cc: Christophe Pettus <xof@thebuild.com>,
Geoff Winkless <pgsqladmin@geoff.dj>, pgsql-general <pgsql-general@lists.postgresql.org>
Date: 2023-03-28T16:45:48Z
Lists: pgsql-general
Note that VACUUM FULL and CLUSTER can update ctids. I don't believe regular VACUUM can, so you should be safe from autovacuum interfering in this scheme, but the ctid colum documentation [1] states "A primary key should be used to identify logical rows," so this is not exactly intended usage. Thanks, Maciek [1]: https://www.postgresql.org/docs/current/ddl-system-columns.html