Re: [GENERAL] "Canceling authentication due to timeout" with idletransaction and reindex - Mailing list pgsql-general

From Michael Paquier
Subject Re: [GENERAL] "Canceling authentication due to timeout" with idletransaction and reindex
Date
Msg-id CAB7nPqR6obLTBB=1AGsSNVB997uz0Fuxe8JibjrC2yJnK5E0gQ@mail.gmail.com
Whole thread Raw
In response to [GENERAL] "Canceling authentication due to timeout" with idle transaction andreindex  (s19n <mailbox@s19n.net>)
List pgsql-general
On Fri, Sep 15, 2017 at 7:25 PM, s19n <mailbox@s19n.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


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: s19n
Date:
Subject: [GENERAL] "Canceling authentication due to timeout" with idle transaction andreindex
Next
From: Justin Pryzby
Date:
Subject: Re: [GENERAL] "Canceling authentication due to timeout" with idletransaction and reindex