[HACKERS] Reading backup label file for checkpoint and redo location duringcrash recovery

Поиск
Список
Период
Сортировка
От Satyanarayana Narlapuram
Тема [HACKERS] Reading backup label file for checkpoint and redo location duringcrash recovery
Дата
Msg-id CY1PR21MB002499FF81D3BD2D74B83546917A0@CY1PR21MB0024.namprd21.prod.outlook.com
обсуждение исходный текст
Ответы Re: [HACKERS] Reading backup label file for checkpoint and redolocation during crash recovery  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-hackers

Hi there,

 

During crash recovery, last checkpoint record information is obtained from the backup label if present, instead of getting it from the control file. This behavior is causing PostgreSQL database cluster not to come up until the backup label file is deleted (as the error message says).

 

if (checkPoint.redo < checkPointLoc)

                      {

                             if (!ReadRecord(xlogreader, checkPoint.redo, LOG, false))

                                    ereport(FATAL,

                                                  (errmsg("could not find redo location referenced by checkpoint record"),

                                                  errhint("If you are not restoring from a backup, try removing the file \"%s/backup_label\".", DataDir)));

                      }

 

If we are recovering from a dump file, reading from the backup label files makes sense as the control file could be archived after a few checkpoints. But this is not the case for crash recovery, and is always safe to read the checkpoint record information from the control file.

Is this behavior kept this way as there is no clear way to distinguish between the recovery from the dump and the regular crash recovery?

 

 

Thanks,

Satya

 

 

 

 

 

 

 

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Server crash due to SIGBUS(Bus Error) when trying toaccess the memory created using dsm_create().
Следующее
От: Petr Jelinek
Дата:
Сообщение: Re: [HACKERS] logical replication and statistics