session id and global storage
Hi, I cant find any function, which tells me something like session
id. Is there something like that? I need it in my AM, because I need
to know, if something which I wrote in file was written in this
current session or previously.
And second thing - it would be great if I could save pointer in some
global storage, because I would like to access my dynamically created
tree in more subsequent scans, which is impossible with void pointer
stored just in opaque scan structure:(
Thnaks,
David Hoksza
Something like this would be maybe possible, but this select can
return more rows, when the user is connected with more instances...
David Hoksza
________________________________
Hi, I cant find any function, which tells me something like session
id. Is there something like that? I need it in my AM, because I need
to know, if something which I wrote in file was written in this
current session or previously.
AL> How about
AL> select procpid||' '||backend_start from pg_stat_activity;
AL> Yours,
AL> Laurenz Albe
Import Notes
Reply to msg id not found: 52EF20B2E3209443BC37736D00C3C13808AA8567@EXADV1.host.magwien.gv.atReference msg id not found: 52EF20B2E3209443BC37736D00C3C13808AA8567@EXADV1.host.magwien.gv.at | Resolved by subject fallback
It seems MyProcID is what I was searching for...
David Hoksza
________________________________
DH> Something like this would be maybe possible, but this select can
DH> return more rows, when the user is connected with more instances...
DH> David Hoksza
DH> ________________________________
Hi, I cant find any function, which tells me something like session
id. Is there something like that? I need it in my AM, because I need
to know, if something which I wrote in file was written in this
current session or previously.
AL>> How about
AL>> select procpid||' '||backend_start from pg_stat_activity;
AL>> Yours,
AL>> Laurenz Albe
DH> ---------------------------(end of
DH> broadcast)---------------------------
DH> TIP 5: don't forget to increase your free space map settings
Ühel kenal päeval, N, 2006-06-01 kell 10:10, kirjutas David Hoksza:
It seems MyProcID is what I was searching for...
On a buzy server with lots of connects, procID will repeat quite often.
--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia
Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com
Hannu Krosing said:
Ãhel kenal päeval, N, 2006-06-01 kell 10:10, kirjutas David Hoksza:
It seems MyProcID is what I was searching for...
On a buzy server with lots of connects, procID will repeat quite often.
log_line-prefix has a sessionid gadget:
Session ID: A unique identifier for each session. It is 2 4-byte hexadecimal
numbers (without leading zeros) separated by a dot. The numbers are the
session start time and the process ID
Assuming PIDs are not reused within one second that will be unique.
cheers
andrew