| From: | Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com> |
|---|---|
| To: | Antonin Houska <ah(at)cybertec(dot)at> |
| Cc: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Robert Treat <rob(at)xzilla(dot)net> |
| Subject: | Re: Adding REPACK [concurrently] |
| Date: | 2025-12-02 00:50:00 |
| Message-ID: | CADzfLwVtct0_GbtKt8hksR6rX2ozEtKSS4b=YmEOPghHkEE6XQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello, Antonin!
On Mon, Nov 3, 2025 at 8:56 AM Antonin Houska <ah(at)cybertec(dot)at> wrote:
> I'll fix all the problems in the next version. Thanks!
A few more moments I mentioned:
> switch ((vis = HeapTupleSatisfiesVacuum(tuple, OldestXmin, buf)))
vis is unused, also to double braces.
> LockBuffer(buf, BUFFER_LOCK_UNLOCK);
> continue;
> }
> /*
> * In the concurrent case, we have a copy of the tuple, so we
> * don't worry whether the source tuple will be deleted / updated
> * after we release the lock.
> */
> LockBuffer(buf, BUFFER_LOCK_UNLOCK);
>}
I think locking and comments are a little bit confusing here.
I think we may use single LockBuffer(buf, BUFFER_LOCK_UNLOCK); before
`if (isdead)` as it was before.
Also, I am not sure "we have a copy" is the correct point here, I
think motivation is mostly the same as in
heapam_index_build_range_scan.
Also, I think it is a good idea to add tests for index-based and
sort-based repack.
Also, for sort-based I think we need to also call
repack_decode_concurrent_changes during insertion phase
> is_system_catalog && !concurrent
2 places, always true, feels strange.
Best regards,
Mikhail.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2025-12-02 01:11:04 | Re: missing PG_IO_ALIGN_SIZE uses |
| Previous Message | Michael Paquier | 2025-12-02 00:32:15 | Re: Refactoring: Use soft error reporting for *_opt_overflow functions of date/timestamp |