postgresql/src/backend/commands
Tom Lane a8df75b0a4 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 name
directly from the relcache as part of the parsetree it's building.  That
becomes a potentially-dangling pointer as soon as the relcache entry is
closed, a bit further down.  Typical symptom if the relcache entry chanced
to get cleared would be "relation does not exist" error with a garbage
relation name, or possibly a core dump; but if you were really truly
unlucky, 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 have
not tried "make check-world" yet).

Discussion: https://postgr.es/m/7b52f900-0579-cda9-ae2e-de5da17090e6@2ndQuadrant.com
2017-03-06 16:50:47 -05:00
..
aggregatecmds.c Use the new castNode() macro in a number of places. 2017-01-26 16:47:03 -08:00
alter.c Remove objname/objargs split for referring to objects 2017-03-06 13:31:47 -05:00
amcmds.c Fix typos in comments. 2017-02-06 11:33:58 +02:00
analyze.c Don't uselessly rewrite, truncate, VACUUM, or ANALYZE partitioned tables. 2017-03-02 17:23:44 +05:30
async.c Use the new castNode() macro in a number of places. 2017-01-26 16:47:03 -08:00
cluster.c In rebuild_relation(), don't access an already-closed relcache entry. 2017-03-04 16:09:33 -05:00
collationcmds.c Add CREATE COLLATION IF NOT EXISTS clause 2017-02-15 10:01:28 -05:00
comment.c Remove objname/objargs split for referring to objects 2017-03-06 13:31:47 -05:00
constraint.c Allow index AMs to cache data across aminsert calls within a SQL command. 2017-02-09 11:52:12 -05:00
conversioncmds.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
copy.c Avoid dangling pointer to relation name in RLS code path in DoCopy(). 2017-03-06 16:50:47 -05:00
createas.c Use castNode() in a bunch of statement-list-related code. 2017-01-26 22:09:34 -05:00
dbcommands.c Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
define.c Logical replication 2017-01-20 09:04:49 -05:00
discard.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
dropcmds.c Remove objname/objargs split for referring to objects 2017-03-06 13:31:47 -05:00
event_trigger.c Provide CatalogTupleDelete() as a wrapper around simple_heap_delete(). 2017-02-01 16:13:30 -05:00
explain.c Fix typos in comments. 2017-02-06 11:33:58 +02:00
extension.c Remove objname/objargs split for referring to objects 2017-03-06 13:31:47 -05:00
foreigncmds.c Provide CatalogTupleDelete() as a wrapper around simple_heap_delete(). 2017-02-01 16:13:30 -05:00
functioncmds.c Replace LookupFuncNameTypeNames() with LookupFuncWithArgs() 2017-03-06 13:31:47 -05:00
indexcmds.c Ignore tablespace ACLs when ignoring schema ACLs. 2017-02-12 16:03:41 -05:00
lockcmds.c Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
Makefile Logical replication 2017-01-20 09:04:49 -05:00
matview.c Tweak catalog indexing abstraction for upcoming WARM 2017-01-31 18:42:24 -03:00
opclasscmds.c Replace LookupFuncNameTypeNames() with LookupFuncWithArgs() 2017-03-06 13:31:47 -05:00
operatorcmds.c Replace LookupFuncNameTypeNames() with LookupFuncWithArgs() 2017-03-06 13:31:47 -05:00
policy.c Provide CatalogTupleDelete() as a wrapper around simple_heap_delete(). 2017-02-01 16:13:30 -05:00
portalcmds.c Use castNode() in a bunch of statement-list-related code. 2017-01-26 22:09:34 -05:00
prepare.c Consistently declare timestamp variables as TimestampTz. 2017-02-23 15:57:08 -05:00
proclang.c Provide CatalogTupleDelete() as a wrapper around simple_heap_delete(). 2017-02-01 16:13:30 -05:00
publicationcmds.c Fix typos in comments. 2017-02-06 11:33:58 +02:00
schemacmds.c Provide CatalogTupleDelete() as a wrapper around simple_heap_delete(). 2017-02-01 16:13:30 -05:00
seclabel.c Remove objname/objargs split for referring to objects 2017-03-06 13:31:47 -05:00
sequence.c Add CREATE SEQUENCE AS <data type> clause 2017-02-10 15:34:35 -05:00
subscriptioncmds.c Disallow CREATE/DROP SUBSCRIPTION in transaction block 2017-03-03 23:29:13 -05:00
tablecmds.c Remove objname/objargs split for referring to objects 2017-03-06 13:31:47 -05:00
tablespace.c Remove useless duplicate inclusions of system header files. 2017-02-25 16:12:55 -05:00
trigger.c Provide CatalogTupleDelete() as a wrapper around simple_heap_delete(). 2017-02-01 16:13:30 -05:00
tsearchcmds.c Provide CatalogTupleDelete() as a wrapper around simple_heap_delete(). 2017-02-01 16:13:30 -05:00
typecmds.c Remove objname/objargs split for referring to objects 2017-03-06 13:31:47 -05:00
user.c Provide CatalogTupleDelete() as a wrapper around simple_heap_delete(). 2017-02-01 16:13:30 -05:00
vacuum.c Don't uselessly rewrite, truncate, VACUUM, or ANALYZE partitioned tables. 2017-03-02 17:23:44 +05:30
vacuumlazy.c Allow vacuums to report oldestxmin 2017-03-03 19:18:25 +05:30
variable.c Remove now-dead code for !HAVE_INT64_TIMESTAMP. 2017-02-23 14:04:43 -05:00
view.c Use the new castNode() macro in a number of places. 2017-01-26 16:47:03 -08:00