Re: [PoC] configurable out of disk space elog level

From: Pavel Borisov <pashkin(dot)elfe(at)gmail(dot)com>
To: Maxim Orlov <orlovmg(at)gmail(dot)com>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PoC] configurable out of disk space elog level
Date: 2022-11-16 13:35:50
Message-ID: CALT9ZEEjb2ov1TL47JSABZeSaJ=nSJXQkUgHaL0hmAtdB-9gDA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, Maxim!
> My proposal is to add a tablespace option in order to be able to configure which behaviour is appropriate for a
> particular user. I've decided to call this option “on_no_space” for now. If anyone has a better naming for this feature,
> please, report.
>
> So, the idea is to add both GUC and tablespace option “on_no_space”. The tablespace option defines the behaviour of the
> cluster for a particular tablespace in “on_no_space” situation. The GUC defines the default value of tablespace option.

I suppose there can be a kind of attack with this feature i.e.

- If someone already has his own tablespace he can do:
ALTER TABLESPACE my SET on_no_space=fatal; // This needs tablespace
ownership, not superuser permission.
- Then fill up his own db with garbage to fill his tablespace.
- Then all the db cluster will go fatal, even if the other users'
tablespaces are almost free.

If this can be avoided, I think the patch can be useful.

Regards,
Pavel Borisov.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Mats Kindahl 2022-11-16 13:49:59 Re: Table AM and DROP TABLE [ Was: Table AM and DDLs]
Previous Message Maxim Orlov 2022-11-16 13:24:51 Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures