sql: Consider supporting a version of rename table that lets you replace a different table #12195
Labels
A-schema-changes
C-enhancement
Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)
The idea is that syntax along the lines of
ALTER TABLE foo REPLACE WITH bar
would allow you to atomically dropfoo
and renamebar
tofoo
. This came up in discussion on #12158 (direct comment link), in which we want to replacesystem.eventlog
with a table that only differs in one of the primary key columns.Alternatively, fixing #12123 such that a user could DROP a table and RENAME over it within a transaction would basically make this pointless.
I don't think we should do this unless other situations come up in which the same idea arises, but I want to make sure we at least track such situations so we can notice the pattern if it arises.
The text was updated successfully, but these errors were encountered: