Handle sequence's transactional behaviour on GTM
Previously we were tracking changes to sequences on the coordinator side and
applying those changes at transaction commit/rollback time. While this worked
ok for most cases, there were issues such as what happens if a sequence is
dropped and then recreated in the same transaction. Since the DROP is not
executed until the transaction commit time, the subsequent CREATE would fail on
the GTM.
We now track sequences renamed/dropped/created on the GTM side and do a cleanup
on transaction commit/rollback. For example, if a sequence is renamed but the
transaction is later aborted, the sequence will be renamed back to its original
name. Similarly, if a sequence is dropped and the transaction aborts, the
sequence will be re-instated.
13 files changed: