HOT Update || want to use a different page for updated tuple

Started by Rohit Goyalalmost 12 years ago3 messages
#1Rohit Goyal
rhtgyl.87@gmail.com

Hi All,

I was comparing postgresql performance and was just curious about
performance in case i want to store the updated index tuple version on a
different page.
I was looking into the code of heapam.c, but was not able to find loop
which i should remove so that postgresql use a different buffer for updated
index tuple version.

Please guide me, about how i can achieve this.

Regards,
Rohit Goyal

#2Heikki Linnakangas
hlinnakangas@vmware.com
In reply to: Rohit Goyal (#1)
Re: HOT Update || want to use a different page for updated tuple

On 04/04/2014 02:53 PM, Rohit Goyal wrote:

Hi All,

I was comparing postgresql performance and was just curious about
performance in case i want to store the updated index tuple version on a
different page.
I was looking into the code of heapam.c, but was not able to find loop
which i should remove so that postgresql use a different buffer for updated
index tuple version.

Did you mean to:

1. Force the old and new tuple to always be stored on different pages?

Hack heap_update so that it chooses a new page. I think you'll also need
to hack RelationGetBufferForTuple to not return the same buffer.

2. Disable the HOT optimization, so that HOT is not used even if the old
and new tuple are stored on the same page?

In heap_update, force satisfies_hot variable to false.

3. Allow HOT to be used even though the old and new tuple are stored on
different pages?

This is not feasible..

- Heikki

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

#3Rohit Goyal
rhtgyl.87@gmail.com
In reply to: Heikki Linnakangas (#2)
Re: HOT Update || want to use a different page for updated tuple

On Fri, Apr 4, 2014 at 2:03 PM, Heikki Linnakangas
<hlinnakangas@vmware.com>wrote:

On 04/04/2014 02:53 PM, Rohit Goyal wrote:

Hi All,

I was comparing postgresql performance and was just curious about
performance in case i want to store the updated index tuple version on a
different page.
I was looking into the code of heapam.c, but was not able to find loop
which i should remove so that postgresql use a different buffer for
updated
index tuple version.

Did you mean to:

1. Force the old and new tuple to always be stored on different pages?

Hack heap_update so that it chooses a new page. I think you'll also need
to hack RelationGetBufferForTuple to not return the same buffer.

Can you explain a bit more from inside the code where i have to make the

changes :)? my focus is just to store the index tuple of an updated tuple
onto a different page or on a different buffer.

2. Disable the HOT optimization, so that HOT is not used even if the old
and new tuple are stored on the same page?

In heap_update, force satisfies_hot variable to false.

If I do change only this variable to false. then does it means, i have
disabled the hot update.?

3. Allow HOT to be used even though the old and new tuple are stored on
different pages?

This is not feasible..

- Heikki

thanks in advance.!! :)

Regards,
Rohit Goyal

--
Regards,
Rohit Goyal