Re: FDW Parallel Append

From: Sanyo Moura <sanyo(dot)moura(at)tatic(dot)net>
To: Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: FDW Parallel Append
Date: 2018-10-31 16:04:47
Message-ID: CAO698qYjS7zaH-S-Gjs=or_oqNOb0hhAg=2y_d6tifcK0ocUGw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Amit
Tks a lot, that worked.
Now I have to deal with other concerns when lauching more than 1 worker.
I'll try to advance my tests.

Regards,

Sanyo Moura

Em qua, 31 de out de 2018 às 01:38, Amit Langote <
Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp> escreveu:

> Hi,
>
> On 2018/10/31 3:25, Sanyo Moura wrote:
> > Hi hackers,
> >
> > I am trying to improve my xdr_fdw (a foreign data wrapper that scan file
> > systems that keep big data compacted) to scan partitions in parallel.
> >
> > But when I execute or analyze I get an error:
> >
> > EXPLAIN ANALYZE SELECT * FROM precio WHERE fecha BETWEEN '2017-01-01' AND
> > '2017-01-02'
> >
> > ERROR: ExtensibleNodeMethods "XDRInfo" was not registered
> > CONTEXT: parallel worker
> > SQL state: 42704
> >
> > XDRInfo is my private structure that implement extensible methods.
> > It is registered in my "xdr_fdw_handler"
> >
> > Datum
> > xdr_fdw_handler(PG_FUNCTION_ARGS)
> > {
> > FdwRoutine *routine = makeNode(FdwRoutine);
> > .
> > .
> > .
> > RegisterXDRInfoExtension();
> >
> > PG_RETURN_POINTER(routine);
> > }
> >
> > I think that each new worker process need to call my
> > RegisterXDRInfoExtension function.
> > But where do I call it? Do I have an entry point each time a new worker
> > process is created?
>
> I think you'll need to call your Register* function from the _PG_init
> function of your module. If you haven't defined the _PG_init function,
> you should do that first.
>
> Thanks,
> Amit
>
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2018-10-31 16:40:20 Re: Super PathKeys (Allowing sort order through precision loss functions)
Previous Message John Naylor 2018-10-31 15:40:39 Re: PostgreSQL Limits and lack of documentation about them.