[PATCH 5/8] Add a new syscache to fetch a pg_class entry via (reltablespace, relfilenode) - Mailing list pgsql-hackers

From Andres Freund
Subject [PATCH 5/8] Add a new syscache to fetch a pg_class entry via (reltablespace, relfilenode)
Date
Msg-id 1347669575-14371-5-git-send-email-andres@2ndquadrant.com
Whole thread Raw
In response to [RFC][PATCH] wal decoding, attempt #2  (Andres Freund <andres@2ndquadrant.com>)
Responses Add pg_relation_by_filenode(reltbspc, filenode) admin function
List pgsql-hackers
This patch is problematic because formally indexes used by syscaches needs to
be unique, this one is not though because of 0/InvalidOids relfilenode entries
for nailed/shared catalog entries. Those values cannot be sensibly queries from
the catalog anyway though (the relmapper infrastructure needs to be used).

It might be nicer to add infrastructure to do this properly, I just don't have
a clue what the best way for this would be.
---
 src/backend/utils/cache/syscache.c | 11 +++++++++++
 src/include/catalog/indexing.h     |  2 ++
 src/include/catalog/pg_proc.h      |  1 +
 src/include/utils/syscache.h       |  1 +
 4 files changed, 15 insertions(+)


Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: [PATCH 6/8] Log enough data into the wal to reconstruct logical changes from it if wal_level=logical
Next
From: Andres Freund
Date:
Subject: [PATCH 8/8] Introduce wal decoding via catalog timetravel