From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
---|---|
To: | Nathan Bossart <nathandbossart(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, Cary Huang <cary(dot)huang(at)highgo(dot)ca>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: add checkpoint stats of snapshot and mapping files of pg_logical dir |
Date: | 2022-03-18 08:02:52 |
Message-ID: | CALj2ACVfTw3yN5zr+63RXG-Uy7Dp0z3wfwcVS92isZUVRuD-uQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Mar 18, 2022 at 11:11 AM Bharath Rupireddy
<bharath(dot)rupireddyforpostgres(at)gmail(dot)com> wrote:
>
> On Fri, Mar 18, 2022 at 2:15 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
> >
> > On Thu, Mar 17, 2022 at 06:48:43PM +0530, Bharath Rupireddy wrote:
> > > Personally, I tend to agree with v4-0001 (option (4)) or v4-0002
> > > (option (3)) than v4-0003 (option (1)) as it adds more unreadability
> > > with most of the code duplicated creating more diff with previous
> > > versions and maintainability problems. Having said that, I will leave
> > > it to the committer to decide on that.
> >
> > I don't think v4-0003/option 1 needs to be unreadable. Perhaps we can use
> > a StringInfo to build the message. That might be a net improvement in
> > readability anyway.
>
> Looks like we already use StringInfo in PerformAuthentication for
> "connection" related log messages, see [1].
>
> I will give it a try using StringInfo for the "checkpoint/restartpoint
> complete" message too.
Well, here's the v5 patch, sample output at [1]. Please have a look at it.
[1]
2022-03-18 07:44:36.102 UTC [1165375] LOG: checkpoint starting:
immediate force wait
2022-03-18 07:44:36.158 UTC [1165375] LOG: checkpoint complete: wrote
444 buffers (2.7%); 0 WAL file(s) added, 0 removed, 0 recycled;
write=0.006 s, sync=0.017 s, total=0.057 s; sync files=2,
longest=0.014 s, average=0.009 s; distance=6270 kB, estimate=6270 kB;
logical decoding snapshot file(s) removed=3, time=0.001 s, cutoff
LSN=0/1B97B10
2022-03-18 07:45:43.263 UTC [1165375] LOG: checkpoint starting:
immediate force wait
2022-03-18 07:45:43.338 UTC [1165375] LOG: checkpoint complete: wrote
968 buffers (5.9%); 0 WAL file(s) added, 0 removed, 0 recycled;
write=0.012 s, sync=0.025 s, total=0.075 s; sync files=24,
longest=0.020 s, average=0.002 s; distance=6975 kB, estimate=6975 kB;
logical decoding snapshot file(s) removed=3, time=0.001 s, cutoff
LSN=0/1BDD080; logical decoding rewrite mapping file(s) removed=1,
synced=7, time=0.001 s, cutoff LSN=0/1BDD080
Regards,
Bharath Rupireddy.
Attachment | Content-Type | Size |
---|---|---|
v5-0001-Add-checkpoint-stats-of-snapshot-and-mapping-file.patch | application/x-patch | 9.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey Borodin | 2022-03-18 09:02:13 | Re: MultiXact\SLRU buffers configuration |
Previous Message | Julien Rouhaud | 2022-03-18 07:40:51 | Re: pgsql: Add option to use ICU as global locale provider |