pgsql: Fix intermittent test failure introduced in 6456c6e2c4.

2025-09-19 Thread Amit Kapila
Fix intermittent test failure introduced in 6456c6e2c4. The test assumes that a backend will execute COMMIT PREPARED on the publisher and hit the injection point commit-after-delay-checkpoint within the commit critical section. This should cause the apply worker on the subscriber to wait for the t

pgsql: Add optional pid parameter to pg_replication_origin_session_setu

2025-09-18 Thread Amit Kapila
the non-builtin logical replication solutions to implement parallel apply for large transactions. Additionally, an existing internal error was made user-facing, as it can now be triggered via the exposed SQL API. Author: Doruk Yilmaz Author: Hayato Kuroda Reviewed-by: Amit Kapila Reviewed-by

pgsql: Improve few errdetail messages introduced in commit 0d48d393d46.

2025-09-18 Thread Amit Kapila
Improve few errdetail messages introduced in commit 0d48d393d46. Based on suggestions by Tom Lane Reported-by: Kyotaro Horiguchi Author: Zhijie Hou Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/20250916.114644.275726106301941878.horikyota@gmail.com Branch -- master

pgsql: Fix intermittent BF failures in 035_conflicts.

2025-09-15 Thread Amit Kapila
ed-by: shveta malik Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/ty4pr01mb16907805de4816e53c547081594...@ty4pr01mb16907.jpnprd01.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0f42206531b3646f5bcda2bd35bb53fb0488eb00 Modified

pgsql: Resume conflict-relevant data retention automatically.

2025-09-15 Thread Amit Kapila
: Amit Kapila Reviewed-by: Dilip Kumar Reviewed-by: Masahiko Sawada Discussion: https://postgr.es/m/os0pr01mb5716be80daeb0ee2a6a5d1f594...@os0pr01mb5716.jpnprd01.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0d48d393d465b6f1abe18b86bd5ac2de0636a40e

pgsql: Fix Coverity issue reported in commit a850be2fe.

2025-09-08 Thread Amit Kapila
per Coverity Author: shveta malik Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/334468.1757280...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/5ac3c1ac22cb325844d0bee37f79f2c11931b32e Modified Files -- src/backend/replication

pgsql: Add test to prevent premature removal of conflict-relevant data.

2025-09-08 Thread Amit Kapila
marking DELAY_CHKPT_IN_COMMIT in RecordTransactionCommitPrepared. Reported-by: Robert Haas Author: Zhijie Hou Reviewed-by: shveta malik Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/os9pr01mb16913f67856b0da2a9097881294...@os9pr01mb16913.jpnprd01.prod.outlook.com Branch -- master

pgsql: Post-commit review fixes for 228c370868.

2025-09-07 Thread Amit Kapila
hijie Hou Reviewed-by: shveta malik Reviewed-by: Dilip Kumar Reviewed-by: Nisha Moond Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/os9pr01mb16913dacb64e5721872aa5c0294...@os9pr01mb16913.jpnprd01.prod.outlook.com Discussion: https://postgr.es/m/os9pr01mb16913f67856b0da2a90978

pgsql: Add max_retention_duration option to subscriptions.

2025-09-03 Thread Amit Kapila
firms that the retention duration is within the configured max_retention_duration. Author: Zhijie Hou Reviewed-by: shveta malik Reviewed-by: Nisha Moond Reviewed-by: Masahiko Sawada Reviewed-by: Dilip Kumar Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/os0pr01mb5716be80daeb0ee2a6a5d

pgsql: Fix use-after-free issue in slot synchronization.

2025-09-03 Thread Amit Kapila
Fix use-after-free issue in slot synchronization. Author: Shlok Kyal Reviewed-by: Daniel Gustafsson Reviewed-by: Amit Kapila Backpatch-through: 18, where it was introduced Discussion: https://postgr.es/m/canhcyexmrcedzj-rngjam0njhm4y+ttdwsgucfmxcim7bnk...@mail.gmail.com Branch

pgsql: Fix use-after-free issue in slot synchronization.

2025-09-02 Thread Amit Kapila
Fix use-after-free issue in slot synchronization. Author: Shlok Kyal Reviewed-by: Daniel Gustafsson Reviewed-by: Amit Kapila Backpatch-through: 18, where it was introduced Discussion: https://postgr.es/m/canhcyexmrcedzj-rngjam0njhm4y+ttdwsgucfmxcim7bnk...@mail.gmail.com Branch -- master

pgsql: Doc: Fix typo in logicaldecoding.sgml.

2025-08-21 Thread Amit Kapila
Doc: Fix typo in logicaldecoding.sgml. Author: Hayato Kuroda Backpatch-through: 17, where it was introduced Discussion: https://postgr.es/m/oscpr01mb149662ec5467b4135398e3731f5...@oscpr01mb14966.jpnprd01.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/commit

pgsql: Doc: Fix typo in logicaldecoding.sgml.

2025-08-21 Thread Amit Kapila
Doc: Fix typo in logicaldecoding.sgml. Author: Hayato Kuroda Backpatch-through: 17, where it was introduced Discussion: https://postgr.es/m/oscpr01mb149662ec5467b4135398e3731f5...@oscpr01mb14966.jpnprd01.prod.outlook.com Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg

pgsql: Doc: Fix typo in logicaldecoding.sgml.

