Re: Writing WAL for relcache invalidation: pg_internal.init

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgresql(dot)org, "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Writing WAL for relcache invalidation: pg_internal.init
Date: 2006-11-01 17:05:25
Message-ID: 20450.1162400725@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

"Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
> Enclose a patch for new WAL records for relcache invalidation.

I don't think this works. RelationCacheInitFileInvalidate is executed
post-commit, which means that there's a window between commit and where
you propose to write the WAL entry. A crash and restart in that
interval would leave the catalog changes committed, but not reflected
into pg_internal.init.

I think we're probably better off to just forcibly remove the init file
during post-recovery cleanup. The easiest place to do this might be
BuildFlatFiles, which has to scan pg_database anyway ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2006-11-01 17:20:26 Re: Extended protocol logging
Previous Message Chuck McDevitt 2006-11-01 16:31:30 Re: [HACKERS] Case Preservation disregarding case

Browse pgsql-patches by date

  From Date Subject
Next Message Simon Riggs 2006-11-01 17:20:26 Re: Extended protocol logging
Previous Message Tom Lane 2006-11-01 15:06:49 Re: Extended protocol logging