Re: pg_upgrade failure due to dependencies

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nikhil Shetty <nikhil(dot)dba04(at)gmail(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Pgsql-admin <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_upgrade failure due to dependencies
Date: 2025-07-01 17:07:26
Message-ID: 3248810.1751389646@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Nikhil Shetty <nikhil(dot)dba04(at)gmail(dot)com> writes:
> Yes both the extension and function are created by the extension but when
> restoring, extension and associated functions or tables are created
> separately and in different order .

Ah, right, I'd momentarily forgotten that binary-upgrade mode dumps
the extensions' contents as separate objects.

I think that switching the function(s) to new-style syntax, as already
mentioned, might get you pretty far. It'd be enough for pg_dump to get
the function-vs-spatial_ref_sys-existence ordering right at least.
What it will not do is ensure that the *contents* of spatial_ref_sys
are restored early. But I'm not sure that that's fatal in a
binary-upgrade situation, because we're not dumping/restoring data:
the tables' disk files are just moved verbatim. There might still be
some edge cases that fail, but I think basic scenarios ought to work.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Laurenz Albe 2025-07-01 17:09:21 Re: pg_upgrade failure due to dependencies
Previous Message Nikhil Shetty 2025-07-01 16:20:56 Re: pg_upgrade failure due to dependencies