Skip site navigation (1) Skip section navigation (2)

Questions

From: "Tzahi Fadida" <tzahifadida(at)gmail(dot)com>
To: <pgsql-students(at)postgresql(dot)org>
Subject: Questions
Date: 2006-05-31 16:45:47
Message-ID: 037b01c684d1$ab072000$0b00a8c0@llord (view raw or flat)
Thread:
Lists: pgsql-students
First,
Good luck to everyone.

I have a postgresql question.

My C function can run for a very very long time on some
inputs and reiterate on relations using SPI.
Basically, I open portals and cursors to relations
and use tuplestores. Also note that I always open the
relations in READ ONLY mode using SPI.

I have a great need to identify a tuple uniquely so
my prototype uses the CTID field for that purpose.

The question is, can the CTID field change throughout
the run of my function due to some other processes working
on the relation? Or because of command bounderies it is
pretty much secured inside an implicit transaction.
The problem wasn't so great if I didn't want to exploit
indices in the relations (but I do and does), since 
after you issue a SELECT that uses indices, all you can rely on
is the CTID to uniquely identify a tuple.

The other solution is to temporarily duplicate the relations but
I don't like this very much.


Regards,
	Tzahi.
--
Tzahi Fadida
Blog: http://tzahi.blogsite.org | Home Site: http://tzahi.webhop.info
WARNING TO SPAMMERS:  see at http://members.lycos.co.uk/my2nis/spamwarning.html



Responses

pgsql-students by date

Next:From: Peter EisentrautDate: 2006-06-01 07:34:16
Subject: Re: Questions
Previous:From: John JawedDate: 2006-05-31 01:05:32
Subject: Re: Welcome to pgsql-students for SoC

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group