Lists: | pgsql-hackers |
---|
From: | Elijah Epifanov <lists(at)xmart(dot)ws> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Storing session-local data |
Date: | 2006-12-01 08:25:25 |
Message-ID: | 456FE6F5.1030100@xmart.ws |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Hi guys.
How can I store session-local data in an efficient way (I need to store
every primary key/oid value for every changed row using triggers)??
I tried to use session-local temporary table, but it doesn't work with
PREPARE TRANSACTION...
Any ideas?
From: | "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> |
---|---|
To: | "Elijah Epifanov" <lists(at)xmart(dot)ws> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Storing session-local data |
Date: | 2006-12-01 09:42:49 |
Message-ID: | 456FF919.8060905@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Elijah Epifanov wrote:
> How can I store session-local data in an efficient way (I need to store
> every primary key/oid value for every changed row using triggers)??
> I tried to use session-local temporary table, but it doesn't work with
> PREPARE TRANSACTION...
We might be able to relax that restriction so that you could use a "on
commit delete rows" or "on commit drop" kind of temporary table in a
global transaction. Would that help you?
Maybe a silly queestion, but are you sure you need 2-phase commit?
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
From: | Elijah Epifanov <lists(at)xmart(dot)ws> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Storing session-local data |
Date: | 2006-12-01 09:53:53 |
Message-ID: | 456FFBB1.204@xmart.ws |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
That would definitely help )))
2) Question isn't silly)) I don't need it right now, but may (with high
degree of probability) need it in future.
Heikki Linnakangas wrote:
> Elijah Epifanov wrote:
>> How can I store session-local data in an efficient way (I need to store
>> every primary key/oid value for every changed row using triggers)??
>
>> I tried to use session-local temporary table, but it doesn't work with
>> PREPARE TRANSACTION...
>
> We might be able to relax that restriction so that you could use a "on
> commit delete rows" or "on commit drop" kind of temporary table in a
> global transaction. Would that help you?
>
> Maybe a silly queestion, but are you sure you need 2-phase commit?
>
From: | "Heikki Linnakangas" <heikki(at)enterprisedb(dot)com> |
---|---|
To: | "Bruce Momjian" <bruce(at)momjian(dot)us> |
Cc: | "Elijah Epifanov" <lists(at)xmart(dot)ws>, <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Storing session-local data |
Date: | 2006-12-01 11:06:34 |
Message-ID: | 45700CBA.90901@enterprisedb.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-hackers |
Bruce, could you add this to the TODO, please?
* Allow "on commit delete rows" and "on commit drop" kind of temporaray
tables to be used in global transactions
Elijah Epifanov wrote:
> That would definitely help )))
>
> 2) Question isn't silly)) I don't need it right now, but may (with high
> degree of probability) need it in future.
>
> Heikki Linnakangas wrote:
>> Elijah Epifanov wrote:
>>> How can I store session-local data in an efficient way (I need to store
>>> every primary key/oid value for every changed row using triggers)??
>>
>>> I tried to use session-local temporary table, but it doesn't work with
>>> PREPARE TRANSACTION...
>>
>> We might be able to relax that restriction so that you could use a "on
>> commit delete rows" or "on commit drop" kind of temporary table in a
>> global transaction. Would that help you?
>>
>> Maybe a silly queestion, but are you sure you need 2-phase commit?
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com