2025-08-21 Thread Amit Kapila
Doc: Fix typo in logicaldecoding.sgml. Author: Hayato Kuroda Backpatch-through: 17, where it was introduced Discussion: https://postgr.es/m/oscpr01mb149662ec5467b4135398e3731f5...@oscpr01mb14966.jpnprd01.prod.outlook.com Branch -- REL_18_STABLE Details --- https://git.postgresql.org/pg

pgsql: Fix self-deadlock during DROP SUBSCRIPTION.

2025-08-18 Thread Amit Kapila
subscription is no longer valid, the worker exits gracefully. This approach avoids the deadlock while still ensuring that orphan workers are not created. Reported-by: Alexander Lakhin Author: Dilip Kumar Reviewed-by: vignesh C Reviewed-by: Hayato Kuroda Reviewed-by: Amit Kapila Backpatch-through: 13

pgsql: Fix self-deadlock during DROP SUBSCRIPTION.

2025-08-18 Thread Amit Kapila
subscription is no longer valid, the worker exits gracefully. This approach avoids the deadlock while still ensuring that orphan workers are not created. Reported-by: Alexander Lakhin Author: Dilip Kumar Reviewed-by: vignesh C Reviewed-by: Hayato Kuroda Reviewed-by: Amit Kapila Backpatch-through: 13

pgsql: Fix self-deadlock during DROP SUBSCRIPTION.

2025-08-18 Thread Amit Kapila
subscription is no longer valid, the worker exits gracefully. This approach avoids the deadlock while still ensuring that orphan workers are not created. Reported-by: Alexander Lakhin Author: Dilip Kumar Reviewed-by: vignesh C Reviewed-by: Hayato Kuroda Reviewed-by: Amit Kapila Backpatch-through: 13

pgsql: Fix self-deadlock during DROP SUBSCRIPTION.

2025-08-18 Thread Amit Kapila
subscription is no longer valid, the worker exits gracefully. This approach avoids the deadlock while still ensuring that orphan workers are not created. Reported-by: Alexander Lakhin Author: Dilip Kumar Reviewed-by: vignesh C Reviewed-by: Hayato Kuroda Reviewed-by: Amit Kapila Backpatch-through: 13

pgsql: Fix self-deadlock during DROP SUBSCRIPTION.

2025-08-18 Thread Amit Kapila
subscription is no longer valid, the worker exits gracefully. This approach avoids the deadlock while still ensuring that orphan workers are not created. Reported-by: Alexander Lakhin Author: Dilip Kumar Reviewed-by: vignesh C Reviewed-by: Hayato Kuroda Reviewed-by: Amit Kapila Backpatch-through: 13

pgsql: Fix self-deadlock during DROP SUBSCRIPTION.

2025-08-18 Thread Amit Kapila
subscription is no longer valid, the worker exits gracefully. This approach avoids the deadlock while still ensuring that orphan workers are not created. Reported-by: Alexander Lakhin Author: Dilip Kumar Reviewed-by: vignesh C Reviewed-by: Hayato Kuroda Reviewed-by: Amit Kapila Backpatch-through: 13

pgsql: Fix self-deadlock during DROP SUBSCRIPTION.

2025-08-18 Thread Amit Kapila
subscription is no longer valid, the worker exits gracefully. This approach avoids the deadlock while still ensuring that orphan workers are not created. Reported-by: Alexander Lakhin Author: Dilip Kumar Reviewed-by: vignesh C Reviewed-by: Hayato Kuroda Reviewed-by: Amit Kapila Backpatch-through: 13

pgsql: Throw ERROR when publish_generated_columns is specified without

2025-08-05 Thread Amit Kapila
Throw ERROR when publish_generated_columns is specified without a value. Previously, specifying the publication option 'publish_generated_columns' without an explicit value would incorrectly default to 'stored', which is not the intended behavior. This patch fixes the issue by raising an ERROR wh

pgsql: Throw ERROR when publish_generated_columns is specified without

2025-08-05 Thread Amit Kapila
Throw ERROR when publish_generated_columns is specified without a value. Previously, specifying the publication option 'publish_generated_columns' without an explicit value would incorrectly default to 'stored', which is not the intended behavior. This patch fixes the issue by raising an ERROR wh

pgsql: Detect and report update_deleted conflicts.

2025-08-03 Thread Amit Kapila
ed-by: Hayato Kuroda Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/os0pr01mb5716be80daeb0ee2a6a5d1f594...@os0pr01mb5716.jpnprd01.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/fd5a1a0c3e566f7fc860838084466a1c25944281 Modified

pgsql: Fix a deadlock during ALTER SUBSCRIPTION ... DROP PUBLICATION.

2025-08-01 Thread Amit Kapila
: vignesh C Reviewed-by: Amit Kapila Backpatch-through: 14, where it was introduced Discussion: https://postgr.es/m/bab95e12-6cc5-4ebb-80a8-3e41956aa...@gmail.com Branch -- REL_18_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d9f01a287ab1e024f42ec3065036f24dc72066af Modified

pgsql: Fix a deadlock during ALTER SUBSCRIPTION ... DROP PUBLICATION.

2025-08-01 Thread Amit Kapila
: vignesh C Reviewed-by: Amit Kapila Backpatch-through: 14, where it was introduced Discussion: https://postgr.es/m/bab95e12-6cc5-4ebb-80a8-3e41956aa...@gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2ab2d6f970584b7ca60cfdf6569336903aa88db5 Modified Files

pgsql: Fix a deadlock during ALTER SUBSCRIPTION ... DROP PUBLICATION.

2025-08-01 Thread Amit Kapila
: vignesh C Reviewed-by: Amit Kapila Backpatch-through: 14, where it was introduced Discussion: https://postgr.es/m/bab95e12-6cc5-4ebb-80a8-3e41956aa...@gmail.com Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/8c298324a4f3c26138b3d31248e6bd9d627963b5 Modified

pgsql: Fix a deadlock during ALTER SUBSCRIPTION ... DROP PUBLICATION.

2025-08-01 Thread Amit Kapila
: vignesh C Reviewed-by: Amit Kapila Backpatch-through: 14, where it was introduced Discussion: https://postgr.es/m/bab95e12-6cc5-4ebb-80a8-3e41956aa...@gmail.com Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/adfd8021911a302499187483c93814d24ca5ac44 Modified

pgsql: Fix a deadlock during ALTER SUBSCRIPTION ... DROP PUBLICATION.

2025-08-01 Thread Amit Kapila
: vignesh C Reviewed-by: Amit Kapila Backpatch-through: 14, where it was introduced Discussion: https://postgr.es/m/bab95e12-6cc5-4ebb-80a8-3e41956aa...@gmail.com Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/434d2d147b589206c58b4cdae366f353fe63f4eb Modified

pgsql: Fix a deadlock during ALTER SUBSCRIPTION ... DROP PUBLICATION.

2025-08-01 Thread Amit Kapila
: vignesh C Reviewed-by: Amit Kapila Backpatch-through: 14, where it was introduced Discussion: https://postgr.es/m/bab95e12-6cc5-4ebb-80a8-3e41956aa...@gmail.com Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/41fb3f51cb74eca1ba959ccd2fb1c0d7fe0bf11b Modified

pgsql: Fix duplicate transaction replay during pg_createsubscriber.

2025-07-24 Thread Amit Kapila
is not reapplied during recovery, avoiding duplication when replication begins. Bug #18897 Reported-by: Zane Duffield Author: Shlok Kyal Reviewed-by: vignesh C Reviewed-by: Amit Kapila Backpatch-through: 17, where it was introduced Discussion: https://postgr.es/m/18897-d3db67535860d

pgsql: Fix duplicate transaction replay during pg_createsubscriber.

2025-07-24 Thread Amit Kapila
is not reapplied during recovery, avoiding duplication when replication begins. Bug #18897 Reported-by: Zane Duffield Author: Shlok Kyal Reviewed-by: vignesh C Reviewed-by: Amit Kapila Backpatch-through: 17, where it was introduced Discussion: https://postgr.es/m/18897-d3db67535860d

pgsql: Fix duplicate transaction replay during pg_createsubscriber.

2025-07-24 Thread Amit Kapila
is not reapplied during recovery, avoiding duplication when replication begins. Bug #18897 Reported-by: Zane Duffield Author: Shlok Kyal Reviewed-by: vignesh C Reviewed-by: Amit Kapila Backpatch-through: 17, where it was introduced Discussion: https://postgr.es/m/18897-d3db67535860d

pgsql: Fix cfbot failure caused by commit 228c370868.

2025-07-23 Thread Amit Kapila
Fix cfbot failure caused by commit 228c370868. Ensure the test waits for the apply worker to exit after disabling the subscription. This is necessary to safely enable the retain_dead_tuples option. Also added a similar wait in another part of the test to prevent unintended apply worker activity th

Re: pgsql: Preserve conflict-relevant data during logical replication.

2025-07-23 Thread Amit Kapila
On Thu, Jul 24, 2025 at 8:27 AM Zhijie Hou (Fujitsu) wrote: > > On Thursday, July 24, 2025 9:25 AM Michael Paquier > wrote: > > > > On Wed, Jul 23, 2025 at 03:35:06AM +, Amit Kapila wrote: > > > Preserve conflict-relevant data during logical replication. &

pgsql: Preserve conflict-relevant data during logical replication.

2025-07-22 Thread Amit Kapila
. Author: Zhijie Hou Reviewed-by: shveta malik Reviewed-by: Masahiko Sawada Reviewed-by: Dilip Kumar Reviewed-by: Nisha Moond Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/os0pr01mb5716be80daeb0ee2a6a5d1f594...@os0pr01mb5716.jpnprd01.prod.outlook.com Branch -- master Details

pgsql: Doc: Fix logical replication examples.

2025-07-21 Thread Amit Kapila
Doc: Fix logical replication examples. The definition of \dRp+ was modified in commit 7054186c4e. This patch updates the column list and row filter examples to align with the revised definition. Author: Shlok Kyal Reviewed by: Peter Smith Backpatch-through: 18, where it was introduced Discussio

pgsql: Doc: Fix logical replication examples.

2025-07-21 Thread Amit Kapila
Doc: Fix logical replication examples. The definition of \dRp+ was modified in commit 7054186c4e. This patch updates the column list and row filter examples to align with the revised definition. Author: Shlok Kyal Reviewed by: Peter Smith Backpatch-through: 18, where it was introduced Discussio

