dbTalk Databases Forums  

What constitutes a pgsql session?

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss What constitutes a pgsql session? in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Taber, Mark
 
Posts: n/a

Default What constitutes a pgsql session? - 08-10-2004 , 01:33 PM






We have a need to create temporary tables (within functions); the
documentation states that temporary tables last as long as the pg session.
What, precisely, does this mean? The length of the active connection?



Thanks for your help.



Mark Taber

State of California

Department of Finance

Infrastructure & Architecture Unit

916.323.3104 x2945





Reply With Quote
  #2  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: What constitutes a pgsql session? - 08-10-2004 , 08:44 PM






Taber, Mark wrote:
Quote:
We have a need to create temporary tables (within functions); the
documentation states that temporary tables last as long as the pg session.
What, precisely, does this mean? The length of the active connection?
Yes, a session is the client/server db connection. When you disconnect,
the session is terminated.

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster



Reply With Quote
  #3  
Old   
Andrew Kelly
 
Posts: n/a

Default Re: What constitutes a pgsql session? - 08-11-2004 , 05:22 AM



On Wed, 2004-08-11 at 03:44, Bruce Momjian wrote:
Quote:
Taber, Mark wrote:
We have a need to create temporary tables (within functions); the
documentation states that temporary tables last as long as the pg session.
What, precisely, does this mean? The length of the active connection?

Yes, a session is the client/server db connection. When you disconnect,
the session is terminated.
What happens during connection pooling?
Would a temp table be global to everybody on the same connection?
Would the table remain after "my" disconnect, when others are still
connected via the shared session "I" was just using?

Andy


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org



Reply With Quote
  #4  
Old   
Bruce Momjian
 
Posts: n/a

Default Re: What constitutes a pgsql session? - 08-11-2004 , 11:59 AM



Andrew Kelly wrote:
Quote:
On Wed, 2004-08-11 at 03:44, Bruce Momjian wrote:
Taber, Mark wrote:
We have a need to create temporary tables (within functions); the
documentation states that temporary tables last as long as the pg session.
What, precisely, does this mean? The length of the active connection?

Yes, a session is the client/server db connection. When you disconnect,
the session is terminated.

What happens during connection pooling?
Would a temp table be global to everybody on the same connection?
Would the table remain after "my" disconnect, when others are still
connected via the shared session "I" was just using?
With connection pooling, the table would still exist. Connection
pooling code needs to do a RESET ALL to reset any changed variables, and
it also need to look in pg_temp_(my_backend) schema and delete
everything there too before passing the connetion to someone else.

--
Bruce Momjian | http://candle.pha.pa.us
pgman (AT) candle (DOT) pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings



Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.