On Fri, Apr 23, 2021 at 6:15 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > On Mon, Apr 19, 2021 at 4:28 PM vignesh C <vignes...@gmail.com> wrote: > > > > I have made the changes to update the replication statistics at > > replication slot release. Please find the patch attached for the same. > > Thoughts? > > > > Thanks, the changes look mostly good to me. The slot stats need to be > initialized in RestoreSlotFromDisk and ReplicationSlotCreate, not in > StartupDecodingContext. Apart from that, I have moved the declaration > of UpdateDecodingStats from slot.h back to logical.h. I have also > added/edited a few comments. Please check and let me know what do you > think of the attached?
The patch moves slot stats to the ReplicationSlot data that is on the shared memory. If we have a space to store the statistics in the shared memory can we simply accumulate the stats there and make them persistent without using the stats collector? And I think there is also a risk to increase shared memory when we want to add other statistics in the future. Regards, -- Masahiko Sawada EDB: https://www.enterprisedb.com/