REFRESH MATERIALIZED VIEW blocks pgAdmin III login

From: Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "pgadmin-support(at)postgresql(dot)org" <pgadmin-support(at)postgresql(dot)org>
Subject: REFRESH MATERIALIZED VIEW blocks pgAdmin III login
Date: 2015-02-18 13:58:40
Message-ID: A737B7A37273E048B164557ADEF4A58B3659CA46@ntex2010i.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

If you try to connect to a database while REFRESH MATERIALIZE VIEW for a
materialized view in the database is in progress, the interface will
"hang" (the window remains blank and does not react to the mouse).

This is probably caused by the ACCESS EXCLUSIVE locks that are held
during REFRESH MATERIALIZED VIEW. When the command finishes, pgAdmin III
continues working as usual.

I'd say that this is a bug, because it is not unusual for REFRESH
MATERIALIZED VIEW to take a very long time, and in that time pgAdmin III
is not working.

I tried with versions 1.20.0 and 1.18.1.

Here is a sample materialized view useful for testing:
CREATE MATERIALIZED VIEW x AS
SELECT CASE WHEN pg_sleep(1) IS NULL THEN i ELSE 0 END
FROM generate_series(1, 100000) i
WITH NO DATA;

Enter "REFRESH MATERIALIZED VIEW x" and try to connect with pgAdmin III!

Yours,
Laurenz Albe

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message inspector morse 2015-02-19 01:09:22 Stored procedure and transactions
Previous Message Guillaume Lelarge 2015-02-13 21:02:41 Re: Results messages in "results output" window