- Notifications
You must be signed in to change notification settings - Fork28
Commit943140d
committed
Avoid dangling pointer to relation name in RLS code path in DoCopy().
With RLS active, "COPY tab TO ..." failed under -DRELCACHE_FORCE_RELEASE,and would sometimes fail without that, because it used the relation namedirectly from the relcache as part of the parsetree it's building. Thatbecomes a potentially-dangling pointer as soon as the relcache entry isclosed, a bit further down. Typical symptom if the relcache entry chancedto get cleared would be "relation does not exist" error with a garbagerelation name, or possibly a core dump; but if you were really trulyunlucky, the COPY might copy from the wrong table.Per report from Andrew Dunstan that regression tests fail with-DRELCACHE_FORCE_RELEASE. The core tests now pass for me (but havenot tried "make check-world" yet).Discussion:https://postgr.es/m/7b52f900-0579-cda9-ae2e-de5da17090e6@2ndQuadrant.com1 parent68f7b91 commit943140d
1 file changed
+2
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
938 | 938 |
| |
939 | 939 |
| |
940 | 940 |
| |
941 |
| - | |
| 941 | + | |
| 942 | + | |
942 | 943 |
| |
943 | 944 |
| |
944 | 945 |
| |
|
0 commit comments
Comments
(0)