1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-04 20:11:56 +03:00

Don't try to open visibilitymap when analyzing a foreign table

It's harmless, visibilitymap_count() returns 0 if the file doesn't
exist. But it's also very pointless. I noticed this when I added an
assertion in smgropen() that the relnumber is valid.

Discussion: https://www.postgresql.org/message-id/621a52fd-3cd8-4f5d-a561-d510b853bbaf@iki.fi
This commit is contained in:
Heikki Linnakangas
2023-12-08 09:16:21 +02:00
parent cd7f19da34
commit 049ef3398d
2 changed files with 6 additions and 1 deletions

View File

@@ -153,6 +153,8 @@ smgropen(RelFileLocator rlocator, BackendId backend)
SMgrRelation reln;
bool found;
Assert(RelFileNumberIsValid(rlocator.relNumber));
if (SMgrRelationHash == NULL)
{
/* First time through: initialize the hash table */