Re: get rid of RM_HEAP2_ID
| От | Heikki Linnakangas |
|---|---|
| Тема | Re: get rid of RM_HEAP2_ID |
| Дата | |
| Msg-id | 1c511d09-b0e4-44f8-94d6-067ef416bfd4@iki.fi обсуждение исходный текст |
| Ответ на | Re: get rid of RM_HEAP2_ID (Michael Paquier <michael@paquier.xyz>) |
| Список | pgsql-hackers |
On 15/10/2025 02:54, Michael Paquier wrote: > On Tue, Oct 14, 2025 at 03:20:16PM +0300, Heikki Linnakangas wrote: >> I'm not sure I agree with the premise that we should try to get rid of >> RM_HEAP2_ID. There's nothing wrong with that scheme as such. As an >> alternative, we could easily teach e.g pg_waldump to treat RM_HEAP_ID and >> RM_HEAP2_ID the same for statistics purposes. > > Yeah, I'd rather keep heap2 as well. As long as there is more room > for the record IDs, we're still going to need it in the long run. IMO if we do expand xl_info so that we have a full byte for RMGR-specific info, then it does make sense to get rid of RM_HEAP2_ID like this patch does. But if that was the only reason for changing the WAL record header format, I don't think it's worth it. >> This patch consumes one of the padding bytes. That's not entirely free, as >> there is an opportunity cost: we could squeeze out the padding bytes and >> save 2 bytes on every WAL record instead. > > Do you recall an alternative where it would have been possible to save > 2 bytes for each record by removing the padding, and still have the > full byte of xl_info be usable freely by each RMGR? I cannot recall > any magic based on how XLogRecord is designed now, but perhaps I > have missed an argument. I don't know how to do that. My point was that if we *don't* consume a full byte for RMGR-specific info, we could remove the two padding bytes instead and make every WAL record 2 bytes smaller. - Heikki
В списке pgsql-hackers по дате отправления: