* Parse options from foreign table and apply them to fpinfo. * * New options might also require tweaking merge_fdw_options(). */
| 5924 | * New options might also require tweaking merge_fdw_options(). |
| 5925 | */ |
| 5926 | static void |
| 5927 | apply_table_options(PgFdwRelationInfo *fpinfo) |
| 5928 | { |
| 5929 | ListCell *lc; |
| 5930 | |
| 5931 | foreach(lc, fpinfo->table->options) |
| 5932 | { |
| 5933 | DefElem *def = (DefElem *) lfirst(lc); |
| 5934 | |
| 5935 | if (strcmp(def->defname, "use_remote_estimate") == 0) |
| 5936 | { |
| 5937 | /* |
| 5938 | * GPDB_13_MERGE_FIXME: For updable statement, different forked Backends by Master |
| 5939 | * (QD and entrydb instances) |
| 5940 | * will hold Exclusive lock on the same table, which causes lock hang issue. |
| 5941 | * For Postgres, there is only one backend, and connnections have been shared, |
| 5942 | * so the issue doesn't exist. |
| 5943 | * |
| 5944 | * For example, following query will hang: |
| 5945 | * SELECT * |
| 5946 | * FROM ft1, ft2, ft4, ft5, local_tbl |
| 5947 | * WHERE ft1.c1 = ft2.c1 AND |
| 5948 | * ft1.c2 = ft4.c1 AND |
| 5949 | * ft1.c2 = ft5.c1 AND |
| 5950 | * ft1.c2 = local_tbl.c1 AND |
| 5951 | * ft1.c1 < 100 AND |
| 5952 | * ft2.c1 < 100 FOR UPDATE; |
| 5953 | */ |
| 5954 | elog(WARNING, "fdw option 'use_remote_estimate' is not supported."); |
| 5955 | fpinfo->use_remote_estimate = false; |
| 5956 | } |
| 5957 | else if (strcmp(def->defname, "fetch_size") == 0) |
| 5958 | (void) parse_int(defGetString(def), &fpinfo->fetch_size, 0, NULL); |
| 5959 | else if (strcmp(def->defname, "async_capable") == 0) |
| 5960 | fpinfo->async_capable = defGetBoolean(def); |
| 5961 | } |
| 5962 | } |
| 5963 | |
| 5964 | /* |
| 5965 | * Merge FDW options from input relations into a new set of options for a join |
no test coverage detected