pgsql: Avoid overflow in fe_utils' printTable()

2023-11-21 Thread Alvaro Herrera
Avoid overflow in fe_utils' printTable() The original code would miscalculate the total number of cells when the table to print has more than ~4 billion cells, leading to an unnecessary error. Repair by changing some computations to be 64-bits wide. Add some necessary overflow checks. Author: H

pgsql: Remove unneeded assignments in for loop header

2023-11-21 Thread Alvaro Herrera
Remove unneeded assignments in for loop header The last use of this variable in the loop body was removed by commit 93df658a0189. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/afc3b0143c89405540461f306137ab6a9671c3bb Modified Files -- src/fe_utils/pri

pgsql: doc: vacuum_cost_limit controls when vacuum_cost_delay happens

2023-11-21 Thread Bruce Momjian
doc: vacuum_cost_limit controls when vacuum_cost_delay happens Mention this relationship. Reported-by: Martín Marqués Discussion: https://postgr.es/m/cabeg9ltsavp4waknguyo-haiiowcb8xejqvddfhx_nfi5sj...@mail.gmail.com Author: Martín Marqués Backpatch-through: master Branch -- master Det

pgsql: Fix query checking consistency of table amhandlers in opr_sanity

2023-11-21 Thread Michael Paquier
Fix query checking consistency of table amhandlers in opr_sanity.sql As written, the query checked for an access method of type 's', which is not an AM type supported in the core code. Error introduced by 8586bf7ed888. As this query is not checking what it should, backpatch all the way down. Re

pgsql: Fix query checking consistency of table amhandlers in opr_sanity

2023-11-21 Thread Michael Paquier
Fix query checking consistency of table amhandlers in opr_sanity.sql As written, the query checked for an access method of type 's', which is not an AM type supported in the core code. Error introduced by 8586bf7ed888. As this query is not checking what it should, backpatch all the way down. Re

pgsql: Fix query checking consistency of table amhandlers in opr_sanity

2023-11-21 Thread Michael Paquier
Fix query checking consistency of table amhandlers in opr_sanity.sql As written, the query checked for an access method of type 's', which is not an AM type supported in the core code. Error introduced by 8586bf7ed888. As this query is not checking what it should, backpatch all the way down. Re

pgsql: Fix query checking consistency of table amhandlers in opr_sanity

2023-11-21 Thread Michael Paquier
Fix query checking consistency of table amhandlers in opr_sanity.sql As written, the query checked for an access method of type 's', which is not an AM type supported in the core code. Error introduced by 8586bf7ed888. As this query is not checking what it should, backpatch all the way down. Re

pgsql: Fix query checking consistency of table amhandlers in opr_sanity

2023-11-21 Thread Michael Paquier
Fix query checking consistency of table amhandlers in opr_sanity.sql As written, the query checked for an access method of type 's', which is not an AM type supported in the core code. Error introduced by 8586bf7ed888. As this query is not checking what it should, backpatch all the way down. Re

pgsql: Fix query checking consistency of table amhandlers in opr_sanity

2023-11-21 Thread Michael Paquier
Fix query checking consistency of table amhandlers in opr_sanity.sql As written, the query checked for an access method of type 's', which is not an AM type supported in the core code. Error introduced by 8586bf7ed888. As this query is not checking what it should, backpatch all the way down. Re

pgsql: doc: FreeBSD uses camcontrol identify, not atacontrol, for cache

2023-11-21 Thread Bruce Momjian
doc: FreeBSD uses camcontrol identify, not atacontrol, for cache This is for IDE drive cache control, same as SCSI (already documented properly). Reported-by: John Ekins Discussion: https://postgr.es/m/[email protected] Author: John Ekins Backpatch-through: 12

pgsql: doc: FreeBSD uses camcontrol identify, not atacontrol, for cache

2023-11-21 Thread Bruce Momjian
doc: FreeBSD uses camcontrol identify, not atacontrol, for cache This is for IDE drive cache control, same as SCSI (already documented properly). Reported-by: John Ekins Discussion: https://postgr.es/m/[email protected] Author: John Ekins Backpatch-through: 12

pgsql: doc: FreeBSD uses camcontrol identify, not atacontrol, for cache

2023-11-21 Thread Bruce Momjian
doc: FreeBSD uses camcontrol identify, not atacontrol, for cache This is for IDE drive cache control, same as SCSI (already documented properly). Reported-by: John Ekins Discussion: https://postgr.es/m/[email protected] Author: John Ekins Backpatch-through: 12

pgsql: doc: FreeBSD uses camcontrol identify, not atacontrol, for cache

2023-11-21 Thread Bruce Momjian
doc: FreeBSD uses camcontrol identify, not atacontrol, for cache This is for IDE drive cache control, same as SCSI (already documented properly). Reported-by: John Ekins Discussion: https://postgr.es/m/[email protected] Author: John Ekins Backpatch-through: 12

pgsql: doc: FreeBSD uses camcontrol identify, not atacontrol, for cache

2023-11-21 Thread Bruce Momjian
doc: FreeBSD uses camcontrol identify, not atacontrol, for cache This is for IDE drive cache control, same as SCSI (already documented properly). Reported-by: John Ekins Discussion: https://postgr.es/m/[email protected] Author: John Ekins Backpatch-through: 12

pgsql: doc: FreeBSD uses camcontrol identify, not atacontrol, for cache

2023-11-21 Thread Bruce Momjian
doc: FreeBSD uses camcontrol identify, not atacontrol, for cache This is for IDE drive cache control, same as SCSI (already documented properly). Reported-by: John Ekins Discussion: https://postgr.es/m/[email protected] Author: John Ekins Backpatch-through: 12

pgsql: Stop the search once the slot for replication origin is found.

2023-11-21 Thread Amit Kapila
Stop the search once the slot for replication origin is found. In replorigin_session_setup(), we were needlessly looping for max_replication_slots even after finding an existing slot for the origin. This shouldn't hurt us much except for probably large values of max_replication_slots. Author: Ant

pgsql: Fix the initial sync tables with no columns.

2023-11-21 Thread Amit Kapila
Fix the initial sync tables with no columns. The copy command formed for initial sync was using parenthesis for tables with no columns leading to syntax error. This patch avoids adding parenthesis for such tables. Reported-by: Justin G Author: Vignesh C Reviewed-by: Peter Smith, Amit Kapila Backp

pgsql: Fix the initial sync tables with no columns.

2023-11-21 Thread Amit Kapila
Fix the initial sync tables with no columns. The copy command formed for initial sync was using parenthesis for tables with no columns leading to syntax error. This patch avoids adding parenthesis for such tables. Reported-by: Justin G Author: Vignesh C Reviewed-by: Peter Smith, Amit Kapila Backp

pgsql: Fix the initial sync tables with no columns.

2023-11-21 Thread Amit Kapila
Fix the initial sync tables with no columns. The copy command formed for initial sync was using parenthesis for tables with no columns leading to syntax error. This patch avoids adding parenthesis for such tables. Reported-by: Justin G Author: Vignesh C Reviewed-by: Peter Smith, Amit Kapila Backp