switch UNLOGGED to LOGGED

Leonardo Francalanci <m_lists@yahoo.it>

From: Leonardo Francalanci <m_lists@yahoo.it>
To: pgsql-hackers@postgresql.org
Date: 2011-04-08T10:01:38Z
Lists: pgsql-hackers
Hi,

I read the discussion at 


http://archives.postgresql.org/pgsql-hackers/2011-01/msg00315.php 


From what I can understand, going from/to unlogged to/from logged in
the wal_level == minimal case is not too complicated. 

Suppose I try to write a patch that allows 

ALTER TABLE tablename SET LOGGED (or UNLOGGED)
(proper sql wording to be discussed...)

only in the wal_level == minimal case: would it be accepted as a
"first step"? Or rejected because it doesn't allow it in the other
cases?

From what I got in the discussion, handling the other wal_level cases
can be very complicated (example: the issues in case "we *crash*
without writing an abort record").




Leonardo