Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1smkSh-007yje-2a for pgsql-admin@arkaria.postgresql.org; Sat, 07 Sep 2024 01:42:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1smkSf-007xhe-Jt for pgsql-admin@arkaria.postgresql.org; Sat, 07 Sep 2024 01:42:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1smkSf-007xhW-8a for pgsql-admin@lists.postgresql.org; Sat, 07 Sep 2024 01:42:01 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1smkSd-000XIa-Om for pgsql-admin@postgresql.org; Sat, 07 Sep 2024 01:42:01 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2f75aa08a96so3078821fa.1 for ; Fri, 06 Sep 2024 18:41:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725673319; x=1726278119; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=TgTEgzhfAg5CwobJf2NvYbemwc/X3ad1xyhmyCesy0A=; b=ZJbg36Z19tWPGZegu8dhOgAw4QLoUPoGO1MGatlEyxj5jJ8m1Oylz55MHGFo0SgIue jfBVkfgEusuwbFOhenMwMk9BfQVMEdDWQWDImnJEVre9CBO63GGU5YW7vVN/u/ZOoIql CA261BT1mPOaTcxUQBVC9655G8BYdyBCpD+inhx9SMzLRZxlf4yE9hITzOa12M4TuCAx ME/EHydyr1X7amDs6JQVgsSl6cp3sL6DXuyrB3AXS71Jpv8o4cgdt2m+bbAY4IVqbkK+ FCLM8XMBfOAtS0FvFjPZxKldKRpcRnMQAhiI+bMXHpEM7kBlQ98wwHTZ5wB+/iv44edB rZ1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725673319; x=1726278119; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=TgTEgzhfAg5CwobJf2NvYbemwc/X3ad1xyhmyCesy0A=; b=f3TZcdQCx4WZnzJ3HInGEQ34arzOaWxPT8w9GDp/wAkmuvyiHfiPrFHnVx+kGLJzyZ jC4+JK39xSqmz/+q/Pm/WBqnRw6omdc0WfbJpEOHUW5VdRmbnSILhmOfrhoN4UHeeJL+ sD8NuqgSCu2aD+nPlXTMbcgtoRRwIljPevGWmRDG7NSzecC/4yghTjTsxhPjWPUPMioQ NaBCIKN7EVIYUH5JIn0nB7KDKivE5wzw15WU1wojWaYoQTrG2/XxcM0qcojSRFrF3ZdZ Nm7T1Mf0ELoHn+xxIOtgd0RR6SDJNbBFVIABLN9nLsSL8wgkrWHV1wvVWd7fzCLYkljF UTkw== X-Gm-Message-State: AOJu0Yz9oiIY7DOoiAtli5nWbbxFA3c9nIuA1oYj1DJ4OB12fYrtZsGA sjINfIVv13Eqsm5epyxiyUsyTIEm6occKgZAupH+/ekv7K9j9QfTnz8GsaJrDXPlJNTDjMWYwS7 8Uoxrf7LGRyZG1Oski1SFHf++0CE= X-Google-Smtp-Source: AGHT+IHiAKL26dQfit2dBYUZ7NniuOZl/rQztcZksyxkw7808sCHkTVpN7diHfwfgdi32pTD88GMr9d4DGXAfmp0FGw= X-Received: by 2002:a2e:a584:0:b0:2f7:4e8c:9bfa with SMTP id 38308e7fff4ca-2f751f65ceamr27269011fa.33.1725673318606; Fri, 06 Sep 2024 18:41:58 -0700 (PDT) MIME-Version: 1.0 References: <2406327.1725672781@sss.pgh.pa.us> In-Reply-To: <2406327.1725672781@sss.pgh.pa.us> From: Wells Oliver Date: Fri, 6 Sep 2024 18:41:22 -0700 Message-ID: Subject: Re: pg_restore and materialized view deps To: Tom Lane Cc: pgsql-admin Content-Type: multipart/alternative; boundary="00000000000027753a06217da1fb" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000027753a06217da1fb Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ah, you know, a little deeper: it's an issue with a mat view unable to refresh because it uses a function, and within that function, there is a call to a mat view not yet materialized. On Fri, Sep 6, 2024 at 6:33=E2=80=AFPM Tom Lane wrote: > Wells Oliver writes: > > Not the end of the world but I notice when running pg_restore that I > > encounter a few errors where materialized views cannot be refreshed > because > > they query other materialized views not yet refreshed. > > Oh? There are dependencies that are supposed to prevent that. > Can you provide a self-contained example of a schema where > that doesn't work? > > regards, tom lane > --=20 Wells Oliver wells.oliver@gmail.com --00000000000027753a06217da1fb Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ah,= you know, a little deeper: it's an issue with a mat view unable to ref= resh because it uses a function, and within that function, there is a call = to a mat view not yet materialized.

=C2=A0

On Fri, Sep 6, 2024 at 6:33=E2=80=AFPM Tom Lane = <tgl@sss.pgh.pa.us> wrote:
Wells Oliver <= wells.oliver@gm= ail.com> writes:
> Not the end of the world but I notice when running pg_restore that I > encounter a few errors where materialized views cannot be refreshed be= cause
> they query other materialized views not yet refreshed.

Oh?=C2=A0 There are dependencies that are supposed to prevent that.
Can you provide a self-contained example of a schema where
that doesn't work?

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 regards, tom lane


--
--00000000000027753a06217da1fb--