git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: db864c3) | patch
Set cutoff xmin more aggressively when vacuuming a temporary table.
Tue, 1 Sep 2020 22:37:12 +0000 (18:37 -0400)
Tue, 1 Sep 2020 22:40:43 +0000 (18:40 -0400)
commit a7212be8b9e0885ee769e8c55f99ef742cda487b
Set cutoff xmin more aggressively when vacuuming a temporary table.

Since other sessions aren't allowed to look into a temporary table
of our own session, we do not need to worry about the global xmin
horizon when setting the vacuum XID cutoff. Indeed, if we're not
inside a transaction block, we may set oldestXmin to be the next
XID, because there cannot be any in-doubt tuples in a temp table,
nor any tuples that are dead but still visible to some snapshot of
our transaction. (VACUUM, of course, is never inside a transaction
block; but we need to test that because CLUSTER shares the same code.)

This approach allows us to always clean out a temp table completely
during VACUUM, independently of concurrent activity. Aside from
being useful in its own right, that simplifies building reproducible
test cases.

Discussion: https://postgr.es/m/3490536.1598629609@sss.pgh.pa.us
src/backend/access/heap/vacuumlazy.c diff | blob | blame | history
src/backend/commands/cluster.c diff | blob | blame | history
src/backend/commands/vacuum.c diff | blob | blame | history
src/include/commands/cluster.h diff | blob | blame | history
src/include/commands/vacuum.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /