From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Re: What use case is make_tuple_indirect() supposed to illustrate? |
Date: | 2014-04-23 08:04:28 |
Message-ID: | 20140423080428.GG4449@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2014-04-22 20:22:23 -0400, Tom Lane wrote:
> And for that matter, it's a bit silly to be testing make_tuple_indirect
> in a BEFORE INSERT/UPDATE trigger, because even if the tuple gets out
> of the trigger without being flattened, it will certainly get flattened
> mere nanoseconds later before it gets written out to disk. (If it did
> not, the test case would fail altogether, since the indirect values
> in memory only survive for the length of the current transaction.)
Well, that's part of what it's essentially testing. We better not end up
with a indirect datum, pointing to memory after all, ending up in a disk
tuple.
> So I'm wondering exactly what use-case this test is supposed to represent.
Testing stuff I was concerned could break without tests. Especially as
this was committed before the rest of the decoding stuff was.
> Or is the whole thing just a toy anyway? Because the more I look at that
> patch, the less it looks like it could do anything useful, short of adding
> a ton of infrastructure that's not there now.
Indirect toast tuples are actively used in logical decoding. So there is
a usecase.
I think there's further potential uses for both the infrastructure for
further toast types in general and specifically indirect toast
tuples. But we'll see.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-04-23 08:11:23 | Re: Missing pfree in logical_heap_rewrite_flush_mappings() |
Previous Message | Albe Laurenz | 2014-04-23 07:58:33 | Re: 9.4 Proposal: Initdb creates a single table |