forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit5a1e1d8
committed
Use correct horizon when vacuuming catalog relations.
Indc7420c I (Andres) accidentally usedRelationIsAccessibleInLogicalDecoding() as the sole condition to use thenon-shared catalog horizon in GetOldestNonRemovableTransactionId(). That isincorrect, as RelationIsAccessibleInLogicalDecoding() checks whether wal_levelis logical.The correct check, as done e.g. in GlobalVisTestFor(), is to checkIsCatalogRelation() and RelationIsAccessibleInLogicalDecoding().The observed misbehavior of this bug was that there could be an endless loopin lazy_scan_prune(), because the horizons used in heap_page_prune() and theindividual tuple liveliness checks did not match. Likely there are otherpotential consequences as well.A later commit will unify the determination which horizon has to be used, andadd additional assertions to make it easier to catch a bug like this.Reported-By: Justin Pryzby <pryzby@telsasoft.com>Diagnosed-By: Matthias van de Meent <boekewurm+postgres@gmail.com>Author: Matthias van de Meent <boekewurm+postgres@gmail.com>Discussion:https://postgr.es/m/CAEze2Wg32Y9+WJfw=aofkRx1ZRFt_Ev6bNPc4PSaz7PjSFtZgQ@mail.gmail.com1 parent8d29d45 commit5a1e1d8
1 file changed
+3
-2
lines changedLines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1971 | 1971 |
| |
1972 | 1972 |
| |
1973 | 1973 |
| |
1974 |
| - | |
| 1974 | + | |
1975 | 1975 |
| |
1976 |
| - | |
| 1976 | + | |
| 1977 | + | |
1977 | 1978 |
| |
1978 | 1979 |
| |
1979 | 1980 |
| |
|
0 commit comments
Comments
(0)