Re: Shared buffer access rule violations?

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Shared buffer access rule violations?
Дата
Msg-id CAH2-WzkPLgJq0h7Y8MjDh5A9T-V1zBAr0ZMQNPbXcKoRDhLfBQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Shared buffer access rule violations?  (Asim R P <apraveen@pivotal.io>)
Ответы Re: Shared buffer access rule violations?
Список pgsql-hackers
On Tue, Aug 7, 2018 at 6:43 PM, Asim R P <apraveen@pivotal.io> wrote:
> Please find attached a patch to mark a shared buffer as read-write or
> read-only using mprotect().  The idea is to catch violations of shared
> buffer access rules.  This patch was useful to detect the access
> violations reported in this thread.  The mprotect() calls are enabled
> by -DMPROTECT_BUFFER compile time flag.

I wonder if it would be a better idea to enable Valgrind's memcheck to
mark buffers as read-only or read-write. We've considered doing
something like that for years, but for whatever reason nobody followed
through.

Using Valgrind would have the advantage of making it possible to mark
memory as undefined or as noaccess. I can imagine doing even fancier
things by making that distinction within buffers. For example, marking
the hole in the middle of a page/buffer as undefined, while still
marking the entire buffer noaccess when there is no pin held.

-- 
Peter Geoghegan


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

Предыдущее
От: Asim R P
Дата:
Сообщение: Re: Shared buffer access rule violations?
Следующее
От: Andres Freund
Дата:
Сообщение: Why do we expand tuples in execMain.c?