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

Поиск
Список
Период
Сортировка
От Christoph Berg
Тема Re: Really unique session ID - PID + connection timestamp?
Дата
Msg-id 20160409100708.GC22154@msg.df7cb.de
обсуждение исходный текст
Ответ на Really unique session ID - PID + connection timestamp?  (Durumdara <durumdara@gmail.com>)
Ответы Re: Really unique session ID - PID + connection timestamp?  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-general
Re: Durumdara 2016-04-09 <CAEcMXhkyUMmT3wiKnyWwSK1Xv3gFot46AoTM+6JxWhya3dGWjg@mail.gmail.com>
> 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 and we can clean their records.
>
> We want create same mechanism.
> I know there are adv. locks in PG, but I want to use session id.
>
> This could be:
> pg_backend_pid()
>
> May pid repeats.
> Where I can get timestamp or some other unique data with I can create a
> combined primary key?

Btw, what you are describing is exactly what %c in log_line_prefix
does.

Christoph


В списке pgsql-general по дате отправления:

Предыдущее
От: Durumdara
Дата:
Сообщение: Really unique session ID - PID + connection timestamp?
Следующее
От: John R Pierce
Дата:
Сообщение: Re: Really unique session ID - PID + connection timestamp?