pgsql: pg_dump: Use only LZ4 frame format for compression

2023-03-31 Thread Tomas Vondra
pg_dump: Use only LZ4 frame format for compression After 0da243fed0 got committed, it was reported that in some cases the compression ratio is rather poor - particularly for custom format with narrow tables - due to writing the LZ4 header/footer for each row. This commit switches to LZ4F (LZ4 fra

pgsql: Doc: add Buffer Access Strategy to the glossary

2023-03-31 Thread David Rowley
Doc: add Buffer Access Strategy to the glossary It seems useful to add this to the glossary as there's discussion around adding an option to VACUUM to disable and adjust the size of the buffer access strategy that VACUUM uses. Author: Melanie Plageman Reviewed-by: Justin Pryzby, David Rowley Disc

pgsql: Add show_data option to pg_get_wal_block_info.

2023-03-31 Thread Peter Geoghegan
Add show_data option to pg_get_wal_block_info. Allow users to opt out of returning FPI data and block data from pg_get_wal_block_info as an optimization. Testing has shown that this can make function execution over twice as fast in some cases. When pg_get_wal_block_info is called with "show_data

pgsql: SQL/JSON: support the IS JSON predicate

2023-03-31 Thread Alvaro Herrera
SQL/JSON: support the IS JSON predicate This patch introduces the SQL standard IS JSON predicate. It operates on text and bytea values representing JSON, as well as on the json and jsonb types. Each test has IS and IS NOT variants and supports a WITH UNIQUE KEYS flag. The tests are: IS JSON [VALU

pgsql: Further tweaking of width_bucket() edge cases.

2023-03-31 Thread Tom Lane
Further tweaking of width_bucket() edge cases. I realized that the third overflow case I posited in commit b0e9e4d76 actually should be handled in a different way: rather than tolerating the idea that the quotient could round to 1, we should clamp so that the output cannot be more than "count" whe

pgsql: Reject system columns as elements of foreign keys.

2023-03-31 Thread Tom Lane
Reject system columns as elements of foreign keys. Up through v11 it was sensible to use the "oid" system column as a foreign key column, but since that was removed there's no visible usefulness in making any of the remaining system columns a foreign key. Moreover, since the TupleTableSlot rewrit

pgsql: Reject system columns as elements of foreign keys.

2023-03-31 Thread Tom Lane
Reject system columns as elements of foreign keys. Up through v11 it was sensible to use the "oid" system column as a foreign key column, but since that was removed there's no visible usefulness in making any of the remaining system columns a foreign key. Moreover, since the TupleTableSlot rewrit

pgsql: Reject system columns as elements of foreign keys.

2023-03-31 Thread Tom Lane
Reject system columns as elements of foreign keys. Up through v11 it was sensible to use the "oid" system column as a foreign key column, but since that was removed there's no visible usefulness in making any of the remaining system columns a foreign key. Moreover, since the TupleTableSlot rewrit

pgsql: Reject system columns as elements of foreign keys.

2023-03-31 Thread Tom Lane
Reject system columns as elements of foreign keys. Up through v11 it was sensible to use the "oid" system column as a foreign key column, but since that was removed there's no visible usefulness in making any of the remaining system columns a foreign key. Moreover, since the TupleTableSlot rewrit

pgsql: Reject system columns as elements of foreign keys.

2023-03-31 Thread Tom Lane
Reject system columns as elements of foreign keys. Up through v11 it was sensible to use the "oid" system column as a foreign key column, but since that was removed there's no visible usefulness in making any of the remaining system columns a foreign key. Moreover, since the TupleTableSlot rewrit

pgsql: Ensure acquire_inherited_sample_rows sets its output parameters.

2023-03-31 Thread Tom Lane
Ensure acquire_inherited_sample_rows sets its output parameters. The totalrows/totaldeadrows outputs were left uninitialized in cases where we find no analyzable child tables of a partitioned table. This could lead to setting the partitioned table's pg_class.reltuples value to garbage. It's not

pgsql: Ensure acquire_inherited_sample_rows sets its output parameters.

2023-03-31 Thread Tom Lane
Ensure acquire_inherited_sample_rows sets its output parameters. The totalrows/totaldeadrows outputs were left uninitialized in cases where we find no analyzable child tables of a partitioned table. This could lead to setting the partitioned table's pg_class.reltuples value to garbage. It's not

pgsql: Ensure acquire_inherited_sample_rows sets its output parameters.

2023-03-31 Thread Tom Lane
Ensure acquire_inherited_sample_rows sets its output parameters. The totalrows/totaldeadrows outputs were left uninitialized in cases where we find no analyzable child tables of a partitioned table. This could lead to setting the partitioned table's pg_class.reltuples value to garbage. It's not

pgsql: Ensure acquire_inherited_sample_rows sets its output parameters.

2023-03-31 Thread Tom Lane
Ensure acquire_inherited_sample_rows sets its output parameters. The totalrows/totaldeadrows outputs were left uninitialized in cases where we find no analyzable child tables of a partitioned table. This could lead to setting the partitioned table's pg_class.reltuples value to garbage. It's not

pgsql: Ensure acquire_inherited_sample_rows sets its output parameters.

2023-03-31 Thread Tom Lane
Ensure acquire_inherited_sample_rows sets its output parameters. The totalrows/totaldeadrows outputs were left uninitialized in cases where we find no analyzable child tables of a partitioned table. This could lead to setting the partitioned table's pg_class.reltuples value to garbage. It's not

pgsql: Ensure acquire_inherited_sample_rows sets its output parameters.

2023-03-31 Thread Tom Lane
Ensure acquire_inherited_sample_rows sets its output parameters. The totalrows/totaldeadrows outputs were left uninitialized in cases where we find no analyzable child tables of a partitioned table. This could lead to setting the partitioned table's pg_class.reltuples value to garbage. It's not

pgsql: pg_regress: Emit TAP compliant output

2023-03-31 Thread Daniel Gustafsson
pg_regress: Emit TAP compliant output This converts pg_regress output format to emit TAP compliant output while keeping it as human readable as possible for use without TAP test harnesses. As verbose harness related information isn't really supported by TAP this also reduces the verbosity of pg_re

pgsql: Move ExecEvalJsonConstructor new function to a more natural plac

2023-03-31 Thread Alvaro Herrera
Move ExecEvalJsonConstructor new function to a more natural place Commit 7081ac46ace8 put it at the end of the file, but that doesn't look very nice. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9b058f6b0d9c3d1ccde4d51a72bf15ce731973a1 Modified Files ---

pgsql: No need to add FORMAT to the keyword precedence list

2023-03-31 Thread Alvaro Herrera
No need to add FORMAT to the keyword precedence list Commit 7081ac46ace8 put it there. Remove it. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/47a97098467fda56b497049430d0949f3a7dde01 Modified Files -- src/backend/parser/gram.y | 1 - 1 file changed,

Re: pgsql: SQL/JSON: add standard JSON constructor functions

2023-03-31 Thread Alvaro Herrera
On 2023-Mar-29, Alvaro Herrera wrote: > SQL/JSON: add standard JSON constructor functions > > This commit introduces the SQL/JSON standard-conforming constructors for > JSON types: > > JSON_ARRAY() > JSON_ARRAYAGG() > JSON_OBJECT() > JSON_OBJECTAGG() > Author: Nikita Glukhov > Author: Teodor S