Re: Re: Cache relation sizes? - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Re: Cache relation sizes?
Date
Msg-id CA+hUKGLKGNyn16B+EH-ArEan_UujPdNwS78FOfmY3W7gugO+4w@mail.gmail.com
Whole thread Raw
In response to 回复:Re: Cache relation sizes?  ("陈佳昕(步真)" <buzhen.cjx@alibaba-inc.com>)
Responses 回复:Re: Re: Cache relation sizes?
List pgsql-hackers
On Wed, Dec 23, 2020 at 1:31 AM 陈佳昕(步真) <buzhen.cjx@alibaba-inc.com> wrote:
> I studied your patch these days and found there might be a problem.
> When execute 'drop database', the smgr shared pool will not be removed because of no call 'smgr_drop_sr'. Function
'dropdb'in dbcommands.c remove the buffer from bufferpool and unlink the real files by 'rmtree', It doesn't call
smgrdounlinkall,so the smgr shared cache will not be dropped although the table has been removed. This will cause some
errorswhen smgr_alloc_str -> smgropen、smgrimmedsync. Table file has been removed, so smgropen and smgrimmedsync will
geta unexpected result. 

Hi Buzhen,

Thanks, you're right -- it needs to scan the pool of SRs and forget
everything from the database you're dropping.



pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Cache relation sizes?
Next
From: Fabien COELHO
Date:
Subject: timestamp bogus parser?