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

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Don't try to open visibilitymap when analyzing a foreign table
Date: 2023-12-08 07:20:20
Message-ID: E1rBV9o-009AE5-FH@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/049ef3398d05c9dc8f48aa9a6d68440661cfeb87

Modified Files
--------------
src/backend/commands/analyze.c | 5 ++++-
src/backend/storage/smgr/smgr.c | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2023-12-08 07:51:08 pgsql: Initialize ShmemVariableCache like other shmem areas
Previous Message Thomas Munro 2023-12-08 03:17:13 pgsql: Fix potential pointer overflow in xlogreader.c.