Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-06-18 Thread Sergey Sargsyan
My bad, my fork's based on pg15, and over there tuplestore_end() does this, void tuplestore_end(Tuplestorestate *state) { int i; if (state->myfile) BufFileClose(state->myfile); if (state->memtuples) { for (i = state->memtupdeleted; i < state->memtupcount; i++) pfree(state->memtuples[i]); pfree(st

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-06-18 Thread Sergey Sargsyan
Hi, Today I encountered a segmentation fault caused by the patch v20-0007-Add-Datum-storage-support-to-tuplestore.patch. During the merge phase, I inserted some tuples into the table so that STIR would have data for the validation phase. The segfault occurred during a call to tuplestore_end(). Th

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-06-17 Thread Sergey Sargsyan
st regards, Sergey On Mon, Jun 16, 2025, 11:21 PM Sergey Sargsyan < sergey.sargsyan.2...@gmail.com> wrote: > Thank you for the information. Tomorrow, I will also run a few tests to > measure the time required to collect tids from the index; however, since I > do not work with vanilla

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-06-16 Thread Sergey Sargsyan
Thank you for the information. Tomorrow, I will also run a few tests to measure the time required to collect tids from the index; however, since I do not work with vanilla postgres, the results may vary. If the results indicate that this procedure is time-consuming, I maybe will develop an additio

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-06-16 Thread Sergey Sargsyan
Hey Mihail, I've started looking at the patches today, mostly the STIR part. Seems solid, but I've got a question about validation. Why are we still grabbing tids from the main index and sorting them? I think it's to avoid duplicate errors when adding tuples from STIP to the main index, but could

Proposal for Improving Concurrent Index Creation Performance

2025-06-11 Thread Sergey Sargsyan
Hi PostgreSQL Hackers, I've been exploring the process of concurrent index creation and noticed a potential area for performance improvement, especially for large indexes. Currently, the process involves multiple stages: creating the index (initially invalid and not ready), builing the index, vali

Re: CREATE INDEX CONCURRENTLY on partitioned index

2024-10-25 Thread Sergey Sargsyan
I noticed that development on the concurrent index creation for partitioned tables feature seemed to stall a few months ago. The patch looked solid, and there didn’t seem to be any issues with it. Has there been any further progress? This feature would be invaluable, given the prevalence of partiti