pgsql: Fix the handling of two GUCs during upgrade.

2025-07-10 Thread Amit Kapila
Fix the handling of two GUCs during upgrade. Previously, the check_hook functions for max_slot_wal_keep_size and idle_replication_slot_timeout would incorrectly raise an ERROR for values set in postgresql.conf during upgrade, even though those values were not actively used in the upgrade process.

pgsql: Fix the handling of two GUCs during upgrade.

2025-07-10 Thread Amit Kapila
Fix the handling of two GUCs during upgrade. Previously, the check_hook functions for max_slot_wal_keep_size and idle_replication_slot_timeout would incorrectly raise an ERROR for values set in postgresql.conf during upgrade, even though those values were not actively used in the upgrade process.

pgsql: Fix the handling of two GUCs during upgrade.

2025-07-10 Thread Amit Kapila
Fix the handling of two GUCs during upgrade. Previously, the check_hook functions for max_slot_wal_keep_size and idle_replication_slot_timeout would incorrectly raise an ERROR for values set in postgresql.conf during upgrade, even though those values were not actively used in the upgrade process.

pgsql: Doc: Improve logical replication failover documentation.

2025-07-08 Thread Amit Kapila
Doc: Improve logical replication failover documentation. Clarified that the failover steps apply to a specific PostgreSQL subscriber and added guidance for verifying replication slot synchronization during planned failover. Additionally, corrected the standby query to avoid false positives by chec

pgsql: Doc: Improve logical replication failover documentation.

2025-07-08 Thread Amit Kapila
Doc: Improve logical replication failover documentation. Clarified that the failover steps apply to a specific PostgreSQL subscriber and added guidance for verifying replication slot synchronization during planned failover. Additionally, corrected the standby query to avoid false positives by chec

pgsql: Doc: Improve logical replication failover documentation.

2025-07-08 Thread Amit Kapila
Doc: Improve logical replication failover documentation. Clarified that the failover steps apply to a specific PostgreSQL subscriber and added guidance for verifying replication slot synchronization during planned failover. Additionally, corrected the standby query to avoid false positives by chec

pgsql: Fix typo in pg_publication.h.

2025-07-01 Thread Amit Kapila
Fix typo in pg_publication.h. Author: shveta malik Discussion: https://postgr.es/m/CAJpy0uAyFN9o7vU_ZkZFv5-6ysXDNKNx_fC0gwLLKg=8==e...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/b5cd0ecd4d4fa89b716785f22e9f009624104d61 Modified Files -

pgsql: Doc: Improve documentation of stream abort.

2025-06-24 Thread Amit Kapila
uot; which may misleadingly suggest that the fields are always present when using protocol v4. This patch clarifies that the abort LSN and timestamp are included only when parallel streaming is enabled, even under protocol v4. Author: Anthonin Bonnefoy Reviewed-by: Amit Kapila Backpatch-through: 16

pgsql: Doc: Improve documentation of stream abort.

2025-06-24 Thread Amit Kapila
uot; which may misleadingly suggest that the fields are always present when using protocol v4. This patch clarifies that the abort LSN and timestamp are included only when parallel streaming is enabled, even under protocol v4. Author: Anthonin Bonnefoy Reviewed-by: Amit Kapila Backpatch-through: 16

pgsql: Doc: Improve documentation of stream abort.

2025-06-24 Thread Amit Kapila
uot; which may misleadingly suggest that the fields are always present when using protocol v4. This patch clarifies that the abort LSN and timestamp are included only when parallel streaming is enabled, even under protocol v4. Author: Anthonin Bonnefoy Reviewed-by: Amit Kapila Backpatch-through: 16

pgsql: Fix missing comment update in 1462aad2e4.

2025-06-23 Thread Amit Kapila
Fix missing comment update in 1462aad2e4. Remove the part of comment that says we don't allow toggling two_phase option as that is supported in commit 1462aad2e4. Author: Hayato Kuroda Author: Amit Kapila Discussion: https://postgr.es/m/oscpr01mb1496656725f3951aee8749ebdf5...@oscpr01mb

Re: pgsql: Improve runtime and output of tests for replication slots checkp

2025-06-23 Thread Amit Kapila
ry / > > recovery/046_checkpoint_logical_slot TIMEOUT 1000.09s exit status 1 > > > > How about we revert the commit for now to get CI and the buildfarm green > > again? > > What about removing the 046_checkpoint_logical_slot which currently > causes all the buzz? I'm not yet convinced we need to revert > ca307d5cec90. Opinions? > If we decide to revert/remove anything, it is better to remove 046_checkpoint_logical_slot and keep investigating the issue. As per the information available at this point, it appears to be a base code bug accidentally discovered by this test case. OTOH, removing this test has a risk that there could be a delay in finding the root cause of the issue. -- With Regards, Amit Kapila.

pgsql: Improve log messages and docs for slot synchronization.

2025-06-18 Thread Amit Kapila
discussion and review. Reported-by: Suraj Kharage Author: shveta malik Reviewed-by: Zhijie Hou Reviewed-by: Peter Smith Reviewed-by: Amit Kapila Backpatch-through: 17, where it was introduced Discussion: https://postgr.es/m/CAF1DzPWTcg+m+x+oVVB=y4q9=pyysl_mujvp7ujr-_outwn...@mail.gmail.com

