BUG #2488: backup history file is archived doubly

Поиск
Список
Период
Сортировка
От Masao Fujii
Тема BUG #2488: backup history file is archived doubly
Дата
Msg-id 200606211320.k5LDKlWR078599@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #2488: backup history file is archived doubly  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      2488
Logged by:          Masao Fujii
Email address:      fujii.masao@oss.ntt.co.jp
PostgreSQL version: 8.1.4
Operating system:   Fedora Core 5
Description:        backup history file is archived doubly
Details:

Hi, My name is Masao Fujii.

I found an error that backup history file is archived doubly.


postgresql.conf that I changed from the default is as follow.

  archive_command = 'cp %p /home/postgres/pg_archive/%f'


The sequence of steps to reproduce the problem is as follow.
NOTE: it is very rare that the problem reproduces.

---
[postgres@excalibur pgsql-8.1.4]$ bin/psql sampledb
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

sampledb=# SELECT pg_start_backup('test1');
 pg_start_backup
-----------------
 0/33ACB4
(1 row)

sampledb=# SELECT pg_stop_backup();
 pg_stop_backup
----------------
 0/33ACF8
(1 row)
---


The server log is as follow.

---
[postgres@excalibur pgsql-8.1.4]$ bin/postmaster -D ./data
LOG:  database system was shut down at 2006-06-21 21:40:26 JST
LOG:  checkpoint record is at 0/33A6AC
LOG:  redo record is at 0/33A6AC; undo record is at 0/0; shutdown TRUE
LOG:  next transaction ID: 565; next OID: 10794
LOG:  next MultiXactId: 1; next MultiXactOffset: 0
LOG:  database system is ready
LOG:  transaction ID wrap limit is 2147484146, limited by database
"postgres"
LOG:  transaction ID wrap limit is 2147484146, limited by database
"postgres"
LOG:  archived transaction log file
"000000010000000000000000.0033ACB4.backup"
LOG:  archived transaction log file
"000000010000000000000000.0033ACB4.backup"
---


The cause of the problem is that pg_stop_backup creates two *.ready files.
One file is created by pg_stop_backup > RemoveOldBackupHistory >
XLogArchiveIsDone > XLogArchiveNotify.
Another is created by pg_stop_backup > XLogArchiveNotify.

The problem occurs if archiver process executes archive_command during the
creation of two files.


I'll be pleased if you cope with the trouble.

Thanks in advance,

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

Предыдущее
От: "Pedro J. Romero"
Дата:
Сообщение: BUG #2487: Immutable functions results
Следующее
От: "James A Cole"
Дата:
Сообщение: BUG #2489: Metadata dosen't match tables