Using threads in FDW for read-ahead

From: Noah Watkins <noahwatkins(at)gmail(dot)com>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: Using threads in FDW for read-ahead
Date: 2014-06-10 19:10:22
Message-ID: CAB2gnbUqOGZi4u8ohKGqFdvtqEz4F6LE5kedHRKJBHO7z3YdcA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

I have created a FDW for a storage backend and it is working well, and now
I would like to overlap processing with I/O by performing read-ahead. I
started by using a thread to do background I/O and this worked, but
problems started to arise when I tried to do predicate filtering in the
thread.

In particular, it seems as though `check_stack_depth` is built to assume a
single threaded environment (`stack_base_ptr` is global).

I'm wondering if there is a solution to this problem, or if there are
examples of overlapping tuple I/O and predicate filtering using
non-multithreading techniques?

Thanks,
Noah

Responses

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2014-06-10 19:21:01 Re: Using threads in FDW for read-ahead
Previous Message Greg Sabino Mullane 2014-06-02 17:23:07 DBD::Pg 3.3.0 released (driver for Postgres)