Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[PBCKP-129] change catchup logging levels#473

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kulaginm merged 7 commits intoREL_2_5frompbckp-129
Aug 4, 2022
Merged

Conversation

kulaginm
Copy link
Member

No description provided.

@kulaginmkulaginm added this to the2.5.6 milestoneFeb 17, 2022
kulaginmand others added2 commitsMay 23, 2022 05:52
INFO – common informationLOG – same as INFO + info about filesVERBOSE – same as LOG + info about block and SQL queries
@MetalDream666MetalDream666 self-requested a reviewMay 26, 2022 13:08
@MetalDream666
Copy link
Contributor

MetalDream666 commentedMay 27, 2022
edited
Loading

Нашла следующие возможные исправления

Поменять elog(VERBOSE..) на LOG:
(Переименование файлов тоже под elog(LOG..) должно быть)

src/restore.c
846:elog(VERBOSE, "Create external directory "%s"", dirpath);
926:elog(VERBOSE, "Deleted file "%s"", fullpath);

src/merge.c
813:elog(VERBOSE, "Deleted "%s"", full_file_path);
1147:elog(VERBOSE, "Deleted "%s"", full_path);
1196:elog(VERBOSE, "Rename %s to %s", old_path, new_path);

src/backup.c
415:elog(VERBOSE, "Create directory '%s'", dirpath);
2067:elog(VERBOSE, "Skipping the unchanged file: "%s"", from_fullpath);
2071:elog(VERBOSE, "File "%s". Copied "INT64_FORMAT " bytes",

src/dir.c
1137:elog(VERBOSE, "Create directory "%s" and symbolic link "%s"",
1154:elog(VERBOSE, "Create directory "%s"", dir->rel_path);
1892:elog(VERBOSE, "Deleted file "%s"", fullpath);

src/archive.c
364:elog(VERBOSE, "Rename "%s" to "%s"", wal_file_ready, wal_file_done);

Поменять elog(LOG..) на INFO (скорее всего):

src/backup.c
119:elog(LOG, "Database backup start");
339:elog(LOG, "Current Start LSN: %X/%X, TLI: %X",
343:elog(LOG, "Parent Start LSN: %X/%X, TLI: %X",
676:elog(LOG, "This PostgreSQL instance was initialized with data block checksums. "
743:elog(LOG, "Backup destination is initialized");
1516:elog(LOG, "stop_lsn: %X/%X",

Поменять elog(INFO..) на что-то другое:

src/util.c
592:elog(INFO, " block %u", blocknum); -- здесь инфа по блокам, VERBOSE

src/data.c
1767:elog(INFO, "Block %u of "%s" is truncated",

@kulaginm
Copy link
MemberAuthor

Исправил по замечаниям ревью, внёс изменения и для других команд (не только для catchup)

@MetalDream666
Copy link
Contributor

MetalDream666 commentedMay 30, 2022
edited
Loading

Новая партия предложенных правок

(аналогичные сообщения стоят под VERBOSE)

Поменять на VERBOSE (информация по блокам, тредам, WAL):

src/backup.c
1274:elog(LOG, "Looking for segment: %s", wal_segment);
1276:elog(LOG, "Looking for LSN %X/%X in segment: %s",
1297:elog(LOG, "Found compressed WAL segment: %s", wal_segment_path);
1301:elog(LOG, "Found WAL segment: %s", wal_segment_path);
1318:elog(LOG, "Found LSN: %X/%X", (uint32) (target_lsn >> 32), (uint32) target_lsn);
1347:elog(LOG, "Found prior LSN: %X/%X",
1415:elog(LOG, "Invalid offset in stop_lsn value %X/%X, trying to fix",

src/data.c
1838:elog(LOG, "File "%s", block %u, page is NULL", file->rel_path, blknum);
1841:elog(LOG, "File: %s blknum %u, empty zeroed page", file->rel_path, blknum);

src/archive.c
470:elog(LOG, "Temp WAL file already exists, waiting on it %u seconds: "%s"",
499:elog(LOG, "Reusing stale temp WAL file "%s"", to_fullpath_part);
520:elog(LOG, "WAL file already exists in archive with the same "
531:elog(LOG, "WAL file already exists in archive with "
716:elog(LOG, "Temp WAL file already exists, waiting on it %u seconds: "%s"",
745:elog(LOG, "Reusing stale temp WAL file "%s"", to_fullpath_gz_part);
769:elog(LOG, "WAL file already exists in archive with the same "
780:elog(LOG, "WAL file already exists in archive with "
1165:elog(LOG, "Failed to get WAL file %s, retry %i/3", wal_file_name, fail_count);
1240:elog(LOG, "Thread [%d]: Failed to prefetch WAL segment %s", 0, xlogfile->name);
1317:elog(LOG, "Failed to prefetch WAL segment %s", xlogfile->name);
1449:elog(LOG, "Target WAL file is missing: %s", filename);
1489:elog(LOG, "WAL file successfully %s: %s",
1663:elog(LOG, "Prefetched WAL segment %s is invalid, cannot use it", wal_file_name);

src/parsexlog.c
691:elog(LOG, "First record in WAL segment "%s": %X/%X", wal_segment,
787:elog(LOG, "Record %X/%X is next after target LSN %X/%X",
913:elog(LOG, "Record %X/%X has endpoint %X/%X which is equal or greater than requested LSN %X/%X",
1039:elog(LOG, "Thread [%d]: Opening WAL segment "%s"",
1058:elog(LOG, "Thread [%d]: Opening compressed WAL segment "%s"",
1491:elog(LOG, "Thread [%d]: Endpoint %X/%X is not inclusive, switch to the next timeline",

src/stream.c
248:elog(LOG, "started streaming WAL at %X/%X (timeline %u) using%s slot %s",
258:elog(LOG, "started streaming WAL at %X/%X (timeline %u)",
340:elog(LOG, "finished streaming WAL at %X/%X (timeline %u)",
393:elog(LOG, _("switched to timeline %u at %X/%X\n"),

src/data.c
1767:elog(INFO, "Block %u of "%s" is truncated",

@kulaginmkulaginm modified the milestones:2.5.6,2.5.7Jun 1, 2022
@kulaginm
Copy link
MemberAuthor

kulaginm commentedAug 2, 2022
edited
Loading

Посмотрел последний комментарий@MetalDream666 (и указанный там код), но ничего не стал менять в коде, по одной из двух встречающихся причин:

  1. некоторые сообщения уже были VERBOSE
  2. WAL segment -- это файл, соответственно уровень логирования -- не ниже LOG, а чаще даже информация касается общего процесса выполнения (например обработка в команде archive_push)

Copy link
Contributor

@MetalDream666MetalDream666 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Окей, соглашусь. Перепровепила еще раз все сообщения, думаю, можно мерджить

@kulaginmkulaginm changed the base branch fromrelease_2_5_6 torelease_2_5_7August 4, 2022 12:18
@kulaginmkulaginm changed the base branch fromrelease_2_5_7 toREL_2_5August 4, 2022 14:13
@kulaginmkulaginm merged commit2e1950a intoREL_2_5Aug 4, 2022
kulaginm added a commit to pgtoolz/pg_backup that referenced this pull requestMar 25, 2023
* [PBCKP-129] change catchup logging level verbosity:INFO – common informationLOG – same as INFO + info about filesVERBOSE – same as LOG + info about block and SQL queries
gsmolk pushed a commit to pgtoolz/pg_backup that referenced this pull requestMar 25, 2023
* [PBCKP-129] change catchup logging level verbosity:INFO – common informationLOG – same as INFO + info about filesVERBOSE – same as LOG + info about block and SQL queries
gsmolk pushed a commit to pgtoolz/pg_backup that referenced this pull requestApr 27, 2023
* [PBCKP-129] change catchup logging level verbosity:INFO – common informationLOG – same as INFO + info about filesVERBOSE – same as LOG + info about block and SQL queries
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@MetalDream666MetalDream666MetalDream666 left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
2.5.7
Development

Successfully merging this pull request may close these issues.

2 participants
@kulaginm@MetalDream666

[8]ページ先頭

©2009-2025 Movatter.jp