dbTalk Databases Forums  

[BUGS] BUG #2488: backup history file is archived doubly

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #2488: backup history file is archived doubly in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default [BUGS] BUG #2488: backup history file is archived doubly - 06-22-2006 , 12:59 AM







The following bug has been logged online:

Bug reference: 2488
Logged by: Masao Fujii
Email address: fujii.masao (AT) oss (DOT) 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,

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: [BUGS] BUG #2488: backup history file is archived doubly - 06-22-2006 , 01:48 PM






"Masao Fujii" <fujii.masao (AT) oss (DOT) ntt.co.jp> writes:
Quote:
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.
Oooh, good catch. The cleanest solution would be to modify
RemoveOldBackupHistory so that it explicitly skips the current entry.
But I'm strongly tempted to just remove the code in pg_stop_backup,
and document that RemoveOldBackupHistory gets the job done (perhaps
renaming it).

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.