pgsql: Add PROCESS_MAIN to VACUUM

2023-03-05 Thread Michael Paquier
Add PROCESS_MAIN to VACUUM Disabling this option is useful to run VACUUM (with or without FULL) on only the toast table of a relation, bypassing the main relation. This option is enabled by default. Running directly VACUUM on a toast table was already possible without this feature, by using the

pgsql: Improve the regression tests of VACUUM (PROCESS_TOAST)

2023-03-05 Thread Michael Paquier
Improve the regression tests of VACUUM (PROCESS_TOAST) All the regression tests of VACUUM (PROCESS_TOAST) were only checking if the commands were able to run, without checking if VACUUM was really running on what it should. This expands this set of tests so as we now look at

pgsql: Deduplicate handling of binary and text modes in logicalrep_read

2023-03-05 Thread Amit Kapila
Deduplicate handling of binary and text modes in logicalrep_read_tuple(). Author: Bharath Rupireddy Reviewed-by: Peter Smith Discussion: https://postgr.es/m/calj2acxdbq7kw_+brrsgmsr6nefcvwbhbj5j51mr3gff7qy...@mail.gmail.com Branch -- master Details ---

pgsql: Revise pg_pwrite_zeros()

2023-03-05 Thread Michael Paquier
Revise pg_pwrite_zeros() The following changes are made to pg_write_zeros(), the API able to write series of zeros using vectored I/O: - Add of an "offset" parameter, to write the size from this position (the 'p' of "pwrite" seems to mean position, though POSIX does not outline ythat directly),

pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY.

2023-03-05 Thread Thomas Munro
Fix assert failures in parallel SERIALIZABLE READ ONLY. 1. Make sure that we don't decrement SxactGlobalXminCount twice when the SXACT_FLAG_RO_SAFE optimization is reached in a parallel query. This could trigger a sanity check failure in assert builds. Non-assert builds recompute the count in

pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY.

2023-03-05 Thread Thomas Munro
Fix assert failures in parallel SERIALIZABLE READ ONLY. 1. Make sure that we don't decrement SxactGlobalXminCount twice when the SXACT_FLAG_RO_SAFE optimization is reached in a parallel query. This could trigger a sanity check failure in assert builds. Non-assert builds recompute the count in

pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY.

2023-03-05 Thread Thomas Munro
Fix assert failures in parallel SERIALIZABLE READ ONLY. 1. Make sure that we don't decrement SxactGlobalXminCount twice when the SXACT_FLAG_RO_SAFE optimization is reached in a parallel query. This could trigger a sanity check failure in assert builds. Non-assert builds recompute the count in

pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY.

2023-03-05 Thread Thomas Munro
Fix assert failures in parallel SERIALIZABLE READ ONLY. 1. Make sure that we don't decrement SxactGlobalXminCount twice when the SXACT_FLAG_RO_SAFE optimization is reached in a parallel query. This could trigger a sanity check failure in assert builds. Non-assert builds recompute the count in

pgsql: Fix assert failures in parallel SERIALIZABLE READ ONLY.

2023-03-05 Thread Thomas Munro
Fix assert failures in parallel SERIALIZABLE READ ONLY. 1. Make sure that we don't decrement SxactGlobalXminCount twice when the SXACT_FLAG_RO_SAFE optimization is reached in a parallel query. This could trigger a sanity check failure in assert builds. Non-assert builds recompute the count in

pgsql: SQL JSON path enhanced numeric literals

2023-03-05 Thread Peter Eisentraut
SQL JSON path enhanced numeric literals Add support for non-decimal integer literals and underscores in numeric literals to SQL JSON path language. This follows the rules of ECMAScript, as referred to by the SQL standard. Internally, all the numeric literal parsing of jsonpath goes through