Re: Point in time recovery: recreating relation files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marc Munro <marc(at)bloodnok(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Point in time recovery: recreating relation files
Date: 2002-02-28 03:44:38
Message-ID: 10632.1014867878@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Marc Munro <marc(at)bloodnok(dot)com> writes:
> The current WAL recovery implementation does not recover newly created
> objects such as tables. My suggested patch is:

> When XLogOpenRelation fails to open the relation file, if errno is
> ENOENT (no file or directory) we shuld attempt to recreate the file
> using smgrcreate.

No, that's wrong. The missing ingredient is that the WAL log should
explicitly log table creations. (And also table drops.) If you look
you will find some comments showing the places where code is missing.

If you try to do it as you suggest above, then you will erroneously
recreate files that have been dropped.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2002-02-28 03:56:01 Re: eWeek Poll: Which database is most critical to
Previous Message Bruce Momjian 2002-02-28 03:42:21 Re: LRU and full table scans