Re: Strange problem with create table as select * from table;
| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Strange problem with create table as select * from table; |
| Дата | |
| Msg-id | 20111105182023.GA17051@svana.org обсуждение исходный текст |
| Ответ на | Re: Strange problem with create table as select * from table; (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
On Fri, Nov 04, 2011 at 09:04:02PM -0400, Tom Lane wrote: > Hah ... I have a theory. > > I will bet that you recently added some column(s) to the source table > using ALTER TABLE ADD COLUMN and no default value, so that the added > columns were nulls and no table rewrite happened. And that these > troublesome rows predate that addition, but contained no nulls before > that. And that they are the only rows that, in addition to the above > conditions, contain data fields wide enough to require out-of-line > toasting. > > These conditions together are enough to break the assumption in > toast_insert_or_update that the old and new tuples must have the same > value of t_hoff. Wow! Good catch. > This is trivial to fix, now that we know there's a problem --- the > function is only using that assumption to save itself a couple lines > of code. Penny wise, pound foolish :-( No doubt the assumption was true when the code was written, but still. Hve a nice day, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > He who writes carelessly confesses thereby at the very outset that he does > not attach much importance to his own thoughts. -- Arthur Schopenhauer
Вложения
В списке pgsql-general по дате отправления: