From: Ashutosh B. <ash...@en...> - 2013-07-05 04:23:09
|
On Thu, Jul 4, 2013 at 6:50 PM, Michael Paquier <mic...@gm...>wrote: > On Thu, Jul 4, 2013 at 7:07 PM, Pavan Deolasee <pav...@gm...> > wrote: > > > > On Thu, Jul 4, 2013 at 3:21 PM, Michael Paquier < > mic...@gm...> > >> generate_series has never been fixed for hash tables as far as I recall. > > Hmm.. that could well be the case. I am immensely surprised and > disappointed > > if that's true though. IMHO any PostgreSQL user will most likely fire > that > > statement soon after creating a table to populate test data. It does not > > sound nice if the very first statement errors out. > +1. > > > What stops us from supporting that, except of course lack of development > time? > That and the fact that such exceptions have never been considered a > high priority, I suppose. generate_series is the particular case of an > immutable function that cannot be FQS'ed for a non-replicated table. I > might be wrong, but I think it worked correctly for roundrobin. > > I don't agree that it's because of immutability. It has more to do with the VALUES_RTE in INSERT statement. Any INSERT statement that is inserting more than one value in the distributed table can not be FQSed. In case there are more than one value being INSERTED through an INSERT statement, there are two RTEs in the query, one for the relation where INSERT is happening, and other for the values. So, I had implemented a simple rule in FQS shippability - if there are more than one RTEs in INSERT statement, do not FQS it. But I am unable to locate this rule now. Looks like while implementing something else, the rule has disappeared. And, since we do not have test for it, we didn't notice it. > > Is it a hard problem to crack ? > No I don't think so, but I've never taken the time to look at it. > > > I assume its the former because we just need to put it > > through the slow path instead of FQS, no ? > Yes, this is the case, it takes, or should take the slow path, and > this even if the function is immutable. I recall that the output of > EXPLAIN VERBOSE works correctly. > -- > Michael > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers > -- Best Wishes, Ashutosh Bapat EntepriseDB Corporation The Postgres Database Company |