to explain the context, I test postgres with a huge table (I try to have 1TB data) in a docker container for isolation, and I ran my container with a -v parameter in order to mount my dedicated HDD (spinning 1TB). So I ran my ingest process, everything worked fine.
Next, I had to run an other container in which I wanted to ingest only 25M rows to make comparison, BUT I ran my docker container with the same -v parameter ... oups ... so I stopped my container and, big mistake, remove it, so my ingest process has been stopped because the previously was unaccessible, which makes sense I suppose.
So I thought "it's ok, I will restart it an rerun the ingest", which I've done, but I got that error:
psql:/home/inserts24_8MTransac_200_124000_263.sql:124001: ERROR: XX002: index "test_table_pkey" contains unexpected zero page at block 17855039 HINT: Please REINDEX it.
So I run the reindexing command:
TestDB=# REINDEX INDEX test_table_pkey;
But I have almost 6.5 Billions rows, and it seems it takes so much time, I only have a primary key on (id) and an index on two rows (both are integers). My table contains only 6 rows (One Bigint for the id, Integers or small integers for the rest).
Is it normal the REINDEXING process take a lot of time?