Re: switch UNLOGGED to LOGGED

From: Leonardo Francalanci <m_lists(at)yahoo(dot)it>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: switch UNLOGGED to LOGGED
Date: 2011-05-08 06:31:38
Message-ID: 842496.23282.qm@web29017.mail.ird.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Fri, Apr 22, 2011 at 4:13 AM, Leonardo Francalanci <m_lists(at)yahoo(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Smith 2011-05-08 06:41:38 Re: patch for new feature: Buffer Cache Hibernation
Previous Message Tom Lane 2011-05-08 05:04:03 Re: postgresql.conf error checking strategy