From: | Kevin Grittner <kgrittn(at)gmail(dot)com> |
---|---|
To: | David Steele <david(at)pgmasters(dot)net> |
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 22:44:01 |
Message-ID: | CACjxUsO4g_-XBMDnZRO-4=agpNUpGONOmOiz-kH4Xmk5FHU8hQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Mar 2, 2017 at 9:04 AM, David Steele <david(at)pgmasters(dot)net> wrote:
> On 2/20/17 10:43 PM, Thomas Munro wrote:
>> 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.
I hope to post a new version addressing review comments by Monday (6 March).
--
Kevin Grittner
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2017-03-02 23:09:13 | Re: Cleanup: avoid direct use of ip_posid/ip_blkid |
Previous Message | Julien Rouhaud | 2017-03-02 22:39:05 | Re: [PATCH] SortSupport for macaddr type |