Palle Girgensohn <girgen@partitur.se> writes:
> BEGIN;
> BEGIN
> ALTER TABLE at_provider_user_info RENAME TO tmp;
> NOTICE: Caution: RENAME TABLE cannot be rolled back, so don't abort now
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> [ followed by deliberately-provoked error to abort the transaction ]
Well, it did tell you not to do this ;-)
Making ALTER TABLE RENAME abort-safe requires changing the conventions
for naming physical table files, and the details have been sufficiently
controversial that it's not been done yet. In the meantime our only
choices are to forbid ALTER TABLE RENAME within transaction blocks, or
allow it with the knowledge that people can shoot themselves in the foot
with it. The above warning notice is the current compromise.
regards, tom lane