Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old November 23rd, 2005, 01:08 AM
David Parker
Guest
 
Posts: n/a
Default global temporary tables?

In our application we have a table that tracks network sessions. The
usage is:

1) create a session record
2) read/update the record several times during the session
3) delete the session record when the session ends

Update activity on this table is going to be pretty intense, and the
transient nature of the data makes it a good candidate for a temporary
and/or in-memory table.

Unfortunately, different network connections may be updating the same
session record at different times (connection pool), so the CREATE TABLE
TEMPORARY doesn't seem to fit the bill, since it's specific to a given
postgres session. It seems like the GLOBAL specifier would make the
temporary table a thing of beauty for our application, but the doc says
GLOBAL doesn't really do anything.

Are there any plans to implement GLOBAL for temporary tables in the near
future? If not, is it a matter of somebody stepping up to do it, or are
there practical/philosophical reasons for not doing it?

- DAP
================================================== ====
David Parker Tazz Networks (401) 709-5130



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

  #2  
Old November 23rd, 2005, 01:08 AM
Tom Lane
Guest
 
Posts: n/a
Default Re: global temporary tables?

"David Parker" <dparker@tazznetworks.com> writes:[color=blue]
> Update activity on this table is going to be pretty intense, and the
> transient nature of the data makes it a good candidate for a temporary
> and/or in-memory table.[/color]
[color=blue]
> Are there any plans to implement GLOBAL for temporary tables in the near
> future?[/color]

No. If you are going to allow multiple backends to access it, I don't
think there are any optimizations possible. Use a regular table.
You can just DROP the thing when you're done.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

  #3  
Old November 23rd, 2005, 01:08 AM
Tom Lane
Guest
 
Posts: n/a
Default Re: global temporary tables?

"David Parker" <dparker@tazznetworks.com> writes:[color=blue]
> Update activity on this table is going to be pretty intense, and the
> transient nature of the data makes it a good candidate for a temporary
> and/or in-memory table.[/color]
[color=blue]
> Are there any plans to implement GLOBAL for temporary tables in the near
> future?[/color]

No. If you are going to allow multiple backends to access it, I don't
think there are any optimizations possible. Use a regular table.
You can just DROP the thing when you're done.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles