Manu <[email protected]> wrote: > v04 fixes two of the four cases from my last mail. The two COPY > trigger cases are still there, and two related cases are now worse > than on master. All of this is on master 9ebc9a458c3 with v04-0001 > and v04-0002, using the attached script. The session reads its own > progress row, so it gives the same output on every run. > > > Should work in v04 [1]. > > It does. After the failed two-scan query the session reports progress > again, and the Assert in xact_callback() no longer fires. The cursor > case is fixed too, and so are the rows Adam and Alberto saw left > behind by CREATE INDEX CONCURRENTLY and REINDEX CONCURRENTLY. > > > This should also work in v04. > > Not for the two COPY trigger cases: > > 1. If a COPY fails inside a two-scan query run by its trigger, its > row stays after the error and through later commands. While the > next CREATE INDEX runs, pg_stat_progress_create_index has no row > for it, and the session still shows the failed COPY. On master the > row goes away with the error. > > 2. A two-scan query that succeeds inside a COPY trigger still removes > the outer COPY's row for the rest of that COPY. Master does the > same, so this one is not a regression. > > The two related cases: if the two-scan query fails inside a > subtransaction and the error is caught, either in a PL/pgSQL > EXCEPTION block or with SAVEPOINT and ROLLBACK TO, the session stops > reporting progress altogether. A later COPY or CREATE INDEX in that > session has no row at all. On master both show up normally, and a > new session is fine with v04 too.
I thought you described all the problem directly in the email, but now it seems that the attachment was important too. So I tried to parse it, but didn't have much success. Somehow I could reproduce one problem (the xact callbacks are called too late, so in v05 I use PG_TRY-PG_CATCH block instead), but the output of the script does not look very human readable. If you still see any problem in v05, can you please give me a little bit information how I can reproduce it? Thanks. > The parallel BRIN build still looks the way Adam described, which I > take it you already plan to drop. Done. -- Antonin Houska Web: https://www.cybertec-postgresql.com
v05-0001-Allow-progress-tracking-of-sub-commands.patch
Description: application/mbox
v05-0002-Do-not-report-progress-of-two-or-more-COPY-commands-.patch
Description: application/mbox
