Re: What does "Table rewrite" mean?

From: "Ilsa Loving" <ilsa(at)ilsadee(dot)com>
To: "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: "Michael Paquier" <michael(dot)paquier(at)gmail(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-docs(at)lists(dot)postgresql(dot)org
Subject: Re: What does "Table rewrite" mean?
Date: 2018-01-22 20:59:07
Message-ID: 63910968-9247-4112-842A-F7063CD4A4C7@ilsadee.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

That’s all that’s needed, really. It’s impossible to make an
informed decision if there is no way for someone to know what a table
rewrite actually does and how it does it.

/*---------------------------------------------------------------------------------*/
float o=0.075,h=1.5,T,r,O,l,I;/* Ilsa Loving        */int
_,L=80,s=3200; int main()
{for(;s%L||(h-=o,T=-2),s;4-(r=/* IT Manager        
*/O*O)<(l=I*I)|++ _==L&&
write(1,(--s%L?_<L?--_%6:6:7) /* The Jonah Group    */+"Ilsa
L.\n",1)&&(O=I=l=_=r=0,
T+=o /2))O=I*2*O+h,I=l+T-r;}  /* 416-304-0860x227   */

On 20 Jan 2018, at 22:47, Alvaro Herrera wrote:

> Michael Paquier wrote:
>> On Fri, Jan 19, 2018 at 11:33:43AM -0500, Tom Lane wrote:
>>> It means reading the whole table and writing it out in some modified
>>> form (for instance, with some column transformed into a new
>>> datatype).
>>> It's not "dangerous" in any way ... but if you've got many GB of
>>> data in
>>> the table and you can't afford to have the table locked for a long
>>> time,
>>> then it's something to avoid.
>>
>> Yeah that can be costly. Note that WAL corresponding to this data
>> needs
>> to be generated as well.
>
> Maybe we need to document this somewhere, particularly now that we
> have
> a "table_rewrite" event item.
>
> --
> Álvaro Herrera https://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message PG Doc comments form 2018-01-23 06:00:15 Can take filesystem bkp of pg data folder when server is running
Previous Message Peter Eisentraut 2018-01-22 18:06:39 Re: overlapping ranges