summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/storage/ipc/procarray.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index 085bd1e4077..e4c008e443f 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -1971,9 +1971,10 @@ GetOldestNonRemovableTransactionId(Relation rel)
ComputeXidHorizons(&horizons);
/* select horizon appropriate for relation */
- if (rel == NULL || rel->rd_rel->relisshared)
+ if (rel == NULL || rel->rd_rel->relisshared || RecoveryInProgress())
return horizons.shared_oldest_nonremovable;
- else if (RelationIsAccessibleInLogicalDecoding(rel))
+ else if (IsCatalogRelation(rel) ||
+ RelationIsAccessibleInLogicalDecoding(rel))
return horizons.catalog_oldest_nonremovable;
else if (RELATION_IS_LOCAL(rel))
return horizons.temp_oldest_nonremovable;