Search Postgresql Archives

Re: When updating row that has TOAST column, is the TOAST column also reinserted ? Or just the oid to the value?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Albe Laurenz <laurenz.albe@xxxxxxxxxx> writes:
> Dorian Hoxha wrote:
>> When updating row that has TOAST column, is the TOAST column also inserted ? Or just the oid?

> The TOAST table will remain unchanged by the UPDATE; you can see that with the
> "pageinspect" contrib module:

You can also read the documentation ;-).  About halfway down this page:

https://www.postgresql.org/docs/current/static/storage-toast.html

it says:

  During an UPDATE operation, values of unchanged fields are normally
  preserved as-is; so an UPDATE of a row with out-of-line values incurs no
  TOAST costs if none of the out-of-line values change.

I don't remember offhand what corner cases might exist to prompt the
weasel wording "normally".  Maybe that just reflects the possibility
that one of the newly updated values would need toasting.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux