Re: Skip collecting decoded changes of already-aborted transactions

2025-03-17 Thread Masahiko Sawada
On Thu, Mar 13, 2025 at 10:04 PM Hayato Kuroda (Fujitsu) wrote: > > Dear hackers, > > I hope I'm in the correct thread. In abfb296, rbtxn_skip_prepared() was > removed from > SnapBuildDistributeNewCatalogSnapshot(). ISTM it was an only caller of the > function. > > Is it an intentional for exter

RE: Skip collecting decoded changes of already-aborted transactions

2025-03-13 Thread Hayato Kuroda (Fujitsu)
Dear hackers, I hope I'm in the correct thread. In abfb296, rbtxn_skip_prepared() was removed from SnapBuildDistributeNewCatalogSnapshot(). ISTM it was an only caller of the function. Is it an intentional for external projects? Or it can be removed like attached? Best regards, Hayato Kuroda FU

Re: Skip collecting decoded changes of already-aborted transactions

2025-02-12 Thread Masahiko Sawada
On Tue, Feb 11, 2025 at 9:43 PM Peter Smith wrote: > > Hi. Here are some minor comments for the v18* patch set. > > // > > Patch v18-0001 > > 1.1. Commit message > > A previously reported typo still exists: > > /noticeble/noticeable/ > > // > > Patch v18-0002 > > 2.1 > +#define RBT

Re: Skip collecting decoded changes of already-aborted transactions

2025-02-11 Thread Peter Smith
Hi. Here are some minor comments for the v18* patch set. // Patch v18-0001 1.1. Commit message A previously reported typo still exists: /noticeble/noticeable/ // Patch v18-0002 2.1 +#define RBTXN_PREPARE_STATUS_FLAGS (RBTXN_IS_PREPARED | RBTXN_SKIPPED_PREPARE | RBTXN_SENT_PR

Re: Skip collecting decoded changes of already-aborted transactions

2025-02-11 Thread Masahiko Sawada
On Mon, Feb 3, 2025 at 10:41 AM Masahiko Sawada wrote: > > On Wed, Jan 29, 2025 at 11:12 PM Peter Smith wrote: > > > > On Tue, Jan 28, 2025 at 9:26 PM Masahiko Sawada > > wrote: > > > > > > On Mon, Jan 27, 2025 at 7:01 PM Peter Smith wrote: > > > > > > ... > > > > > > To be honest, I didn't un

Re: Skip collecting decoded changes of already-aborted transactions

2025-02-03 Thread Masahiko Sawada
On Thu, Jan 30, 2025 at 7:07 PM Peter Smith wrote: > > On Fri, Jan 31, 2025 at 11:04 AM Masahiko Sawada > wrote: > > > > On Wed, Jan 29, 2025 at 9:32 PM Peter Smith wrote: > > > > > > == > > > .../replication/logical/reorderbuffer.c > > > > > > ReorderBufferCheckAndTruncateAbortedTXN: > > >

Re: Skip collecting decoded changes of already-aborted transactions

