Re: posgres 12 bug (partitioned table)

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: posgres 12 bug (partitioned table)
Дата
Msg-id 804629.1619041133@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: posgres 12 bug (partitioned table)  (Andres Freund <andres@anarazel.de>)
Ответы Re: posgres 12 bug (partitioned table)  (Andres Freund <andres@anarazel.de>)
Список pgsql-bugs
Andres Freund <andres@anarazel.de> writes:
> On 2021-04-21 16:51:42 -0400, Tom Lane wrote:
>> Hmm, I'd have thought that ctid would be very high on the list of
>> things we don't want to assume are the same for all AMs.  Admittedly,
>> refactoring that is going to be a large pain in the rear, but ...

> I don't really see us getting rid of something like ctid as a generic
> concept across AMs - there's just too many places that need a way to
> reference a specific tuple. However, I think we ought to change how much
> code outside of AMs know about what tids mean. And, although that's a
> significant lift on its own, we ought to make at least the generic
> representation variable width.

It seems like it might not be that hard to convert ctid generically
into a uint64, where heaps and heap-related indexes only use 6 bytes
of it.  Variable-width I agree would be a very big complication added
on top, and I'm not quite convinced that we need it.

> Not fully responsive to this: I've previously wondered if we ought to
> handle tableoid at parse-analysis or expression simplification time
> instead of runtime. It's not really something that needs runtime
> evaluation. But it's also not clear it's worth changing anything...

If you do "RETURNING tableoid" in DML on a partitioned table, or on a
traditional-inheritance hierarchy, you get the OID of the particular
partition that was touched (indeed, that's the whole point of the
feature, IIRC).  Don't really see how that could be implemented
earlier than runtime.  Also don't see where the win would be, TBH.

            regards, tom lane



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: posgres 12 bug (partitioned table)
Следующее
От: Andres Freund
Дата:
Сообщение: Re: posgres 12 bug (partitioned table)