Re: 32TB relation size make mdnblocks overflow

Поиск
Список
Период
Сортировка
Искать
От
Julien Rouhaud
Тема
Re: 32TB relation size make mdnblocks overflow
Дата
Msg-id
20220118072510.uimhupioyhr7tc77@jrouhaud
Ответ на
Список
Дерево обсуждения
32TB relation size make mdnblocks overflow "陈佳昕(步真)" <buzhen.cjx@alibaba-inc.com>
Re: 32TB relation size make mdnblocks overflow Julien Rouhaud <rjuju123@gmail.com>
Re: 32TB relation size make mdnblocks overflow Tom Lane <tgl@sss.pgh.pa.us>
Hi,

On Tue, Jan 18, 2022 at 02:21:14PM +0800, 陈佳昕(步真) wrote:
> 
> We know that PostgreSQL doesn't support a single relation size over 32TB,
> limited by the MaxBlockNumber. But if we just 'insert into' one relation over
> 32TB, it will get an error message 'unexpected data beyond EOF in block 0 of
> relation' in ReadBuffer_common. The '0 block' is from mdnblocks function
> where the segment number is over 256 and make segno * RELSEG_SIZE over
> uint32's max value. So is it necessary to make the error message more
> readable like 'The relation size is over max value ...' and elog in
> mdnblocks?

I didn't try it but this is supposed to be caught by mdextend():

	/*
	 * If a relation manages to grow to 2^32-1 blocks, refuse to extend it any
	 * more --- we mustn't create a block whose number actually is
	 * InvalidBlockNumber.  (Note that this failure should be unreachable
	 * because of upstream checks in bufmgr.c.)
	 */
	if (blocknum == InvalidBlockNumber)
		ereport(ERROR,
				(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
				 errmsg("cannot extend file \"%s\" beyond %u blocks",
						relpath(reln->smgr_rnode, forknum),
						InvalidBlockNumber)));


Didn't you hit this?


В списке pgsql-hackers по дате отправления
От: Julien Rouhaud
Дата:
От: Simon Riggs
Дата:
FAQ