Re: Patch: dumping tables data in multiple chunks in pg_dump

Zsolt Parragi <zsolt.parragi@percona.com>

From: Zsolt Parragi <zsolt.parragi@percona.com>
To: Hannu Krosing <hannuk@google.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, David Rowley <dgrowleyml@gmail.com>, Michael Banck <mbanck@gmx.net>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, Nathan Bossart <nathandbossart@gmail.com>
Date: 2026-03-30T21:32:22Z
Lists: pgsql-hackers
Hello!

A simple test causes an assertion failure in my testing, dependency
counting still doesn't seem to work correctly:

pg_restore: >...>/pg_backup_archiver.c:5207: reduce_dependencies:
Assertion `otherte->depCount > 0' failed.

Without assertions it results in data loss.

004_pg_dump_parallel also showcases the issue in my testing.

But simple manual testing also confirms it:

1. create some data

CREATE TABLE tplain (id int UNIQUE);
INSERT INTO tplain SELECT x FROM generate_series(1,1000) x;

2. create a dump

dump with --max-table-segment-pages=2

3. try to restore

restore with --jobs=3