pgsql: doc: Fix some typos and grammar

2023-04-11 Thread Michael Paquier
doc: Fix some typos and grammar This is a first batch of the fixes, for the most obvious fixes. A little bit more is under discussion. Author: Thom Brown, Justin Pryzby Discussion: https://postgr.es/m/caa-alv7xcz0nbja-nwe0rxbb28tjfjs2jtjizmoq+0wsugg...@mail.gmail.com Branch -- master

pgsql: Fix detection of unseekable files for fseek() and ftello() with

2023-04-11 Thread Michael Paquier
Fix detection of unseekable files for fseek() and ftello() with MSVC Calling fseek() or ftello() on a handle to a non-seeking device such as a pipe or a communications device is not supported. Unfortunately, MSVC's flavor of these routines, _fseeki64() and _ftelli64(), do not return an error

pgsql: Fix detection of unseekable files for fseek() and ftello() with

2023-04-11 Thread Michael Paquier
Fix detection of unseekable files for fseek() and ftello() with MSVC Calling fseek() or ftello() on a handle to a non-seeking device such as a pipe or a communications device is not supported. Unfortunately, MSVC's flavor of these routines, _fseeki64() and _ftelli64(), do not return an error

pgsql: Fix detection of unseekable files for fseek() and ftello() with

2023-04-11 Thread Michael Paquier
Fix detection of unseekable files for fseek() and ftello() with MSVC Calling fseek() or ftello() on a handle to a non-seeking device such as a pipe or a communications device is not supported. Unfortunately, MSVC's flavor of these routines, _fseeki64() and _ftelli64(), do not return an error

pgsql: Refine the guidelines for rmgrdesc authors.

2023-04-11 Thread Peter Geoghegan
Refine the guidelines for rmgrdesc authors. Clarify the goals of the recently added guidelines for rmgrdesc authors: to avoid gratuitous inconsistencies across resource managers, and to make it reasonably easy to write a reusable custom parser. Beyond that, the guidelines leave rmgrdesc authors

pgsql: Fix Heap rmgr's desc output for infobits arrays.

2023-04-11 Thread Peter Geoghegan
Fix Heap rmgr's desc output for infobits arrays. Make heap desc routines that output status bit as arrays of constants avoid outputting array literals that contain superfluous punctuation characters that complicate parsing the output. Also make sure that no heap desc routine repeats the same key

pgsql: Fix xl_heap_lock WAL record field's data type.

2023-04-11 Thread Peter Geoghegan
Fix xl_heap_lock WAL record field's data type. Make xl_heap_lock's infobits_set field of type uint8, not int8. Using int8 isn't appropriate given that the field just holds status bits. This fixes an oversight in commit 0ac5ad5134. In passing rename the nearby TransactionId field to "xmax" to

pgsql: 035_standby_logical_decoding: Add missing waits for replication

2023-04-11 Thread Andres Freund
035_standby_logical_decoding: Add missing waits for replication At least one slow buildfarm system (hoverfly) showed that the database creation was not replicated before we try to create logical replication slots on the standby, in that database. Reported-by: Noah Misch Author: "Drouvot,

pgsql: Document new pg_subscription columns.

2023-04-11 Thread Robert Haas
Document new pg_subscription columns. Commit 482675987bcdffb390ae735cfd5f34b485ae97c6 and commit c3afe8cf5a1e465bd71e48e4bc717f5bfdc7a7d6 forgot to take care of this. Noriyoshi Shinoda Discussion: http://postgr.es/m/dm4pr84mb17345d8760165f14a199b81cee...@dm4pr84mb1734.namprd84.prod.outlook.com

pgsql: Fix uninitialized variable in transformTableLikeClause()

2023-04-11 Thread David Rowley
Fix uninitialized variable in transformTableLikeClause() process_notnull_constraints should be set to false until we discover a NOT NULL column. Discovered while running Valgrind. Discussion: https://postgr.es/m/caaphdvomyizvi1kw5wvdqmrzwswkd3f7n6qd+bbao6wteaw...@mail.gmail.com Branch --

Re: pgsql: Catalog NOT NULL constraints

2023-04-11 Thread David Rowley
On Sat, 8 Apr 2023 at 06:09, Alvaro Herrera wrote: > Catalog NOT NULL constraints I think transformTableLikeClause() contains a small issue because process_notnull_constraints is not set to false by default. Per valgrind, it looks like the variable can be uninitialised by the time it's

Re: pgsql: Add VACUUM/ANALYZE BUFFER_USAGE_LIMIT option

2023-04-11 Thread David Rowley
On Tue, 11 Apr 2023 at 18:29, Kyotaro Horiguchi wrote: > My point was just that "valid" seems redundant. (Sorry, but..) > However, looking again, many of the "cases" are like "requires a > value", which looks womewhat similar to "requires a valid > value" when the cannot be represented by a

pgsql: Improve ereports for VACUUM's BUFFER_USAGE_LIMIT option

2023-04-11 Thread David Rowley
Improve ereports for VACUUM's BUFFER_USAGE_LIMIT option There's no need to check if opt->arg is NULL since defGetString() already does that and raises an ERROR if it is. Let's just remove that check. Also, combine the two remaining ERRORs into a single check. It seems better to give an

pgsql: Doc: use "an SQL" consistently rather than "a SQL"

2023-04-11 Thread David Rowley
Doc: use "an SQL" consistently rather than "a SQL" Similarly to what was done in 04539e73f and 7bdd489d3, we standardized on SQL being pronounced "es-que-ell" rather than "sequel" in our documentation. This fixes the instances of "a SQL" that have crept in during the v16 cycle. Discussion:

Re: pgsql: Add VACUUM/ANALYZE BUFFER_USAGE_LIMIT option

2023-04-11 Thread Kyotaro Horiguchi
At Tue, 11 Apr 2023 16:53:42 +1200, David Rowley wrote in > On Tue, 11 Apr 2023 at 15:02, Kyotaro Horiguchi > wrote: > > > postgres=# vacuum (buffer_usage_limit); > > > ERROR: buffer_usage_limit requires a valid value > > > > The error message doesn't really make much sense to me. In the