Re: Avoiding unnecessary writes during relation drop and truncate

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Avoiding unnecessary writes during relation drop and truncate
Date: 2005-03-21 02:54:20
Message-ID: 9570.1111373660@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Qingqing Zhou 2005-03-21 03:37:11 Re: Avoiding unnecessary writes during relation drop and truncate
Previous Message Qingqing Zhou 2005-03-21 02:11:15 Re: Avoiding unnecessary writes during relation drop and truncate