forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit32269be
committed
Ensure tableoid reads correctly in EvalPlanQual-manufactured tuples.
The ROW_MARK_COPY path in EvalPlanQualFetchRowMarks() was just settingtableoid to InvalidOid, I think on the assumption that the referencedRTE must be a subquery or other case without a meaningful OID. However,foreign tables also use this code path, and they do have meaningfultable OIDs; so failure to set the tuple field can lead to user-visiblemisbehavior. Fix that by fetching the appropriate OID from the rangetable.There's still an issue about whether CTID can ever have a meaningfulvalue in this case; at least with postgres_fdw foreign tables, it does.But that is a different problem that seems to require a significantlydifferent patch --- it's debatable whether postgres_fdw really wants touse this code path at all.Simplified version of a patch by Etsuro Fujita, who also noted theproblem to begin with. The issue can be demonstrated in all versionshaving FDWs, so back-patch to 9.1.1 parentd810720 commit32269be
1 file changed
+3
-1
lines changedLines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2407 | 2407 |
| |
2408 | 2408 |
| |
2409 | 2409 |
| |
2410 |
| - | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
2411 | 2413 |
| |
2412 | 2414 |
| |
2413 | 2415 |
| |
|
0 commit comments
Comments
(0)