Re: Fix slot synchronization with two_phase decoding enabled

2025-06-18 Thread shveta malik
On Tue, Jun 17, 2025 at 5:17 AM Masahiko Sawada wrote: > > On Wed, Jun 11, 2025 at 9:50 PM shveta malik wrote: > > > > On Wed, Jun 11, 2025 at 11:31 PM Masahiko Sawada > > wrote: > > > > > > > > BTW have we addressed the point Amit mentioned befo

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-06-18 Thread shveta malik
On Wed, Jun 18, 2025 at 2:39 PM Bertrand Drouvot wrote: > > Hi, > > On Tue, Jun 10, 2025 at 02:00:55PM -0700, Masahiko Sawada wrote: > > > > > > > 0001 patch allows us to create a logical slot without WAL > > > > > > > reservation. > > Thanks for the patch and sorry to be late in this conversatio

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-06-17 Thread shveta malik
On Wed, Jun 18, 2025 at 6:06 AM Masahiko Sawada wrote: > > Thank you for the comments! > > > > > 2) > > I see that when primary switches back its effective wal_level to > > replica while standby has wal_level=logical in conf file, then standby > > has this status: > > > > postgres=# show wal_level

Re: Replication slot is not able to sync up

2025-06-17 Thread shveta malik
On Tue, Jun 17, 2025 at 12:01 PM Amit Kapila wrote: > > This whole paragraph sounds like a duplicate of its previous section, > and the line alignment in the first paragraph has some issues. > Sorry for the wrong upload, duplicacy was the merge issue. Removed the duplicate paragraph and corrected

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-06-16 Thread shveta malik
On Wed, Jun 11, 2025 at 2:31 AM Masahiko Sawada wrote: > > I think it's the user's responsibility to keep at least one logical > slot. It seems that setting wal_level to 'logical' would be the most > reliable solution for this case. We might want to provide a way to > keep 'logical' WAL level some

Re: Conflict detection for update_deleted in logical replication

2025-06-16 Thread shveta malik
On Mon, Jun 16, 2025 at 9:29 AM Zhijie Hou (Fujitsu) wrote: > > 0001: > * Removed the slot acquisition as suggested above. > > 0002: > * Addressed the comments above. > Thanks for the patches. In advance_conflict_slot_xmin(), if new_xmin is same as slot's current xmin, then shall we simply retu

Re: Replication slot is not able to sync up

2025-06-15 Thread shveta malik
On Sat, Jun 14, 2025 at 11:08 AM Amit Kapila wrote: > > I feel WARNING and CAUTION markups could be a little strong for the > > concerned case. Such markups are generally used when there is a > > side-effect involved with the usage. But in our case, there is no such > > side-effect with the API.

Re: Logical Replication slot disappeared after promote Standby

2025-06-13 Thread shveta malik
On Fri, Jun 13, 2025 at 1:00 PM Perumal Raj wrote: > > Yes Shveta! > > I could see repeated message in New-replica . > > 2025-06-13 06:20:30.146 UTC [277861] LOG: could not synchronize replication > slot "kafka_logical_slot" because remote slot precedes local slot > 2025-06-13 06:20:30.146 UTC [

Re: Conflict detection for update_deleted in logical replication

2025-06-12 Thread shveta malik
On Thu, Jun 12, 2025 at 4:22 PM shveta malik wrote: > > On Thu, Jun 12, 2025 at 11:34 AM Zhijie Hou (Fujitsu) > wrote: > > > > > > Here is the V35 patch set which includes the following changes: > > > > Thank You for the patches. Few comments: > >

Re: Logical Replication slot disappeared after promote Standby

2025-06-12 Thread shveta malik
On Fri, Jun 13, 2025 at 6:23 AM Perumal Raj wrote: > > Hi Hou zj > > I have found some strange issue , but not sure if I am doing anything wrong. > > I am able to see logical slot at STANDBY even after promote. 👏 Good to know. > > Importantly Logical replication slot is persistance in STANDBYs w

Re: Conflict detection for update_deleted in logical replication

2025-06-12 Thread shveta malik
On Thu, Jun 12, 2025 at 11:34 AM Zhijie Hou (Fujitsu) wrote: > > > Here is the V35 patch set which includes the following changes: > Thank You for the patches. Few comments: 1) Since now we create slot for rci enabled subscription, it will require wal_level >= replica even on subscribers. We sha

Re: Question on error code selection in conflict detection

2025-06-12 Thread shveta malik
On Thu, Jun 12, 2025 at 12:39 PM Amit Kapila wrote: > > On Wed, Jun 11, 2025 at 7:33 PM Robert Haas wrote: > > > > On Tue, Jun 10, 2025 at 2:09 AM Amit Kapila wrote: > > > Can we instead try to use other suitable existing error codes? > > > > Why? > > > > I mean, I'm not 100% against using exist

Re: Fix slot synchronization with two_phase decoding enabled

