Issue #2459139 by mikran, morsok: Fix relation_endpoint_update_7001() errors, add checks for existing table and indexes