From: Michael P. <mic...@gm...> - 2010-12-16 05:11:08
|
Please see attached a patch fixing EXECUTE DIRECT. It has been extended with Coordinators also, so the SQL synopsis becomes like this: EXECUTE DIRECT on { COORDINATOR num | NODE num[,num]} query; I put the following restrictions in this functionnality: 1) only SELECT queries can be used with EXECUTE DIRECT. This would be perhaps better to allow also queries such as COMMIT PREPARED and ABORT PREPARED. 2) it cannot be launched on multiple Coordinators at the same time. it is possible on multiple nodes though If a query is launched at the same time on local Coordinator and remote Coordinator, XC is not able to merge results well. There is still one bug. In the case of launching EXECUTE DIRECT on local coordinator with a query containing the name of a non-catalog table, this query is launched on nodes. I was looking for a fix in allpaths.c, where RemoteQuery paths are set, but a fix for that looks a little bit tricky. btw, it is not really important for the HA features in short term as EXECUTE DIRECT is planned to be used to have a look on catalog tables on remote Coordinators (and perhaps targeting nodes with COMMIT/ABORT PREPARED queries). Thanks, -- Michael Paquier http://michaelpq.users.sourceforge.net |