Re: Avoiding unnecessary writes during relation drop and truncate - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Avoiding unnecessary writes during relation drop and truncate
Date
Msg-id 9570.1111373660@sss.pgh.pa.us
Whole thread Raw
In response to Re: Avoiding unnecessary writes during relation drop and truncate  ("Qingqing Zhou" <zhouqq@cs.toronto.edu>)
List pgsql-hackers
"Qingqing Zhou" <zhouqq@cs.toronto.edu> writes:
> What if AtEOXact_Inval() fails (though the chance is slim)? Does that mean
> that smgrDoPendingDeletes() -> DropRelFileNodeBuffers can never get
> executed, which means we can never "dropped without write" the buffers
> belonging to the victim relation? So when the BgWrite sweeps, it will write
> those buffers to a non-logically-existed file?

So it'll get an error ... this scenario doesn't strike me as any worse
than any other problem occuring in post-commit cleanup.  The locks left
around by the not-cleaned-up transaction would probably be a bigger
issue, for example.
        regards, tom lane


pgsql-hackers by date:

Previous
From: strk@refractions.net
Date:
Subject: caches lifetime with SQL vs PL/PGSQL procs
Next
From: Kenneth Marshall
Date:
Subject: Re: Changing the default wal_sync_method to open_sync for Win32?