Tuesday, 2010-09-14

*** grantc has joined #ingres01:53
*** grantc has quit IRC02:48
*** grantc has joined #ingres03:18
*** rossand has joined #ingres04:04
*** ChanServ sets mode: +o rossand04:04
*** atrofast has joined #ingres04:04
*** cthibert has joined #ingres04:11
*** mull has joined #ingres05:43
*** Meyer080 has joined #ingres06:13
Meyer080hi, does ingres have a checkpoint command like SQL Server, that flushes committed txn to the disk?06:16
*** Dejan has joined #ingres06:50
grantchi Meyer080 - if you wish to commit a txn then the "commit" statement is used. If you wish to make sure it's on disk you can force a "consistency point"07:02
grantcto do that you issue the command "set trace point DM1305"07:02
Meyer080grantc, it means that 'consistency points' occur automatically in regular intervals?07:05
grantcyes07:05
grantci'm trying to remember the maths for how it's worked out07:06
grantcIf i remember correctly it's either for a % of the log file or size of data07:07
Meyer080ok grantc. How regular are they? one can set up their interval somehow? perhaps per database?07:07
grantcit's per installation07:10
grantcare you using linux/unix?07:11
Meyer080grantc, linux07:13
grantciisetres -v ii.`iipmhost`.rcp.log.cp_interval_mb X      - set the consistency point to X MB07:17
grantcmake sure ingres is down before07:17
Meyer080grantc: great07:17
grantcor - iisetres -v ii.`iipmhost`.rcp.log.cp_interval X                                -  set the CP to X% of the transaction log file07:18
Dejani actually think the default one is fine07:18
grantcthe former is a wrapper for the latter07:18
grantcDejan: it depends07:18
Dejanit should not be extra big07:18
Dejanand also not extra small07:18
grantc12% of 2G is a lot of data07:18
grantcimagine an 8GB log file etc.. :)07:19
*** cthibert has left #ingres07:19
grantcMeyer080: you're welcome07:20
Meyer080I understand one adjusts the interval thinking about how long the recovery interval will be07:20
grantcor thinking about how much data is sat in your log file before the disks go boom07:21
*** cthibert has joined #ingres07:21
Dejannot just that, consistency point triggers some expensive processes07:21
Dejanyou definitely should not have it to be a small value07:21
Dejanbut grantc has right07:21
grantcDejan, i'd disagree07:21
Dejanit should not be a large one too07:21
Dejanyou do not want CPs every minute07:22
grantcsetting it to 1MB would be foolish but it's very much a site specific parameter based on usage and hardware07:22
grantcWhat happens if you're writting 100MB/s of data ... you want all that data in your trx log file?07:23
Dejandefault value is 40Mb07:24
Dejani think that is pretty fine07:24
grantcit depends on the size of your trx log file as it's a percentage of that07:24
Dejanso it is not the actual size in Mb ?07:25
grantcif you setup a 2GB log file 12% = 240MB07:25
Dejanwhy the hack the name is "cp_interval_mb" ?07:25
grantcthe cp_interval_mb is used with the size of transaction of log file to calc the %07:25
grantcit's a derived param07:25
Dejanahammmmm07:26
grantcii.$.rcp.log.cp_interval:((ii.$.rcp.log.cp_interval_mb * 1024) / ii.$.rcp.file.kbytes) * 100,07:26
grantcsee grep cp_interval $II_SYSTEM/ingres/files/dbms.crs07:27
Dejanso percentage is actually a derived parameter07:27
Dejannot the cp_interval_mb ?07:28
grantcif you set _mb it derives the % value, if you set the % cp_interval_mb is not updated07:28
grantci hope that reads ok07:28
Dejanyeah, i get it07:28
grantc"iisetres -v param value" shows the derived changes07:29
grantchttp://ingres.pastebin.com/waJkjqU707:32
Meyer080grantc, in case of a server failure, when ingres restarts, the rollforward/rollback of transactions occur automatically or one needs to execute a command or pass a flag to the dbms process?07:34
grantcMeyer080: from memory, the recovery server, dmfrcp, rolls back open transactions to the last CP07:36
grantcsee http://docs.ingres.com/ingres/9.3/database-administrator-guide/2373-logging-system07:37
Meyer080grantc: what about txn that were committed and not flushed to the disk? in other dbms's this is called rollforwarding07:38
Meyer080grantc: thx07:38
grantcassuming the transactions are in the journal files (not sure what they are called in SQL Server) the you can recover the DB from the last backup/checkpoint (ckpdb command) using rollforwarddb +j ( +j = apply the journal files)07:40
*** Alex| has quit IRC07:40
grantchttp://docs.ingres.com/ingres/9.3/database-administrator-guide/2380-backup-by-checkpoints07:40
Dejangrantc, did you try incremental rollforward ?07:41
Dejani never tried it, i must do it one day when i have time07:42
grantci looked at it a while ago - i've not got my head around how it works just yet07:42
grantci was looking at it to maintain an offsite backup of a live system07:43
grantcthe next time i'm in the UK i'm going to have a word with mike flower as he knows how it works07:43
Dejanyeah, he wrote that presentation...07:44
Dejanbut i wish i have the original PP file07:44
Dejanbecause lots of slides are missing07:44
Dejanthis is good stuff, because i can use this to make an online, standby database07:45
Dejanit is going to miss few transactions07:45
Dejanbut the moment i get next JNL file, i just "apply" it07:45
Dejanand i get those new transactions07:46
Dejanetc07:46
grantcthe next jnl file has to be complete07:47
grantci.e. not open07:47
Dejansure07:47
Dejanit is some nice form of simple replication07:48
grantcyeah - that's what i was looking at it for07:55
Meyer080grantc: so, if you have journaled database, and in order to miss the fewest number of transactions, once the ingres server restarts after a failure one must run rollforwarddb +j. Is that correct?08:04
grantcif you have a corrupt database then that command will recover all transactions from the last backup which is held in a journal file08:06
grantcIt's been a while since I've done DBA stuff, unless Dejan or pboro have any ideas I'd suggest you ask at http://community.ingres.com/forum08:08
grantcalternatively use the USENET group comp.databases.ingres08:08
Meyer080understood. thx for your time grantc08:09
DejanMeyer080, i think recovery is going to do it for you08:10
Meyer080Dejan: how can one be sure?08:11
Dejanif you want to be sure, yes, do rollforwarddb +108:11
Dejan+j pardon08:11
Dejanyou can see the rcp log08:11
Dejanafter you restart it is going to start recovery process, and there you will be able to see what it did08:12
Meyer080that command will ensure I will have everything back up to the last consistency point, right?08:12
Meyer080dejan: understood08:13
Dejanyes08:13
Dejaniircp.log08:13
Meyer080Dejan: terrific, thank you.08:14
DejanI am not a superduper Ingres DBA either08:15
Dejanit is not my job, however, I do lots of DBA stuff here08:15
Dejanbecause they do not want to hire a new person for it08:16
Dejanand i must admit, it is refreshing sometimes to do DBA work08:16
Dejanand forget about boresome software development08:16
Dejan:D08:16
*** Meyer080 has quit IRC08:52
*** Alex| has joined #ingres09:10
*** ChanServ sets mode: +o Alex|09:10
*** Alex| has quit IRC09:45
*** grantc has quit IRC11:08
*** Mud has quit IRC11:56
*** Alex| has joined #ingres13:06
*** ChanServ sets mode: +o Alex|13:06
*** Alex| has quit IRC13:19
*** cthibert has left #ingres13:20
*** mull has quit IRC14:21
*** mull has joined #ingres15:09
*** mull has quit IRC18:11
*** rossand has quit IRC18:14
*** atrofast has quit IRC18:17
*** cytrinox has quit IRC19:24
*** cytrinox has joined #ingres19:26
*** Alex| has joined #ingres22:06
*** ChanServ sets mode: +o Alex|22:06
*** Alex| has quit IRC22:49
*** Alex| has joined #ingres23:02
*** ChanServ sets mode: +o Alex|23:02
*** Mud has joined #ingres23:19
*** Alex| has quit IRC23:29
*** Alex| has joined #ingres23:29
*** ChanServ sets mode: +o Alex|23:29

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!