From: | David Steele <david(at)pgmasters(dot)net> |
---|---|
To: | Kevin Grittner <kgrittn(at)gmail(dot)com> |
Cc: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com>, Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, David Fetter <david(at)fetter(dot)org>, Kevin Grittner <kgrittn(at)ymail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Amit Khandekar <amit(dot)khandekar(at)enterprisedb(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: delta relations in AFTER triggers |
Date: | 2017-03-02 15:04:44 |
Message-ID: | ee4038f8-25be-1667-e0f0-05ae09ca7e05@pgmasters.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Kevin,
On 2/20/17 10:43 PM, Thomas Munro wrote:
> On Tue, Feb 21, 2017 at 7:14 AM, Thomas Munro
> <thomas(dot)munro(at)enterprisedb(dot)com> wrote:
>> On Fri, Jan 20, 2017 at 2:49 AM, Kevin Grittner <kgrittn(at)gmail(dot)com> wrote:
>>> Attached is v9 which fixes bitrot from v8. No other changes.
>>>
>>> Still needs review.
>
> Based on a suggestion from Robert off-list I tried inserting into a
> delta relation from a trigger function and discovered that it
> segfaults:
>
> * frame #0: 0x00000001057705a6
> postgres`addRangeTableEntryForRelation(pstate=0x00007fa58186a4d0,
> rel=0x0000000000000000, alias=0x0000000000000000, inh='\0',
> inFromCl='\0') + 70 at parse_relation.c:1280 [opt]
> frame #1: 0x000000010575bbda
> postgres`setTargetTable(pstate=0x00007fa58186a4d0,
> relation=0x00007fa58186a098, inh=<unavailable>, alsoSource='\0',
> requiredPerms=1) + 90 at parse_clause.c:199 [opt]
> frame #2: 0x0000000105738530 postgres`transformStmt [inlined]
> transformInsertStmt(pstate=<unavailable>) + 69 at analyze.c:540 [opt]
> frame #3: 0x00000001057384eb
> postgres`transformStmt(pstate=<unavailable>, parseTree=<unavailable>)
> + 2411 at analyze.c:279 [opt]
> frame #4: 0x0000000105737a42
> postgres`transformTopLevelStmt(pstate=<unavailable>,
> parseTree=0x00007fa58186a438) + 18 at analyze.c:192 [opt]
> frame #5: 0x00000001059408d0
> postgres`pg_analyze_and_rewrite_params(parsetree=0x00007fa58186a438,
> query_string="insert into d values (1000000, 1000000, 'x')",
> parserSetup=(plpgsql.so`plpgsql_parser_setup at pl_comp.c:1017),
> parserSetupArg=0x00007fa58185c2a0, queryEnv=0x00007fa581857798) + 128
> at postgres.c:706 [opt]
Do you know when you will have a new patch ready?
This looks like an interesting and important feature but I think it's
going to have to come together quickly if it's going to make it into v10.
Thanks,
--
-David
david(at)pgmasters(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | David Steele | 2017-03-02 15:13:39 | Re: Proposal for changes to recovery.conf API |
Previous Message | David Steele | 2017-03-02 14:57:50 | Re: [PATCH] kNN for btree |