Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-07-11 Thread Ashutosh Bapat
On Tue, Jul 11, 2023 at 5:59 PM Amit Kapila wrote: > > > > I have pushed this work. But feel free to propose further > improvements, if you have any better ideas. > Thanks. We have fixed the problem. So things are better than they were. I have been busy with something else so couldn't reply.

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-07-11 Thread Amit Kapila
On Thu, Jul 6, 2023 at 2:06 PM Amit Kapila wrote: > > On Wed, Jul 5, 2023 at 7:20 PM Ashutosh Bapat > wrote: > > > > On Wed, Jul 5, 2023 at 2:29 PM Amit Kapila wrote: > > > > > > On Wed, Jul 5, 2023 at 2:28 PM Amit Kapila > > > wrote: > > > > > > > > On Mon, Jul 3, 2023 at 4:49 PM vignesh C

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-07-06 Thread Amit Kapila
On Wed, Jul 5, 2023 at 7:20 PM Ashutosh Bapat wrote: > > On Wed, Jul 5, 2023 at 2:29 PM Amit Kapila wrote: > > > > On Wed, Jul 5, 2023 at 2:28 PM Amit Kapila wrote: > > > > > > On Mon, Jul 3, 2023 at 4:49 PM vignesh C wrote: > > > > > > > > +1 for the first version patch, I also felt the first

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-07-05 Thread Ashutosh Bapat
On Wed, Jul 5, 2023 at 2:29 PM Amit Kapila wrote: > > On Wed, Jul 5, 2023 at 2:28 PM Amit Kapila wrote: > > > > On Mon, Jul 3, 2023 at 4:49 PM vignesh C wrote: > > > > > > +1 for the first version patch, I also felt the first version is > > > easily understandable. > > > > > > > Okay, please

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-07-05 Thread Amit Kapila
On Wed, Jul 5, 2023 at 2:28 PM Amit Kapila wrote: > > On Mon, Jul 3, 2023 at 4:49 PM vignesh C wrote: > > > > +1 for the first version patch, I also felt the first version is > > easily understandable. > > > > Okay, please find the slightly updated version (changed a comment and > commit

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-07-05 Thread Amit Kapila
On Mon, Jul 3, 2023 at 4:49 PM vignesh C wrote: > > +1 for the first version patch, I also felt the first version is > easily understandable. > Okay, please find the slightly updated version (changed a comment and commit message). Unless there are more comments, I'll push this in a day or two.

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-07-03 Thread vignesh C
On Fri, 30 Jun 2023 at 09:55, Amit Kapila wrote: > > On Thu, Jun 29, 2023 at 9:40 PM vignesh C wrote: > > > > On Thu, 29 Jun 2023 at 09:58, Zhijie Hou (Fujitsu) > > wrote: > > > > > > On Thursday, June 29, 2023 12:06 PM vignesh C wrote: > > > > > > > > > > Thanks for the patches. > > > > > > I

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-06-29 Thread Amit Kapila
On Thu, Jun 29, 2023 at 9:40 PM vignesh C wrote: > > On Thu, 29 Jun 2023 at 09:58, Zhijie Hou (Fujitsu) > wrote: > > > > On Thursday, June 29, 2023 12:06 PM vignesh C wrote: > > > > > > > Thanks for the patches. > > > > I tried to understand the following check: > > > > /* > >

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-06-29 Thread Amit Kapila
On Wed, Jun 28, 2023 at 7:26 PM Ashutosh Bapat wrote: > > Hi Vignesh, > Thanks for working on this. > > On Wed, Jun 28, 2023 at 4:52 PM vignesh C wrote: > > > > Here is a patch having the fix for the same. I have not added any > > tests as the existing tests cover this scenario. The same issue

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-06-29 Thread vignesh C
On Thu, 29 Jun 2023 at 09:58, Zhijie Hou (Fujitsu) wrote: > > On Thursday, June 29, 2023 12:06 PM vignesh C wrote: > > > > On Wed, 28 Jun 2023 at 19:26, Ashutosh Bapat > > wrote: > > > > > > Hi Vignesh, > > > Thanks for working on this. > > > > > > On Wed, Jun 28, 2023 at 4:52 PM vignesh C

RE: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-06-28 Thread Zhijie Hou (Fujitsu)
On Thursday, June 29, 2023 12:06 PM vignesh C wrote: > > On Wed, 28 Jun 2023 at 19:26, Ashutosh Bapat > wrote: > > > > Hi Vignesh, > > Thanks for working on this. > > > > On Wed, Jun 28, 2023 at 4:52 PM vignesh C wrote: > > > > > > Here is a patch having the fix for the same. I have not added

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-06-28 Thread vignesh C
On Wed, 28 Jun 2023 at 19:26, Ashutosh Bapat wrote: > > Hi Vignesh, > Thanks for working on this. > > On Wed, Jun 28, 2023 at 4:52 PM vignesh C wrote: > > > > Here is a patch having the fix for the same. I have not added any > > tests as the existing tests cover this scenario. The same issue is

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-06-28 Thread Ashutosh Bapat
Hi Vignesh, Thanks for working on this. On Wed, Jun 28, 2023 at 4:52 PM vignesh C wrote: > > Here is a patch having the fix for the same. I have not added any > tests as the existing tests cover this scenario. The same issue is > present in back branches too. Interesting, we have a test for

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-06-28 Thread vignesh C
On Mon, 26 Jun 2023 at 15:51, Amit Kapila wrote: > > On Mon, Jun 26, 2023 at 3:07 PM Ashutosh Bapat > wrote: > > > > Hi All, > > Every pg_decode routine except pg_decode_message that decodes a > > transactional change, has following block > > /* output BEGIN if we haven't yet */ > > if

Re: pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-06-26 Thread Amit Kapila
On Mon, Jun 26, 2023 at 3:07 PM Ashutosh Bapat wrote: > > Hi All, > Every pg_decode routine except pg_decode_message that decodes a > transactional change, has following block > /* output BEGIN if we haven't yet */ > if (data->skip_empty_xacts && !txndata->xact_wrote_changes) > { >

pg_decode_message vs skip_empty_xacts and xact_wrote_changes

2023-06-26 Thread Ashutosh Bapat
Hi All, Every pg_decode routine except pg_decode_message that decodes a transactional change, has following block /* output BEGIN if we haven't yet */ if (data->skip_empty_xacts && !txndata->xact_wrote_changes) { pg_output_begin(ctx, data, txn, false); } txndata->xact_wrote_changes = true; But