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

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").

> - Ditto for CREATE INDEX CONCURRENTLY?

The answer is the same.
Note that if CREATE INDEX CONCURRENTLY is interrupted, you are left with an
INVALID index that you have to delete later.

> - Whether CREATE INDEX CONCURRENTLY "returns" immediately or blocks the session until it's created?

It blocks until the index has been created.

Do you want to propose a patch?

Yours,
Laurenz Albe





view thread (3+ messages)  latest in thread

Message-ID: <e50d1bc392eb97bdd161603b3a2c802c27a82c2c.camel@cybertec.at>
Permalink:  ../e50d1bc392eb97bdd161603b3a2c802c27a82c2c.camel@cybertec.at/
Also on:    postgresql.org/message-id/e50d1bc392eb97bdd161603b3a2c802c27a82c2c.camel@cybertec.at

 · 

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: 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: <e50d1bc392eb97bdd161603b3a2c802c27a82c2c.camel@cybertec.at>

* 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