Re: Foreign join pushdown vs EvalPlanQual - Mailing list pgsql-hackers

From Jeevan Chalke
Subject Re: Foreign join pushdown vs EvalPlanQual
Date
Msg-id CAM2+6=XsXhMw_owFiKJP9syUx9eFc0x5U9jGOtO9v34G5epd8g@mail.gmail.com
Whole thread Raw
In response to Re: Foreign join pushdown vs EvalPlanQual  (Etsuro Fujita <fujita.etsuro@lab.ntt.co.jp>)
Responses Re: Foreign join pushdown vs EvalPlanQual  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
List pgsql-hackers
<div dir="ltr"><br /><div class="gmail_extra"><br /><div class="gmail_quote">On Fri, Oct 9, 2015 at 3:35 PM, Etsuro
Fujita<span dir="ltr"><<a href="mailto:fujita.etsuro@lab.ntt.co.jp"
target="_blank">fujita.etsuro@lab.ntt.co.jp</a>></span>wrote:<br /><br />Hi,<br /><br />Just to have hands on, I
startedlooking into this issue and trying to<br />grasp it as this is totally new code for me. And later I want to
review<br/>this code changes.<br /><br />I have noticed that, this thread started saying we are getting a crash<br
/>withthe given steps with foreign_join_v16.patch, I am correct?<br /><br />Then there are various patches which trying
tofix this,<br />fdw-eval-plan-qual-*.patch<br /><br />I have tried applying foreign_join_v16.patch, which was good.
Andtried<br />reproducing the crash. But instead of crash I am getting following error.<br /><br />ERROR:  could not
serializeaccess due to concurrent update<br />CONTEXT:  Remote SQL command: SELECT a FROM public.foo FOR UPDATE<br
/>RemoteSQL command: SELECT a FROM public.tab FOR UPDATE<br /><br /><br />Then I have applied
fdw-eval-plan-qual-3.0.patchon top of it. It was not<br />getting applied cleanly (may be due to some other changes
meanwhile).<br/>I fixed the conflicts and the warnings to make it compile.<br /><br />When I run same sql sequence, I
amgetting crash in terminal 2 at EXPLAIN<br />it self.<br /><br /><span style="font-family:monospace,monospace">server
closedthe connection unexpectedly<br />    This probably means the server terminated abnormally<br />    before or
whileprocessing the request.<br />The connection to the server was lost. Attempting reset: Failed.<br />!>
</span><br/><br />Following sql statement I am using:<br /><br /><span style="font-family:monospace,monospace">create
tabletab (a int, b int);<br />create foreign table foo (a int) server myserver options(table_name 'tab');<br />create
foreigntable bar (a int) server myserver options(table_name 'tab');<br /><br />insert into tab values (1, 1);<br
/>insertinto foo values (1);<br />insert into bar values (1);<br /><br />analyze tab;<br />analyze foo;<br />analyze
bar;<br/><br /><br />Run the example:<br /><br />[Terminal 1]<br />begin;<br />update tab set b = b + 1 where a = 1;<br
/><br/>[Terminal 2]<br />explain verbose select tab.* from tab, foo, bar where tab.a =<br />foo.a and foo.a = bar.a for
update;<br/></span><br /><br />Am I missing something here?<br />Do I need to apply any other patch from other
mail-threads?<br/><br />Do you have sample test-case explaining the issue and fix?<br /><br />With these simple
questions,I might have taking the thread slightly off<br />from the design considerations, please excuse me for
that.<br/><br />Thanks<br /></div><br />-- <br /><div class="gmail_signature"><div dir="ltr">Jeevan B Chalke<br
/>PrincipalSoftware Engineer, Product Development<br />EnterpriseDB Corporation<br />The Enterprise PostgreSQL
Company<br/><br /></div></div></div></div> 

pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: Multi-tenancy with RLS
Next
From: Peter Eisentraut
Date:
Subject: Re: proposal: PL/Pythonu - function ereport