-
Notifications
You must be signed in to change notification settings - Fork 5k
Comparing changes
Open a pull request
base repository: postgres/postgres
base: master@{1day}
head repository: postgres/postgres
compare: master
- 9 commits
- 61 files changed
- 6 contributors
Commits on Jul 22, 2025
-
ecpg: Fix NULL pointer dereference during connection lookup
ECPGconnect() caches established connections to the server, supporting the case of a NULL connection name when a database name is not specified by its caller. A follow-up call to ECPGget_PGconn() to get an established connection from the cached set with a non-NULL name could cause a NULL pointer dereference if a NULL connection was listed in the cache and checked for a match. At least two connections are necessary to reproduce the issue: one with a NULL name and one with a non-NULL name. Author: Aleksander Alekseev <aleksander@tigerdata.com> Discussion: https://postgr.es/m/CAJ7c6TNvFTPUTZQuNAoqgzaSGz-iM4XR61D7vEj5PsQXwg2RyA@mail.gmail.com Backpatch-through: 13
Configuration menu - View commit details
-
Copy full SHA for 1b8bbee - Browse repository at this point
Copy the full SHA 1b8bbeeView commit details -
Log remote NOTICE, WARNING, and similar messages using ereport().
Previously, NOTICE, WARNING, and similar messages received from remote servers over replication, postgres_fdw, or dblink connections were printed directly to stderr on the local server (e.g., the subscriber). As a result, these messages lacked log prefixes (e.g., timestamp), making them harder to trace and correlate with other log entries. This commit addresses the issue by introducing a custom notice receiver for replication, postgres_fdw, and dblink connections. These messages are now logged via ereport(), ensuring they appear in the logs with proper formatting and context, which improves clarity and aids in debugging. Author: Vignesh C <vignesh21@gmail.com> Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de> Reviewed-by: Fujii Masao <masao.fujii@gmail.com> Discussion: https://postgr.es/m/CALDaNm2xsHpWRtLm-VL_HJCsaE3+1Y_n-jDEAr3-suxVqc3xoQ@mail.gmail.com
Configuration menu - View commit details
-
Copy full SHA for 112faf1 - Browse repository at this point
Copy the full SHA 112faf1View commit details -
doc: Inform about aminsertcleanup optional NULLness
This index AM callback has been introduced in c1ec02b and it is optional, currently only being used by BRIN. Optional callbacks are documented with NULL as possible value in amapi.h and indexam.sgml, but this callback has missed this part of the description. Reported-by: Peter Smith <smithpb2250@gmail.com> Reviewed-by: Japin Li <japinli@hotmail.com> Discussion: https://postgr.es/m/CAHut+PvgYcPmPDi1YdHMJY5upnyGRpc0N8pk1xNB11xDSBwNog@mail.gmail.com Backpatch-through: 17
Configuration menu - View commit details
-
Copy full SHA for 19179db - Browse repository at this point
Copy the full SHA 19179dbView commit details -
Doc: Fix logical replication examples.
The definition of \dRp+ was modified in commit 7054186. This patch updates the column list and row filter examples to align with the revised definition. Author: Shlok Kyal <shlok.kyal.oss@gmail.com> Reviewed by: Peter Smith <smithpb2250@gmail.com> Backpatch-through: 18, where it was introduced Discussion: https://postgr.es/m/CANhcyEUvqkSO6b9zi_fs_BBPEge5acj4mf8QKmq2TX-7axa7EQ@mail.gmail.com
Amit Kapila committedJul 22, 2025 Configuration menu - View commit details
-
Copy full SHA for ce6513e - Browse repository at this point
Copy the full SHA ce6513eView commit details -
aio: Fix assertion, clarify README
The assertion wouldn't have triggered for a long while yet, but this won't accidentally fail to detect the issue if/when it occurs. Author: Matthias van de Meent <boekewurm+postgres@gmail.com> Discussion: https://postgr.es/m/CAEze2Wj-43JV4YufW23gm=Uwr7Lkj+p0yKctKHxNm1rwFC+_DQ@mail.gmail.com Backpatch-through: 18
Configuration menu - View commit details
-
Copy full SHA for d3f97fd - Browse repository at this point
Copy the full SHA d3f97fdView commit details -
Remove translation marker from libpq-be-fe-helpers.h.
Commit 112faf1 introduced a translation marker in libpq-be-fe-helpers.h, but this caused build failures on some platforms—such as the one reported by buildfarm member indri—due to linker issues with dblink. This is the same problem previously addressed in commit 213c959. To fix the issue, this commit removes the translation marker from libpq-be-fe-helpers.h, following the approach used in 213c959. It also removes the associated gettext_noop() calls added in commit 112faf1, as they are no longer needed. While reviewing this, a gettext_noop() call was also found in contrib/basic_archive. Since contrib modules don't support translation, this call has been removed as well. Per buildfarm member indri. Author: Fujii Masao <masao.fujii@gmail.com> Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de> Discussion: https://postgr.es/m/0e6299d9-608a-4ffa-aeb1-40cb8a99000b@oss.nttdata.com
Configuration menu - View commit details
-
Copy full SHA for a7ca73a - Browse repository at this point
Copy the full SHA a7ca73aView commit details -
ecpg: Improve error detection around ecpg_strdup()
Various code paths of the ECPG code did not check for memory allocation failures, including the specific case where ecpg_strdup() considers a NULL value given in input as a valid behavior. strdup() returning itself NULL on failure, there was no way to make the difference between what could be valid and what should fail. With the different cases in mind, ecpg_strdup() is redesigned and gains a new optional argument, giving its callers the possibility to differentiate allocation failures and valid cases where the caller is giving a NULL value in input. Most of the ECPG code does not expect a NULL value, at the exception of ECPGget_desc() (setlocale) and ECPGconnect(), like dbname being unspecified, with repeated strdup calls. The code is adapted to work with this new routine. Note the case of ecpg_auto_prepare(), where the code order is switched so as we handle failures with ecpg_strdup() before manipulating any cached data, avoiding inconsistencies. This class of failure is unlikely a problem in practice, so no backpatch is done. Random OOM failures in ECPGconnect() could cause the driver to connect to a different server than the one wanted by the caller, because it could fallback to default values instead of the parameters defined depending on the combinations of allocation failures and successes. Author: Evgeniy Gorbanev <gorbanyoves@basealt.ru> Co-authored-by: Aleksander Alekseev <aleksander@tigerdata.com> Reviewed-by: Álvaro Herrera <alvherre@kurilemu.de> Reviewed-by: Michael Paquier <michael@paquier.xyz> Discussion: https://postgr.es/m/a6b193c1-6994-4d9c-9059-aca4aaf41ddd@basealt.ru
Configuration menu - View commit details
-
Copy full SHA for a6eabec - Browse repository at this point
Copy the full SHA a6eabecView commit details
Commits on Jul 23, 2025
-
Use strchr instead of strstr for single-char lookups
Compilers such as gcc and clang seem to perform this rewrite automatically when the lookup string is known at compile-time to contain a single character. The MSVC compiler does not seem apply the same optimization, and the code being adjusted here is within an #ifdef WIN32, so it seems worth adjusting this with the assumption that strchr() will be slightly more performant. There are a couple more instances in contrib/fuzzystrmatch that this commit could also have adjusted. After some discussion, we deemed those not important enough to bother with. Author: Dmitry Mityugov <d.mityugov@postgrespro.ru> Reviewed-by: Corey Huinker <corey.huinker@gmail.com> Reviewed-by: David Rowley <drowleyml@gmail.com> Discussion: https://postgr.es/m/9c1beea6c7a5e9fb6677f26620f1f257%40postgrespro.ru
Configuration menu - View commit details
-
Copy full SHA for 039f7ee - Browse repository at this point
Copy the full SHA 039f7eeView commit details -
Preserve conflict-relevant data during logical replication.
Logical replication requires reliable conflict detection to maintain data consistency across nodes. To achieve this, we must prevent premature removal of tuples deleted by other origins and their associated commit_ts data by VACUUM, which could otherwise lead to incorrect conflict reporting and resolution. This patch introduces a mechanism to retain deleted tuples on the subscriber during the application of concurrent transactions from remote nodes. Retaining these tuples allows us to correctly ignore concurrent updates to the same tuple. Without this, an UPDATE might be misinterpreted as an INSERT during resolutions due to the absence of the original tuple. Additionally, we ensure that origin metadata is not prematurely removed by vacuum freeze, which is essential for detecting update_origin_differs and delete_origin_differs conflicts. To support this, a new replication slot named pg_conflict_detection is created and maintained by the launcher on the subscriber. Each apply worker tracks its own non-removable transaction ID, which the launcher aggregates to determine the appropriate xmin for the slot, thereby retaining necessary tuples. Conflict information retention (deleted tuples and commit_ts) can be enabled per subscription via the retain_conflict_info option. This is disabled by default to avoid unnecessary overhead for configurations that do not require conflict resolution or logging. During upgrades, if any subscription on the old cluster has retain_conflict_info enabled, a conflict detection slot will be created to protect relevant tuples from deletion when the new cluster starts. This is a foundational work to correctly detect update_deleted conflict which will be done in a follow-up patch. Author: Zhijie Hou <houzj.fnst@fujitsu.com> Reviewed-by: shveta malik <shveta.malik@gmail.com> Reviewed-by: Masahiko Sawada <sawada.mshk@gmail.com> Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com> Reviewed-by: Nisha Moond <nisha.moond412@gmail.com> Reviewed-by: Amit Kapila <amit.kapila16@gmail.com> Discussion: https://postgr.es/m/OS0PR01MB5716BE80DAEB0EE2A6A5D1F5949D2@OS0PR01MB5716.jpnprd01.prod.outlook.com
Amit Kapila committedJul 23, 2025 Configuration menu - View commit details
-
Copy full SHA for 228c370 - Browse repository at this point
Copy the full SHA 228c370View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master@{1day}...master