Pinning buffers for long times like outer joins might do. - Mailing list pgsql-general

From Tzahi Fadida
Subject Pinning buffers for long times like outer joins might do.
Date
Msg-id 009b01c50661$12f8d960$0b00a8c0@llord
Whole thread Raw
Responses Re: Pinning buffers for long times like outer joins might do.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi,
I am writing an algorithm in a dynamic c library and using heap_fetch.
I want to pin strategic buffers for long times like an Outer
joins might do for the inner table.

Do i to also need to lock the table somehow?

I am only reading the tuple but maybe other transactions will
want to write to it and when I am looping over
the table like in an outer join does I can get different
values and I want to avoid that.
or that can't happen when pinning?

Another question, when a column attribute is toasted,
do I need to do another heap_fetch aside from the main
table to fetch the data from the adjoined toasted table?
How do I also pin the toasted table buffer pages?

And last general question,
what is the best way to compare two datums?
datumIsEqual doc says its not enough because of
different representations, and if its toasted it won't
work (maybe if its detoasted first).

Regards,
    tzahi.

WARNING TO SPAMMERS:  see at
http://members.lycos.co.uk/my2nis/spamwarning.html



pgsql-general by date:

Previous
From: Dawid Kuroczko
Date:
Subject: Re: Export a column in a view without "announcing" it?
Next
From: Chris Travers
Date:
Subject: Re: [pgsql-advocacy] MySQL worm attacks Windows servers