Re: How to interpret 'depends on' errors in pg_restore?

From: Fire Emerald <fire(dot)github(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: How to interpret 'depends on' errors in pg_restore?
Date: 2024-03-28 15:57:04
Message-ID: 18e85c76c98.2815.a5aef60df33e8d2ac3d54c6545825f63@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Am 28. März 2024 15:00:06 schrieb Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:

> Fire Emerald <fire(dot)github(at)gmail(dot)com> writes:
>> Then i did a pg_restore -d target --verbose -Fc file.dump and saw in the
>> output this:
>
>> 5145 0 730750 TABLE subpartitions backends_y2024w03 userA
>> ; depends on: 237
>> .... and so on ...
>
> That is not an error, it's just verbose display of one of the items
> in the dump.

Well, I know it's not an error, but it's everything i got. There was no
error shown. The command completed, but without anything imported.

>
>> Nothing was restored.
>
> You would need to show us the actual errors. (Suggestion:
> leave off --verbose, it's just clutter.) A guess though is
> that the import failed because of foreign key constraints.
> --data-only mode is not good at ordering the table loads to
> ensure that FK constraints are satisfied on-the-fly.
>
> regards, tom lane

As i said, the same import but with INSERT INTOs worked without any issues.
So no, there are no FK constraints failing.

But the target and source table had partitioned tables attached, using
ATTACH PARTITION.

The schema was like:
db1 schema1 public table1 (links to the listed below)
db1 schema1 subpartitions backends_y2024w03
db1 schema1 subpartitions backends_y2024w04
db1 schema1 subpartitions backends_y2024w05

The partitioning must be the problem somehow.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2024-03-28 16:03:58 Re: How to interpret 'depends on' errors in pg_restore?
Previous Message Adrian Klaver 2024-03-28 15:51:14 Re: Inquiry on Participating in the Korean Translation Project for PostgreSQL Documentation