2025-02-03 Thread Masahiko Sawada
On Wed, Jan 29, 2025 at 11:12 PM Peter Smith wrote: > > On Tue, Jan 28, 2025 at 9:26 PM Masahiko Sawada wrote: > > > > On Mon, Jan 27, 2025 at 7:01 PM Peter Smith wrote: > > > > ... > > > > To be honest, I didn't understand the "CLEAR" part of that name. It > > > seems more like it should've bee

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-30 Thread Peter Smith
On Fri, Jan 31, 2025 at 11:04 AM Masahiko Sawada wrote: > > On Wed, Jan 29, 2025 at 9:32 PM Peter Smith wrote: > > > > == > > .../replication/logical/reorderbuffer.c > > > > ReorderBufferCheckAndTruncateAbortedTXN: > > > > 2. > > It seemed tricky that the only place that is setting the > > RB

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-30 Thread Masahiko Sawada
On Wed, Jan 29, 2025 at 9:32 PM Peter Smith wrote: > > Some comments for patch v17-0001. Thank you for reviewing the patch! > > == > Commit message. > > 1. > typo /noticeble/noticeable/ Fixed. > > == > .../replication/logical/reorderbuffer.c > > ReorderBufferCheckAndTruncateAbortedTXN:

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-29 Thread Peter Smith
On Tue, Jan 28, 2025 at 9:26 PM Masahiko Sawada wrote: > > On Mon, Jan 27, 2025 at 7:01 PM Peter Smith wrote: > > ... > > To be honest, I didn't understand the "CLEAR" part of that name. It > > seems more like it should've been called something like > > RBTXN_IS_SERIALIZED_ALREADY or RBTXN_IS_SE

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-29 Thread Peter Smith
Some comments for patch v17-0001. == Commit message. 1. typo /noticeble/noticeable/ == .../replication/logical/reorderbuffer.c ReorderBufferCheckAndTruncateAbortedTXN: 2. It seemed tricky that the only place that is setting the RBTXN_IS_COMMITTED flag is the function ReorderBufferCheck

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-28 Thread Masahiko Sawada
On Mon, Jan 27, 2025 at 7:01 PM Peter Smith wrote: > > On Tue, Jan 28, 2025 at 4:31 AM Masahiko Sawada wrote: > > > > On Sun, Jan 26, 2025 at 10:26 PM Amit Kapila > > wrote: > > > > > > On Fri, Jan 24, 2025 at 12:38 AM Masahiko Sawada > > > wrote: > > > > > > > > On Wed, Jan 22, 2025 at 7:35 

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-27 Thread Peter Smith
On Tue, Jan 28, 2025 at 4:31 AM Masahiko Sawada wrote: > > On Sun, Jan 26, 2025 at 10:26 PM Amit Kapila wrote: > > > > On Fri, Jan 24, 2025 at 12:38 AM Masahiko Sawada > > wrote: > > > > > > On Wed, Jan 22, 2025 at 7:35 PM Peter Smith wrote: > > > > > > > > On Thu, Jan 23, 2025 at 2:17 PM Amit

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-27 Thread Masahiko Sawada
On Sun, Jan 26, 2025 at 10:26 PM Amit Kapila wrote: > > On Fri, Jan 24, 2025 at 12:38 AM Masahiko Sawada > wrote: > > > > On Wed, Jan 22, 2025 at 7:35 PM Peter Smith wrote: > > > > > > On Thu, Jan 23, 2025 at 2:17 PM Amit Kapila > > > wrote: > > > > > > > > On Wed, Jan 22, 2025 at 9:21 AM Pet

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-26 Thread Amit Kapila
On Fri, Jan 24, 2025 at 12:38 AM Masahiko Sawada wrote: > > On Wed, Jan 22, 2025 at 7:35 PM Peter Smith wrote: > > > > On Thu, Jan 23, 2025 at 2:17 PM Amit Kapila wrote: > > > > > > On Wed, Jan 22, 2025 at 9:21 AM Peter Smith wrote: > > > > > > > > > > > > == > > > > Commit message > > > >

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-23 Thread Masahiko Sawada
On Wed, Jan 22, 2025 at 7:35 PM Peter Smith wrote: > > On Thu, Jan 23, 2025 at 2:17 PM Amit Kapila wrote: > > > > On Wed, Jan 22, 2025 at 9:21 AM Peter Smith wrote: > > > > > > > > > == > > > Commit message > > > > > > typo /RBTXN_IS_PREAPRE/RBTXN_IS_PREPARE/ > > > Will fix. > > > > > > Al

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-22 Thread Peter Smith
On Thu, Jan 23, 2025 at 2:17 PM Amit Kapila wrote: > > On Wed, Jan 22, 2025 at 9:21 AM Peter Smith wrote: > > > > On Wed, Jan 22, 2025 at 5:36 AM Masahiko Sawada > > wrote: > > > > > > On Sun, Jan 19, 2025 at 7:53 PM Amit Kapila > > > wrote: > > > > > > > > On Fri, Jan 17, 2025 at 11:19 PM Ma

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-22 Thread Amit Kapila
On Wed, Jan 22, 2025 at 9:21 AM Peter Smith wrote: > > On Wed, Jan 22, 2025 at 5:36 AM Masahiko Sawada wrote: > > > > On Sun, Jan 19, 2025 at 7:53 PM Amit Kapila wrote: > > > > > > On Fri, Jan 17, 2025 at 11:19 PM Masahiko Sawada > > > wrote: > > > > > > > > On Wed, Jan 15, 2025 at 4:43 PM Pet

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-21 Thread Peter Smith
On Wed, Jan 22, 2025 at 5:36 AM Masahiko Sawada wrote: > > On Sun, Jan 19, 2025 at 7:53 PM Amit Kapila wrote: > > > > On Fri, Jan 17, 2025 at 11:19 PM Masahiko Sawada > > wrote: > > > > > > On Wed, Jan 15, 2025 at 4:43 PM Peter Smith wrote: > > > > > > > > My thoughts are that any consistency

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-21 Thread Masahiko Sawada
On Sun, Jan 19, 2025 at 7:53 PM Amit Kapila wrote: > > On Fri, Jan 17, 2025 at 11:19 PM Masahiko Sawada > wrote: > > > > On Wed, Jan 15, 2025 at 4:43 PM Peter Smith wrote: > > > > > > My thoughts are that any consistency improvement is a step in the > > > right direction so even "don't increase

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-19 Thread Amit Kapila
On Fri, Jan 17, 2025 at 11:19 PM Masahiko Sawada wrote: > > On Wed, Jan 15, 2025 at 4:43 PM Peter Smith wrote: > > > > My thoughts are that any consistency improvement is a step in the > > right direction so even "don't increase the consistency much" is still > > better than nothing. > > I agree

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-17 Thread Masahiko Sawada
On Wed, Jan 15, 2025 at 4:43 PM Peter Smith wrote: > > On Wed, Jan 15, 2025 at 5:49 PM Amit Kapila wrote: > > > > On Wed, Jan 15, 2025 at 3:11 AM Masahiko Sawada > > wrote: > > > > > > It seems we agreed on RBTXN_IS_PREPARED and rbtxn_is_prepared(). > > > Adding 'IS' seems to clarify the transa

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-15 Thread Peter Smith
On Wed, Jan 15, 2025 at 5:49 PM Amit Kapila wrote: > > On Wed, Jan 15, 2025 at 3:11 AM Masahiko Sawada wrote: > > > > It seems we agreed on RBTXN_IS_PREPARED and rbtxn_is_prepared(). > > Adding 'IS' seems to clarify the transaction having this flag *is* a > > prepared transaction. Both other two

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-14 Thread Amit Kapila
On Wed, Jan 15, 2025 at 3:11 AM Masahiko Sawada wrote: > > It seems we agreed on RBTXN_IS_PREPARED and rbtxn_is_prepared(). > Adding 'IS' seems to clarify the transaction having this flag *is* a > prepared transaction. Both other two constants RBTXN_SENT_PREAPRE and > RBTXN_SKIPPED_PREPARE seem no

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-14 Thread Masahiko Sawada
On Mon, Jan 13, 2025 at 8:48 PM Amit Kapila wrote: > > On Tue, Jan 14, 2025 at 7:32 AM Peter Smith wrote: > > > > Hi Sawada-San. > > > > Some review comments for patch v13-0002. > > > > == > > > > I think the v12 ambiguity of RBTXN_PREPARE versus RBTXN_SENT_PREPARE > > was mostly addressed al

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-14 Thread Masahiko Sawada
On Mon, Jan 13, 2025 at 5:36 PM Peter Smith wrote: > > Hi Sawada-San. Here are some cosmetic review comments for the patch v13-0001. Thank you for reviewing the patch. > > == > Commit message > > 1. > This commit introduces an additional CLOG lookup to check the > transaction status, so the

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-13 Thread Amit Kapila
On Tue, Jan 14, 2025 at 7:32 AM Peter Smith wrote: > > Hi Sawada-San. > > Some review comments for patch v13-0002. > > == > > I think the v12 ambiguity of RBTXN_PREPARE versus RBTXN_SENT_PREPARE > was mostly addressed already by the improved comments for the macros > in patch 0001. > > Meanwhi

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-13 Thread Peter Smith
Hi Sawada-San. Some review comments for patch v13-0002. == I think the v12 ambiguity of RBTXN_PREPARE versus RBTXN_SENT_PREPARE was mostly addressed already by the improved comments for the macros in patch 0001. Meanwhile, patch v13-0002 says it is renaming constants for better consistency,

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-13 Thread Peter Smith
Hi Sawada-San. Here are some cosmetic review comments for the patch v13-0001. == Commit message 1. This commit introduces an additional CLOG lookup to check the transaction status, so the logical decoding skips further change also when it doesn't touch system catalogs if the transaction is al

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-13 Thread Masahiko Sawada
On Mon, Jan 6, 2025 at 5:52 PM Peter Smith wrote: > > Hi Sawada-San. > > Here are some review comments for the patch v12-0001. Thank you for reviewing the patch! > > == > .../replication/logical/reorderbuffer.c > > ReorderBufferCheckAndTruncateAbortedTXN: > > 1. > +/* > + * Check the transac

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-13 Thread Masahiko Sawada
On Mon, Jan 13, 2025 at 3:07 AM Amit Kapila wrote: > > On Tue, Jan 7, 2025 at 7:22 AM Peter Smith wrote: > > > > == > > src/include/replication/reorderbuffer.h > > > > 6. > > #define RBTXN_PREPARE 0x0040 > > #define RBTXN_SKIPPED_PREPARE 0x0080 > > #define RBTXN_HAS_STREAMAB

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-13 Thread Amit Kapila
On Tue, Jan 7, 2025 at 7:22 AM Peter Smith wrote: > > == > src/include/replication/reorderbuffer.h > > 6. > #define RBTXN_PREPARE 0x0040 > #define RBTXN_SKIPPED_PREPARE 0x0080 > #define RBTXN_HAS_STREAMABLE_CHANGE 0x0100 > +#define RBTXN_SENT_PREPARE 0x0200 > +#define RBTXN_I

Re: Skip collecting decoded changes of already-aborted transactions

2025-01-06 Thread Peter Smith
Hi Sawada-San. Here are some review comments for the patch v12-0001. == .../replication/logical/reorderbuffer.c ReorderBufferCheckAndTruncateAbortedTXN: 1. +/* + * Check the transaction status by looking CLOG and discard all changes if + * the transaction is aborted. The transaction status

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-19 Thread Masahiko Sawada
On Thu, Dec 19, 2024 at 9:36 PM Amit Kapila wrote: > > On Fri, Dec 20, 2024 at 12:42 AM Masahiko Sawada > wrote: > > > > On Thu, Dec 19, 2024 at 2:56 AM Amit Kapila wrote: > > > > > > > > > @@ -2067,7 +2143,7 @@ ReorderBufferResetTXN(ReorderBuffer *rb, > > > ReorderBufferTXN *txn, > > > Reo

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-19 Thread Amit Kapila
On Fri, Dec 20, 2024 at 12:42 AM Masahiko Sawada wrote: > > On Thu, Dec 19, 2024 at 2:56 AM Amit Kapila wrote: > > > > > > @@ -2067,7 +2143,7 @@ ReorderBufferResetTXN(ReorderBuffer *rb, > > ReorderBufferTXN *txn, > > ReorderBufferChange *specinsert) > > { > > /* Discard the changes that we

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-19 Thread Masahiko Sawada
On Thu, Dec 19, 2024 at 2:56 AM Amit Kapila wrote: > > On Thu, Dec 19, 2024 at 7:14 AM Masahiko Sawada wrote: > > > > On Mon, Dec 9, 2024 at 9:09 PM Amit Kapila wrote: > > > > > > On Tue, Nov 26, 2024 at 3:03 AM Masahiko Sawada > > > wrote: > > > > > > > > I've attached a new version patch tha

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-19 Thread Amit Kapila
On Thu, Dec 19, 2024 at 7:14 AM Masahiko Sawada wrote: > > On Mon, Dec 9, 2024 at 9:09 PM Amit Kapila wrote: > > > > On Tue, Nov 26, 2024 at 3:03 AM Masahiko Sawada > > wrote: > > > > > > I've attached a new version patch that incorporates all comments I got so > > > far. > > > > > > > Review

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-18 Thread Masahiko Sawada
On Mon, Dec 9, 2024 at 9:09 PM Amit Kapila wrote: > > On Tue, Nov 26, 2024 at 3:03 AM Masahiko Sawada wrote: > > > > I've attached a new version patch that incorporates all comments I got so > > far. > > > > Review comments: Thank you for reviewing the patch! > === > 1. > + * The g

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-17 Thread Amit Kapila
On Sun, Dec 15, 2024 at 10:45 AM Dilip Kumar wrote: > > On Fri, Dec 13, 2024 at 3:01 AM Masahiko Sawada wrote: > > > > DDLs write not only XLOG_XACT_INVALIDATIONS but also system catalog > > changes. I think that when decoding these system catalog changes, we > > end up calling SnapBuildProcessCh

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-14 Thread Dilip Kumar
On Fri, Dec 13, 2024 at 3:01 AM Masahiko Sawada wrote: > > DDLs write not only XLOG_XACT_INVALIDATIONS but also system catalog > changes. I think that when decoding these system catalog changes, we > end up calling SnapBuildProcessChange(). I understand that decoding > XLOG_XACT_INVALIDATIONS does

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-12 Thread Masahiko Sawada
On Wed, Dec 11, 2024 at 10:01 PM Dilip Kumar wrote: > > On Thu, Dec 12, 2024 at 11:08 AM Amit Kapila wrote: > > > > On Wed, Dec 11, 2024 at 8:21 AM Dilip Kumar wrote: > > > > > > On Wed, Dec 11, 2024 at 3:18 AM Masahiko Sawada > > > wrote: > > > > > > > > On Mon, Dec 9, 2024 at 10:19 PM Dilip

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-11 Thread Dilip Kumar
On Thu, Dec 12, 2024 at 11:08 AM Amit Kapila wrote: > > On Wed, Dec 11, 2024 at 8:21 AM Dilip Kumar wrote: > > > > On Wed, Dec 11, 2024 at 3:18 AM Masahiko Sawada > > wrote: > > > > > > On Mon, Dec 9, 2024 at 10:19 PM Dilip Kumar wrote: > > > > > > > > > > > > If the largest transaction is non

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-11 Thread Amit Kapila
On Wed, Dec 11, 2024 at 8:21 AM Dilip Kumar wrote: > > On Wed, Dec 11, 2024 at 3:18 AM Masahiko Sawada wrote: > > > > On Mon, Dec 9, 2024 at 10:19 PM Dilip Kumar wrote: > > > > > > > > > If the largest transaction is non-streamable, won't the transaction > > > > returned by ReorderBufferLargestT

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-10 Thread Dilip Kumar
On Wed, Dec 11, 2024 at 3:18 AM Masahiko Sawada wrote: > > On Mon, Dec 9, 2024 at 10:19 PM Dilip Kumar wrote: > > > > > > If the largest transaction is non-streamable, won't the transaction > > > returned by ReorderBufferLargestTXN() in the other case already > > > suffice the need? > > > > I se

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-10 Thread Masahiko Sawada
On Mon, Dec 9, 2024 at 10:19 PM Dilip Kumar wrote: > > On Tue, Dec 10, 2024 at 11:09 AM Amit Kapila wrote: > > > > On Tue, Dec 10, 2024 at 10:59 AM Dilip Kumar wrote: > > > > > > On Tue, Nov 26, 2024 at 3:02 AM Masahiko Sawada > > > wrote: > > > > > > > > > > > I've attached a new version patc

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-09 Thread Dilip Kumar
On Tue, Dec 10, 2024 at 11:09 AM Amit Kapila wrote: > > On Tue, Dec 10, 2024 at 10:59 AM Dilip Kumar wrote: > > > > On Tue, Nov 26, 2024 at 3:02 AM Masahiko Sawada > > wrote: > > > > > > > > I've attached a new version patch that incorporates all comments I got so > > > far. > > > > > > I thin

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-09 Thread Amit Kapila
On Tue, Dec 10, 2024 at 10:39 AM Amit Kapila wrote: > > 5. > +/* > + * Check the transaction status by looking CLOG and discard all changes if > + * the transaction is aborted. The transaction status is cached in > + * txn->txn_flags so we can skip future changes and avoid CLOG lookups on the > +

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-09 Thread Amit Kapila
On Tue, Dec 10, 2024 at 10:59 AM Dilip Kumar wrote: > > On Tue, Nov 26, 2024 at 3:02 AM Masahiko Sawada wrote: > > > > > I've attached a new version patch that incorporates all comments I got so > > far. > > > > I think the patch is in good shape but I'm considering whether we > > might want to

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-09 Thread Dilip Kumar
On Tue, Nov 26, 2024 at 3:02 AM Masahiko Sawada wrote: > > I've attached a new version patch that incorporates all comments I got so far. > > I think the patch is in good shape but I'm considering whether we > might want to call ReorderBufferToastReset() after truncating all > changes, in Reorder

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-09 Thread Amit Kapila
On Tue, Nov 26, 2024 at 3:03 AM Masahiko Sawada wrote: > > I've attached a new version patch that incorporates all comments I got so far. > Review comments: === 1. + * The given transaction is marked as streamed if appropriate and the caller + * requested it by passing 'mark_txn_strea

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-09 Thread Masahiko Sawada
On Tue, Nov 26, 2024 at 10:01 PM vignesh C wrote: > > On Tue, 26 Nov 2024 at 02:58, Masahiko Sawada wrote: > > > > On Mon, Nov 18, 2024 at 11:12 PM vignesh C wrote: > > > > > > > > > Few comments: > > > > Thank you for reviewing the patch! > > > > > 1) Should we have the Assert inside ReorderBuf

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-26 Thread vignesh C
On Tue, 26 Nov 2024 at 02:58, Masahiko Sawada wrote: > > On Mon, Nov 18, 2024 at 11:12 PM vignesh C wrote: > > > > > > Few comments: > > Thank you for reviewing the patch! > > > 1) Should we have the Assert inside ReorderBufferTruncateTXNIfAborted > > instead of having it at multiple callers, Reo

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-25 Thread Masahiko Sawada
On Sun, Nov 24, 2024 at 8:50 PM Peter Smith wrote: > > Hi, Here are my review comments for patch v9-0001. > > These are only trivial nits for some code comments. Everything else > looked good to me. > > == > .../replication/logical/reorderbuffer.c > > ReorderBufferTruncateTXN: > > 1. > + * The

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-25 Thread Masahiko Sawada
On Mon, Nov 18, 2024 at 11:12 PM vignesh C wrote: > > > Few comments: Thank you for reviewing the patch! > 1) Should we have the Assert inside ReorderBufferTruncateTXNIfAborted > instead of having it at multiple callers, ReorderBufferResetTXN also > has the Assert inside the function after trunc

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-24 Thread Peter Smith
Hi, Here are my review comments for patch v9-0001. These are only trivial nits for some code comments. Everything else looked good to me. == .../replication/logical/reorderbuffer.c ReorderBufferTruncateTXN: 1. + * The given transaction is marked as streamed if appropriate and the caller + *

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-18 Thread vignesh C
On Fri, 15 Nov 2024 at 23:32, Masahiko Sawada wrote: > > On Thu, Nov 14, 2024 at 7:07 PM Peter Smith wrote: > > > > Hi Sawada-Sn, > > > > Here are some review comments for patch v8-0001. > > Thank you for the comments. > > > > > == > > contrib/test_decoding/sql/stats.sql > > > > 1. > > +-- Th

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-15 Thread Masahiko Sawada
On Thu, Nov 14, 2024 at 7:07 PM Peter Smith wrote: > > Hi Sawada-Sn, > > Here are some review comments for patch v8-0001. Thank you for the comments. > > == > contrib/test_decoding/sql/stats.sql > > 1. > +-- The INSERT changes are large enough to be spilled but not, because the > +-- transac

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-14 Thread Peter Smith
Hi Sawada-Sn, Here are some review comments for patch v8-0001. == contrib/test_decoding/sql/stats.sql 1. +-- The INSERT changes are large enough to be spilled but not, because the +-- transaction is aborted. The logical decoding skips collecting further +-- changes too. The transaction is pr

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-14 Thread Masahiko Sawada
On Wed, Nov 13, 2024 at 8:23 PM Peter Smith wrote: > > Hi Sawda-San, > > Here are some more review comments for the latest (accidentally called > v6 again?) v6-0001 patch. Thank you for reviewing the patch! Indeed, the previous version should have been v7. > > == > contrib/test_decoding/sql/

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-13 Thread Peter Smith
Hi Sawda-San, Here are some more review comments for the latest (accidentally called v6 again?) v6-0001 patch. == contrib/test_decoding/sql/stats.sql 1. +-- Execute a transaction that is prepared and aborted. We detect that the +-- transaction is aborted before spilling changes, and then ski

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-13 Thread Masahiko Sawada
On Tue, Nov 12, 2024 at 7:29 PM vignesh C wrote: > > On Mon, 11 Nov 2024 at 23:30, Masahiko Sawada wrote: > > > > On Sun, Nov 10, 2024 at 11:24 PM Peter Smith wrote: > > > > > > Hi Sawada-San, here are some review comments for the patch v5-0001. > > > > > > > Thank you for reviewing the patch! >

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-13 Thread Masahiko Sawada
On Mon, Nov 11, 2024 at 5:40 PM Peter Smith wrote: > > On Tue, Nov 12, 2024 at 5:00 AM Masahiko Sawada wrote: > > > > I've attached the updated patch. > > > > Hi, here are some review comments for the latest v6-0001. > > == > contrib/test_decoding/sql/stats.sql > > 1. > +INSERT INTO stats_tes

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-12 Thread vignesh C
On Mon, 11 Nov 2024 at 23:30, Masahiko Sawada wrote: > > On Sun, Nov 10, 2024 at 11:24 PM Peter Smith wrote: > > > > Hi Sawada-San, here are some review comments for the patch v5-0001. > > > > Thank you for reviewing the patch! > > > == > > Commit message. > > > > 1. > > This commit introduce

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-11 Thread Peter Smith
On Tue, Nov 12, 2024 at 5:00 AM Masahiko Sawada wrote: > > I've attached the updated patch. > Hi, here are some review comments for the latest v6-0001. == contrib/test_decoding/sql/stats.sql 1. +INSERT INTO stats_test SELECT 'serialize-topbig--1:'||g.i FROM generate_series(1, 5000) g(i); I

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-11 Thread Masahiko Sawada
On Sun, Nov 10, 2024 at 11:24 PM Peter Smith wrote: > > Hi Sawada-San, here are some review comments for the patch v5-0001. > Thank you for reviewing the patch! > == > Commit message. > > 1. > This commit introduces an additional check to determine if a > transaction is already aborted by a

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-10 Thread Peter Smith
Hi Sawada-San, here are some review comments for the patch v5-0001. == Commit message. 1. This commit introduces an additional check to determine if a transaction is already aborted by a CLOG lookup, so the logical decoding skips further change also when it doesn't touch system catalogs. ~

Re: Skip collecting decoded changes of already-aborted transactions

2024-10-29 Thread Masahiko Sawada
On Wed, Mar 27, 2024 at 4:49 AM Ajin Cherian wrote: > > > > On Mon, Mar 18, 2024 at 7:50 PM Masahiko Sawada wrote: >> >> >> In addition to these changes, I've made some changes to the latest >> patch. Here is the summary: >> >> - Use txn_flags field to record the transaction status instead of two

Re: Skip collecting decoded changes of already-aborted transactions

2024-10-29 Thread Masahiko Sawada
Sorry for the late reply. On Tue, Jun 11, 2024 at 7:41 PM Peter Smith wrote: > > Hi, here are some review comments for your patch v4-0001. Thank you for reviewing the patch! > > == > contrib/test_decoding/sql/stats.sql > > 1. > Huh? The test fails because the "expected results" file for the

Re: Skip collecting decoded changes of already-aborted transactions

2024-06-11 Thread Peter Smith
Hi, here are some review comments for your patch v4-0001. == contrib/test_decoding/sql/stats.sql 1. Huh? The test fails because the "expected results" file for these new tests is missing from the patch. == .../replication/logical/reorderbuffer.c 2. static void ReorderBufferTruncateTXN(

Re: Skip collecting decoded changes of already-aborted transactions

2024-03-27 Thread Masahiko Sawada
On Wed, Mar 27, 2024 at 8:49 PM Ajin Cherian wrote: > > > > On Mon, Mar 18, 2024 at 7:50 PM Masahiko Sawada wrote: >> >> >> In addition to these changes, I've made some changes to the latest >> patch. Here is the summary: >> >> - Use txn_flags field to record the transaction status instead of two

Re: Skip collecting decoded changes of already-aborted transactions

2024-03-27 Thread Ajin Cherian
On Mon, Mar 18, 2024 at 7:50 PM Masahiko Sawada wrote: > > In addition to these changes, I've made some changes to the latest > patch. Here is the summary: > > - Use txn_flags field to record the transaction status instead of two > 'committed' and 'aborted' flags. > - Add regression tests. > - Up

Re: Skip collecting decoded changes of already-aborted transactions

2024-03-18 Thread Masahiko Sawada
On Fri, Mar 15, 2024 at 1:21 PM Ajin Cherian wrote: > > > > On Fri, Mar 15, 2024 at 3:17 PM Masahiko Sawada wrote: >> >> >> I resumed working on this item. I've attached the new version patch. >> >> I rebased the patch to the current HEAD and updated comments and >> commit messages. The patch is

Re: Skip collecting decoded changes of already-aborted transactions

2024-03-14 Thread Ajin Cherian
On Fri, Mar 15, 2024 at 3:17 PM Masahiko Sawada wrote: > > I resumed working on this item. I've attached the new version patch. > > I rebased the patch to the current HEAD and updated comments and > commit messages. The patch is straightforward and I'm somewhat > satisfied with it, but I'm thinki

Re: Skip collecting decoded changes of already-aborted transactions

2024-02-14 Thread Masahiko Sawada
On Fri, Feb 2, 2024 at 12:48 AM vignesh C wrote: > > On Tue, 3 Oct 2023 at 15:54, vignesh C wrote: > > > > On Mon, 3 Jul 2023 at 07:16, Masahiko Sawada wrote: > > > > > > On Fri, Jun 23, 2023 at 12:39 PM Dilip Kumar > > > wrote: > > > > > > > > On Fri, Jun 9, 2023 at 10:47 AM Masahiko Sawada

Re: Skip collecting decoded changes of already-aborted transactions

2024-02-01 Thread vignesh C
On Tue, 3 Oct 2023 at 15:54, vignesh C wrote: > > On Mon, 3 Jul 2023 at 07:16, Masahiko Sawada wrote: > > > > On Fri, Jun 23, 2023 at 12:39 PM Dilip Kumar wrote: > > > > > > On Fri, Jun 9, 2023 at 10:47 AM Masahiko Sawada > > > wrote: > > > > > > > > Hi, > > > > > > > > In logical decoding, we

Re: Skip collecting decoded changes of already-aborted transactions

2023-10-03 Thread vignesh C
On Mon, 3 Jul 2023 at 07:16, Masahiko Sawada wrote: > > On Fri, Jun 23, 2023 at 12:39 PM Dilip Kumar wrote: > > > > On Fri, Jun 9, 2023 at 10:47 AM Masahiko Sawada > > wrote: > > > > > > Hi, > > > > > > In logical decoding, we don't need to collect decoded changes of > > > aborted transactions.

Re: Skip collecting decoded changes of already-aborted transactions

2023-07-02 Thread Masahiko Sawada
On Fri, Jun 23, 2023 at 12:39 PM Dilip Kumar wrote: > > On Fri, Jun 9, 2023 at 10:47 AM Masahiko Sawada wrote: > > > > Hi, > > > > In logical decoding, we don't need to collect decoded changes of > > aborted transactions. While streaming changes, we can detect > > concurrent abort of the (sub)tra

Re: Skip collecting decoded changes of already-aborted transactions

2023-06-22 Thread Dilip Kumar
On Fri, Jun 9, 2023 at 10:47 AM Masahiko Sawada wrote: > > Hi, > > In logical decoding, we don't need to collect decoded changes of > aborted transactions. While streaming changes, we can detect > concurrent abort of the (sub)transaction but there is no mechanism to > skip decoding changes of tran

Re: Skip collecting decoded changes of already-aborted transactions

2023-06-22 Thread Amit Kapila
On Wed, Jun 21, 2023 at 8:12 AM Masahiko Sawada wrote: > > On Thu, Jun 15, 2023 at 7:50 PM Amit Kapila wrote: > > > > On Tue, Jun 13, 2023 at 2:06 PM Masahiko Sawada > > wrote: > > > > > > On Sun, Jun 11, 2023 at 5:31 AM Andres Freund wrote: > > > > > > > > A separate issue is that Transaction

Re: Skip collecting decoded changes of already-aborted transactions

2023-06-20 Thread Masahiko Sawada
On Thu, Jun 15, 2023 at 7:50 PM Amit Kapila wrote: > > On Tue, Jun 13, 2023 at 2:06 PM Masahiko Sawada wrote: > > > > On Sun, Jun 11, 2023 at 5:31 AM Andres Freund wrote: > > > > > > A separate issue is that TransactionIdDidAbort() can end up being very > > > slow if > > > a lot of transactions

Re: Skip collecting decoded changes of already-aborted transactions

2023-06-15 Thread Amit Kapila
On Tue, Jun 13, 2023 at 2:06 PM Masahiko Sawada wrote: > > On Sun, Jun 11, 2023 at 5:31 AM Andres Freund wrote: > > > > A separate issue is that TransactionIdDidAbort() can end up being very slow > > if > > a lot of transactions are in progress concurrently. As soon as the clog > > buffers are e

Re: Skip collecting decoded changes of already-aborted transactions

2023-06-13 Thread Masahiko Sawada
On Sun, Jun 11, 2023 at 5:31 AM Andres Freund wrote: > > Hi, > > On 2023-06-09 14:16:44 +0900, Masahiko Sawada wrote: > > In logical decoding, we don't need to collect decoded changes of > > aborted transactions. While streaming changes, we can detect > > concurrent abort of the (sub)transaction b

Re: Skip collecting decoded changes of already-aborted transactions

2023-06-10 Thread Andres Freund
Hi, On 2023-06-09 14:16:44 +0900, Masahiko Sawada wrote: > In logical decoding, we don't need to collect decoded changes of > aborted transactions. While streaming changes, we can detect > concurrent abort of the (sub)transaction but there is no mechanism to > skip decoding changes of transactions