Re: Point in time recovery: recreating relation files - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Point in time recovery: recreating relation files
Date
Msg-id 10632.1014867878@sss.pgh.pa.us
Whole thread Raw
In response to Point in time recovery: recreating relation files  (Marc Munro <marc@bloodnok.com>)
Responses Re: Point in time recovery: recreating relation files  (Marc Munro <marc@bloodnok.com>)
Re: Point in time recovery: recreating relation files  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
Marc Munro <marc@bloodnok.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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: LRU and full table scans
Next
From: Bruce Momjian
Date:
Subject: Re: eWeek Poll: Which database is most critical to