2025-06-11 Thread shveta malik
On Wed, Jun 11, 2025 at 11:31 PM Masahiko Sawada wrote: > > BTW have we addressed the point Amit mentioned before[1]? > > > The one more combination to consider is when someone takes a dump of > > an older version and loads it into a newer version. For example, where > > users dump from 17.5 and

Re: Replication slot is not able to sync up

2025-06-11 Thread shveta malik
On Thu, Jun 12, 2025 at 4:13 AM Peter Smith wrote: > > Phrases like "... it is recommended..." and "... intended for testing > and debugging .. " and "... should be used with caution." and "... it > is advisable to..." seem like indicators that parts of the above > description should be using SGML

Re: Question on error code selection in conflict detection

2025-06-11 Thread shveta malik
On Wed, Jun 11, 2025 at 11:05 AM Dilip Kumar wrote: > > On Tue, Jun 10, 2025 at 12:14 PM Dilip Kumar wrote: > > > > On Tue, Jun 10, 2025 at 11:39 AM Amit Kapila > > wrote: > > > > > > On Mon, Jun 9, 2025 at 7:14 PM Dilip Kumar wrote: > > > > > > > > I was reviewing the code for conflict report

Re: Conflict detection for update_deleted in logical replication

2025-06-11 Thread shveta malik
On Tue, Jun 10, 2025 at 11:55 AM Zhijie Hou (Fujitsu) wrote: > > Here is the V35 patch set which includes the following changes: > Thank You for the patches, few comments: 1) compute_min_nonremovable_xid: + /* + * Stop advancing xmin if an invalid non-removable transaction ID is + * found, othe

Re: Replication slot is not able to sync up

2025-06-10 Thread shveta malik
On Tue, Jun 10, 2025 at 3:20 PM Zhijie Hou (Fujitsu) wrote: > > > Thanks for updating the patch. > > I have few suggestions for the document from a user's perspective. > Thanks Hou-San, I agree with your suggestions. Addressed in v4. Also addressed Amit's suggestion at [1] to improve errdetail.

Re: Fix slot synchronization with two_phase decoding enabled

2025-06-10 Thread shveta malik
On Fri, Jun 6, 2025 at 12:37 PM Nisha Moond wrote: > > Attached v18 patch. > - patch-001: modified error messages as suggested above. > - patch-002: improved pg_dump docs as per Shveta's off-list suggestions. > Thanks for the patches. Please find few comments: 1) + * However, we allow this com

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-06-08 Thread shveta malik
On Sat, Jun 7, 2025 at 2:44 AM Masahiko Sawada wrote: > > On Fri, Jun 6, 2025 at 3:02 AM shveta malik wrote: > > > > On Wed, Jun 4, 2025 at 3:40 PM shveta malik wrote: > > > > > > On Wed, Jun 4, 2025 at 6:41 AM Masahiko Sawada > > > wrote: > &g

Re: synchronized_standby_slots used in logical replication

2025-06-06 Thread shveta malik
On Thu, Jun 5, 2025 at 3:10 PM Fabrice Chapuis wrote: > > Thank you very much for the detailed response. I will proceed with the native > implementation for synchronizing logical replication slots. Sure, thanks! > In a maintenance context, when standby is shutdown, it's possible to > temporar

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-06-06 Thread shveta malik
On Wed, Jun 4, 2025 at 3:40 PM shveta malik wrote: > > On Wed, Jun 4, 2025 at 6:41 AM Masahiko Sawada wrote: > > > > On Tue, May 20, 2025 at 9:54 PM Amit Kapila wrote: > > > > > > Yeah, I find the idea that the presence of a logical slot will allow >

Re: Conflict detection for update_deleted in logical replication

2025-06-05 Thread shveta malik
On Wed, Jun 4, 2025 at 4:12 PM Zhijie Hou (Fujitsu) wrote: > > Here is the V33 patch set which includes the following changes: > Thank You for the patches, please find few comments for patch003: 1) + /* + * Skip the track_commit_timestamp check by passing it as + * true, since it has already bee

Re: synchronized_standby_slots used in logical replication

2025-06-05 Thread shveta malik
On Wed, Jun 4, 2025 at 4:01 PM Fabrice Chapuis wrote: > > Hi, > > I'm working with logical replication in a PostgreSQL 17 setup, and I'm > exploring the new synchronized_standby_slots parameter to make replication > slots failover safe in a highly available environment using physical standby >

Re: Conflict detection for update_deleted in logical replication

2025-06-04 Thread shveta malik
On Mon, Jun 2, 2025 at 12:09 PM Amit Kapila wrote: > > On Mon, May 26, 2025 at 12:46 PM Zhijie Hou (Fujitsu) > wrote: > > > > Attaching the V32 patch set which addressed comments in [1]~[5]. > > > > Review comments: > === > * > +advance_conflict_slot_xmin(FullTransactionId new_xmin) >

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-06-04 Thread shveta malik
On Wed, Jun 4, 2025 at 6:41 AM Masahiko Sawada wrote: > > On Tue, May 20, 2025 at 9:54 PM Amit Kapila wrote: > > > > Yeah, I find the idea that the presence of a logical slot will allow > > the user to enable logical decoding/replication more appealing than > > this new alternative, leaving aside

Re: Logical Replication of sequences

2025-06-02 Thread shveta malik
On Thu, May 29, 2025 at 8:09 PM vignesh C wrote: > These comments are handled in the attached v2025029 version patch. > Thanks for the patches. I am still reviewing but please find few comments: 1) Only persistent sequences are included in the publication. Temporary sequences a

Re: Conflict detection for update_deleted in logical replication

2025-05-29 Thread shveta malik
On Tue, May 27, 2025 at 3:59 PM shveta malik wrote: > > On Mon, May 26, 2025 at 12:46 PM Zhijie Hou (Fujitsu) > wrote: > > > > Attaching the V32 patch set which addressed comments in [1]~[5]. > > Thanks for the patch, I am still reviewing the patches, please find

Re: Replication slot is not able to sync up

2025-05-29 Thread shveta malik
On Wed, May 28, 2025 at 11:56 AM Masahiko Sawada wrote: > > > I didn't know it was intended for testing and debugging purposes so > clearilying it in the documentation would be a good idea. I have added the suggested docs in v3. thanks Shveta v3-0001-Improve-log-messages-and-docs-for-slotsync.

Re: Conflict detection for update_deleted in logical replication

2025-05-27 Thread shveta malik
On Mon, May 26, 2025 at 12:46 PM Zhijie Hou (Fujitsu) wrote: > > Attaching the V32 patch set which addressed comments in [1]~[5]. Thanks for the patch, I am still reviewing the patches, please find few trivial comments for patch001: 1) + FullTransactionId last_phase_at; /* publisher transaction

Re: Replication slot is not able to sync up

2025-05-26 Thread shveta malik
On Mon, May 26, 2025 at 12:02 PM shveta malik wrote: > > Agree that log messages need improvement. Please find the patch > attached for the same. I also intend to update the docs in this area > for users to understand this feature better, and will work on that > soon. > PFA

Re: Replication slot is not able to sync up

2025-05-25 Thread shveta malik
On Sat, May 24, 2025 at 10:37 AM Amit Kapila wrote: > If the > > problem is that we're not able to create a slot on the standby at an > > old enough LSN or XID position to permit its use with the > > corresponding slot on the master, it should be reported that way. > > > > That is the case, and w

Re: Conflict detection for update_deleted in logical replication

2025-05-22 Thread shveta malik
Thanks you for v31 patch-set. Please find few comments on patch001: 1) wait_for_local_flush: + if (data->last_recv_time && + TimestampDifferenceExceeds(data->flushpos_update_time, +data->last_recv_time, WalWriterDelay)) + { + XLogRecPtr writepos; + XLogRecPtr flushpos; + bool have_pending_tx

Re: Logical Replication of sequences

2025-05-21 Thread shveta malik
On Tue, May 20, 2025 at 11:13 AM Peter Smith wrote: > > > Test-scenario: > > --Created 250 sequences on both pub and sub. > > --There were 10 sequences mismatched. > > --Sequence replication worked as expected. Logs look better now: > > > > LOG: Logical replication sequence synchronization for su

Re: Conflict detection for update_deleted in logical replication

2025-05-20 Thread shveta malik
On Tue, May 20, 2025 at 8:38 AM shveta malik wrote: > > Please find few more comments: > > 1) > ProcessStandbyPSRequestMessage: > + /* > + * This shouldn't happen because we don't support getting primary status > + * message from standby. > + */ > + if (Re

Re: Conflict detection for update_deleted in logical replication

2025-05-20 Thread shveta malik
On Tue, May 20, 2025 at 10:24 AM Amit Kapila wrote: > > On Tue, May 20, 2025 at 8:38 AM shveta malik wrote: > > > > Please find few more comments: > > > > 1) > > ProcessStandbyPSRequestMessage: > > + /* > > + * This shouldn't happen because we

Re: Logical Replication of sequences

2025-05-19 Thread shveta malik
On Tue, May 20, 2025 at 8:35 AM Nisha Moond wrote: > > > > > Thanks for the comments, these are handled in the attached v20250516 > > version patch. > > > > Thanks for the patches. Here are my review comments - > > Patch-0004: src/backend/replication/logical/sequencesync.c > > The sequence count l

Re: Conflict detection for update_deleted in logical replication

2025-05-19 Thread shveta malik
Please find few more comments: 1) ProcessStandbyPSRequestMessage: + /* + * This shouldn't happen because we don't support getting primary status + * message from standby. + */ + if (RecoveryInProgress()) + elog(ERROR, "the primary status is unavailable during recovery"); a) This error is not cle

