使用 Postgres 16 数据库(以及所有 PG>13)备份失败

Yep, that seems to be the case.

From the PR:

I discovered this bug when a Discourse backup was taken using pg_dump versioned 17.2 which cannot be restored onto postgres clusters < 17.2.

Seems like you’re between a rock and a hard place here (PostgreSQL: Documentation: 17: pg_dump)

Because pg_dump is used to transfer data to newer versions of PostgreSQL, the output of pg_dump can be expected to load into PostgreSQL server versions newer than pg_dump’s version. pg_dump can also dump from PostgreSQL servers older than its own version. (Currently, servers back to version 9.2 are supported.) However, pg_dump cannot dump from PostgreSQL servers newer than its own major version; it will refuse to even try, rather than risk making an invalid dump. Also, it is not guaranteed that pg_dump’s output can be loaded into a server of an older major version — not even if the dump was taken from a server of that version. Loading a dump file into an older server may require manual editing of the dump file to remove syntax not understood by the older server.