Re: [BUGS] BUG #11867: Strange behaviour with composite types after resetting database tablespace

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: [BUGS] BUG #11867: Strange behaviour with composite types after resetting database tablespace
Дата
Msg-id 545BE646.7060808@BlueTreble.com
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #11867: Strange behaviour with composite types after resetting database tablespace  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 11/4/14, 10:45 AM, Tom Lane wrote:
> So it's safe as things stand; but this seems a bit, um, rickety.  Should
> we insert a DropRelFileNodesAllBuffers call into ATExecSetTableSpace to
> make it safer?  It's kind of annoying to have to scan the buffer pool
> twice, but I'm afraid that sometime in the future somebody will try to get
> clever about optimizing away the end-of-transaction buffer pool scan, and
> break this case.  Or maybe I'm just worrying too much.

We could possibly remember what relations have been moved to different tablespaces in a transaction and avoid the call
inthat case, but that seems rather silly.
 

If there's any non-trivial actual data involved then presumably the buffer scan won't be noticed amidst all the IO, so
thiswould only be an issue if you're playing games with mostly empty tables, and only then if you've got really large
sharedbuffers. I can't actually come up with any real use case for that.
 

So +1 for doing the safe thing...
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Kevin Grittner
Дата:
Сообщение: Re: Tweaking Foreign Keys for larger tables
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Proposal: Log inability to lock pages during vacuum