Re: ALTER INDEX .. RENAME allows to rename tables/views as well
Alvaro Herrera <alvherre@alvh.no-ip.org>
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: "Bossart, Nathan" <bossartn@amazon.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Bruce Momjian <bruce@momjian.us>, Onder Kalaci <onderk@microsoft.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-10-18T23:55:25Z
Lists: pgsql-hackers
On 2021-Oct-07, Bossart, Nathan wrote: > Good idea. Patch attached. Yeah, that sounds exactly what I was thinking. Now, what is the worst that can happen if we rename a table under SUE and somebody else is using the table concurrently? Is there any way to cause a backend crash or something like that? As far as I can see, because we grab a fresh catalog snapshot for each query, you can't cause anything worse than reading from a different table. I do lack imagination for creating attacks, though. So my inclination would be to apply this to master only. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "The Gord often wonders why people threaten never to come back after they've been told never to return" (www.actsofgord.com)
Commits
-
Ensure correct lock level is used in ALTER ... RENAME
- c2c618ff1137 15.0 landed
- 842fe6123c8a 13.5 landed
- 6c8d1c197bd6 12.9 landed
- 3ce3fb2f7dc6 14.1 landed