pgsql: Fix xmin advancement during fast_forward decoding.

2025-04-27 Thread Amit Kapila
Fix xmin advancement during fast_forward decoding. During logical decoding, we advance catalog_xmin of logical too early in fast_forward mode, resulting in required catalog data being removed by vacuum. This mode is normally used to advance the slot without processing the changes, but we still can

pgsql: Fix xmin advancement during fast_forward decoding.

2025-04-27 Thread Amit Kapila
Fix xmin advancement during fast_forward decoding. During logical decoding, we advance catalog_xmin of logical too early in fast_forward mode, resulting in required catalog data being removed by vacuum. This mode is normally used to advance the slot without processing the changes, but we still can

pgsql: Fix xmin advancement during fast_forward decoding.

2025-04-27 Thread Amit Kapila
Fix xmin advancement during fast_forward decoding. During logical decoding, we advance catalog_xmin of logical too early in fast_forward mode, resulting in required catalog data being removed by vacuum. This mode is normally used to advance the slot without processing the changes, but we still can

pgsql: Fix xmin advancement during fast_forward decoding.

2025-04-27 Thread Amit Kapila
Fix xmin advancement during fast_forward decoding. During logical decoding, we advance catalog_xmin of logical too early in fast_forward mode, resulting in required catalog data being removed by vacuum. This mode is normally used to advance the slot without processing the changes, but we still can

pgsql: Fix xmin advancement during fast_forward decoding.

2025-04-27 Thread Amit Kapila
Fix xmin advancement during fast_forward decoding. During logical decoding, we advance catalog_xmin of logical too early in fast_forward mode, resulting in required catalog data being removed by vacuum. This mode is normally used to advance the slot without processing the changes, but we still can

pgsql: Fix xmin advancement during fast_forward decoding.

2025-04-27 Thread Amit Kapila
Fix xmin advancement during fast_forward decoding. During logical decoding, we advance catalog_xmin of logical too early in fast_forward mode, resulting in required catalog data being removed by vacuum. This mode is normally used to advance the slot without processing the changes, but we still can

pgsql: Remove circular #include's between wait_event.h and wait_event_t

2025-04-27 Thread Michael Paquier
Remove circular #include's between wait_event.h and wait_event_types.h wait_event_types.h is generated by the code, and included wait_event.h. wait_event.h did the opposite move, including wait_event_types.h, causing a circular dependency between both. wait_event_types.h only needs to now about t

pgsql: Disallow removing placeholders during Self-Join Elimination.

2025-04-27 Thread Alexander Korotkov
Disallow removing placeholders during Self-Join Elimination. fc069a3a6319 implements Self-Join Elimination (SJE), which can remove base relations when appropriate. However, regressions tests for SJE only cover the case when placeholder variables (PHVs) are evaluated and needed only in a single ba

pgsql: Remove inappropriate inclusions of c.h and postgres_fe.h.

2025-04-27 Thread Tom Lane
Remove inappropriate inclusions of c.h and postgres_fe.h. Per our usual policy, Postgres header files should not include these; the decision as to which one to use is to be made in the calling .c file instead. These errors aren't particularly new, but I'm not feeling a need to back-patch these ch

pgsql: Don't use double-quotes in #include's of system headers, redux.

2025-04-27 Thread Tom Lane
Don't use double-quotes in #include's of system headers, redux. This cleans up some loose ends left by commit e8ca9ed1d. I hadn't looked closely enough at these places before, but now I have. The use of double-quoted #includes for Perl headers in plperl_system.h seems to be simply a mistake intr

Re: pgsql: Improve nbtree skip scan primitive scan scheduling.

2025-04-27 Thread Mark Dilger
On Sat, Apr 26, 2025 at 8:53 PM Peter Geoghegan wrote: > On Sat, Apr 26, 2025 at 10:39 PM Mark Dilger > wrote: > > Peter, Matthias, thanks kindly for the good work on skipscans! > > Thanks! > > > I found a test case which fails after commit > 21a152b37f36c9563d1b0b058fe1436baf578b4c. Please fin

pgsql: Remove circular #include's between plpython.h and plpy_util.h.

2025-04-27 Thread Tom Lane
Remove circular #include's between plpython.h and plpy_util.h. plpython.h included plpy_util.h, simply on the grounds that "it's easier to just include it everywhere". However, plpy_util.h must include plpython.h, or it won't pass headerscheck. While the resulting circularity doesn't have any im

Re: clang-tidy complaints

2025-04-27 Thread Peter Geoghegan
On Sun, Apr 27, 2025 at 4:25 AM Bertrand Drouvot wrote: > +1. Peter, do you think you could add "misc-header-include-cycle" in your > annual check (see [1])? I'll also put a note on my side to do it at a regular > basis. I've added it to my personal clangd config (I mostly use clang-tidy through

Re: clang-tidy complaints

2025-04-27 Thread Bertrand Drouvot
Hi, On Sat, Apr 12, 2025 at 01:16:39PM -0400, Tom Lane wrote: > Peter Geoghegan writes: > > Looks like I'm done with this process, at least until this time next year. > > OK. Thanks for taking care of it. +1. Peter, do you think you could add "misc-header-include-cycle" in your annual check (s