mirror of https://github.com/citusdata/citus.git
Populate trigger objects
parent
c18c23ac67
commit
cf512de241
|
@ -22,6 +22,7 @@
|
||||||
#include "catalog/pg_depend_d.h"
|
#include "catalog/pg_depend_d.h"
|
||||||
#endif
|
#endif
|
||||||
#include "catalog/pg_foreign_server.h"
|
#include "catalog/pg_foreign_server.h"
|
||||||
|
#include "commands/event_trigger.h"
|
||||||
#include "distributed/citus_ruleutils.h"
|
#include "distributed/citus_ruleutils.h"
|
||||||
#include "distributed/distribution_column.h"
|
#include "distributed/distribution_column.h"
|
||||||
#include "distributed/listutils.h"
|
#include "distributed/listutils.h"
|
||||||
|
@ -151,8 +152,21 @@ WorkerDropDistributedTable(Oid relationId)
|
||||||
*
|
*
|
||||||
* We drop the table with cascade since other tables may be referring to it.
|
* We drop the table with cascade since other tables may be referring to it.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
bool needCleanup = EventTriggerBeginCompleteQuery();
|
||||||
|
PG_TRY();
|
||||||
|
{
|
||||||
performDeletion(&distributedTableObject, DROP_CASCADE, 0);
|
performDeletion(&distributedTableObject, DROP_CASCADE, 0);
|
||||||
}
|
}
|
||||||
|
PG_FINALLY();
|
||||||
|
{
|
||||||
|
if (needCleanup)
|
||||||
|
{
|
||||||
|
EventTriggerEndCompleteQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
PG_END_TRY();
|
||||||
|
}
|
||||||
|
|
||||||
/* iterate over shardList to delete the corresponding rows */
|
/* iterate over shardList to delete the corresponding rows */
|
||||||
List *shardList = LoadShardList(relationId);
|
List *shardList = LoadShardList(relationId);
|
||||||
|
|
Loading…
Reference in New Issue