Re: Adding REPACK [concurrently]
От | Mihail Nikalayeu |
---|---|
Тема | Re: Adding REPACK [concurrently] |
Дата | |
Msg-id | CADzfLwWm3hA3=j6dujKMP9BdMzZM7L_7S_TqnCyQK-GSHychFQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Adding REPACK [concurrently] (Alvaro Herrera <alvherre@alvh.no-ip.org>) |
Ответы |
Re: Adding REPACK [concurrently]
|
Список | pgsql-hackers |
Hello, Álvaro! > If others are motivated enough to certify it, maybe we can consider it. > But I don't think I'm going to have time to get this part reviewed and > committed in time for 19, so you might need another committer. I don't think it is realistic to involve another committer - it is just a well-known curse of all non-committers :) > > > Because having an MVCC-safe mode has drawbacks, IMO we should make it > > > optional. As far as I can see, the proposed "lightweight" solutions don't introduce any drawbacks - unless something has been overlooked. > > Do you mean some option for the command? Like REPACK (CONCURRENTLY, SAFE)? > Yes, exactly that. To be honest that approach feels a little bit strange for me. I work in the database-consumer (not database-developer) industry and 90% of DevOps engineers (or similar roles who deal with database maintenance now) have no clue what MVCC is - and it is industry standard nowadays. From my perspective - it is better to have a less performant, but MVCC-safe approach by default, with some "more performance, less safety" flag for those who truly understand the trade-offs. All kinds of safety and correctness is probably the main reason to use classic databases instead of storing data in s3\elastis\mongo\etc these days. In case of some incident related to that (in a large well-known company) the typical takeaway for readers of tech blogs will simply be "some command in Postgres is broken". And maybe also "the database with a name starting with 'O' is not affected by that flaw". Yes, some ALTER table-rewriting commands are not MVCC-safe, but those typically block everything for hours - so they're avoided unless absolutely necessary, and usually performed during backend outages to prevent systems from getting stuck waiting on millions of locks. "CONCURRENTLY" is something that feels like a "working in background, don't worry, do not stop your 100k RPS" thing, especially in Postgres because of CIC. I also have personal experience debugging incidents caused by incorrect Postgres behavior - and it’s absolute hell. Sorry, I made a drama here.... I fully understand resource limitations... Maybe Postgres 19 could introduce something like REPACK (CONCURRENTLY, UNSAFE) first, and later add a safer REPACK (CONCURRENTLY)? Best regards, Mikhail.
В списке pgsql-hackers по дате отправления: