Re: add checkpoint stats of snapshot and mapping files of pg_logical dir
От | Bharath Rupireddy |
---|---|
Тема | Re: add checkpoint stats of snapshot and mapping files of pg_logical dir |
Дата | |
Msg-id | CALj2ACVfTw3yN5zr+63RXG-Uy7Dp0z3wfwcVS92isZUVRuD-uQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: add checkpoint stats of snapshot and mapping files of pg_logical dir (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>) |
Ответы |
Re: add checkpoint stats of snapshot and mapping files of pg_logical dir
Re: add checkpoint stats of snapshot and mapping files of pg_logical dir |
Список | pgsql-hackers |
On Fri, Mar 18, 2022 at 11:11 AM Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote: > > On Fri, Mar 18, 2022 at 2:15 AM Nathan Bossart <nathandbossart@gmail.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.
Вложения
В списке pgsql-hackers по дате отправления: