> > If the  master crashes while a transaction that used CREATE TABLE is 
> >  both the master and the standby will indefinitely retain identical, stray  
> > referenced by pg_class) files.  The catalogs do reference the  relfilenode 
> > each unlogged relation; currently, that relfilenode never  exists on a 
> > while that standby is accepting connections.  By the  time the startup 
> > releases the AccessExclusiveLock acquired by  the proposed UNLOGGED -> 
> > conversion process, that relfilenode  needs to be either fully copied or 
> > all over again.   (Alternately, find some other way to make sure queries 
> > read the  half-copied file.)  In effect, the problem is that the 
> > relfilenode 
> >  *not* stray, so its final state does need to be well-defined.
> Oh,  right.
> Maybe we should just put in a rule that a server in Hot Standby  mode
> won't ever try to read from an unlogged table (right now we count  on
> the fact that there will be nothing to read).  If we crash  before
> copying the whole file, it won't matter, because the catalogs  won't
> have been updated, so we'll refuse to look at it anyway.  And we  have
> to reinitialize on entering normal running anyway, so we can clean  it
> up then.

Ok then... I'll try to code the "easy" version first (the wal_level=minimal 
and then we'll see....


Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to