Re: Conflict detection for update_deleted in logical replication

2025-05-16 Thread shveta malik
On Fri, May 16, 2025 at 12:17 PM Amit Kapila wrote: > > On Fri, Apr 25, 2025 at 10:08 AM shveta malik wrote: > > > > On Thu, Apr 24, 2025 at 6:11 PM Zhijie Hou (Fujitsu) > > wrote: > > > > > > Few comments for patch004: > > > > Config.sgml

Re: Conflict detection for update_deleted in logical replication

2025-05-15 Thread shveta malik
On Fri, May 16, 2025 at 11:15 AM Amit Kapila wrote: > > On Fri, Apr 25, 2025 at 4:06 PM shveta malik wrote: > > > > 2) > > in wait_for_local_flush(), we have > > should_stop_conflict_info_retention() before 'AllTablesyncsReady' > > check. Should we

Re: Conflict detection for update_deleted in logical replication

2025-05-15 Thread shveta malik
On Thu, May 15, 2025 at 6:02 PM Amit Kapila wrote: > > On Fri, Apr 25, 2025 at 4:06 PM shveta malik wrote: > > > > > > > > Here is V30 patch set includes the following changes: > > > > > > > Thank You for the patch, please find few concerns: >

Backward movement of confirmed_flush resulting in data duplication.

