On Wed, Apr 28, 2021 at 12:29 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > On Tue, Apr 27, 2021 at 11:02 AM vignesh C <vignes...@gmail.com> wrote: > > > > On Tue, Apr 27, 2021 at 9:48 AM vignesh C <vignes...@gmail.com> wrote: > > > > > > > Attached patch has the changes to update statistics during > > spill/stream which prevents the statistics from being lost during > > interrupt. > > > > void > -UpdateDecodingStats(LogicalDecodingContext *ctx) > +UpdateDecodingStats(ReorderBuffer *rb) > > I don't think you need to change this interface because > reorderbuffer->private_data points to LogicalDecodingContext. See > StartupDecodingContext.
+1 With this approach, we could still miss the totalTxns and totalBytes updates if the decoding a large but less than logical_decoding_work_mem is interrupted, right? Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/