> On Oct 23, 2020, at 9:52 AM, Ravi Krishna <sravikrishna@xxxxxxxx> wrote: > >> My understanding is that when CONCURRENTLY is specified, Postgres implements the refresh as a series of INSERT, UPDATE, >> and DELETE statements on the existing view. So the answer to your question is no, Postgres doesn’t create another table and >> then swap it. > > The INSERTS/UPDATE/DELETE happens only for the difference. PG first creates a new temp table and then compares it with > the MV and detects the difference. That is why for CONCURRENTLY, a unique index is required on the MV. Yes, thank you, that’s what I understand too but I expressed it very poorly.