From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Ryan Kelly <rpkelly22(at)gmail(dot)com> |
Cc: | Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: Rewritten rows on unchanged values |
Date: | 2013-03-22 13:55:14 |
Message-ID: | 3803.1363960514@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Ryan Kelly <rpkelly22(at)gmail(dot)com> writes:
> I'm having trouble understanding why it is necessary to generate a new
> tuple even when nothing has changed. It seems that the OP understands
> that MVCC is at work, but is questioning why this exact behavior occurs.
> I too have the same question.
It's not *necessary* to do so. However, avoiding it would require
sitting there and comparing the old and new tuples, which would be a
waste of cycles for most applications, which don't do useless updates.
We'd be trading off a small loss on every update for a moderate gain
on a few updates, with all of the benefit going to poorly-coded
applications. This has come up before and we've always judged that
it would be a net loss not gain of performance to check for useless
updates.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2013-03-22 13:55:51 | Re: Rewritten rows on unchanged values |
Previous Message | Ryan Kelly | 2013-03-22 13:41:10 | Re: Rewritten rows on unchanged values |