Re: REINDEX CONCURRENTLY unexpectedly fails
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Manuel Rigger <rigger.manuel@gmail.com>,
PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2019-11-13T15:59:08Z
Lists: pgsql-bugs
Andres Freund <andres@anarazel.de> writes: > On 2019-11-13 15:29:53 +0100, Manuel Rigger wrote: >> On the latest trunk version, I get an error "index "t0_pkey_ccnew" >> already contains data" when using REINDEX CONCURRENTLY: >> >> CREATE TEMP TABLE t0(c1 INT PRIMARY KEY) ON COMMIT DELETE ROWS; >> REINDEX TABLE CONCURRENTLY t0; -- unexpected: ERROR: index >> "t0_pkey_ccnew" already contains data > It think we really ought to just refuse CIC (and thereby REINDEX > CONCURRENTLY) for ON COMMIT DELETE/DROP temp tables. Given that CIC > internally uses transactions, it makes no sense to use CIC on such a > table. It's not real clear why there would be any point in (RE)INDEX CONCURRENTLY on a temp table anyway, since no other session could be using it. +1 for just erroring out, rather than working hard to support such a case. regards, tom lane
Commits
-
Fix concurrent indexing operations with temporary tables
- d76652edc56f 9.4.26 landed
- c39f45598177 9.5.21 landed
- ef33edeb5835 9.6.17 landed
- 9055344b495f 10.12 landed
- 5b4b07fa9ac3 11.7 landed
- 817a1b88ac66 12.2 landed
- a904abe2e284 13.0 landed