Ingres Community Forums Login Register Ingres.com  

Ingres Community Forum


Go Back   Ingres Community Forums > Community > Newsgroups & Mailing Lists > Comp.Databases.Ingres
 

Reply
 
LinkBack Thread Tools Display Modes
Old 2009-06-19   #1 (permalink)
Armand Pirvu
Guest
 
Posts: n/a
Default Re: [Info-Ingres] closed journals and incremental rollforwarddb

Hi Marty


For incremental there is a new log record, called JEOF.
Alterdb -next_jnl_file will close the journal and in 9.2 will also generatethe JEOF log record (Journal End Of File). JEOF will be generated also when even without alterdb -next_jnl_file, an archiver cycle occurs , closes the current jnl and opens a new one.

Sample:

LSN=(00000000,00000000), COMP_LSN=(00000000,00000000), DBID=0x4A3C4407, XID=0x0000000000000000
JEOF Length: 64 Flags:
HEADER: 00000040 000000B0 00000000 4A3C4407 00000000 00000000 00000000 00000000 00000000
HEADER: 00000000 00000000 00000000 00000000 00000000 4A3C44430009B3FE 20202020 20202020


If this is not in the journal, -icremental -norollback will ignore the journal. But -rollback will process it

I guess when you say it barfs you mean maybe something like E_DM1377_RFP_INCR_JNL_WARNING ROLLFORWARDDB -incremental -norollback for database bl, ignoring open journal file sequence 4 ?

Build 136 case

createdb bl
create table foo (col1 integer)
ckpdb +j
ckpdb
insert into foo values (100)
insert into foo values (200)

rolldb +c -j -incremental
rolldb -c +j -incremental -norollback
rolldb -c +j -incremental -rollback
ckpdb bl
delete from foo
rolldb -c +j -incremental -norollback
Here I got the E_DM1377 . But in this case is correct, since I did not close the jnl with alterdb for example. And further more when I do a select from foo I still see the records there. And this expected too. The journal was not processed since it lack JEOF and I used norollback.
Rolldb -c +j -incremental -rollback completes and as expected I don't have the records anymore. It processed the last jnl as expected. It also writes the JEOF andcloses it and opens a new one.

rollforwarddb +c -j bl -incremental
.....
rollforwarddb -c +j bl -incremental -norollback
Fri Jun 19 19:29:15 2009 RFP: Searching for incremental jnl 2
beginning restore of journals
Fri Jun 19 19:29:15 2009 RFP: Validating incremental journal 2
Fri Jun 19 19:29:15 2009 E_DM1377_RFP_INCR_JNL_WARNING ROLLFORWARDDB -incremental -norollback for database bl, ignoring open journal file sequence 2
......
rollforwarddb -c +j bl -incremental -rollback
Fri Jun 19 19:29:20 2009 RFP: Searching for incremental jnl 2
beginning restore of journals
Fri Jun 19 19:29:20 2009 RFP: Start processing journal file 2 blkseq 2
Fri Jun 19 19:29:20 2009 RFP: Searching for incremental jnl 3
Fri Jun19 19:29:20 2009 RFP: Journal file sequence 3 not found -- skipped.
donewith disk operations
Fri Jun 19 19:29:20 2009 Completed processing of 2 transactions.
Fri Jun 19 19:29:20 2009 RFP: Switching to the Next Journalfor Database 'bl'. -> jnl 3 gets created here.

Not sure I completely understood your case, but if it is the same and if it still gets stucked you did hit a bug. That is assuming with the new ckp, the new cnf, and dumps are transferred across before running rolldb +c -j -incremental.

Not sure what build you are on. Mine is 136.

An excellent debuggingtool (or set of tools) would be to use '#x' with rolldb . It will generatean rfpdb.dbg file.
Along with it in general I use also auditdb -v -all dbname

On the SAN snapshot, tinkering the ckp template and the scripting is a major component. But once it is done correctly, it is indeed super.
However , even using snapshot, one still needs to backup the snapshot. Even if a relaxed pace, but still it needs to be backed up.
I noticed way too many situations when this is ignored. The consequences are easy to imagine.


Hope this helps

Cheers
A

P.S. I guess I will be registering my ingres.com e-mail as well.



________________________________
From: Martin Bowes <martin.bowes@ctsu.ox.ac.uk>
To: Ingres andrelated product discussion forum <info-ingres@kettleriverconsulting.com>
Cc: Michael Flower <Michael.Flower@ingres.com>
Sent: Friday, June 19, 2009 8:41:23 AM
Subject: [Info-Ingres] closed journals and incremental rollforwarddb


Hi All,

I've just started tinkering with the incremental
rollforwarddb in 9.2.0…and gee its sweet!

But…when is a source journal closed off?

I'm currently running alterdb -next_jnl_file on the source
database before transferring journals tomy target host.
All of which seems cool. It closes the current journal and
starts a new one, the incremental rollforwarddb then proceeds as expected
straight out of the box with no tinkering.

But when I ckpdb thesource database, run the journal
transfer and try an incremental rollforwarddb on the target it barfs at the
journal before the checkpoint, complaining that it is not closed. Subsequent
journal transfers and incrementals stall at this journal and refuse to go past
this point.

Surely the checkpoint would close the journal regardless of
whether it was an online/ofline checkpoint?

So my attempts at an incremental rollforwarddbstop as soon
as I checkpoint the source database. I have to restart the process from
scratch.

Comments from anyone?

Martin Bowes



  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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


© 2009 Ingres Corporation. All Rights Reserved