Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-12-02 Thread Merlin Moncure
On Wed, Nov 30, 2011 at 6:03 PM, Tomas Vondra t...@fuzzy.cz wrote: On 29.11.2011 23:38, Merlin Moncure wrote: On Tue, Nov 29, 2011 at 7:49 AM, Heiko Wundram modeln...@modelnine.org wrote: Hello! Sorry for that subscribe post I've just sent, that was bad reading on my part (for the

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-12-02 Thread Magnus Hagander
On Thu, Dec 1, 2011 at 01:03, Tomas Vondra t...@fuzzy.cz wrote: On 29.11.2011 23:38, Merlin Moncure wrote: On Tue, Nov 29, 2011 at 7:49 AM, Heiko Wundram modeln...@modelnine.org wrote: Hello! Sorry for that subscribe post I've just sent, that was bad reading on my part (for the subscribe

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-12-01 Thread Tomas Vondra
On 29.11.2011 23:38, Merlin Moncure wrote: On Tue, Nov 29, 2011 at 7:49 AM, Heiko Wundram modeln...@modelnine.org wrote: Hello! Sorry for that subscribe post I've just sent, that was bad reading on my part (for the subscribe info on the homepage). Anyway, the title says it all: is there

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-12-01 Thread Tomas Vondra
On 1 Prosinec 2011, 13:47, Magnus Hagander wrote: On Thu, Dec 1, 2011 at 01:03, Tomas Vondra t...@fuzzy.cz wrote: Anyway, I do have an idea how this could be done using a shared library (so it has the same disadvantages as logon triggers). Hopefully I'll have time to implement a PoC of this

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-30 Thread Heiko Wundram
Am 29.11.2011 23:44, schrieb Filip Rembiałkowski: did you look at connlimit? http://www.netfilter.org/projects/patch-o-matic/pom-external.html#pom-external-connlimit AFAIK, it applies only to ESTABLISHED state, so maybe it suits you. No, I didn't, and THANKS! That's exactly the hint I needed.

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-30 Thread Heiko Wundram
Am 29.11.2011 23:49, schrieb Tom Lane: Another way that we've sometimes recommended people handle custom login restrictions is (1) use PAM for authentication (2) find or write a PAM plugin that makes the kind of check you want Very interesting - I'll first try the connlimit approach hinted at

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-30 Thread Magnus Hagander
On Wed, Nov 30, 2011 at 09:23, Heiko Wundram modeln...@modelnine.org wrote: Am 29.11.2011 23:49, schrieb Tom Lane: Another way that we've sometimes recommended people handle custom login restrictions is (1) use PAM for authentication (2) find or write a PAM plugin that makes the kind of

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-30 Thread Heiko Wundram
Am 30.11.2011 09:26, schrieb Magnus Hagander: I don't believe we do teardown using PAM, just session start. So you'd have to have your PAM module check the current state of postgresql every time - not keep some internal state. Okay, that's too bad - if connlimit doesn't do the trick, I'll try

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-30 Thread Merlin Moncure
On Tue, Nov 29, 2011 at 7:49 AM, Heiko Wundram modeln...@modelnine.org wrote: Hello! Sorry for that subscribe post I've just sent, that was bad reading on my part (for the subscribe info on the homepage). Anyway, the title says it all: is there any possibility to limit the number of

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-30 Thread Tomas Vondra
On 29.11.2011 14:49, Heiko Wundram wrote: Hello! Sorry for that subscribe post I've just sent, that was bad reading on my part (for the subscribe info on the homepage). Anyway, the title says it all: is there any possibility to limit the number of connections that a client can have

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-30 Thread Filip Rembiałkowski
no easy, standard way of doing this in postgres. before we go into workarounds - what's the underlying OS? 2011/11/29 Heiko Wundram modeln...@modelnine.org: Hello! Sorry for that subscribe post I've just sent, that was bad reading on my part (for the subscribe info on the homepage).

[GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-29 Thread Heiko Wundram
Hello! Sorry for that subscribe post I've just sent, that was bad reading on my part (for the subscribe info on the homepage). Anyway, the title says it all: is there any possibility to limit the number of connections that a client can have concurrently with a PostgreSQL-Server with

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-29 Thread Heiko Wundram
Am 29.11.2011 20:44, schrieb Filip Rembiałkowski: no easy, standard way of doing this in postgres. before we go into workarounds - what's the underlying OS? Okay, that's too bad that there's no standard way for this. The underlying OS is Linux (Gentoo, to be exact), and I'd already thought

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-29 Thread Filip Rembiałkowski
W dniu 29 listopada 2011 23:18 użytkownik Heiko Wundram modeln...@modelnine.org napisał: Okay, that's too bad that there's no standard way for this. The underlying OS is Linux (Gentoo, to be exact), and I'd already thought about setting up some form of iptables firewalling, but there's no real

Re: [GENERAL] Limiting number of connections to PostgreSQL per IP (not per DB/user)?

2011-11-29 Thread Tom Lane
=?UTF-8?Q?Filip_Rembia=C5=82kowski?= plk.zu...@gmail.com writes: W dniu 29 listopada 2011 23:18 użytkownik Heiko Wundram modeln...@modelnine.org napisał: Okay, that's too bad that there's no standard way for this. did you look at connlimit?