From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steve Baldwin <steve.baldwin@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: Transaction prevention
Date: Wed, 29 Jul 2020 21:10:13 -0400
Message-ID: <1346557.1596071413@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKE1AiaMM-W9b+JAnpeF12MoG0YO1O1oP61fBU2KzMUmG9dgZA@mail.gmail.com>
References: <CAKE1AiYUreZcQdgg76DK2ESAxuowf4OkLhUJyfVXc2or4Y25Vg@mail.gmail.com>
<1344584.1596068614@sss.pgh.pa.us>
<CAKE1AiaMM-W9b+JAnpeF12MoG0YO1O1oP61fBU2KzMUmG9dgZA@mail.gmail.com>
Steve Baldwin <steve.baldwin@gmail.com> writes:
> Thanks Tom. The idle_in_transaction_session_timeout could work well, but it
> seems to be just a default that can be overridden by a user post-login (or
> am I missing something?).
It is that, but if you have an actively malicious user then you need to
keep them from issuing SQL directly at all. There are far too many ways
to cause effective denial-of-service, eg a single query that runs
"forever".
> I'm thinking of setting lock_timeout as part of
> the migration process so it will fail if it is unable to obtain a lock in a
> 'reasonable' amount of time. I wonder what other folks do?
If you'd rather fail the migration process, sure.
regards, tom lane
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, steve.baldwin@gmail.com
Subject: Re: Transaction prevention
In-Reply-To: <1346557.1596071413@sss.pgh.pa.us>
References: <CAKE1AiYUreZcQdgg76DK2ESAxuowf4OkLhUJyfVXc2or4Y25Vg@mail.gmail.com> <1344584.1596068614@sss.pgh.pa.us> <CAKE1AiaMM-W9b+JAnpeF12MoG0YO1O1oP61fBU2KzMUmG9dgZA@mail.gmail.com> <1346557.1596071413@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