On Tue, Nov 30, 2010 at 10:36 PM, Andy Colson <a...@squeakycode.net> wrote: > [ review ]
Currently, if you create an unlogged table, restart PG, and vacuum the table, you'll get this: rhaas=# vacuum unlogged; WARNING: relation "unlogged" page 0 is uninitialized --- fixing VACUUM The reason this happens is because the init fork of an unlogged heap consists of a single empty page, rather than a totally empty file. I needed to WAL-log the creation of the init fork, and there's currently no way to WAL-log the creation of an empty file other than the main relation fork. I figured a file with one empty page would be just as good as a totally empty file, and that way I could piggyback on XLOG_HEAP_NEWPAGE, which will automatically create the relation fork if it's not already there. However, as the above warning message demonstrates, this was a bit too clever. One possible fix is to change the XLOG_SMGR_CREATE record to carry a fork number. Does that seem reasonable, or would anyone like to recommend another approach? I'm also going to go through and change all instances of the word "unlogged" to "volatile", per previous discussion. If this seems like a bad idea to anyone, please object now rather than afterwards. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers