Re: PATCH: Add REINDEX tag to event triggers - Mailing list pgsql-hackers

From Jim Jones
Subject Re: PATCH: Add REINDEX tag to event triggers
Date
Msg-id 28176fb8-5169-ecf7-9b3c-82748dde76f0@uni-muenster.de
Whole thread Raw
In response to Re: PATCH: Add REINDEX tag to event triggers  (jian he <jian.universality@gmail.com>)
Responses Re: PATCH: Add REINDEX tag to event triggers
List pgsql-hackers
On 01.09.23 18:10, jian he wrote:
> Thanks for pointing this out! 
Thanks for the fix!
> also due to commit
> https://git.postgresql.org/cgit/postgresql.git/commit/?id=11af63fb48d278b86aa948a5b57f136ef03c2bb7
> ExecReindex function input arguments also changed. so we need to
> rebase this patch.
>
> change to
> currentReindexStatement = unconstify(ReindexStmt*, stmt);
> seems to work for me. I tested it, no warning. But I am not 100% sure.
>
> anyway I refactored the patch, making it git applyable
> also change from "currentReindexStatement = stmt;" to
> "currentReindexStatement = unconstify(ReindexStmt*, stmt);" due to
> ExecReindex function changes.

LGTM. It applies and builds cleanly, all tests pass and documentation 
also builds ok. The CFbot seems also much happier now :)

I tried this "small stress test" to see if the code was leaking .. but 
it all looks ok to me:

DO $$
BEGIN
   FOR i IN 1..10000 LOOP
     REINDEX INDEX reindex_test.reindex_test1_idx1;
     REINDEX TABLE reindex_test.reindex_tester1;
   END LOOP;
END;
$$;


Jim




pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: information_schema and not-null constraints
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: psql: show current user in prompt