Re: Commit 86dc90056 - Rework planning and execution of UPDATE and DELETE

2021-04-19 Thread Robert Haas
On Mon, Apr 19, 2021 at 1:03 PM Tom Lane wrote: > That doco is explaining the users-eye view of it. Places addressed > to datatype developers, such as the CREATE TYPE reference page, see > it a bit differently. CREATE TYPE for instance points out that > > All storage values other than plain

Re: Commit 86dc90056 - Rework planning and execution of UPDATE and DELETE

2021-04-19 Thread Tom Lane
Robert Haas writes: > On Mon, Apr 19, 2021 at 12:13 PM Tom Lane wrote: >> Au contraire. The reason that mode exists at all (for varlena types) >> is to support data types that haven't been updated for TOAST. > This kind of begs the question of whether you have the right idea > about what PLAIN

Re: Commit 86dc90056 - Rework planning and execution of UPDATE and DELETE

2021-04-19 Thread Robert Haas
On Mon, Apr 19, 2021 at 12:13 PM Tom Lane wrote: > Au contraire. The reason that mode exists at all (for varlena types) > is to support data types that haven't been updated for TOAST. Perhaps > that's now the empty set, but it's not really our job to take away the > capability. If you really wa

Re: Commit 86dc90056 - Rework planning and execution of UPDATE and DELETE

2021-04-19 Thread Tom Lane
Robert Haas writes: > On Mon, Apr 19, 2021 at 10:34 AM Amit Langote wrote: >> After 86dc90056, the new tuple is computed with the target table's >> actual TupleDesc, so the new value respects the column's attstorage, >> which makes me think the new behavior is not wrong. > I would not have expec

Re: Commit 86dc90056 - Rework planning and execution of UPDATE and DELETE

2021-04-19 Thread Robert Haas
On Mon, Apr 19, 2021 at 10:34 AM Amit Langote wrote: > After 86dc90056, the new tuple is computed with the target table's > actual TupleDesc, so the new value respects the column's attstorage, > which makes me think the new behavior is not wrong. I would not have expected SET STORAGE PLAIN to dis

Re: Commit 86dc90056 - Rework planning and execution of UPDATE and DELETE

2021-04-19 Thread Tom Lane
I wrote: > Rushabh Lathia writes: >> With the commit mentioned in the $subject, I am seeing the >> change in behaviour with the varlena header size. > Interesting. AFAICS, the new behavior is correct and the old is wrong. > SET STORAGE PLAIN is supposed to disable use of TOAST features, includin

Re: Commit 86dc90056 - Rework planning and execution of UPDATE and DELETE

2021-04-19 Thread Amit Langote
On Mon, Apr 19, 2021 at 10:00 PM Rushabh Lathia wrote: > > Hi. > > With the commit mentioned in the $subject, I am seeing the > change in behaviour with the varlena header size. Please > consider the below test: > > postgres@83795=#CREATE TABLE test_storage_char(d char(20)); > CREATE TABLE > post

Re: Commit 86dc90056 - Rework planning and execution of UPDATE and DELETE

2021-04-19 Thread Tom Lane
Rushabh Lathia writes: > With the commit mentioned in the $subject, I am seeing the > change in behaviour with the varlena header size. Interesting. AFAICS, the new behavior is correct and the old is wrong. SET STORAGE PLAIN is supposed to disable use of TOAST features, including short varlena h

Commit 86dc90056 - Rework planning and execution of UPDATE and DELETE

2021-04-19 Thread Rushabh Lathia
Hi. With the commit mentioned in the $subject, I am seeing the change in behaviour with the varlena header size. Please consider the below test: postgres@83795=#CREATE TABLE test_storage_char(d char(20)); CREATE TABLE postgres@83795=#INSERT INTO test_storage_char SELECT REPEAT('e', 20); INSERT 0