Re: REPACK (ANALYZE) within transaction block segfaults

Поиск
Список
Период
Сортировка
Искать

Re: REPACK (ANALYZE) within transaction block segfaults

От:
Alvaro Herrera <alvherre@kurilemu.de>
Дата:
On 2026-Sep-02, Fujii Masao wrote:

> + * that's just consistent with VACUUM (FULL, ANALYZE), which is a
> + * synonym for REPACK (ANALYZE).
> 
> Is VACUUM (FULL, ANALYZE) really a synonym for REPACK (ANALYZE)?

That's the intent, at least.  If there are things that work differently,
I would strive to change them so that they do work the same.  However,
some such changes might be too invasive for pg19, but I would still see
about changing those in pg20.

Now, maybe there are things about VACUUM FULL ANALYZE that we don't like
(perhaps, for instance, they exist solely because of even older
backwards compatibility concerns) that we would prefer not to have in
REPACK.  I don't know if anything of that sort exists, but if so, I
would propose to seek decisions for each thing individually.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
Essentially, you're proposing Kevlar shoes as a solution for the problem
that you want to walk around carrying a loaded gun aimed at your foot.
(Tom Lane)


Re: REPACK (ANALYZE) within transaction block segfaults

От:
Antonin Houska <ah@cybertec.at>
Дата:
Osama Abdul Qader  wrote:

> I have prepared a patch that rejects REPACK (ANALYZE) with PreventInTransactionBlock(), consistent with the existing restriction for
> REPACK (CONCURRENTLY). I also added a regression test covering execution inside a transaction block.
> 
> The patch applies cleanly to the current tree and passes git diff --check.

Is this a new version of [1]? If so, I'm not sure it addresses all the
problems mentioned in [2]. And regarding regression tests, it misses the
changes in expected/cluster.out.


[1] https://www.postgresql.org/message-id/49398.1787944525%40localhost
[2] https://www.postgresql.org/message-id/CAHGQGwEezdMUixhJ-N0YO0OFUmh0uPaXRDkds5FS-5dmdwz4Bg%40mail.gmail.com

-- 
Antonin Houska
Web: https://www.cybertec-postgresql.com


Re: REPACK (ANALYZE) within transaction block segfaults

От:
Osama Abdul Qader <osamaabdulqader.cs@gmail.com>
Дата:
Вложения:
Hi everybody,

Thanks for pointing that out.

Yes, this is an updated version of the patch. I've addressed the missing regression test changes by updating 'expected/cluster.out' as well.

The patch now includes:
  • the 'PreventInTransactionBlock()' check for 'REPACK (ANALYZE)';
  • the regression test in 'cluster.sql'; and
  • the corresponding expected output in 'expected/cluster.out'
I also verified that the regression tests 'test_setup' and cluster pass, and that the patch applies cleanly to a clean worktree.

The updated patch is attached.

With Regards,
Osama Abdul Qader 

On Thu, Sep 3, 2026 at 12:43 PM Osama Abdul Qader <osamaabdulqader.cs@gmail.com> wrote:
Hi Antonin and Everyone,

Greetings of the day, 

I'll look into the issues mentioned in [1] and [2], including the missing regression test changes in 'expected/cluster.out', and prepare an updated patch.

With best regards,
Osama Abdul Qader

On Thu, Sep 3, 2026 at 10:12 AM Antonin Houska <ah@cybertec.at> wrote:
Osama Abdul Qader <osamaabdulqader.cs@gmail.com> wrote:

> I have prepared a patch that rejects REPACK (ANALYZE) with PreventInTransactionBlock(), consistent with the existing restriction for
> REPACK (CONCURRENTLY). I also added a regression test covering execution inside a transaction block.
>
> The patch applies cleanly to the current tree and passes git diff --check.

Is this a new version of [1]? If so, I'm not sure it addresses all the
problems mentioned in [2]. And regarding regression tests, it misses the
changes in expected/cluster.out.


[1] https://www.postgresql.org/message-id/49398.1787944525%40localhost
[2] https://www.postgresql.org/message-id/CAHGQGwEezdMUixhJ-N0YO0OFUmh0uPaXRDkds5FS-5dmdwz4Bg%40mail.gmail.com

--
Antonin Houska
Web: https://www.cybertec-postgresql.com
FAQ