Re: Using unlogged tables for web sessions

Поиск
Список
Период
Сортировка
От Tim Cross
Тема Re: Using unlogged tables for web sessions
Дата
Msg-id 877dyf10go.fsf@gmail.com
обсуждение исходный текст
Ответ на Using unlogged tables for web sessions  (Stephen Carboni <stephen.entropy@gmail.com>)
Список pgsql-general
Stephen Carboni <stephen.entropy@gmail.com> writes:

> Hello.
>
> I was wondering if anyone was using unlogged tables for website
> sessions in production. I'm interested if it breaks the prevailing
> opinion that you don't put sessions in PG.

This really depends on what you define as website session data and what
benefit you would see compared to the additional overhead of maintaining
this session information remotely (from the client). Depending on your
application, there is often some session information which makes more
sense stored on the back end server rather than in the client - notably,
data used by your server API to modify responses or possibly encrypted
data to handle 'remember me' type functionality. However, you probably
don't want to store session data used by the client API e.g. browser
Javascript as this would introduce additional network overheads,
latency, load on web and db server, increased web and db server API
complexity and possibly additional data privacy/security concerns you
will need to manage. This can be hard to justify when you have good
client data storage facilities available.

I have not come across a use case where it made sense to store ALL
session data remotely in the database. I have seen situations with a
very specialised application where having a more full featured LOCAL (to
the client) database server to record session information can be useful,
but this is rare.


--
Tim Cross



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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: File Foreign Table Doesn't Exist when in Exception
Следующее
От: Ted Toth
Дата:
Сообщение: performance of first exec of prepared statement