Re: [PATCH 05/14] Add a new relmapper.c function RelationMapFilenodeToOid that acts as a reverse of RelationMapOidToFilenode

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH 05/14] Add a new relmapper.c function RelationMapFilenodeToOid that acts as a reverse of RelationMapOidToFilenode
Date: 2012-11-16 04:44:45
Message-ID: CAB7nPqSyW9MV_xyUtY4XEEumKcCYZLG-RBBHWUuWDJOf0HY34g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

This patch looks OK.

I got 3 comments:
1) Why changing the OID of pg_class_tblspc_relfilenode_index from 3171 to
3455? It does not look necessary.
2) You should perhaps change the header of RelationMapFilenodeToOid so as
not mentionning it as the opposite operation of RelationMapOidToFilenode
but as an operation that looks for the OID of a relation based on its
relfilenode. Both functions are opposite but independent.
3) Both functions are doing similar operations. Could it be possible to
wrap them in the same central function?

On Thu, Nov 15, 2012 at 10:17 AM, Andres Freund <andres(at)2ndquadrant(dot)com>wrote:

> ---
> src/backend/utils/cache/relmapper.c | 53
> +++++++++++++++++++++++++++++++++++++
> src/include/catalog/indexing.h | 4 +--
> src/include/utils/relmapper.h | 2 ++
> 3 files changed, 57 insertions(+), 2 deletions(-)
>
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>

--
Michael Paquier
http://michael.otacoo.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-11-16 04:55:36 Re: WIP patch: add (PRE|POST)PROCESSOR options to COPY
Previous Message Pavan Deolasee 2012-11-16 04:42:32 Re: Problem Observed in behavior of Create Index Concurrently and Hot Update