2025-05-13 Thread shveta malik
Hi All, It is a spin-off thread from earlier discussions at [1] and [2]. While analyzing the slot-sync BF failure as stated in [1], it was observed that there are chances that confirmed_flush_lsn may move backward depending on the feedback messages received from the downstream system. It was susp

Re: Fix slot synchronization with two_phase decoding enabled

2025-05-12 Thread shveta malik
On Sat, May 10, 2025 at 4:59 PM Amit Kapila wrote: > > On Tue, May 6, 2025 at 4:52 PM Zhijie Hou (Fujitsu) > wrote: > > > > On Mon, May 5, 2025 at 6:59 PM Amit Kapila wrote: > > > > > > > > > Yes, this is possible. Here is my theory as to how it can happen in the > > > current > > > case. In the

Re: Logical Replication of sequences

2025-05-09 Thread shveta malik
On Sat, May 3, 2025 at 7:27 PM vignesh C wrote: > > > > > Thanks for the comments, the updated patch has the changes for the same. > Thanks for the patches. Please find few comments: 1) patch004 commit msg: - Drop published sequences are removed from pg_subscription_rel. Drop -->Dropped 2) c

Re: Fix slot synchronization with two_phase decoding enabled

2025-05-07 Thread shveta malik
On Wed, May 7, 2025 at 4:36 PM Nisha Moond wrote: > > > Attached is the v13 patch with the above comments addressed. > > -- Thanks for the patch. I think we can have the restriction mentioned under the 'two_phase' section as well along with the 'failover' section in the CREATE SUBSCRIPTION doc,

Re: Fix slot synchronization with two_phase decoding enabled

2025-05-06 Thread shveta malik
On Mon, May 5, 2025 at 3:29 PM Nisha Moond wrote: > > Please find the v12 patch with above suggested changes. > Thanks for the patch. Few comments for doc changes: 1) func.sgml - pg_create_logical_replication_slot: +failover. The parameters twophase and +failover cannot be enabl

Re: Fix slot synchronization with two_phase decoding enabled

2025-05-02 Thread shveta malik
On Fri, May 2, 2025 at 12:57 PM Nisha Moond wrote: > > > Please find the v11 patch addressing the above points and all other > comments. I have also optimized the test by reducing the number of > subscriptions and slots. > Thanks for the patch. Few comments: 1) pg_upgrade/t/003_logical_slots.pl

Re: Conflict detection for update_deleted in logical replication

2025-04-29 Thread shveta malik
On Fri, Apr 25, 2025 at 4:05 PM shveta malik wrote: > > > > > Here is V30 patch set includes the following changes: > > > > Thank You for the patch, please find few concerns: > Please find few more concerns: 3) In get_candidate_xid(), we first set candidate_xid_tim

Re: Fix slot synchronization with two_phase decoding enabled

2025-04-29 Thread shveta malik
On Mon, Apr 28, 2025 at 4:33 PM Nisha Moond wrote: > > Please find the v9 patch, addressing the above and all other comments as well. > Thanks for the patch. 1) + The default is false. This option cannot be set together with + two_phase when creating the slot. However, once +

Re: Fix slot synchronization with two_phase decoding enabled

2025-04-28 Thread shveta malik
On Mon, Apr 28, 2025 at 2:27 PM Zhijie Hou (Fujitsu) wrote: > > On Fri, Apr 18, 2025 at 12:29 PM Amit Kapila wrote: > > > > On Thu, Apr 17, 2025 at 6:14 PM Zhijie Hou (Fujitsu) > > > > > > > > - > > > Fix > > > - > > > > > > I think we should keep the confirmed_flush even if the previous

Re: Fix slot synchronization with two_phase decoding enabled

2025-04-27 Thread shveta malik
On Fri, Apr 25, 2025 at 5:53 PM Nisha Moond wrote: > > Please find the attached v8 patch with above comments addressed. > This version includes the documentation updates suggested by > Sawada-san at [1], and incorporates his feedback from [2] as well. > Thanks for the patches. 1) Regarding docu

Re: Conflict detection for update_deleted in logical replication

