On Thu, Mar 24, 2022 at 8:58 AM Bharath Rupireddy <bharath.rupireddyforpostg...@gmail.com> wrote: > > On Wed, Mar 23, 2022 at 10:16 AM Bharath Rupireddy > <bharath.rupireddyforpostg...@gmail.com> wrote: > > > > On Tue, Mar 22, 2022 at 8:12 PM Andres Freund <and...@anarazel.de> wrote: > > > > Do you mean like this? > > > > ereport(LOG, > > > > /* translator: the placeholders show checkpoint options */ > > > > (errmsg("%s starting:%s%s%s%s%s%s%s%s", > > > > restartpoint ? _("restartpoint") : _("checkpoint"), > > > > (flags & CHECKPOINT_IS_SHUTDOWN) ? " shutdown" : "", > > > > (flags & CHECKPOINT_END_OF_RECOVERY) ? " > > > > end-of-recovery" : "", > > > > (flags & CHECKPOINT_IMMEDIATE) ? " immediate" : "", > > > > (flags & CHECKPOINT_FORCE) ? " force" : "", > > > > (flags & CHECKPOINT_WAIT) ? " wait" : "", > > > > (flags & CHECKPOINT_CAUSE_XLOG) ? " wal" : "", > > > > (flags & CHECKPOINT_CAUSE_TIME) ? " time" : "", > > > > (flags & CHECKPOINT_FLUSH_ALL) ? " flush-all" : > > > > ""))); > > > > > > Yes. > > > > Done that way, see > > v7-0001-Deduplicate-checkpoint-restartpoint-starting-comp.patch. > > > > > > I think the reason in this case might be that some flag names with > > > > hyphens > > > > and spaces before words may not have the right/matching words in all > > > > languages. What happens if we choose to translate/not translate the > > > > entire > > > > message? > > > > > > If individual words aren't translated the "original" word would be used. > > > > Interestingly, the translated message for "checkpoint/restart > > complete" is empty. Maybe because it has untranslatable strings? > > > > #: access/transam/xlog.c:8752 > > #, c-format > > msgid "restartpoint complete: wrote %d buffers (%.1f%%); %d WAL > > file(s) added, %d removed, %d recycled; write=%ld.%03d s, > > sync=%ld.%03d s, total=%ld.%03d s; sync files=%d, longest=%ld.%03d s, > > average=%ld.%03d s; distance=%d kB, estimate=%d kB" > > msgstr "" > > > > > > > Both seem still very long. I still am doubtful this level of detail is > > > > > appropriate. Seems more like a thing for a tracepoint or such. How > > > > > about just > > > > > printing the time for the logical decoding operations in aggregate, > > > > > without > > > > > breaking down into files, adding LSNs etc? > > > > > > > > The distinction that the patch makes right now is for snapshot and > > > > rewrite mapping files and it makes sense to have them separately. > > > > > > -1. The line also needs to be readable... > > > > IMHO, that's subjective. Even now, the existing > > "checkpoint/restartpoint complete" message has a good amount of info > > which makes it unreadable for some. > > > > The number of logical decoding files(snapshot and mapping) the > > checkpoint processed is a good metric to have in server logs along > > with the time it took for removing/syncing them. Thoughts? > > Realized that the CF bot is applying patches in the alphabetical order > (I've sent out both v7 patches as v7-0001). Attaching v8 patch-set > with v8-0001 and v8-0002 names. Apart from this, no change in v8.
CF bot is complaining https://cirrus-ci.com/task/6458067389775872?logs=mingw_cross_warning#L399. Attaching v9 patch-set to fix it. Regards, Bharath Rupireddy.
v9-0001-Deduplicate-checkpoint-restartpoint-starting-comp.patch
Description: Binary data
v9-0002-Add-checkpoint-stats-of-snapshot-and-mapping-file.patch
Description: Binary data