You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The easiest way to do this Properly™ would be to add a unique constraint on endtime with the SQL NULLS NOT DISTINCT clause — that way, at most one row could have a null endtime.
Unfortunately, this was only implemented in Postgresql 15 — most current installations are using Postgresql 14 (or earlier).
Since this has only come up once in 20 years, we could wait a while before fixing it...
If two people try to start a session at exactly the same time, two open sessions can be created.
Take an exclusive lock on the sessions table during session creation to prevent this.
The text was updated successfully, but these errors were encountered: