pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: Ilya Priven <ilya.konstantinov@gmail.com>
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: Is CREATE INDEX dependent on the session?
Date: Thu, 28 Sep 2023 10:06:29 -0400
Message-ID: <947974.1695909989@sss.pgh.pa.us> (raw)
In-Reply-To: <e50d1bc392eb97bdd161603b3a2c802c27a82c2c.camel@cybertec.at>
References: <CA+dzQZ11kt9X3bBoig+CtCtNp_z6sqqXMe4WxArHi97+gYCxqg@mail.gmail.com>
	<e50d1bc392eb97bdd161603b3a2c802c27a82c2c.camel@cybertec.at>

Laurenz Albe <laurenz.albe@cybertec.at> writes:
> On Wed, 2023-09-27 at 11:23 -0400, Ilya Priven wrote:
>> Would it warrant a clarification in the documentation:
>> - Whether CREATE INDEX is aborted if the session is disconnected, assuming it's not in a transaction?

> It is aborted as soon as the server realizes that the client is gone, which may
> take a while (see the keepalive parameters and "client_connection_check_interval").

Note that unless you change client_connection_check_interval to
a nondefault value, the server will not notice that the client
is gone until it tries to send or receive data.  So a command
like CREATE INDEX will typically run to completion even if the
client drops the connection.  I don't think keepalive settings
affect this --- they might cause the kernel to realize that the
connection is lost earlier than it otherwise would, but that
doesn't result in an automatic kill of the server process.

> Do you want to propose a patch?

There are enough environmental dependencies involved here that
any simple description is likely to contain lies.  So I'm
hesitant to try to put anything about it into the docs.

			regards, tom lane





view thread (3+ messages)

Message-ID: <947974.1695909989@sss.pgh.pa.us>
Permalink:  ../947974.1695909989@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/947974.1695909989@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 using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at, ilya.konstantinov@gmail.com, pgsql-docs@lists.postgresql.org
  Subject: Re: Is CREATE INDEX dependent on the session?
  In-Reply-To: <947974.1695909989@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