pgsql: Fix PDF doc build.

2025-01-25 Thread Jeff Davis
Fix PDF doc build. Reported-by: Tom Lane Discussion: https://postgr.es/m/608525.1737781...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d2ca16bb509c453eac181c1ef805ff55289df779 Modified Files -- doc/src/sgml/func.sgml | 12

pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page

2025-01-25 Thread Noah Misch
At update of non-LP_NORMAL TID, fail instead of corrupting page header. The right mix of DDL and VACUUM could corrupt a catalog page header such that PageIsVerified() durably fails, requiring a restore from backup. This affects only catalogs that both have a syscache and have DDL code that uses sy

pgsql: Disable runningcheck for src/test/modules/injection_points/specs

2025-01-25 Thread Noah Misch
Disable runningcheck for src/test/modules/injection_points/specs. Directory "injection_points" has specified NO_INSTALLCHECK since before commit c35f419d6efbdf1a050250d84b687e6705917711 added the specs, but that commit neglected to disable the corresponding meson runningcheck. The alternative woul

pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull

2025-01-25 Thread Noah Misch
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this,

pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull

2025-01-25 Thread Noah Misch
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this,

pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull

2025-01-25 Thread Noah Misch
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this,

pgsql: Merge copies of converting an XID to a FullTransactionId.

2025-01-25 Thread Noah Misch
Merge copies of converting an XID to a FullTransactionId. Assume twophase.c is the performance-sensitive caller, and preserve its choice of unlikely() branch hint. Add some retrospective rationale for that choice. Back-patch to v17, for the next commit to use it. Reviewed (in earlier versions)

pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page

2025-01-25 Thread Noah Misch
At update of non-LP_NORMAL TID, fail instead of corrupting page header. The right mix of DDL and VACUUM could corrupt a catalog page header such that PageIsVerified() durably fails, requiring a restore from backup. This affects only catalogs that both have a syscache and have DDL code that uses sy

pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page

2025-01-25 Thread Noah Misch
At update of non-LP_NORMAL TID, fail instead of corrupting page header. The right mix of DDL and VACUUM could corrupt a catalog page header such that PageIsVerified() durably fails, requiring a restore from backup. This affects only catalogs that both have a syscache and have DDL code that uses sy

pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull

2025-01-25 Thread Noah Misch
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this,

pgsql: Disable runningcheck for src/test/modules/injection_points/specs

2025-01-25 Thread Noah Misch
Disable runningcheck for src/test/modules/injection_points/specs. Directory "injection_points" has specified NO_INSTALLCHECK since before commit c35f419d6efbdf1a050250d84b687e6705917711 added the specs, but that commit neglected to disable the corresponding meson runningcheck. The alternative woul

pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page

2025-01-25 Thread Noah Misch
At update of non-LP_NORMAL TID, fail instead of corrupting page header. The right mix of DDL and VACUUM could corrupt a catalog page header such that PageIsVerified() durably fails, requiring a restore from backup. This affects only catalogs that both have a syscache and have DDL code that uses sy

pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull

2025-01-25 Thread Noah Misch
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this,

pgsql: Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull

2025-01-25 Thread Noah Misch
Test ECPG decadd(), decdiv(), decmul(), and decsub() for risnull() input. Since commit 757fb0e5a9a61ac8d3a67e334faeea6dc0084b3f, these Informix-compat functions return 0 without changing the output parameter. Initialize the output parameter before the test call, making that obvious. Before this,

pgsql: Merge copies of converting an XID to a FullTransactionId.

2025-01-25 Thread Noah Misch
Merge copies of converting an XID to a FullTransactionId. Assume twophase.c is the performance-sensitive caller, and preserve its choice of unlikely() branch hint. Add some retrospective rationale for that choice. Back-patch to v17, for the next commit to use it. Reviewed (in earlier versions)

pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page

2025-01-25 Thread Noah Misch
At update of non-LP_NORMAL TID, fail instead of corrupting page header. The right mix of DDL and VACUUM could corrupt a catalog page header such that PageIsVerified() durably fails, requiring a restore from backup. This affects only catalogs that both have a syscache and have DDL code that uses sy