2025-04-25 Thread shveta malik
> > Here is V30 patch set includes the following changes: > Thank You for the patch, please find few concerns: 1) By looking at code of ApplyLauncherMain(), it appears that we stopped advancing shared-slot's xmin if any of the subscriptions with retain_conflict_info is disabled. If a subscription

Re: Conflict detection for update_deleted in logical replication

2025-04-24 Thread shveta malik
On Thu, Apr 24, 2025 at 6:11 PM Zhijie Hou (Fujitsu) wrote: > > Few comments for patch004: > > Config.sgml: > > 1) > > + > > +Maximum duration (in milliseconds) for which conflict > > +information can be retained for conflict detection by the apply > > worker. > > +

Re: Fix slot synchronization with two_phase decoding enabled

2025-04-24 Thread shveta malik
On Thu, Apr 24, 2025 at 2:54 PM Nisha Moond wrote: > > Please find the updated patch for Approach 3, which implements the > idea suggested by Swada-san above. > Thank You for the patch. 1) CreateDecodingContext: if (ctx->twophase && !slot->data.two_phase) { + /* + * Do not allow two-phase

Re: Fix premature xmin advancement during fast forward decoding

2025-04-22 Thread shveta malik
On Tue, Apr 22, 2025 at 12:36 PM Zhijie Hou (Fujitsu) wrote: > > Hi, > > To fix this, I think we can allow the base snapshot to be built during fast > forward decoding, as implemented in the patch 0001 (We already built base > snapshot in fast-forward mode for logical message in logicalmsg_decode(

Re: Fix slot synchronization with two_phase decoding enabled

2025-04-22 Thread shveta malik
On Fri, Apr 11, 2025 at 1:03 PM Nisha Moond wrote: > > > Patch "v5_aprch_3-0001" implements the above Approach 3. > > Thanks Hou-san for implementing approach-2 and providing the patch. > I find Approach 2 better than Approach1. Yet to review Approach3. Please find my initial comments: Approach

Re: Conflict detection for update_deleted in logical replication

2025-04-17 Thread shveta malik
On Wed, Apr 16, 2025 at 10:30 AM shveta malik wrote: > > On Wed, Mar 26, 2025 at 4:17 PM Zhijie Hou (Fujitsu) > wrote: > > > > Here's a rebased version of the patch series. > > > Few comments for patch004: Config.sgml: 1) + +Maximum duration (

Re: Conflict detection for update_deleted in logical replication

2025-04-15 Thread shveta malik
On Wed, Mar 26, 2025 at 4:17 PM Zhijie Hou (Fujitsu) wrote: > > Here's a rebased version of the patch series. > Thanks Hou-San for the patches. I am going through this long thread and patches. One doubt I have is whenever there is a chance of conflict-slot update (either xmin or possibility of it

Re: Conflict Detection and Resolution

2024-10-20 Thread shveta malik
On Fri, Oct 18, 2024 at 4:30 PM Zhijie Hou (Fujitsu) wrote: > > On Wednesday, October 9, 2024 2:34 PM shveta malik > wrote: > > > > On Wed, Oct 9, 2024 at 8:58 AM shveta malik > > wrote: > > > > > > On Tue, Oct 8, 2024 at 3:12 PM Nisha Moond >

Re: Conflict Detection and Resolution

2024-10-08 Thread shveta malik
On Wed, Oct 9, 2024 at 8:58 AM shveta malik wrote: > > On Tue, Oct 8, 2024 at 3:12 PM Nisha Moond wrote: > > > Please find few comments on v14-patch004: patch004: 1) GetConflictResolver currently errors out when the resolver is last_update_wins and track_commit_timestamp is dis

Re: Conflict Detection and Resolution

2024-10-08 Thread shveta malik
On Tue, Oct 8, 2024 at 3:12 PM Nisha Moond wrote: > I have not started reviewing v15 yet, but here are few comments for v14-patch003: 1) In apply_handle_update_internal(), I see that FindReplTupleInLocalRel() used to lock the row to be updated in exclusive mode, but now since we are avoiding thi

Re: Make default subscription streaming option as Parallel

2024-10-08 Thread shveta malik
On Tue, Oct 8, 2024 at 3:38 PM Amit Kapila wrote: > > On Tue, Oct 8, 2024 at 2:25 PM shveta malik wrote: > > > > On Mon, Oct 7, 2024 at 4:03 PM vignesh C wrote: > > > > > > > With parallel streaming as default, do you think there is

Re: Make default subscription streaming option as Parallel

2024-10-08 Thread shveta malik
On Mon, Oct 7, 2024 at 4:03 PM vignesh C wrote: > With parallel streaming as default, do you think there is a need to increase the default for 'max_logical_replication_workers' as IIUC parallel workers are taken from the same pool. thanks Shveta

Re: Logical Replication of sequences

2024-10-04 Thread shveta malik
On Sun, Sep 29, 2024 at 12:34 PM vignesh C wrote: > > On Thu, 26 Sept 2024 at 11:07, shveta malik wrote: > > > > On Fri, Sep 20, 2024 at 9:36 AM vignesh C wrote: > > > > > > On Wed, 21 Aug 2024 at 11:54, vignesh C wrote: > > > > > >

Re: Conflict Detection and Resolution

2024-10-01 Thread shveta malik
On Tue, Oct 1, 2024 at 9:54 AM shveta malik wrote: > > On Tue, Oct 1, 2024 at 9:48 AM shveta malik wrote: > > > > I have started reviewing patch002, it is WIP, but please find initial > set of comments: > Please find second set of comments for patch002: 9) can_create_fu

Re: Conflict Detection and Resolution

2024-09-30 Thread shveta malik
On Tue, Oct 1, 2024 at 9:48 AM shveta malik wrote: > I have started reviewing patch002, it is WIP, but please find initial set of comments: 1. ExecSimpleRelationInsert(): + /* Check for conflict and return to caller for resolution if found */ + if (resolver != CR_ER

Re: Conflict Detection and Resolution

2024-09-30 Thread shveta malik
On Mon, Sep 30, 2024 at 2:55 PM Peter Smith wrote: > > On Mon, Sep 30, 2024 at 4:29 PM shveta malik wrote: > > > > On Mon, Sep 30, 2024 at 11:04 AM Peter Smith wrote: > > > > > > On Mon, Sep 30, 2024 at 2:27 PM shveta malik > > > wrote: > >

Re: Conflict Detection and Resolution

2024-09-30 Thread shveta malik
On Fri, Sep 27, 2024 at 2:33 PM shveta malik wrote: > > On Fri, Sep 27, 2024 at 10:44 AM shveta malik wrote: > > > > > > > > > > Thanks for the review. > > > > Here is the v14 patch-set fixing review comments in [1] and [2]. > > > > >

Re: Conflict Detection and Resolution

2024-09-29 Thread shveta malik
On Mon, Sep 30, 2024 at 11:04 AM Peter Smith wrote: > > On Mon, Sep 30, 2024 at 2:27 PM shveta malik wrote: > > > > On Fri, Sep 27, 2024 at 1:00 PM Peter Smith wrote: > ... > > > > > > 13. General - ordering of conflict_type. > > > > > >

Re: Conflict Detection and Resolution

2024-09-29 Thread shveta malik
On Fri, Sep 27, 2024 at 1:00 PM Peter Smith wrote: > > Here are some review comments for v14-0001. > > This is a WIP, but here are my comments for all the SGML parts. > > (There will be some overlap here with comments already posted by Shveta) > > == > 1. file modes after applying the patch >

Re: Conflict Detection and Resolution

2024-09-27 Thread shveta malik
On Fri, Sep 27, 2024 at 10:44 AM shveta malik wrote: > > > > > > > Thanks for the review. > > > Here is the v14 patch-set fixing review comments in [1] and [2]. > > > > > > > Thanks for the patches. I am reviewing patch001, it is WIP, but ple

Re: Conflict Detection and Resolution

2024-09-26 Thread shveta malik
On Thu, Sep 26, 2024 at 2:57 PM shveta malik wrote: > > On Fri, Sep 20, 2024 at 8:40 AM Nisha Moond wrote: > > > > Thanks for the review. > > Here is the v14 patch-set fixing review comments in [1] and [2]. > > > > Thanks for the patches. I am reviewing pa

Re: Conflict Detection and Resolution

2024-09-26 Thread shveta malik
On Fri, Sep 20, 2024 at 8:40 AM Nisha Moond wrote: > > Thanks for the review. > Here is the v14 patch-set fixing review comments in [1] and [2]. > Thanks for the patches. I am reviewing patch001, it is WIP, but please find initial set of comments: 1) Please see these 2 errors: postgres=# create

Re: Logical Replication of sequences

2024-09-25 Thread shveta malik
On Fri, Sep 20, 2024 at 9:36 AM vignesh C wrote: > > On Wed, 21 Aug 2024 at 11:54, vignesh C wrote: > > > > On Wed, 21 Aug 2024 at 08:33, Peter Smith wrote: > > > > > > Hi Vignesh, Here are my only review comments for the latest patch set. > > > > Thanks, these issues have been addressed in the

Re: Add contrib/pg_logicalsnapinspect

2024-09-25 Thread shveta malik
On Wed, Sep 25, 2024 at 11:01 PM Bertrand Drouvot wrote: > > Hi, > > On Wed, Sep 25, 2024 at 11:23:17AM +0530, shveta malik wrote: > > + OUT catchange_xip xid[] > > > > One question, what is xid datatype, is it too int8? Sorry, could not > > find the correct

Re: Add contrib/pg_logicalsnapinspect

2024-09-24 Thread shveta malik
On Tue, Sep 24, 2024 at 10:23 PM Bertrand Drouvot wrote: > > Hi, > > On Tue, Sep 24, 2024 at 09:15:31AM +0530, shveta malik wrote: > > On Fri, Sep 20, 2024 at 12:22 PM Bertrand Drouvot > > wrote: > > > > > > > > > Please find attached v8, that:

Re: Add contrib/pg_logicalsnapinspect

2024-09-23 Thread shveta malik
On Mon, Sep 23, 2024 at 7:57 AM Peter Smith wrote: > > My review comments for v8-0001 > > == > contrib/pg_logicalinspect/pg_logicalinspect.c > > 1. > +/* > + * Lookup table for SnapBuildState. > + */ > + > +#define SNAPBUILD_STATE_INCR 1 > + > +static const char *const SnapBuildStateDesc[] = {

Re: Add contrib/pg_logicalsnapinspect

2024-09-23 Thread shveta malik
On Fri, Sep 20, 2024 at 12:22 PM Bertrand Drouvot wrote: > > > Please find attached v8, that: > Thank You for the patch. In one of my tests, I noticed that I got negative checksum: postgres=# SELECT * FROM pg_get_logical_snapshot_meta('0/3481F20'); magic| checksum | version

Re: Allow logical failover slots to wait on synchronous replication

2024-09-20 Thread shveta malik
On Thu, Sep 19, 2024 at 12:02 PM Amit Kapila wrote: > > On Tue, Sep 17, 2024 at 9:08 AM shveta malik wrote: > > > > On Mon, Sep 16, 2024 at 4:04 PM Amit Kapila wrote: > > > > > > On Mon, Sep 16, 2024 at 2:55 PM shveta malik > > > wrote: > >

Re: Conflict Detection and Resolution

2024-09-19 Thread shveta malik
On Thu, Sep 19, 2024 at 5:43 PM vignesh C wrote: > > > > > I was reviewing the CONFLICT RESOLVER (insert_exists='apply_remote') > and found that one conflict remains unresolved in the following > scenario: Thanks for the review and testing. > Pub: > CREATE TABLE circles(c1 CIRCLE, c2 text, EXCLU

Re: Add contrib/pg_logicalsnapinspect

2024-09-18 Thread shveta malik
On Thu, Sep 19, 2024 at 12:17 AM Bertrand Drouvot wrote: > > Hi, > > Thanks for the review! > Thanks for the patch. Should we include in the document who can execute these functions and the required access permissions, similar to how it's done for pgwalinspect, pg_ls_logicalmapdir(), and other s

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-09-18 Thread shveta malik
On Wed, Sep 18, 2024 at 3:31 PM shveta malik wrote: > > On Wed, Sep 18, 2024 at 2:49 PM shveta malik wrote: > > > > > > Please find the attached v46 patch having changes for the above review > > > > comments and your test review comments and Shveta's re

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-09-18 Thread shveta malik
On Wed, Sep 18, 2024 at 2:49 PM shveta malik wrote: > > > > Please find the attached v46 patch having changes for the above review > > > comments and your test review comments and Shveta's review comments. > > > When the synced slot is marked as 'inactive

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-09-18 Thread shveta malik
On Wed, Sep 18, 2024 at 12:21 PM shveta malik wrote: > > On Mon, Sep 16, 2024 at 3:31 PM Bharath Rupireddy > wrote: > > > > Hi, > > > > > > Please find the attached v46 patch having changes for the above review > > comments and your test

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-09-17 Thread shveta malik
On Mon, Sep 16, 2024 at 3:31 PM Bharath Rupireddy wrote: > > Hi, > > > Please find the attached v46 patch having changes for the above review > comments and your test review comments and Shveta's review comments. > Thanks for addressing comments. Is there a reason that we don't support this inva

Re: Add contrib/pg_logicalsnapinspect

2024-09-17 Thread shveta malik
On Tue, Sep 17, 2024 at 12:44 PM Bertrand Drouvot wrote: > > Hi, > > On Tue, Sep 17, 2024 at 10:18:35AM +0530, shveta malik wrote: > > Thanks for addressing the comments. I have not started reviewing v4 > > yet, but here are few more comments on v3: > > > >

Re: Add contrib/pg_logicalsnapinspect

2024-09-17 Thread shveta malik
On Tue, Sep 17, 2024 at 10:46 AM David G. Johnston wrote: > > > > On Monday, September 16, 2024, shveta malik wrote: >> >> On Tue, Sep 17, 2024 at 10:18 AM shveta malik wrote: >> > >> > Thanks for addressing the comments. I have not started reviewing v

Re: Add contrib/pg_logicalsnapinspect

2024-09-16 Thread shveta malik
On Tue, Sep 17, 2024 at 10:18 AM shveta malik wrote: > > Thanks for addressing the comments. I have not started reviewing v4 > yet, but here are few more comments on v3: > I just noticed that when we pass NULL input, both the new functions give 1 row as output, all cols as NULL: new

Re: Add contrib/pg_logicalsnapinspect

2024-09-16 Thread shveta malik
On Mon, Sep 16, 2024 at 8:03 PM Bertrand Drouvot wrote: > > Hi, > > On Mon, Sep 16, 2024 at 04:02:51PM +0530, shveta malik wrote: > > On Wed, Sep 11, 2024 at 4:21 PM Bertrand Drouvot > > wrote: > > > > > > > > > Yeah, good idea. Done that way

Re: Allow logical failover slots to wait on synchronous replication

2024-09-16 Thread shveta malik
On Mon, Sep 16, 2024 at 4:04 PM Amit Kapila wrote: > > On Mon, Sep 16, 2024 at 2:55 PM shveta malik wrote: > > > > On Mon, Sep 16, 2024 at 11:13 AM Amit Kapila > > wrote: > > > > > > > > Another question aside from the above point, what if so

Re: Add contrib/pg_logicalsnapinspect

2024-09-16 Thread shveta malik
On Wed, Sep 11, 2024 at 4:21 PM Bertrand Drouvot wrote: > > > Yeah, good idea. Done that way in v3 attached. > Thanks for the patch. +1 on the patch's idea. I have started reviewing/testing it. It is WIP but please find few initial comments: src/backend/replication/logical/snapbuild.c: 1) + fsy

Re: Allow logical failover slots to wait on synchronous replication

2024-09-16 Thread shveta malik
On Mon, Sep 16, 2024 at 11:13 AM Amit Kapila wrote: > > On Fri, Sep 13, 2024 at 3:13 PM shveta malik wrote: > > > > On Thu, Sep 12, 2024 at 3:04 PM shveta malik wrote: > > > > > > On Wed, Sep 11, 2024 at 2:40 AM John H wrote: > > > > > > &g

Re: Allow logical failover slots to wait on synchronous replication

2024-09-13 Thread shveta malik
On Thu, Sep 12, 2024 at 3:04 PM shveta malik wrote: > > On Wed, Sep 11, 2024 at 2:40 AM John H wrote: > > > > Hi Shveta, > > > > On Sun, Sep 8, 2024 at 11:16 PM shveta malik wrote: > > > > > > > > I was trying to have a look at the patch a

Re: Conflict detection for update_deleted in logical replication

2024-09-13 Thread shveta malik
On Fri, Sep 13, 2024 at 11:38 AM Amit Kapila wrote: > > > > > > > So in brief, this solution is only for bidrectional setup? For > > > non-bidirectional, > > > feedback_slots is non-configurable and thus irrelevant. > > > > Right. > > > > One possible idea to address the non-bidirectional case ra

Re: Allow logical failover slots to wait on synchronous replication

2024-09-12 Thread shveta malik
On Wed, Sep 11, 2024 at 2:40 AM John H wrote: > > Hi Shveta, > > On Sun, Sep 8, 2024 at 11:16 PM shveta malik wrote: > > > > > I was trying to have a look at the patch again, it doesn't apply on > > the head, needs rebase. > > > > Reba

Re: Conflict detection for update_deleted in logical replication

2024-09-10 Thread shveta malik
On Wed, Sep 11, 2024 at 10:15 AM Zhijie Hou (Fujitsu) wrote: > > On Wednesday, September 11, 2024 12:18 PM shveta malik > wrote: > > > > On Tue, Sep 10, 2024 at 4:30 PM Zhijie Hou (Fujitsu) > > > > wrote: > > > > > > On Tuesday,

Re: Conflict detection for update_deleted in logical replication

2024-09-10 Thread shveta malik
On Tue, Sep 10, 2024 at 4:30 PM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, September 10, 2024 5:56 PM shveta malik > wrote: > > > > On Tue, Sep 10, 2024 at 1:40 PM Zhijie Hou (Fujitsu) > > > > wrote: > > > > > > On Tuesday,

Re: Disallow altering invalidated replication slots

2024-09-10 Thread shveta malik
On Tue, Sep 10, 2024 at 11:24 PM Bharath Rupireddy wrote: > > > Please find the attached v2 patch also having Shveta's review comments > addressed. The v2 patch looks good to me. thanks Shveta

Re: Conflict detection for update_deleted in logical replication

2024-09-10 Thread shveta malik
On Tue, Sep 10, 2024 at 1:40 PM Zhijie Hou (Fujitsu) wrote: > > On Tuesday, September 10, 2024 2:45 PM shveta malik > wrote: > > > --- > > > THE DESIGN > > > --- > > > > > > To achieve the above, we plan to allow the logical walsender to &

Re: Conflict detection for update_deleted in logical replication

2024-09-09 Thread shveta malik
On Thu, Sep 5, 2024 at 5:07 PM Zhijie Hou (Fujitsu) wrote: > > > Hi hackers, > > I am starting a new thread to discuss and propose the conflict detection for > update_deleted scenarios during logical replication. This conflict occurs when > the apply worker cannot find the target tuple to be updat

Re: Disallow altering invalidated replication slots

2024-09-09 Thread shveta malik
On Tue, Sep 10, 2024 at 12:11 AM Bharath Rupireddy wrote: > > Hi, > > ALTER_REPLICATION_SLOT on invalidated replication slots is unnecessary > as there is no way to get the invalidated (logical) slot to work. > Please find the patch to add an error in such cases. Relevant > discussion is at [1]. >

  1   2   3   4   5   6   >