Re: switch UNLOGGED to LOGGED

Leonardo Francalanci <m_lists@yahoo.it>

From: Leonardo Francalanci <m_lists@yahoo.it>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Alvaro Herrera <alvherre@commandprompt.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-05-08T06:31:38Z
Lists: pgsql-hackers
> On Fri, Apr 22, 2011 at 4:13 AM, Leonardo Francalanci <m_lists@yahoo.it> 
wrote:
> >> Maybe  you should change  xl_act_commit to have a separate list of rels to
> >>  drop the init fork for  (instead of mixing those with the list of files  
to
> >> drop as a  whole).
> >
> > I tried to follow your  suggestion, thank you very much.
> 
> I have to admit I don't like this  approach very much.  I can't see
> adding 4 bytes to every commit record  for this feature.


I understand.

What if, in xl_xact_commit, instead of 

RelFileNode xnodes

I use another struct for xnodes, something like:

{
 RelFileNode xnode;
 bool            onlyInitFork;
}


That would increase the commit record size only when there are
RelFileNode(s) to drop at commit. So, instead of 4 bytes in
every commit, there are "wasted" bytes when the commit record
contains deleted permanent relations (that should happen much
less). I'm open to suggestions here...


> > 3) Should we have a "cascade" option? I don't know  if I have to handle
> > inherited tables and other dependent  objects
> 
> Look at the way ALTER TABLE [ONLY] works for other action types,  and copy it.


Ok


Thank you very much



Leonardo