pgsql: Improve log messages and docs for slot synchronization.

2025-06-18 Thread Amit Kapila
discussion and review. Reported-by: Suraj Kharage Author: shveta malik Reviewed-by: Zhijie Hou Reviewed-by: Peter Smith Reviewed-by: Amit Kapila Backpatch-through: 17, where it was introduced Discussion: https://postgr.es/m/CAF1DzPWTcg+m+x+oVVB=y4q9=pyysl_mujvp7ujr-_outwn...@mail.gmail.com

pgsql: Doc: Make logical replication examples executable in bulk.

2025-05-25 Thread Amit Kapila
Doc: Make logical replication examples executable in bulk. To improve the usability of logical replication examples, we need to enable bulk copy-pasting of DML/DDL series. Currently, output command tags and prompts disrupt this workflow. While prompts are typically removed, converting them to com

pgsql: Don't retreat slot's confirmed_flush LSN.

2025-05-19 Thread Amit Kapila
us didn't store persistently. After a restart, the client can send the prior LSN that it stored persistently as an acknowledgement, but we need to ignore such an LSN to avoid retreating confirm_flush LSN. Diagnosed-by: Zhijie Hou Author: shveta malik Reviewed-by: Amit Kapila Reviewed-by: Di

pgsql: Don't retreat slot's confirmed_flush LSN.

2025-05-19 Thread Amit Kapila
us didn't store persistently. After a restart, the client can send the prior LSN that it stored persistently as an acknowledgement, but we need to ignore such an LSN to avoid retreating confirm_flush LSN. Diagnosed-by: Zhijie Hou Author: shveta malik Reviewed-by: Amit Kapila Reviewed-by: Di

pgsql: Don't retreat slot's confirmed_flush LSN.

2025-05-19 Thread Amit Kapila
us didn't store persistently. After a restart, the client can send the prior LSN that it stored persistently as an acknowledgement, but we need to ignore such an LSN to avoid retreating confirm_flush LSN. Diagnosed-by: Zhijie Hou Author: shveta malik Reviewed-by: Amit Kapila Reviewed-by: Di

pgsql: Don't retreat slot's confirmed_flush LSN.

2025-05-19 Thread Amit Kapila
us didn't store persistently. After a restart, the client can send the prior LSN that it stored persistently as an acknowledgement, but we need to ignore such an LSN to avoid retreating confirm_flush LSN. Diagnosed-by: Zhijie Hou Author: shveta malik Reviewed-by: Amit Kapila Reviewed-by: Di

pgsql: Don't retreat slot's confirmed_flush LSN.

2025-05-19 Thread Amit Kapila
us didn't store persistently. After a restart, the client can send the prior LSN that it stored persistently as an acknowledgement, but we need to ignore such an LSN to avoid retreating confirm_flush LSN. Diagnosed-by: Zhijie Hou Author: shveta malik Reviewed-by: Amit Kapila Reviewed-by: Di

pgsql: Don't retreat slot's confirmed_flush LSN.

2025-05-19 Thread Amit Kapila
us didn't store persistently. After a restart, the client can send the prior LSN that it stored persistently as an acknowledgement, but we need to ignore such an LSN to avoid retreating confirm_flush LSN. Diagnosed-by: Zhijie Hou Author: shveta malik Reviewed-by: Amit Kapila Reviewed-by: Di

pgsql: Fix the race condition in the test added by 7c99dc587.

2025-05-12 Thread Amit Kapila
continuing after ALTER SUBSCRIPTION. Reported-by: Tom Lane as per CI Author: vignesh C Reviewed-by: Xuneng Zhou Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/1230066.1745992...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

pgsql: Fix assertion failure during decoding from synced slots.

2025-04-29 Thread Amit Kapila
y: shveta malik Reviewed-by: Masahiko Sawada Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/os0pr01mb5716b44052000eb91efae60e94...@os0pr01mb5716.jpnprd01.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/3ff2a1f0c9e8d016f3288f4da3962eb

pgsql: Doc: Specify the interaction of publish_generated_columns with c

2025-04-28 Thread Amit Kapila
Doc: Specify the interaction of publish_generated_columns with column list. Author: Peter Smith Reviewed-by: David G. Johnston Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/cahut+ptnjlinffh-3f9cxh0wnwqjdktjqnbvmzdz1y+zkt_...@mail.gmail.com Branch -- master Details

pgsql: Fix xmin advancement during fast_forward decoding.

2025-04-27 Thread Amit Kapila
e won't build a base snapshot in that mode, and the future call to get_changes from the same slot can miss seeing the required catalog changes leading to incorrect reslts. This commit allows building the base snapshot even in fast_forward mode to prevent the early advancement of xmin. Reporte

pgsql: Fix xmin advancement during fast_forward decoding.

2025-04-27 Thread Amit Kapila
e won't build a base snapshot in that mode, and the future call to get_changes from the same slot can miss seeing the required catalog changes leading to incorrect reslts. This commit allows building the base snapshot even in fast_forward mode to prevent the early advancement of xmin. Reporte

pgsql: Fix xmin advancement during fast_forward decoding.

2025-04-27 Thread Amit Kapila
e won't build a base snapshot in that mode, and the future call to get_changes from the same slot can miss seeing the required catalog changes leading to incorrect reslts. This commit allows building the base snapshot even in fast_forward mode to prevent the early advancement of xmin. Reporte

pgsql: Fix xmin advancement during fast_forward decoding.

2025-04-27 Thread Amit Kapila
e won't build a base snapshot in that mode, and the future call to get_changes from the same slot can miss seeing the required catalog changes leading to incorrect reslts. This commit allows building the base snapshot even in fast_forward mode to prevent the early advancement of xmin. Reporte

pgsql: Fix xmin advancement during fast_forward decoding.

2025-04-27 Thread Amit Kapila
e won't build a base snapshot in that mode, and the future call to get_changes from the same slot can miss seeing the required catalog changes leading to incorrect reslts. This commit allows building the base snapshot even in fast_forward mode to prevent the early advancement of xmin. Reporte

pgsql: Fix xmin advancement during fast_forward decoding.

2025-04-27 Thread Amit Kapila
e won't build a base snapshot in that mode, and the future call to get_changes from the same slot can miss seeing the required catalog changes leading to incorrect reslts. This commit allows building the base snapshot even in fast_forward mode to prevent the early advancement of xmin. Reporte

pgsql: Fix typo in test file name added in commit 4909b38af0.

2025-04-25 Thread Amit Kapila
Fix typo in test file name added in commit 4909b38af0. Author: Shlok Kyal Backpatch-through: 13 Discussion: https://postgr.es/m/canhcyexsobdjkjxenq10ajumdpa5j6aipzgth_w4kcwryhl...@mail.gmail.com Branch -- REL_17_STABLE Details --- https://git.postgresql.org/pg/commitdiff/d96206f259d679

pgsql: Fix typo in test file name added in commit 4909b38af0.

2025-04-25 Thread Amit Kapila
Fix typo in test file name added in commit 4909b38af0. Author: Shlok Kyal Backpatch-through: 13 Discussion: https://postgr.es/m/canhcyexsobdjkjxenq10ajumdpa5j6aipzgth_w4kcwryhl...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/50b8ad30f7541ff48f50a

pgsql: Fix typo in test file name added in commit 4909b38af0.

2025-04-25 Thread Amit Kapila
Fix typo in test file name added in commit 4909b38af0. Author: Shlok Kyal Backpatch-through: 13 Discussion: https://postgr.es/m/canhcyexsobdjkjxenq10ajumdpa5j6aipzgth_w4kcwryhl...@mail.gmail.com Branch -- REL_15_STABLE Details --- https://git.postgresql.org/pg/commitdiff/90bc4523fd47e5

pgsql: Fix typo in test file name added in commit 4909b38af0.

2025-04-25 Thread Amit Kapila
Fix typo in test file name added in commit 4909b38af0. Author: Shlok Kyal Backpatch-through: 13 Discussion: https://postgr.es/m/canhcyexsobdjkjxenq10ajumdpa5j6aipzgth_w4kcwryhl...@mail.gmail.com Branch -- REL_13_STABLE Details --- https://git.postgresql.org/pg/commitdiff/4164d6976316ef

pgsql: Fix typo in test file name added in commit 4909b38af0.

2025-04-25 Thread Amit Kapila
Fix typo in test file name added in commit 4909b38af0. Author: Shlok Kyal Backpatch-through: 13 Discussion: https://postgr.es/m/canhcyexsobdjkjxenq10ajumdpa5j6aipzgth_w4kcwryhl...@mail.gmail.com Branch -- REL_14_STABLE Details --- https://git.postgresql.org/pg/commitdiff/bb1bc9fa962ed7

pgsql: Fix typo in test file name added in commit 4909b38af0.

2025-04-25 Thread Amit Kapila
Fix typo in test file name added in commit 4909b38af0. Author: Shlok Kyal Backpatch-through: 13 Discussion: https://postgr.es/m/canhcyexsobdjkjxenq10ajumdpa5j6aipzgth_w4kcwryhl...@mail.gmail.com Branch -- REL_16_STABLE Details --- https://git.postgresql.org/pg/commitdiff/9987c94662c25f

pgsql: Fix data loss in logical replication.

2025-04-23 Thread Amit Kapila
eviewed-by: Masahiko Sawada Reviewed-by: Amit Kapila Tested-by: Benoit Lobréau Discussion: https://postgr.es/m/de52b282-1166-1180-45a2-8d8917ca7...@enterprisedb.com Discussion: https://postgr.es/m/CAD21AoAenVqiMjpN-PvGHL1N9DWnHSq673bfgr6phmBUzx=k...@mail.gmail.com Discussion: https://p

pgsql: Fix an oversight in 3f28b2fcac.

2025-04-22 Thread Amit Kapila
his commit, but kept it in backbranches to avoid breaking any applications. A separate case can be made to have such a function even for HEAD. Reported-by: Shawn McCoy Author: Hayato Kuroda Reviewed-by: Masahiko Sawada Reviewed-by: vignesh C Reviewed-by: Amit Kapila Backpatch-through: 16, wh

pgsql: Fix an oversight in 3f28b2fcac.

