Re: Is CREATE INDEX dependent on the session?

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Ilya Priven <ilya(dot)konstantinov(at)gmail(dot)com>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: Is CREATE INDEX dependent on the session?
Date: 2023-09-28 06:23:35
Message-ID: e50d1bc392eb97bdd161603b3a2c802c27a82c2c.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Daniel Gustafsson 2023-09-28 12:13:44 Re: Hyperlinks for source file references
Previous Message Bruce Momjian 2023-09-28 00:17:54 Re: Suggestion for deprecated spellings