On 2014-07-23 00:13:26 +0900, MauMau wrote:
> Hello, Robert-san, Andres-san, Tom-san,
>
> From: "Andres Freund" <andres@2ndquadrant.com>
> >a) There very well could be a backend reconnecting to that
> > backendId. Then we potentially might try to remove the temp schema
> > from two backends - I'm not sure that's always going to end up going
> > well. There's already a race window, but it's pretty darn unlikely to
> > hit it right now because the wraparound case pretty much implies that
> > nothing has used that backendid slot for a while.
> > I guess we could do something like:
> >
> > LockDatabaseObject(tempschema);
> > if (SearchSysCacheExists1)
> > /* bailout */
> > performDeletion(...);
> >
> >b) I think at the very least we also need to call RemovePgTempFiles()
> > during crash restart.
>
> Thank you for showing the direction. I'll investigate the code. But that
> will be tomorrow as it's already past midnight.
>
> Could it be included in 9.2.9 if I could submit the patch tomorrow? (I'm not
> confident I can finish it...) I'd really appreciate it if you could create
> the fix, if tomorrow will be late.
9.2.9 is already stamped, so no. But even without that, I don't think
that this is a change that should be rushed into the backbranches. The
risk/benefit ratio just isn't on the size of doing things hastily.
Greetings,
Andres Freund
-- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services