Re: Assert in heapgettup_pagemode() fails due to underlying buffer change
| От | Robert Haas |
|---|---|
| Тема | Re: Assert in heapgettup_pagemode() fails due to underlying buffer change |
| Дата | |
| Msg-id | CA+TgmoaNY0cKKcuUo3wQub6OUeyEyU9ySgSTEe51ToJTazC-XQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Assert in heapgettup_pagemode() fails due to underlying buffer change (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
| Ответы |
Re: Assert in heapgettup_pagemode() fails due to underlying buffer change
|
| Список | pgsql-hackers |
On Fri, Jun 7, 2024 at 4:05 AM Alvaro Herrera <alvherre@alvh.no-ip.org> wrote: > > static void > > -ZeroBuffer(Buffer buffer, ReadBufferMode mode) > > +ZeroBuffer(Buffer buffer, ReadBufferMode mode, bool zero) > > This change makes the API very strange. Should the function be called > ZeroAndLockBuffer() instead? Then the addition of a "bool zero" > argument makes a lot more sense. I agree that's better, but it still looks a bit weird. You have to realize that 'bool zero' means 'is already zeroed' here -- or at least, I guess that's the intention. But then I wonder why you'd call a function called ZeroAndLockBuffer if all you need to do is LockBuffer. -- Robert Haas EDB: http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: