pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bryn Llewellyn <bryn@yugabyte.com>
Cc: Christophe Pettus <xof@thebuild.com>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Subject: Re: Is it possible to stop sessions killing eachother when they all authorize as the same role?
Date: Tue, 13 Sep 2022 01:01:16 -0400
Message-ID: <1886398.1663045276@sss.pgh.pa.us> (raw)
In-Reply-To: <DA037D53-5C8B-4E13-A850-E154C22EF5B0@yugabyte.com>
References: <10F360BB-3149-45E6-BFFE-10B9AE31F1A6@yugabyte.com>
	<C85947EF-7A77-4AB7-8FB6-EEAF16551DBF@thebuild.com>
	<DA037D53-5C8B-4E13-A850-E154C22EF5B0@yugabyte.com>

Bryn Llewellyn <bryn@yugabyte.com> writes:
> I can't agree with you about risks and probability, though. The general literature of security threats often makes the point that disgruntled employees (current or very recently former) who know the code in question do sometimes wreak havoc—sometimes just for sport. The general risk that the unrestricted ability to use "pg_terminate_backend()" to kill sessions started by one's peers is ordinary denial of service—notwithstanding the possibility for automatic re-connect. It still steals time and resources.

I'm not sure that this argument has much to recommend it.  If you
are able to issue arbitrary SQL commands, you can cause effective
denials-of-service in many ways.  A couple of random examples:

* launch a query that will eat indefinite amounts of CPU and/or disk.

* "LOCK TABLE some-important-table" and leave for lunch.

* leave a transaction open and go on vacation.

Yeah, you can progressively lock down a system against all of these
sorts of hazards, but it will get progressively less useful for
anyone who wants to do actual work on it.

In the end, the default settings have to represent a compromise
that we think is generally useful.  You're welcome to lock your
own installation down more than that, but it doesn't follow that
everybody else should too.

			regards, tom lane





view thread (32+ messages)  latest in thread

Message-ID: <1886398.1663045276@sss.pgh.pa.us>
Permalink:  ../1886398.1663045276@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1886398.1663045276@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, bryn@yugabyte.com, xof@thebuild.com, david.g.johnston@gmail.com
  Subject: Re: Is it possible to stop sessions killing eachother when they all authorize as the same role?
  In-Reply-To: <1886398.1663045276@sss.pgh.pa.us>
  References: <10F360BB-3149-45E6-BFFE-10B9AE31F1A6@yugabyte.com> <C85947EF-7A77-4AB7-8FB6-EEAF16551DBF@thebuild.com> <DA037D53-5C8B-4E13-A850-E154C22EF5B0@yugabyte.com> <1886398.1663045276@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox