How to write a new tuple into page?

Started by jacktby@gmail.comalmost 3 years ago2 messages
#1jacktby@gmail.com
jacktby@gmail.com

Hi, I'm trying to construct a new tuple type, that's not heaptuple,
When I get a tupleTableSlot, I will get data info from it and then I
will constuct a new tuple, and now I need to put it into a physical
page, how should I do?

--------------

jacktby@gmail.com

#2Bharath Rupireddy
bharath.rupireddyforpostgres@gmail.com
In reply to: jacktby@gmail.com (#1)
Re: How to write a new tuple into page?

On Thu, Feb 2, 2023 at 7:31 PM jacktby@gmail.com <jacktby@gmail.com> wrote:

Hi, I'm trying to construct a new tuple type, that's not heaptuple,
When I get a tupleTableSlot, I will get data info from it and then I
will constuct a new tuple, and now I need to put it into a physical
page, how should I do?

Postgres writes table pages from shared buffers/buffer pool to disk
via storage manager (smgr.c). I think looking at the code around
FlushBuffer()/FlushRelationBuffers()/smgrwrite() might help.

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com