Re: TupleTableSlot abstraction
Amit Khandekar <amitdkhan.pg@gmail.com>
Attachments
- pg_abstract_tts_patches_v12.tar.gz (application/x-gzip)
I have only done the below two changes yet. After doing that and rebasing with latest master, in the regression I got crashes, and I suspect the reason being that I have used Virtual tuple slot for the destination slot of execute_attr_map_slot(). I am analyzing it. I am anyway attaching the patches (v12) to give you an idea of how I have handled the below two items. On Wed, 26 Sep 2018 at 05:09, Andres Freund <andres@anarazel.de> wrote: > > On 2018-09-04 18:35:34 +0530, Amit Khandekar wrote: > > The attached v11 tar has the above set of changes. > > - I've pushed 0003 - although that commit seems to have included a lot > of things unrelated to the commit message. I guess two patches have > accidentally been merged? Could you split out the part of the changes > that was mis-squashed? Yeah, it indeed looks like it had unrelated things, mostly the changes that moved the slot attribute functions into execTuples.c . I have included this change as the very first patch in the patch series. >> From 280eac5c6758061d0a46b7ef9dd324e9a23226b5 Mon Sep 17 00:00:00 2001 >> From: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> >> Date: Fri, 31 Aug 2018 10:53:42 +0530 >> Subject: [PATCH 08/14] Change tuple table slot creation routines to suite >> tuple table slot abstraction >> >> This change requires ExecInitResultTupleSlotTL, ExecInitScanTupleSlot, >> ExecCreateScanSlotFromOuterPlan, ExecInitNullTupleSlot, >> ExecInitExtraTupleSlot, MakeTupleTableSlot, ExecAllocTableSlot to >> accept TupleTableSlotType as a new parameter. Change all their calls. >> >> Ashutosh Bapat and Andres Freund >> >> This by itself won't compile. Neither the tuple table slot abstraction >> patch would compile and work without this change. Both of those need >> to be committed together. > > I don't like this kind of split - all commits should individually > compile. I think we should instead introduce dummy / empty structs for > &TTSOpsHeapTuple etc, and add the parameters necessary to pass them > through. And then move this patch to *before* the "core" abstract slot > patch. That way every commit, but the super verbose stuff is still > split out. > Done. Moved this patch before the core one. In this patch, just declared the global variables of type TupleTableSlotOps, without initializing them. I have tried to make sure individual patches compile successfully by shuffling around the changes to the right patch, but there is one particular patch that still gives error. Will fix that later. I will handle the other review comments in the next patch series.
Commits
-
Fix memory leak when inserting tuple at relation creation for CTAS
- 414a9d3cf34c 12.0 landed
-
Build HashState's hashkeys expression with the correct parent.
- 5f32b29c1819 12.0 landed
-
Move TupleTableSlots boolean member into one flag variable.
- c5257345ef61 12.0 landed
-
Move generic slot support functions from heaptuple.c into execTuples.c.
- 9d906f1119de 12.0 landed
-
Remove absolete function TupleDescGetSlot().
- 10763358c3f0 12.0 landed
-
Remove function list from prologue of execTuples.c.
- bbdfbb9154fc 12.0 landed
-
Split ExecStoreTuple into ExecStoreHeapTuple and ExecStoreBufferHeapTuple.
- 29c94e03c7d0 12.0 landed
-
Change TupleTableSlot->tts_nvalid to type AttrNumber.
- a598708ffa8e 12.0 landed
-
Deduplicate code between slot_getallattrs() and slot_getsomeattrs().
- 88ebd62fcc2e 12.0 landed
-
Mention ownership requirements for REFRESH MATERIALIZED VIEW in docs
- ee8012481190 12.0 cited
-
Spell "partitionwise" consistently.
- 31380bc7c204 12.0 cited
-
Fix WHERE CURRENT OF when the referenced cursor uses an index-only scan.
- 8f5ac440430a 11.0 cited