2025-04-22 Thread Amit Kapila
his commit, but kept it in backbranches to avoid breaking any applications. A separate case can be made to have such a function even for HEAD. Reported-by: Shawn McCoy Author: Hayato Kuroda Reviewed-by: Masahiko Sawada Reviewed-by: vignesh C Reviewed-by: Amit Kapila Backpatch-through: 16, wh

pgsql: Fix an oversight in 3f28b2fcac.

2025-04-22 Thread Amit Kapila
his commit, but kept it in backbranches to avoid breaking any applications. A separate case can be made to have such a function even for HEAD. Reported-by: Shawn McCoy Author: Hayato Kuroda Reviewed-by: Masahiko Sawada Reviewed-by: vignesh C Reviewed-by: Amit Kapila Backpatch-through: 16, wh

pgsql: Stabilize 035_standby_logical_decoding.pl.

2025-04-10 Thread Amit Kapila
d the failing tests in them by disallowing the slot to become active for the required cases (where rows_removed conflict could be generated). Author: Hayato Kuroda Reviewed-by: Bertrand Drouvot Reviewed-by: Amit Kapila Backpatch-through: 16, where it was introduced Discussion: https://postgr

pgsql: Fix data loss in logical replication.

2025-04-10 Thread Amit Kapila
ato Kuroda Reviewed-by: Zhijie Hou Reviewed-by: Masahiko Sawada Reviewed-by: Amit Kapila Tested-by: Benoit Lobréau Backpatch-through: 14 Discussion: https://postgr.es/m/de52b282-1166-1180-45a2-8d8917ca7...@enterprisedb.com Discussion: https://postgr.es/m/CAD21AoAenVqiMjpN-PvGHL1N9DWnHSq673bfgr

pgsql: Fix data loss in logical replication.

2025-04-10 Thread Amit Kapila
ato Kuroda Reviewed-by: Zhijie Hou Reviewed-by: Masahiko Sawada Reviewed-by: Amit Kapila Tested-by: Benoit Lobréau Backpatch-through: 14 Discussion: https://postgr.es/m/de52b282-1166-1180-45a2-8d8917ca7...@enterprisedb.com Discussion: https://postgr.es/m/CAD21AoAenVqiMjpN-PvGHL1N9DWnHSq673bfgr

pgsql: Fix data loss in logical replication.

2025-04-10 Thread Amit Kapila
ato Kuroda Reviewed-by: Zhijie Hou Reviewed-by: Masahiko Sawada Reviewed-by: Amit Kapila Tested-by: Benoit Lobréau Backpatch-through: 14 Discussion: https://postgr.es/m/de52b282-1166-1180-45a2-8d8917ca7...@enterprisedb.com Discussion: https://postgr.es/m/CAD21AoAenVqiMjpN-PvGHL1N9DWnHSq673bfgr

pgsql: Fix data loss in logical replication.

2025-04-10 Thread Amit Kapila
ato Kuroda Reviewed-by: Zhijie Hou Reviewed-by: Masahiko Sawada Reviewed-by: Amit Kapila Tested-by: Benoit Lobréau Backpatch-through: 14 Discussion: https://postgr.es/m/de52b282-1166-1180-45a2-8d8917ca7...@enterprisedb.com Discussion: https://postgr.es/m/CAD21AoAenVqiMjpN-PvGHL1N9DWnHSq673bfgr

pgsql: Fix data loss in logical replication.

2025-04-10 Thread Amit Kapila
ato Kuroda Reviewed-by: Zhijie Hou Reviewed-by: Masahiko Sawada Reviewed-by: Amit Kapila Tested-by: Benoit Lobréau Backpatch-through: 14 Discussion: https://postgr.es/m/de52b282-1166-1180-45a2-8d8917ca7...@enterprisedb.com Discussion: https://postgr.es/m/CAD21AoAenVqiMjpN-PvGHL1N9DWnHSq673bfgr

pgsql: Cosmetic fixes for pg_createsubscriber's -all option.

2025-04-09 Thread Amit Kapila
Cosmetic fixes for pg_createsubscriber's -all option. Author: Peter Smith Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/CAHut+PsmSCQ-ENSDQ0YOUcsgzT=gg-e9jyxbvxd51a_dmxh...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commi

pgsql: Fix uninitialized index information access during apply.

2025-04-08 Thread Amit Kapila
relying on ExecOpenIndices to do the same. The additional benefit of this approach is that it avoids building index information when there is no conflict. Author: Hou Zhijie Reviewed-by:Reviewed-by: Amit Kapila Discussion: https://postgr.es/m/tyapr01mb57244ada33dda57119b9d26494...@tyapr01mb5724

pgsql: Stabilize 035_standby_logical_decoding.pl.

2025-04-07 Thread Amit Kapila
d the failing tests in them by disallowing the slot to become active for the required cases (where rows_removed conflict could be generated). Author: Hayato Kuroda Reviewed-by: Bertrand Drouvot Reviewed-by: Amit Kapila Backpatch-through: 16, where it was introduced Discussion: https://postgr

pgsql: Stabilize 035_standby_logical_decoding.pl.

2025-04-07 Thread Amit Kapila
d the failing tests in them by disallowing the slot to become active for the required cases (where rows_removed conflict could be generated). Author: Hayato Kuroda Reviewed-by: Bertrand Drouvot Reviewed-by: Amit Kapila Backpatch-through: 16, where it was introduced Discussion: https://postgr

