Re: Should TIDs be typbyval = FLOAT8PASSBYVAL to speed up CREATE INDEX CONCURRENTLY?
От | Tom Lane |
---|---|
Тема | Re: Should TIDs be typbyval = FLOAT8PASSBYVAL to speed up CREATE INDEX CONCURRENTLY? |
Дата | |
Msg-id | 31571.1447775689@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Should TIDs be typbyval = FLOAT8PASSBYVAL to speed up CREATE INDEX CONCURRENTLY? (Peter Geoghegan <pg@heroku.com>) |
Ответы |
Re: Should TIDs be typbyval = FLOAT8PASSBYVAL to speed up
CREATE INDEX CONCURRENTLY?
|
Список | pgsql-hackers |
Peter Geoghegan <pg@heroku.com> writes: >>> Might be better to hack a special case right there (ie, embed TIDs into >>> int8s and sort the int8s) rather than try to change the type's SQL >>> declaration. > I suggested to someone else that he take a look at this as a project, > but I guess he was busy too. I decided to just do it myself. Patch is > attached. I think this might do the wrong thing with block numbers above 0x80000000 and/or offset numbers above 0x8000. I'd be more comfortable about it if + encoded = ((int64) block << 16) | offset; were + encoded = ((uint64) block << 16) | (uint16) offset; so that there's no risk of the compiler deciding to sign-extend rather than zero-fill either input. Also, I think it'd be a good idea to explicitly set indexcursor = NULL in the tuplesort_empty case; the previous coding was effectively doing that. It's true that the code shouldn't attempt to touch the value, but it's better not to have dangling pointers lying around. regards, tom lane
В списке pgsql-hackers по дате отправления: