https://github.com/postgres/postgres
Revision a12899e76bac3fe053f673450a52f537b2eec677 authored by Tom Lane on 02 June 2011, 18:46:37 UTC, committed by Tom Lane on 02 June 2011, 18:46:37 UTC
We can't allow this because such an operation stores its transaction XID
into the sequence tuple's xmax.  Because VACUUM doesn't process sequences
(and we don't want it to start doing so), such an xmax value won't get
frozen, meaning it will eventually refer to nonexistent pg_clog storage,
and even wrap around completely.  Since the row lock is ignored by nextval
and setval, the usefulness of the operation is highly debatable anyway.
Per reports of trouble with pgpool 3.0, which had ill-advisedly started
using such commands as a form of locking.

In HEAD, also disallow SELECT FOR UPDATE/SHARE on toast tables.  Although
this does work safely given the current implementation, there seems no
good reason to allow it.  I refrained from changing that behavior in
back branches, however.
1 parent 08779dc
History
Tip revision: a12899e76bac3fe053f673450a52f537b2eec677 authored by Tom Lane on 02 June 2011, 18:46:37 UTC
Disallow SELECT FOR UPDATE/SHARE on sequences.
Tip revision: a12899e
File Mode Size
config
contrib
doc
src
.gitignore -rw-r--r-- 233 bytes
COPYRIGHT -rw-r--r-- 1.2 KB
GNUmakefile.in -rw-r--r-- 3.7 KB
Makefile -rw-r--r-- 1.4 KB
README -rw-r--r-- 2.0 KB
README.git -rw-r--r-- 820 bytes
aclocal.m4 -rw-r--r-- 445 bytes
configure -rwxr-xr-x 694.3 KB
configure.in -rw-r--r-- 47.2 KB

README

back to top