This is a discussion on MVCC, undo log, and HOT within the pgsql Hackers forums, part of the PostgreSQL category; --> Those who have been with the community from long ago might remember discussion about implementing a undo log. The ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Those who have been with the community from long ago might remember discussion about implementing a undo log. The big advantage of this is that it allows UPDATE to _replace_ rows and limits the amount of cleanup required for UPDATEs. I am hoping that with HOT we will no longer have any need to even consider undo. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match |
| |||
| Bruce Momjian wrote: > Those who have been with the community from long ago might remember > discussion about implementing a undo log. The big advantage of this is > that it allows UPDATE to _replace_ rows and limits the amount of cleanup > required for UPDATEs. > > I am hoping that with HOT we will no longer have any need to even > consider undo. > We were considering it? I certainly wasn't. I've enough experience with Oracle and InnoDB to see that an undo log is its own set of performance issues. No thanks. Hopefully the "multi-thread the backend" idea is dead, too. --Josh ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| |||
| Josh Berkus wrote: > Bruce Momjian wrote: >> Those who have been with the community from long ago might remember >> discussion about implementing a undo log. The big advantage of this is >> that it allows UPDATE to _replace_ rows and limits the amount of cleanup >> required for UPDATEs. >> >> I am hoping that with HOT we will no longer have any need to even >> consider undo. >> > > We were considering it? I don't ever remember us considering it seriously. > > I certainly wasn't. I've enough experience with Oracle and InnoDB to > see that an undo log is its own set of performane issues. No thanks. > It certainly does. Joshua D. Drake ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| |||
| Joshua D. Drake wrote: > Josh Berkus wrote: > > Bruce Momjian wrote: > >> Those who have been with the community from long ago might remember > >> discussion about implementing a undo log. The big advantage of this is > >> that it allows UPDATE to _replace_ rows and limits the amount of cleanup > >> required for UPDATEs. > >> > >> I am hoping that with HOT we will no longer have any need to even > >> consider undo. > >> > > > > We were considering it? > > I don't ever remember us considering it seriously. > > > > > I certainly wasn't. I've enough experience with Oracle and InnoDB to > > see that an undo log is its own set of performane issues. No thanks. > > > > It certainly does. We never actually considred undo, but high UPDATE activity was one of the areas we historically handled poorly compared to undo systems, and undo would have been one way to improve that area. I think with HOT we have improved high UPDATE activity enough that the undo benefits are no longer attractive (and of course the undo disadvantages were never attractive). -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend |
| |||
| Bruce, > We never actually considred undo, but high UPDATE activity was one of > the areas we historically handled poorly compared to undo systems, and > undo would have been one way to improve that area. I think with HOT we > have improved high UPDATE activity enough that the undo benefits are no > longer attractive (and of course the undo disadvantages were never > attractive). > If you're asking if we should remove the TODO (is there one?) and replace it with a FAQ item called "Why PostgreSQL doesn't have an UNDO LOG", then my vote is "yes". --Josh ---------------------------(end of broadcast)--------------------------- TIP 4: Have you searched our list archives? http://archives.postgresql.org |
| |||
| Josh Berkus wrote: > Bruce, > > > We never actually considred undo, but high UPDATE activity was one of > > the areas we historically handled poorly compared to undo systems, and > > undo would have been one way to improve that area. I think with HOT we > > have improved high UPDATE activity enough that the undo benefits are no > > longer attractive (and of course the undo disadvantages were never > > attractive). > > > > If you're asking if we should remove the TODO (is there one?) and > replace it with a FAQ item called "Why PostgreSQL doesn't have an UNDO > LOG", then my vote is "yes". No, it never got close to being a TODO item. It was more a limitation we had that is now fixed. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://postgres.enterprisedb.com + If your life is a hard drive, Christ can be your backup. + ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match |
| |||
| Bruce Momjian wrote: > Josh Berkus wrote: > >> Bruce, >> >> >>> We never actually considred undo, but high UPDATE activity was one of >>> the areas we historically handled poorly compared to undo systems, and >>> undo would have been one way to improve that area. I think with HOT we >>> have improved high UPDATE activity enough that the undo benefits are no >>> longer attractive (and of course the undo disadvantages were never >>> attractive). >>> >>> >> If you're asking if we should remove the TODO (is there one?) and >> replace it with a FAQ item called "Why PostgreSQL doesn't have an UNDO >> LOG", then my vote is "yes". >> > > No, it never got close to being a TODO item. It was more a limitation > we had that is now fixed. > HOT is cool, but it really doesn't solve the whole problem. It works for a significant class of problems, but for example it won't have any significant effect on the app I'm currently working on which is very index-rich. It would be a major mistake to think there's no work left to do in improving update performance. cheers andrew ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| |||
| "Andrew Dunstan" <andrew@dunslane.net> writes: > HOT is cool, but it really doesn't solve the whole problem. It works for a > significant class of problems, but for example it won't have any significant > effect on the app I'm currently working on which is very index-rich. It would > be a major mistake to think there's no work left to do in improving update > performance. Another use case it doesn't address is updating a large fraction of the table. If you do a single unconstrained "UPDATE foo SET x=y" your table and indexes will double in size and never shrink back. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly |
| |||
| On Mon, 2007-10-22 at 11:00 -0400, Bruce Momjian wrote: > Joshua D. Drake wrote: > > Josh Berkus wrote: > > > Bruce Momjian wrote: > > >> Those who have been with the community from long ago might remember > > >> discussion about implementing a undo log. The big advantage of this is > > >> that it allows UPDATE to _replace_ rows and limits the amount of cleanup > > >> required for UPDATEs. > > >> > > >> I am hoping that with HOT we will no longer have any need to even > > >> consider undo. > > >> > > > > > > We were considering it? > > > > I don't ever remember us considering it seriously. > > > > > > > > I certainly wasn't. I've enough experience with Oracle and InnoDB to > > > see that an undo log is its own set of performane issues. No thanks. > > > > > > > It certainly does. > > We never actually considred undo I did, but eventually ruled it out during the HOT design process. But then I considered a ton of other things and ruled them out also. Can't see a reason to bring it up again, so perhaps we should add it to the definitely don't want list. Don't *need* would be better. -- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster |
| ||||
| On 10/23/07, Andrew Dunstan <andrew@dunslane.net> wrote: > It would be a major mistake to think there's no work left to > do in improving update performance. Agreed. That would be a very short-sighted move. -- Jonah H. Harris, Sr. Software Architect | phone: 732.331.1324 EnterpriseDB Corporation | fax: 732.331.1301 499 Thornall Street, 2nd Floor | jonah.harris@enterprisedb.com Edison, NJ 08837 | http://www.enterprisedb.com/ ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match |