Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-11 Thread Durumdara
Dear All! 2016-04-10 18:03 GMT+02:00 Adrian Klaver : > On 04/10/2016 06:29 AM, durumd...@gmail.com wrote: > >> >> Products, offers are edited for long time. >> > > Define long time, a session, a day, days, etc? > For 1 minute to 1-2 hours. > > But we must save

Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-10 Thread Adrian Klaver
On 04/10/2016 06:29 AM, durumd...@gmail.com wrote: Dear Alban! 2016.04.10. 13:05 keltezéssel, Alban Hertroys írta: On 10 Apr 2016, at 9:07, Durumdara wrote: Dear Adrian! Again. As I see the beginning blocks are removed by mailing system in the code. We have an

Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-10 Thread David G. Johnston
On Sun, Apr 10, 2016 at 6:29 AM, durumd...@gmail.com wrote: > > Dear Alban! > > > 2016.04.10. 13:05 keltezéssel, Alban Hertroys írta: > >> On 10 Apr 2016, at 9:07, Durumdara wrote: >>> >>> Dear Adrian! >>> >>> Again. As I see the beginning blocks are

Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-10 Thread durumd...@gmail.com
Dear Alban! 2016.04.10. 13:05 keltezéssel, Alban Hertroys írta: On 10 Apr 2016, at 9:07, Durumdara wrote: Dear Adrian! Again. As I see the beginning blocks are removed by mailing system in the code. We have an "ourlocks" table which hold records (TableName, RecordID,

Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-10 Thread Alban Hertroys
> On 10 Apr 2016, at 9:07, Durumdara wrote: > > Dear Adrian! > > Again. As I see the beginning blocks are removed by mailing system in the > code. > > We have an "ourlocks" table which hold records (TableName, RecordID, > SessionInnerID, TimeStamp, etc, with

Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-10 Thread Durumdara
Dear Adrian! Again. As I see the beginning blocks are removed by mailing system in the code. We have an "ourlocks" table which hold records (TableName, RecordID, SessionInnerID, TimeStamp, etc, with TableName/RecordID prikey). If anybody wants to lock record "for long time", "over the

Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-09 Thread Adrian Klaver
On 04/09/2016 01:30 AM, Durumdara wrote: Dear Everybody! In MS we had a "persistent lock" structure and method. This over transactions because based on real records in a real table with pri key (tablename + id). For garbaging we had a special session info. In MS the session id is smallint,

Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-09 Thread Christoph Berg
Re: Stephen Frost 2016-04-09 <20160409115712.gt10...@tamriel.snowman.net> > > Btw, what you are describing is exactly what %c in log_line_prefix > > does. > > That's not currently exposed at an SQL level anywhere though, is it? > Perhaps we should add a way to get that. Another thought would be

Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-09 Thread Stephen Frost
* Christoph Berg (c...@df7cb.de) wrote: > Re: Durumdara 2016-04-09 > > > In MS the session id is smallint, so it can repeats after server restarts, > > but my coll. found a "session creation timestamp". > > This is a key which

Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-09 Thread Durumdara
Dear John! This is not about MS. This is about: how to get unique session_id. This could be "pid" + "client starting time". The pid isn't unique, where I can get "client's starting time"? But I think the solution is pg_activity view. There is no same PID as mine, because no one have same

Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-09 Thread Stephen Frost
Greetings, * Durumdara (durumd...@gmail.com) wrote: > Where I can get timestamp or some other unique data with I can create a > combined primary key? Not entirely sure about the rest of it, but if you want backend start time, you can look at pg_stat_activity (which also happens to have the pid).

Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-09 Thread John R Pierce
On 4/9/2016 1:30 AM, Durumdara wrote: In MS we had... If you want Microsoft's unique version of SQL, run Microsoft SQL. That stuff you describe is a whole bunch of implementation specific wierdness from the standpoint of someone outside, looking in.. -- john r pierce, recycling bits in

Re: [GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-09 Thread Christoph Berg
Re: Durumdara 2016-04-09 > In MS the session id is smallint, so it can repeats after server restarts, > but my coll. found a "session creation timestamp". > This is a key which unique. > With this we can check for died sessions

[GENERAL] Really unique session ID - PID + connection timestamp?

2016-04-09 Thread Durumdara
Dear Everybody! In MS we had a "persistent lock" structure and method. This over transactions because based on real records in a real table with pri key (tablename + id). For garbaging we had a special session info. In MS the session id is smallint, so it can repeats after server restarts, but