Re: Restrict number of connections to specific table

From: "Sam Franklin" <Sam(dot)Franklin(at)senergyworld(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Restrict number of connections to specific table
Date: 2014-05-14 07:25:53
Message-ID: 17F5AB8399453A43B8514B1516503D2C2F9ED6@senabzmail2.senergyltd.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Thomas, Keith and Tom - many thanks for your replies. Plenty of ideas
to try.
Best regards
Sam

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us]
Sent: 13 May 2014 15:28
To: Sam Franklin
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] Restrict number of connections to specific table

"Sam Franklin" <Sam(dot)Franklin(at)senergyworld(dot)com> writes:
> I have some licenced geospatial data. The licence terms state that
> only "one user can access the data at one time".

> Can I put a constraint on a specific table to restrict the number of
> concurrent connections to 1, which will allow me to adhere to the data

> licencing terms?

Not on a specific table. You could possibly use a dedicated Postgres
instance with max_connections set to 1. If you need to serialize access
to just this table while allowing concurrent access to some other data
in the same DB, then there's no built-in answer.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message byron509 2014-05-14 22:05:20 Behavior of CAST to integer
Previous Message Tom Lane 2014-05-13 14:27:38 Re: Restrict number of connections to specific table