From 282d2a03dd30804b01f8042f640d638c2ee76604 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Thu, 20 Sep 2007 17:56:33 +0000 Subject: HOT updates. When we update a tuple without changing any of its indexed columns, and the new version can be stored on the same heap page, we no longer generate extra index entries for the new version. Instead, index searches follow the HOT-chain links to ensure they find the correct tuple version. In addition, this patch introduces the ability to "prune" dead tuples on a per-page basis, without having to do a complete VACUUM pass to recover space. VACUUM is still needed to clean up dead index entries, however. Pavan Deolasee, with help from a bunch of other people. --- src/backend/executor/spi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/backend/executor/spi.c') diff --git a/src/backend/executor/spi.c b/src/backend/executor/spi.c index af94ad1a3b8..875e4da2914 100644 --- a/src/backend/executor/spi.c +++ b/src/backend/executor/spi.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.180 2007/08/15 19:15:46 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/executor/spi.c,v 1.181 2007/09/20 17:56:31 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -1407,6 +1407,7 @@ _SPI_prepare_plan(const char *src, SPIPlanPtr plan) plansource->num_params = nargs; plansource->fully_planned = true; plansource->fixed_result = false; + /* no need to set search_path, generation or saved_xmin */ plansource->resultDesc = PlanCacheComputeResultDesc(stmt_list); plansource->plan = cplan; @@ -1973,6 +1974,7 @@ _SPI_copy_plan(SPIPlanPtr plan, MemoryContext parentcxt) newsource->num_params = newplan->nargs; newsource->fully_planned = plansource->fully_planned; newsource->fixed_result = plansource->fixed_result; + /* no need to worry about seach_path, generation or saved_xmin */ if (plansource->resultDesc) newsource->resultDesc = CreateTupleDescCopy(plansource->resultDesc); newsource->plan = newcplan; -- cgit v1.2.3