Knowledge Drop

Can two connections on separate instances share a scratch schema/PDTs? aka Enemy Reaper

Userlevel 5

Last tested: May 11, 2020


TL/DR: Don't share the schema! Two instances should not share the same scratch schema because they can hit the "enemy reaper" scenario. PDTs CAN be shared using the publish_as_db_view feature (detailed below)

The PDT Reaper cleans up (deletes) any tables that are expired. In the "enemy reaper" scenario, the reaper for one instance shares a connection registration key (the two letters after $ in the PDT name) and will delete all PDTs with the same reg key that are not listed in the "active_derived_table" internal db table. PDTs that were created by the other instance will not be here, so they will be deleted, and the other instance will do the same thing. Thus, all PDTs will constantly be being deleted. The most common way for instances to possibly have the same reg key would be sharing license keys.

To share PDTs across instances, you should use publish_as_db_view. This way, one instance can create the PDT and be in charge of maintaining it, while the other one simply selects * from the view. This entirely avoids the enemy reaper scenario. Example here:


This content is subject to limited support.                




0 replies

Be the first to reply!