views:

74

answers:

2

We had a database spin itself out of control and fill the SAN partition it was sharing with other services. In some other RDBMSen, there are ways to disable autogrowth. I've not found that approach (yet) with Postgres. Putting aside the problem database that caused this mess...

What is your approach to preventing or limiting table/database growth in Postgres? Or is there one?

"...there exists no size limitation except physical boundaries placed on the device by the OS."
Ref. http://wiki.postgresql.org/wiki/PostgreSQL_for_Oracle_DBAs

Thanks muchly.

+1  A: 

Monitoring. And manual (or automated, depending on your preference) reaction on situations.

Monitoring of course should be done automatically - Nagios, Cacti, whatever you like.

depesz
Zabbix is nice too.
Dirk Eddelbuettel
Monitoring should apply in observing long-term growth, certainly; this was an unexpected two-day "burst" that began Friday night so the manual reaction was enacted Monday morning.Ideally, I'd love to automate everything.And I was already on track with undoing the shared partition so that's a good direction so far...
Joe
Technically you can also: setup loopback partitions to files, set quote on these partitions, assign each partition as tablespace, and let every user use only "his" tablespace.
depesz
A: 

Monitoring, as depesz has said already, and enforcing it by specifically not sharing the partition with other services. As long as PostgreSQL is on it's own partition, it won't affect anybody else. And this is generally a good idea from a performance perspective as well.

Magnus Hagander