pgsql: pg_dump: Remove move "blob" terminology

2023-02-23 Thread Daniel Gustafsson
pg_dump: Remove move "blob" terminology Commit e9960732a9618 accidentally introduced the blob terminology in error messages which had previously been altered by commit 35ce24c33 from "blob" to "LO". This reverts back to "LO". Reported-by: Kyotaro Horiguchi Discussion:

pgsql: Fix incorrect format placeholders

2023-02-23 Thread Peter Eisentraut
Fix incorrect format placeholders Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/318b1c0cc1660c51c06a716de5d36367afa2499e Modified Files -- src/backend/statistics/dependencies.c | 4 ++-- src/backend/statistics/mcv.c | 6 +++---

pgsql: meson: windows: Fix tmp_install + prefix computation with meson

2023-02-23 Thread Andres Freund
meson: windows: Fix tmp_install + prefix computation with meson 1.0.1 In d0366bfb3b21 I said: Instead of trying to do this in meson.build, call out to the implementation meson install uses. This isn't pretty, but it's more reliable than what we had before. Unfortunately it was too

pgsql: Don't repeatedly register cache callbacks in pgoutput plugin.

2023-02-23 Thread Tom Lane
Don't repeatedly register cache callbacks in pgoutput plugin. Multiple cycles of starting up and shutting down the plugin within a single session would eventually lead to "out of relcache_callback_list slots", because pgoutput_startup blindly re-registered its cache callbacks each time. Fix it

pgsql: Don't repeatedly register cache callbacks in pgoutput plugin.

2023-02-23 Thread Tom Lane
Don't repeatedly register cache callbacks in pgoutput plugin. Multiple cycles of starting up and shutting down the plugin within a single session would eventually lead to "out of relcache_callback_list slots", because pgoutput_startup blindly re-registered its cache callbacks each time. Fix it

pgsql: Don't repeatedly register cache callbacks in pgoutput plugin.

2023-02-23 Thread Tom Lane
Don't repeatedly register cache callbacks in pgoutput plugin. Multiple cycles of starting up and shutting down the plugin within a single session would eventually lead to "out of relcache_callback_list slots", because pgoutput_startup blindly re-registered its cache callbacks each time. Fix it

pgsql: Don't repeatedly register cache callbacks in pgoutput plugin.

2023-02-23 Thread Tom Lane
Don't repeatedly register cache callbacks in pgoutput plugin. Multiple cycles of starting up and shutting down the plugin within a single session would eventually lead to "out of relcache_callback_list slots", because pgoutput_startup blindly re-registered its cache callbacks each time. Fix it

pgsql: Don't repeatedly register cache callbacks in pgoutput plugin.

2023-02-23 Thread Tom Lane
Don't repeatedly register cache callbacks in pgoutput plugin. Multiple cycles of starting up and shutting down the plugin within a single session would eventually lead to "out of relcache_callback_list slots", because pgoutput_startup blindly re-registered its cache callbacks each time. Fix it

pgsql: Don't repeatedly register cache callbacks in pgoutput plugin.

2023-02-23 Thread Tom Lane
Don't repeatedly register cache callbacks in pgoutput plugin. Multiple cycles of starting up and shutting down the plugin within a single session would eventually lead to "out of relcache_callback_list slots", because pgoutput_startup blindly re-registered its cache callbacks each time. Fix it

pgsql: Add LZ4 compression to pg_dump

2023-02-23 Thread Tomas Vondra
Add LZ4 compression to pg_dump Expand pg_dump's compression streaming and file APIs to support the lz4 algorithm. The newly added compress_lz4.{c,h} files cover all the functionality of the aforementioned APIs. Minor changes were necessary in various pg_backup_* files, where code for the 'lz4'

pgsql: Refactor to introduce pg_locale_deterministic().

2023-02-23 Thread Jeff Davis
Refactor to introduce pg_locale_deterministic(). Avoids the need of callers to test for NULL, and also avoids the need to access the pg_locale_t structure directly. Reviewed-by: Peter Eisentraut, Peter Geoghegan Discussion:

pgsql: Remove unnecessary #ifdef USE_ICU and branch.

2023-02-23 Thread Jeff Davis
Remove unnecessary #ifdef USE_ICU and branch. Now that the provider-independent API pg_strnxfrm() is available, we no longer need the special cases for ICU in hashfunc.c and varchar.c. Reviewed-by: Peter Eisentraut, Peter Geoghegan Discussion:

pgsql: Refactor to add pg_strcoll(), pg_strxfrm(), and variants.

2023-02-23 Thread Jeff Davis
Refactor to add pg_strcoll(), pg_strxfrm(), and variants. Offers a generally better separation of responsibilities for collation code. Also, a step towards multi-lib ICU, which should be based on a clean separation of the routines required for collation providers. Callers with NUL-terminated

pgsql: Introduce a generic pg_dump compression API

2023-02-23 Thread Tomas Vondra
Introduce a generic pg_dump compression API Switch pg_dump to use the Compression API, implemented by bf9aa490db. The CompressFileHandle replaces the cfp* family of functions with a struct of callbacks for accessing (compressed) files. This allows adding new compression methods simply by

pgsql: Fix mis-handling of outer join quals generated by EquivalenceCla

2023-02-23 Thread Tom Lane
Fix mis-handling of outer join quals generated by EquivalenceClasses. It's possible, in admittedly-rather-contrived cases, for an eclass to generate a derived "join" qual that constrains the post-outer-join value(s) of some RHS variable(s) without mentioning the LHS at all. While the mechanisms

pgsql: Prepare pg_dump internals for additional compression methods

2023-02-23 Thread Tomas Vondra
Prepare pg_dump internals for additional compression methods Commit bf9aa490db introduced a compression API in compress_io.{c,h} to make reuse easier, and allow adding more compression algorithms. However, pg_backup_archiver.c was not switched to this API and continued to call the compression

pgsql: pg_rewind: Fix determining TLI when server was just promoted.

2023-02-23 Thread Heikki Linnakangas
pg_rewind: Fix determining TLI when server was just promoted. If the source server was just promoted, and it hasn't written the checkpoint record yet, pg_rewind considered the server to be still on the old timeline. Because of that, it would claim incorrectly that no rewind is required. Fix that

pgsql: Fix multi-row DEFAULT handling for INSERT ... SELECT rules.

2023-02-23 Thread Dean Rasheed
Fix multi-row DEFAULT handling for INSERT ... SELECT rules. Given an updatable view with a DO ALSO INSERT ... SELECT rule, a multi-row INSERT ... VALUES query on the view fails if the VALUES list contains any DEFAULTs that are not replaced by view defaults. This manifests as an "unrecognized node

pgsql: Fix multi-row DEFAULT handling for INSERT ... SELECT rules.

2023-02-23 Thread Dean Rasheed
Fix multi-row DEFAULT handling for INSERT ... SELECT rules. Given an updatable view with a DO ALSO INSERT ... SELECT rule, a multi-row INSERT ... VALUES query on the view fails if the VALUES list contains any DEFAULTs that are not replaced by view defaults. This manifests as an "unrecognized node

pgsql: Fix multi-row DEFAULT handling for INSERT ... SELECT rules.

2023-02-23 Thread Dean Rasheed
Fix multi-row DEFAULT handling for INSERT ... SELECT rules. Given an updatable view with a DO ALSO INSERT ... SELECT rule, a multi-row INSERT ... VALUES query on the view fails if the VALUES list contains any DEFAULTs that are not replaced by view defaults. This manifests as an "unrecognized node

pgsql: Fix multi-row DEFAULT handling for INSERT ... SELECT rules.

2023-02-23 Thread Dean Rasheed
Fix multi-row DEFAULT handling for INSERT ... SELECT rules. Given an updatable view with a DO ALSO INSERT ... SELECT rule, a multi-row INSERT ... VALUES query on the view fails if the VALUES list contains any DEFAULTs that are not replaced by view defaults. This manifests as an "unrecognized node

pgsql: Fix multi-row DEFAULT handling for INSERT ... SELECT rules.

2023-02-23 Thread Dean Rasheed
Fix multi-row DEFAULT handling for INSERT ... SELECT rules. Given an updatable view with a DO ALSO INSERT ... SELECT rule, a multi-row INSERT ... VALUES query on the view fails if the VALUES list contains any DEFAULTs that are not replaced by view defaults. This manifests as an "unrecognized node

pgsql: Fix multi-row DEFAULT handling for INSERT ... SELECT rules.

2023-02-23 Thread Dean Rasheed
Fix multi-row DEFAULT handling for INSERT ... SELECT rules. Given an updatable view with a DO ALSO INSERT ... SELECT rule, a multi-row INSERT ... VALUES query on the view fails if the VALUES list contains any DEFAULTs that are not replaced by view defaults. This manifests as an "unrecognized node

pgsql: Consider a failed process as a failed test in pg_regress

2023-02-23 Thread Daniel Gustafsson
Consider a failed process as a failed test in pg_regress Commit 55de145d1cf added reporting of child process failures, but the test suite is still allowed to pass even if the process failed. Since regress tests are higher level tests, a false positive is more likely in this case so report failed