Re: [GENERAL] PG and undo logging

2015-05-24 Thread Tom Lane
Ravi Krishna writes: > Thanks for the detailed explanation. The explanation makes me wonder > that PG must do more work at commit time, right? No. Commit and abort are both O(1). Where we pay the piper is in having to run VACUUM to clean up no-longer-needed row versions. This is a better desig

Re: [GENERAL] PG and undo logging

2015-05-24 Thread Ravi Krishna
On Sat, May 23, 2015 at 10:12 PM, Scott Marlowe wrote: > Ever run an insert with 1M rows, and roll it back in postgresql and > compare that to oracle. Time the rollback in both. That should give > you an idea of how differently the two dbs operate. > > A rollback in postgres is immediate because

Re: [GENERAL] PG and undo logging

2015-05-23 Thread Scott Marlowe
On Sat, May 23, 2015 at 2:34 PM, Ravi Krishna wrote: > Is it true that PG does not log undo information, only redo. If true, > then how does it bring a database back to consistent state during > crash recovery. Just curious. PostgreSQL is NOT oracle. And it doesn't work like oracle. This is norma

Re: [GENERAL] PG and undo logging

2015-05-23 Thread David G. Johnston
On Saturday, May 23, 2015, Ravi Krishna wrote: > undo means that reading the WAL logs and able to rollback a row back > to its original state before the update. Typically it is used to > rollback a long running transaction which got aborted due to a crash. > Here is an example: > > Not an expert

Re: [GENERAL] PG and undo logging

2015-05-23 Thread Ravi Krishna
undo means that reading the WAL logs and able to rollback a row back to its original state before the update. Typically it is used to rollback a long running transaction which got aborted due to a crash. Here is an example: 2.pm You kick off a huge transaction to update say 1 million rows. betwee

Re: [GENERAL] PG and undo logging

2015-05-23 Thread Jan de Visser
On May 23, 2015 01:48:11 PM David G. Johnston wrote: > On Sat, May 23, 2015 at 1:34 PM, Ravi Krishna > > wrote: > > Is it true that PG does not log undo information, only redo. If true, > > then how does it bring a database back to consistent state during > > crash recovery. Just curious. > > ​W

Re: [GENERAL] PG and undo logging

2015-05-23 Thread David G. Johnston
On Sat, May 23, 2015 at 1:34 PM, Ravi Krishna wrote: > Is it true that PG does not log undo information, only redo. If true, > then how does it bring a database back to consistent state during > crash recovery. Just curious. > ​What does "undo" mean? David J.​