Re: [HACKERS] Unlogged tables cleanup

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>, konstantin knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Unlogged tables cleanup
Date: 2019-05-14 03:50:09
Message-ID: 20190514035009.GI1418@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 13, 2019 at 10:52:21AM -0700, Andres Freund wrote:
> I was wrong here - I thought we WAL logged the main fork creation even
> for unlogged tables. I think it's foolish that we don't, but we don't.

Why? The main fork is not actually necessary, and the beginning of
recovery would make sure that any existing main fork gets removed and
that the main fork gets recreated by copying it from the init fork,
which is WAL-logged. So we definitely have to log the init fork, but
logging the main fork is just useless data in the WAL record. Or you
have something else in mind?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-05-14 03:50:21 Re: PANIC :Call AbortTransaction when transaction id is no normal
Previous Message Michael Paquier 2019-05-14 03:37:39 Re: PANIC :Call AbortTransaction when transaction id is no normal