On Sat, Dec 11, 2010 at 2:53 PM, Jeff Janes <jeff.ja...@gmail.com> wrote: > On Wed, Dec 8, 2010 at 6:52 AM, Marti Raudsepp <ma...@juffo.org> wrote: >> A very useful feature for unlogged tables would be the ability to >> switch them back to normal tables -- this way you could do bulk >> loading into an unlogged table and then turn it into a regular table >> using just fsync(), bypassing all the WAL-logging overhead. > > If archive_mode is off, then you can often find a way to bypass > WAL-logging during bulk loading anyway. > > If archive_mode is on, then I don't see how this can work without > massive changes.
Well, you'd need to work your way through the heap and all of its indices and XLOG every page. And you've got to do that in a way that's transaction-safe, and I don't have a design in mind for that off the top of my head. But I think "massive changes" is probably an overstatement. We can already handle ALTER TABLE operations that involve a full relation rewrite, and that already does the full-table-XLOG thing. -- 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