Re: It's past time to redo the smgr API - Mailing list pgsql-hackers

From Tom Lane
Subject Re: It's past time to redo the smgr API
Date
Msg-id 12000.1076016161@sss.pgh.pa.us
Whole thread Raw
In response to Re: It's past time to redo the smgr API  ("Marc G. Fournier" <scrappy@postgresql.org>)
Responses Re: It's past time to redo the smgr API  ("Marc G. Fournier" <scrappy@postgresql.org>)
List pgsql-hackers
"Marc G. Fournier" <scrappy@postgresql.org> writes:
> 'k, only comment is on this one ... would it not be a bit more efficient
> to add a flag to the "SMgrRelation *" structure that acts as a timer?

Hm, we could try that, although I'm not sure it would help much.  You'd
have to set the timeout to be longer than a checkpoint interval to make
any difference.

In the back of my mind is the thought that the Windows guys are going to
end up passing file-delete requests over to the bgwriter anyway, which
would largely eliminate the issue --- the bgwriter would know which
files need to be sgmrclose'd and wouldn't have to do smgrcloseall.
(If they don't do this, how are they going to cope with backends that
exit before their file deletion is completed?)

I'll do it the easy way for now and we can refine it after we see what
the file-close solution for Windows ends up looking like.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: It's past time to redo the smgr API
Next
From: Rod Taylor
Date:
Subject: Re: Preventing duplicate vacuums?