Re: making relfilenodes 56 bits

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: making relfilenodes 56 bits
Date: 2022-06-29 09:15:09
Message-ID: CAFiTN-vBdCn=NHvb33WtAsy3UqdA+3Yqp4ed9uo7=6gN_KmLYA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 24, 2022 at 8:29 PM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>
> On Fri, Jun 24, 2022 at 7:08 AM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> > I have changed that. PFA, the updated patch.
>
> Apart from one minor nitpick (see below) I don't see a problem with
> this in isolation. It seems like a pretty clean renaming. So I think
> we need to move onto the question of how clean the rest of the patch
> series looks with this as a base.
>

PFA, the remaining set of patches. It might need to fix some
indentation but lets first see how is the overall idea then we can
work on it. I have fixed all the open review comment from the
previous thread except this comment from Robert.

>- It looks to me like you need to give significantly more thought to
> the proper way of adjusting the relfilenode-related test cases in
> alter_table.out.

It seems to me that this test case is just testing whether the
table/child table are rewritten or not after the alter table. And for
that it is comparing the oid with the relfilenode, now that is not
possible so I think it's quite reasonable to just compare the current
relfilenode with the old relfilenode and if they are same the table is
not rewritten. So I am not sure why the original test case had two
cases 'own' and 'orig'. With respect to this test case they both have
the same meaning, in fact comparing old relfilenode with current
relfilenode is better way of testing than comparing the oid with
relfilenode.

diff --git a/src/test/regress/expected/alter_table.out
b/src/test/regress/expected/alter_table.out
index 5ede56d..80af97e 100644
--- a/src/test/regress/expected/alter_table.out
+++ b/src/test/regress/expected/alter_table.out
@@ -2164,7 +2164,6 @@ select relname,
c.oid = oldoid as orig_oid,
case relfilenode
when 0 then 'none'
- when c.oid then 'own'
when oldfilenode then 'orig'
else 'OTHER'
end as storage,
@@ -2175,10 +2174,10 @@ select relname,
relname | orig_oid | storage | desc
------------------------------+----------+---------+---------------
at_partitioned | t | none |
- at_partitioned_0 | t | own |
- at_partitioned_0_id_name_key | t | own | child 0 index
- at_partitioned_1 | t | own |
- at_partitioned_1_id_name_key | t | own | child 1 index
+ at_partitioned_0 | t | orig |
+ at_partitioned_0_id_name_key | t | orig | child 0 index
+ at_partitioned_1 | t | orig |
+ at_partitioned_1_id_name_key | t | orig | child 1 index
at_partitioned_id_name_key | t | none | parent index
(6 rows)

--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

Attachment Content-Type Size
v3-0002-Preliminary-refactoring-for-supporting-larger-rel.patch application/x-patch 20.2 KB
v3-0004-Don-t-delay-removing-Tombstone-file-until-next.patch application/x-patch 8.6 KB
v3-0003-Use-56-bits-for-relfilenumber-to-avoid-wraparound.patch application/x-patch 70.3 KB
v3-0001-Rename-RelFileNode-to-RelFileLocator-and-relNode-.patch application/x-patch 412.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2022-06-29 09:25:59 Re: OpenSSL 3.0.0 compatibility
Previous Message Jehan-Guillaume de Rorthais 2022-06-29 09:09:37 Re: Fix proposal for comparaison bugs in PostgreSQL::Version