pgsql: Change shutdown sequence to terminate checkpointer last

2025-01-25 Thread Andres Freund
Change shutdown sequence to terminate checkpointer last The main motivation for this change is to have a process that can serialize stats after all other processes have terminated. Serializing stats already happens in checkpointer, even though walsenders can be active longer. The only reason the

pgsql: Doc: recommend "psql -X" for restoring pg_dump scripts.

2025-01-25 Thread Tom Lane
Doc: recommend "psql -X" for restoring pg_dump scripts. This practice avoids possible problems caused by non-default psql options, such as disabling AUTOCOMMIT. Author: Shinya Kato Reviewed-by: Robert Treat Discussion: https://postgr.es/m/96ff23a5d858ff72ca8e823a014d1...@oss.nttdata.com Backpat

pgsql: Doc: recommend "psql -X" for restoring pg_dump scripts.

2025-01-25 Thread Tom Lane
Doc: recommend "psql -X" for restoring pg_dump scripts. This practice avoids possible problems caused by non-default psql options, such as disabling AUTOCOMMIT. Author: Shinya Kato Reviewed-by: Robert Treat Discussion: https://postgr.es/m/96ff23a5d858ff72ca8e823a014d1...@oss.nttdata.com Backpat

pgsql: Doc: recommend "psql -X" for restoring pg_dump scripts.

2025-01-25 Thread Tom Lane
Doc: recommend "psql -X" for restoring pg_dump scripts. This practice avoids possible problems caused by non-default psql options, such as disabling AUTOCOMMIT. Author: Shinya Kato Reviewed-by: Robert Treat Discussion: https://postgr.es/m/96ff23a5d858ff72ca8e823a014d1...@oss.nttdata.com Backpat

pgsql: Doc: recommend "psql -X" for restoring pg_dump scripts.

2025-01-25 Thread Tom Lane
Doc: recommend "psql -X" for restoring pg_dump scripts. This practice avoids possible problems caused by non-default psql options, such as disabling AUTOCOMMIT. Author: Shinya Kato Reviewed-by: Robert Treat Discussion: https://postgr.es/m/96ff23a5d858ff72ca8e823a014d1...@oss.nttdata.com Backpat

pgsql: Doc: recommend "psql -X" for restoring pg_dump scripts.

2025-01-25 Thread Tom Lane
Doc: recommend "psql -X" for restoring pg_dump scripts. This practice avoids possible problems caused by non-default psql options, such as disabling AUTOCOMMIT. Author: Shinya Kato Reviewed-by: Robert Treat Discussion: https://postgr.es/m/96ff23a5d858ff72ca8e823a014d1...@oss.nttdata.com Backpat

pgsql: Doc: recommend "psql -X" for restoring pg_dump scripts.

2025-01-25 Thread Tom Lane
Doc: recommend "psql -X" for restoring pg_dump scripts. This practice avoids possible problems caused by non-default psql options, such as disabling AUTOCOMMIT. Author: Shinya Kato Reviewed-by: Robert Treat Discussion: https://postgr.es/m/96ff23a5d858ff72ca8e823a014d1...@oss.nttdata.com Backpat

pgsql: At update of non-LP_NORMAL TID, fail instead of corrupting page

2025-01-25 Thread Noah Misch
At update of non-LP_NORMAL TID, fail instead of corrupting page header. The right mix of DDL and VACUUM could corrupt a catalog page header such that PageIsVerified() durably fails, requiring a restore from backup. This affects only catalogs that both have a syscache and have DDL code that uses sy

pgsql: Tighten pg_restore's recognition of its -F (format) option value

2025-01-25 Thread Tom Lane
Tighten pg_restore's recognition of its -F (format) option values. Instead of checking just the first letter, match the whole string using pg_strcasecmp. Per the documentation, we allow either just the first letter (e.g. "c") or the whole name ("custom"); but we will no longer accept random varia