Re: "Canceling authentication due to timeout" with idle transaction and reindex

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: s19n <mailbox(at)s19n(dot)net>
Cc: PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: "Canceling authentication due to timeout" with idle transaction and reindex
Date: 2017-09-15 11:27:03
Message-ID: CAB7nPqR6obLTBB=1AGsSNVB997uz0Fuxe8JibjrC2yJnK5E0gQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Sep 15, 2017 at 7:25 PM, s19n <mailbox(at)s19n(dot)net> wrote:
> Is this expected? I am failing to see the relation between an idle
> transaction in the 'postgres' database, a reindex operation and subsequent
> logins.

REINDEX DATABASE processes as well system indexes, and takes an
exclusive lock on them in order to process. The lock being hold by the
transaction of session 1 conflicts by what REINDEX tries to take, and
REINDEX is able to process only when the index is free from any
lookups. The reason why logins are not possible is this was likely
waiting for a lock of an index of pg_authid which is looked up at
authentication.
--
Michael

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Justin Pryzby 2017-09-15 11:34:00 Re: "Canceling authentication due to timeout" with idle transaction and reindex
Previous Message s19n 2017-09-15 10:25:58 "Canceling authentication due to timeout" with idle transaction and reindex