Unnecessary smgropen in {heapam_relation,index}_copy_data? - Mailing list pgsql-hackers

From Japin Li
Subject Unnecessary smgropen in {heapam_relation,index}_copy_data?
Date
Msg-id ME3P282MB316600FA62F6605477F26F6AB6742@ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM
Whole thread Raw
Responses Re: Unnecessary smgropen in {heapam_relation,index}_copy_data?
List pgsql-hackers
Hi, hackers

I find heapam_relation_copy_data() and index_copy_data() have the following code:

    dstrel = smgropen(*newrlocator, rel->rd_backend);

    ...

    RelationCreateStorage(*newrlocator, rel->rd_rel->relpersistence, true);

The smgropen() is also called by RelationCreateStorage(), why should we call
smgropen() explicitly here?

I try to remove the smgropen(), and all tests passed.


Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Report planning memory in EXPLAIN ANALYZE
Next
From: Alexander Lakhin
Date:
Subject: Re: core dumps in auto_prewarm, tests succeed