Re: Regarding identifying a foreign scan

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Regarding identifying a foreign scan
Дата
Msg-id 8039.1349553920@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Regarding identifying a foreign scan  (Atri Sharma <atri.jiit@gmail.com>)
Ответы Re: Regarding identifying a foreign scan
Список pgsql-hackers
Atri Sharma <atri.jiit@gmail.com> writes:
> On Sat, Oct 6, 2012 at 3:45 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Atri Sharma <atri.jiit@gmail.com> writes:
>>> I am trying to identify foreign scans uniquely.

>> What do you mean by "identify"?  What are you trying to accomplish,
>> and in what context?

> I am trying to identify the situation where a query has multiple
> foreign scans.In that case,I need to check whether the current scan is
> the same as a previous scan or not.If not,then I think it means that
> multiple scans are in progress on the same backend.

Well, if you search the plan tree and find more than one ForeignScan
node, it means there's more than one foreign scan.  It doesn't seem to
me to be very complicated.  Now, if you're wondering whether they
reference the same server or not, that's a bit harder.    I guess you
could look at the RTEs, fetch the foreign-table data for each FT
relation OID, and see if the same server is referenced.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Bad Data back Door
Следующее
От: Atri Sharma
Дата:
Сообщение: Re: Regarding identifying a foreign scan