Re: ALTER INDEX .. RENAME allows to rename tables/views as well

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, "Onder Kalaci" <onderk(at)microsoft(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: ALTER INDEX .. RENAME allows to rename tables/views as well
Date: 2021-10-19 00:19:24
Message-ID: 2735A836-1DE2-4448-93B8-7B558A7F016E@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/18/21, 4:56 PM, "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org> wrote:
> 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.

This message [0] in the thread for lowering the lock level for
renaming indexes seems to indicate that there may be some risk of
crashing.

Nathan

[0] https://postgr.es/m/CA%2BTgmobtmFT5g-0dA%3DvEFFtogjRAuDHcYPw%2BqEdou5dZPnF%3Dpg%40mail.gmail.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-10-19 00:46:00 Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?
Previous Message Tomas Vondra 2021-10-19 00:07:27 Re: XTS cipher mode for cluster file encryption