Re: Restrict number of connections to specific table

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Sam Franklin <Sam(dot)Franklin(at)senergyworld(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Restrict number of connections to specific table
Date: 2014-05-15 21:56:47
Message-ID: 20140515215647.GF25052@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, May 13, 2014 at 10:27:38AM -0400, Tom Lane wrote:
> "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.

Seems they could set the CONNECTION LIMIT to 1 on CREATE/ALTER DATABASE
also, but as you said, it is per database.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Fabian Santiago 2014-05-17 15:03:35 CONCAT function equivalent
Previous Message David G Johnston 2014-05-15 19:15:31 Re: Behavior of CAST to integer