Skip site navigation (1) Skip section navigation (2)

FDW state from plan time

From: Dave Page <dpage(at)pgadmin(dot)org>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: FDW state from plan time
Date: 2011-04-03 07:30:18
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

I can't help thinking I must be missing something obvious here, but is
there any way to persist some data from PlanForeignScan to at least
BeginForeignScan in an FDW? I'm aware of fdwplan->fdw_private, but at
that needs to be copyObject compatible, it's not much use to me.

The issue I have is that in order to properly plan my remote scan, I
need to connect to the remote database to try to calculate some stats
for the query. I'm currently then disconnecting and freeing all the
data associated with that connection, and then reconnecting again in
BeginForeignScan in order to do the actual work. I'd like to avoid the
connect/reconnect, as we all know they can be expensive!

Dave Page
Twitter: @pgsnake

EnterpriseDB UK:
The Enterprise PostgreSQL Company


pgsql-hackers by date

Next:From: Devrim GÜNDÜZDate: 2011-04-03 08:34:49
Subject: Re: psql 9.1 alpha5: connection pointer is NULL
Previous:From: Dan PortsDate: 2011-04-03 06:16:44
Subject: Re: SSI bug?

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group