pgsql: pg_createsubscriber: Improve error messages.

2025-04-03 Thread Amit Kapila
pg_createsubscriber: Improve error messages. Consistently, an option name is used in the error messages where applicable. Also, change the code to use pg_fatal() instead of a combination of pg_log_error() and exit(). Author: vignesh C Reviewed-by: Hayato Kuroda Reviewed-by: Amit Kapila

Re: pgsql: Doc: Improve -R option added in e5aeed4b80.

2025-04-03 Thread Amit Kapila
On Thu, Apr 3, 2025 at 2:37 PM Amit Kapila wrote: > > Doc: Improve -R option added in e5aeed4b80. > > Author: Reviewed-by: Peter Smith > Oops, messed up the Author tag. Sorry. -- With Regards, Amit Kapila.

pgsql: Doc: Improve -R option added in e5aeed4b80.

2025-04-03 Thread Amit Kapila
Doc: Improve -R option added in e5aeed4b80. Author: Reviewed-by: Peter Smith Reviewed-by: vignesh C Discussion: https://postgr.es/m/CAHut+PvJPnaL=70SbBe3fYg2nq74Z=Yv4X=zRpUWYfOi-q6=2...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d1d83827ba4d8c

pgsql: Fix slot synchronization for two_phase enabled slots.

2025-04-02 Thread Amit Kapila
7. Author: Zhijie Hou Reviewed-by: Amit Kapila Reviewed-by: Masahiko Sawada Discussion: https://postgr.es/m/tyapr01mb5724cc7c288535bbceee65da94...@tyapr01mb5724.jpnprd01.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/

Re: pgsql: Stablize tests added in 3abe9dc188.

2025-03-28 Thread Amit Kapila
On Fri, Mar 28, 2025 at 11:18 AM Amit Kapila wrote: > > Stablize tests added in 3abe9dc188. > > The problem is that after the ALTER SUBSCRIPTION tap_sub SET PUBLICATION > command, we didn't wait for the new walsender to start on the publisher. > Immediately after ALTER,

pgsql: pg_createsubscriber: Add '--all' option.

2025-03-28 Thread Amit Kapila
when '--all' is specified. Author: Shubham Khanna Reviewed-by: vignesh C Reviewed-by: Ashutosh Bapat Reviewed-by: Euler Taveira Reviewed-by: Hayato Kuroda Reviewed-by: Amit Kapila Reviewed-by: Peter Smith Reviewed-by: Shlok Kyal Discussion: https://postgr.es/m/CAHv8RjKhA=_h5vAbo

pgsql: Stablize tests added in 3abe9dc188.

2025-03-27 Thread Amit Kapila
Stablize tests added in 3abe9dc188. The problem is that after the ALTER SUBSCRIPTION tap_sub SET PUBLICATION command, we didn't wait for the new walsender to start on the publisher. Immediately after ALTER, we performed Insert and expected it to replicate. However, the replication could start from

pgsql: Fix the typo in the test case added in 73eba5004a.

2025-03-24 Thread Amit Kapila
Fix the typo in the test case added in 73eba5004a. Author: vignesh C Discussion: https://postgr.es/m/CALDaNm2ms1deM5EYNLFEfESv_Kw=Y4AiTB0LP=qgs-upfwg...@mail.gmail.com Discussion: https://postgr.es/m/cabdarm7fw-_dnthgkg2s0fy1hhub8c3ela0gzx1kkbs1zzo...@mail.gmail.com Branch -- master Detai

pgsql: Fix an oversight in 3abe9dc188.

2025-03-24 Thread Amit Kapila
Fix an oversight in 3abe9dc188. Forgot to update the comment atop one of the functions. Author: Hayato Kuroda Discussion: https://postgr.es/m/oscpr01mb1496623be1125b44614494e7af5...@oscpr01mb14966.jpnprd01.prod.outlook.com Branch -- master Details --- https://git.postgresql.org/pg/com

pgsql: Detect and Log multiple_unique_conflicts type conflict.

2025-03-24 Thread Amit Kapila
conflict type. Add the stats for this conflict type in pg_stat_subscription_stats. Author: Nisha Moond Author: Zhijie Hou Reviewed-by: Amit Kapila Reviewed-by: Peter Smith Reviewed-by: Dilip Kumar Discussion: https://postgr.es/m/cabdarm7fw-_dnthgkg2s0fy1hhub8c3ela0gzx1kkbs1zzo

pgsql: pg_createsubscriber: Add -R publications option.

2025-03-21 Thread Amit Kapila
ions in case they want some pre-existing subscribers to point to the newly created subscriber. Author: Shubham Khanna Reviewed-by: Peter Smith Reviewed-by: David G. Johnston Reviewed-by: Euler Taveira Reviewed-by: Zhijie Hou Reviewed-by: vignesh C Reviewed-by: Nisha Moond Reviewed-by: Amit

pgsql: Fix typo.

2025-03-18 Thread Amit Kapila
Fix typo. Author: vignesh C Reviewed-by: Ashutosh Bapat Discussion: https://postgr.es/m/caldanm1kqj0vffdjrpbfyi9shz6lhfee-ckn+eqsepfkheb...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/122a9af5def2db78f2c2131958eab8873bfee93b Modified Files ---

  1   2   3   4   5   6   7   8   9   10   >