Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-12 Thread Sami Imseih
> > [...] > > - LWLockInitialize(&dsm->lck, > > LWLockNewTrancheId("test_dsm_registry")); > > + LWLockInitialize(&dsm->lck, LWLockNewTrancheId((char *) arg)); > > dsm->val = 0; > > [...] > > > > instead of creating a new test? For the other GetNamedDSMSegment calls, > > I'll pa

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-12-12 Thread Aleksander Alekseev
Hi, > It's strange to see this thread go on about messing with the Perl script > because we're too afraid of pg_bsd_indent. Maybe we should take > ownership of that code -- improve its own indentation to our > conventions, add comments, rename unclear variables, and so on until we > have somethin

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-12 Thread Nathan Bossart
On Fri, Dec 12, 2025 at 02:56:39PM -0600, Sami Imseih wrote: > fair point. In that case why don't we just keep: > > [...] > - LWLockInitialize(&dsm->lck, LWLockNewTrancheId("test_dsm_registry")); > + LWLockInitialize(&dsm->lck, LWLockNewTrancheId((char *) arg)); > dsm->val = 0;

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-12 Thread Zsolt Parragi
> fair point. In that case why don't we just keep: I did something similar, but using a simple pointer comparison instead of strings, to avoid a warning about discarding const qualifiers. What do you think about this version? +void *sample_arg_ptr = &tdr_dsm; + static void -init_tdr_dsm(void *p

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-12 Thread Sami Imseih
> On Fri, Dec 12, 2025 at 12:48:52PM -0600, Sami Imseih wrote: > > As far as testing, I did not think it's worth it since in the cases out > > there now a NULL void * will result in an error when calling > > LWLockNewTrancheId. > > I think we should pass NULL to all the existing in-tree calls to >

Re: [PATCH] Fix severe performance regression with gettext 0.20+ on Windows

2025-12-12 Thread Bryan Green
On 12/12/2025 2:01 PM, Tom Lane wrote: > Bryan Green writes: >> On 12/11/2025 8:43 AM, Peter Eisentraut wrote: >>> I wonder, this change that gettext did with the locale naming, does that >>> also affect what guidance we need to provide to users about how to >>> configure locale names?  For exampl

Re: Speed up COPY FROM text/CSV parsing using SIMD

2025-12-12 Thread Mark Wong
Hi everyone, On Tue, Dec 09, 2025 at 04:40:19PM +0300, Bilal Yavuz wrote: > Hi, > > On Sat, 6 Dec 2025 at 10:55, Bilal Yavuz wrote: > > > > Hi, > > > > On Sat, 6 Dec 2025 at 04:40, Manni Wood wrote: > > > Hello, all. > > > > > > Andrew, I tried your suggestion of just reading the first chunk of

Re: Remaining dependency on setlocale()

2025-12-12 Thread Jeff Davis
On Fri, 2025-12-05 at 16:01 +0100, Peter Eisentraut wrote: > v11-0003-Fix-inconsistency-between-ltree_strncasecmp-and-.patch > > The function comment reads "Check if b has a prefix of a." -- Is that > the same as "Check if a is a prefix of b."?  The latter might be > clearer. Yes, fixed. Note: I

Re: [PATCH] Fix severe performance regression with gettext 0.20+ on Windows

2025-12-12 Thread Tom Lane
Bryan Green writes: > On 12/11/2025 8:43 AM, Peter Eisentraut wrote: >> I wonder, this change that gettext did with the locale naming, does that >> also affect what guidance we need to provide to users about how to >> configure locale names?  For example, on a Unix-ish system, a user can >> do som

Re: Solaris versus our NLS files

2025-12-12 Thread Tom Lane
I wrote: > Peter Eisentraut writes: >> I wonder how other gettext-using projects handle this on Solaris. > I suspect that the answer for most non-Solaris-specific projects has > been "use GNU gettext". I poked into that and it seems a lot messier than I hoped. At least on OpenIndiana, what's ac

Re: Import Statistics in postgres_fdw before resorting to sampling.

2025-12-12 Thread Corey Huinker
CCing Jonathan Katz and Nathan Bossart as they had been sounding boards for me when I started designing this feature. > Returning in the FDW_IMPORT_STATS_OK case isn't 100% correct; if the > foreign table is an inheritance parent, we would fail to do inherited > stats. > Perhaps I'm not understa

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-12 Thread Nathan Bossart
On Fri, Dec 12, 2025 at 12:48:52PM -0600, Sami Imseih wrote: > As far as testing, I did not think it's worth it since in the cases out > there now a NULL void * will result in an error when calling > LWLockNewTrancheId. I think we should pass NULL to all the existing in-tree calls to GetNamedDSMSe

Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers

2025-12-12 Thread Andres Freund
Hi, On 2025-12-12 14:21:47 -0500, Greg Burd wrote: > > On Fri, Dec 12, 2025, at 11:03 AM, Nathan Bossart wrote: > > +/* > > + * _InterlockedExchange() generates a full memory barrier (or release > > + * semantics that ensures all prior memory operations are visible to > > + * other cores before t

Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers

2025-12-12 Thread Greg Burd
On Fri, Dec 12, 2025, at 11:03 AM, Nathan Bossart wrote: > +/* > + * _InterlockedExchange() generates a full memory barrier (or release > + * semantics that ensures all prior memory operations are visible to > + * other cores before the lock is released. > + */ > +#define S_UNLOCK(lock) (Interloc

Re: enhance wraparound warnings

2025-12-12 Thread Nathan Bossart
On Fri, Dec 12, 2025 at 10:59:53AM +0800, Chao Li wrote: > I just reviewed the patch. My comments are mainly in 0001, and a few nits > on 0003. For 0002, the code change is quite straightforward, I am not > sure the value bumping to has been discussed. Thanks! > Where "(MaxTransactionId >> 1)” ha

Re: Import Statistics in postgres_fdw before resorting to sampling.

2025-12-12 Thread Corey Huinker
> > > A kind reminder, I don’t see my comments are addressed: > > My apologies. Will get into the next rev.

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-12 Thread Sami Imseih
> My trivial example for it would be persistent statistics: when I want > to collect some information, save it to disk before shutdown, and on > the next startup, I want to load the previous state before continuing > collecting. pg_track_optimizer seems to do this. There are also > definitely other

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-12-12 Thread Tom Lane
Nathan Bossart writes: > Yeah, I tried to find a bug in it recently and could do little more than > trial-and-error in the areas that seemed vaguely close (with no success). > I'm generally critical of efforts to rewrite things from scratch, but this > might be a case where it's the better option.

Re: pg_plan_advice

2025-12-12 Thread Jacob Champion
On Fri, Dec 12, 2025 at 9:36 AM Robert Haas wrote: > At least for me, setting pg_plan_advice.advice to any of these strings > does not provoke a crash. What I discovered after a bit of > experimentation is that you get the crash if you (a) set the string to > something like this and then (b) run a

Re: On non-Windows, hard depend on uselocale(3)

2025-12-12 Thread Tom Lane
Peter Eisentraut writes: > On 28.08.24 20:50, Peter Eisentraut wrote: >> I suggest that the simplification of the xlocale.h configure tests could >> be committed separately. This would also be useful independent of this, >> and it's a sizeable chunk of this patch. > To keep this moving along a

Re: Inval reliability, especially for inplace updates

2025-12-12 Thread Paul A Jungwirth
On Thu, Dec 11, 2025 at 4:24 PM Noah Misch wrote: > > On Thu, Dec 04, 2025 at 04:19:02PM -0800, Noah Misch wrote: > > Thanks for the review. > > > The attached version doesn't need a comprehensive re-review, but I'd > > particularly value hearing about any places where you find it's reducing > > c

Re: pg_plan_advice

2025-12-12 Thread Robert Haas
On Thu, Dec 11, 2025 at 8:11 PM Jacob Champion wrote: > Sure! (They'll need to be golfed down.) Here are three entries that > hit the crash, each on its own line: > > > join_order(qoe((nested_l > > oindex_scanp_plain))se(nested_loop_plain)nested_loo/_pseq_scanlain) > > join_order(qoe((nested_loop

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-12-12 Thread Nathan Bossart
On Fri, Dec 12, 2025 at 11:17:01AM -0500, Tom Lane wrote: > =?utf-8?Q?=C3=81lvaro?= Herrera writes: >> It's strange to see this thread go on about messing with the Perl script >> because we're too afraid of pg_bsd_indent. Maybe we should take >> ownership of that code -- improve its own indentati

Re: Non-text mode for pg_dumpall

2025-12-12 Thread Mahendra Singh Thalor
On Fri, 12 Dec 2025 at 19:10, tushar wrote: > > > > On Thu, Dec 11, 2025 at 9:39 PM Mahendra Singh Thalor > wrote: >> >> >> >> Here, in our case, as the cluster already has a role with the current >> user in restore, we are reporting error "pg_restore: error: could not >> execute query: ERROR:

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-12-12 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > It's strange to see this thread go on about messing with the Perl script > because we're too afraid of pg_bsd_indent. Maybe we should take > ownership of that code -- improve its own indentation to our > conventions, add comments, rename unclear variables

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-12 Thread Nathan Bossart
On Fri, Dec 12, 2025 at 07:10:24AM +, Zsolt Parragi wrote: >> GetNamedDSA and GetNamedDSHash do not have a need for a callback, >> because there isn't custom initialization logic that can be applied there. > > The use case for GetNamedDSHash is: I'm going to stay focused on the GetNamedDSMSeg

Re: Proposal: Add a callback data parameter to GetNamedDSMSegment

2025-12-12 Thread Nathan Bossart
On Thu, Dec 11, 2025 at 05:17:30PM -0600, Sami Imseih wrote: >> If the initialization callback function needed the name, it could be >> provided via the "void *" callback argument, right? I'm not following why >> we need to provide it separately. > > While it's true it can be passed as extra data

Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB ?barriers

2025-12-12 Thread Nathan Bossart
+/* + * _InterlockedExchange() generates a full memory barrier (or release + * semantics that ensures all prior memory operations are visible to + * other cores before the lock is released. + */ +#define S_UNLOCK(lock) (InterlockedExchange(lock, 0)) This seems to change the implementation from

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-12-12 Thread Álvaro Herrera
It's strange to see this thread go on about messing with the Perl script because we're too afraid of pg_bsd_indent. Maybe we should take ownership of that code -- improve its own indentation to our conventions, add comments, rename unclear variables, and so on until we have something we can work w

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-12-12 Thread Euler Taveira
On Fri, Dec 12, 2025, at 7:52 AM, Akshay Joshi wrote: > On Thu, Dec 11, 2025 at 7:29 PM Euler Taveira wrote: >> > Is there any way to obtain the default values directly from the source > code itself, or do I need to refer to the documentation? If we rely on > the documentation and compare against

Re: Mark function arguments of type "T *" as "const T *" where possible

2025-12-12 Thread Bertrand Drouvot
Hi, On Thu, Dec 11, 2025 at 09:51:49AM -0800, Jacob Champion wrote: > On Wed, Dec 10, 2025 at 11:22 PM Bertrand Drouvot > wrote: > > Let me try to focus on functions that really > > deserve the change. I could look at function names that contain "copy" or > > "cmp", > > functions that are used f

[PATCH] Skip unpublishable child tables when adding parent to publication

2025-12-12 Thread Arunprasad Rajkumar
Hi, I would like to propose a patch that improves the handling of table inheritance hierarchies when adding tables to publications for logical replication. Problem: Currently, when attempting to add a parent table to a publication using, the operation fails with an error if any of the inherited c

Re: Import Statistics in postgres_fdw before resorting to sampling.

2025-12-12 Thread Etsuro Fujita
On Fri, Dec 12, 2025 at 6:59 AM Corey Huinker wrote: > Rebase, no changes. Thanks for rebasing! I reviewed the changes made to the core: @@ -196,13 +196,56 @@ analyze_rel(Oid relid, RangeVar *relation, { /* * For a foreign table, call the FDW's hook function to see whether

Re: Add WALRCV_CONNECTING state to walreceiver

2025-12-12 Thread Xuneng Zhou
Hi, On Fri, Dec 12, 2025 at 4:45 PM Xuneng Zhou wrote: > > Hi Noah, > > On Fri, Dec 12, 2025 at 1:05 PM Noah Misch wrote: > > > > On Fri, Dec 12, 2025 at 12:51:00PM +0800, Xuneng Zhou wrote: > > > Bug #19093 [1] reported that pg_stat_wal_receiver.status = 'streaming' > > > does not accurately re

Re: Import Statistics in postgres_fdw before resorting to sampling.

2025-12-12 Thread Etsuro Fujita
On Thu, Nov 27, 2025 at 9:46 PM Etsuro Fujita wrote: > On Sat, Nov 22, 2025 at 6:31 AM Corey Huinker wrote: > >> Other initial comments: > >> > >> The commit message says: > >> > >> This is managed via two new options, fetch_stats and remote_analyze, > >> both are available at the server

Re: Non-text mode for pg_dumpall

2025-12-12 Thread tushar
On Thu, Dec 11, 2025 at 9:39 PM Mahendra Singh Thalor wrote: > > > Here, in our case, as the cluster already has a role with the current > user in restore, we are reporting error "pg_restore: error: could not > execute query: ERROR: role "role" already exists" and after this > error, restore is

Re: weird ON CONFLICT clauses

2025-12-12 Thread Álvaro Herrera
On 2025-Nov-27, Peter Geoghegan wrote: > On Thu, Nov 27, 2025 at 11:00 AM Álvaro Herrera wrote: > index_elems is needed by ON CONFLICT so that the user can specify an > operator class and/or a collation. This is probably hardly ever used, > but it does have its place. Right. > > So what about

Re: Visibility bug in tuple lock

2025-12-12 Thread Jasper Smit
Thanks, for looking into this and for creating the patch. > +1 for that approach. heap_lock_updated_tuple() actually does that check > too, but not for the first tuple. I think this will for sure fix the problem, however we are still accessing completely unrelated tuples. It feels unsafe to acces

Re: Metadata and record block access stats for indexes

2025-12-12 Thread Mircea Cadariu
Hi Aleksander, On 20/11/2025 16:56, Aleksander Alekseev wrote: Thanks for the patch. Here are my two cents. This is a follow-up on my earlier answers to your questions. Below is a motivating example and a performance comparison with HEAD. For database performance we want to ensure our worki

Re: [PATCH] Better Performance for PostgreSQL with large INSERTs

2025-12-12 Thread Jakub Wartak
On Wed, Nov 26, 2025 at 3:03 PM Filip Janus wrote: > > > > -Filip- > > > út 7. 10. 2025 v 16:54 odesílatel Andres Freund napsal: >> >> Hi, >> >> On 2025-10-07 15:03:29 +0200, Philipp Marek wrote: >> > > Have you tried to verify that this doesn't cause performance regressions >> > > in >> > >

Re: Improve the performance of Unicode Normalization Forms.

2025-12-12 Thread Heikki Linnakangas
On 24/11/2025 11:55, Alexander Borisov wrote: Hey guys, any news? I finally got around to look at this, thanks for your patience! v6-0001-Moving-Perl-functions-Sparse-Array-to-a-common-mo.patch +1, this makes the existing code more readable, even without the rest of the patches. Thanks for

Re: Periodic authorization expiration checks using GoAway message

2025-12-12 Thread Zsolt Parragi
Would client side revalidation allow re-authentication while a long-running query is in progress? Or would it kick out a connection because it can't reauthenticate after some grace period? A strict OIDC setup might use 5 or 10 minute access tokens, where this is a realistic issue. > Online checks

Re: Serverside SNI support in libpq

2025-12-12 Thread Daniel Gustafsson
> On 11 Dec 2025, at 18:47, Jacob Champion > wrote: > On Mon, Nov 24, 2025 at 6:53 AM Daniel Gustafsson wrote: >> The attached incorporates your tests, fixes them to make them pass. The >> culprit seemed to be a combination of a bug in the code (the verify callback >> need to be defined in the

Re: [PATCH] pg_bsd_indent: improve formatting of multiline comments

2025-12-12 Thread Aleksander Alekseev
Hi Nathan, > [...] > I think we should also figure out what we want to do for things like this: > > > ** > - This file contains routines that can be bound to a Postgres backend and > - called by the backend in the pro

Re: Make PGOAUTHCAFILE in libpq-oauth work out of debug mode

2025-12-12 Thread Zsolt Parragi
Hello I implemented a simple patch based on the above suggestion (PGOAUTHDEBUG=UNSAFE:http...). I did not update the documentation yet, let's see what everyone thinks about it before that, and I also have some concerns/questions. I added the new functions into a common source file which gets incl

Re: Enhancing Memory Context Statistics Reporting

2025-12-12 Thread Rahila Syed
Hi Daniel, > > Thanks for the patch, below are a few comments and suggestions. As I was > reviewing I tweaked the below and have attached the comments as changes in > 0003. > Thank you for the improvements. All your changes look good to me. I have incorporated those in the v44 patch. > +*

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-12-12 Thread Akshay Joshi
On Thu, Dec 11, 2025 at 7:29 PM Euler Taveira wrote: > > On Thu, Nov 20, 2025, at 6:18 AM, Akshay Joshi wrote: > > > > Implemented in the suggested solution. Attached is the v5 patch for review. > > > > I reviewed your patch and have some suggestions for this patch. > > * You shouldn't include th

Propagate XLogFindNextRecord error to callers

2025-12-12 Thread Anthonin Bonnefoy
Hi, Currently, XLogFindNextRecord errormsg is ignored and callers will only output a generic 'could not find a valid record' message without details. Additionally, invalid page header won't go through XLogReadRecord, leaving the error in state->errormsg_buf. This patch propagates XLogFindNextReco

Re: Fix memory leak in gist_page_items() of pageinspect

2025-12-12 Thread Daniel Gustafsson
> On 12 Dec 2025, at 11:27, Heikki Linnakangas wrote: > If we're going to bother changing this at all, let's consider reusing the > buffer. So instead of initStringInfo()+pfree on every tuple, allocate it once > and use resetStringInfo(). +1 -- Daniel Gustafsson

Re: Fix memory leak in gist_page_items() of pageinspect

2025-12-12 Thread Heikki Linnakangas
On 12/12/2025 11:48, Michael Paquier wrote: On Fri, Dec 12, 2025 at 09:00:08AM +, Bertrand Drouvot wrote: On Fri, Dec 12, 2025 at 04:50:09PM +0800, Chao Li wrote: where CStringGetTextDatum() has made a copy of buf.data and assigned to value[4], however buf.data is never free-ed. I did not

Re: Fix memory leak in gist_page_items() of pageinspect

2025-12-12 Thread Bertrand Drouvot
Hi, On Fri, Dec 12, 2025 at 06:48:09PM +0900, Michael Paquier wrote: > On Fri, Dec 12, 2025 at 09:00:08AM +, Bertrand Drouvot wrote: > > On Fri, Dec 12, 2025 at 04:50:09PM +0800, Chao Li wrote: > >> where CStringGetTextDatum() has made a copy of buf.data and assigned to > >> value[4], however

Re: Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY

2025-12-12 Thread Álvaro Herrera
On 2025-Dec-12, Mihail Nikalayeu wrote: > Hello, Álvaro! > > On Thu, Dec 11, 2025 at 10:36 PM Álvaro Herrera wrote: > > I just saw a failure in CI for an unrelated patch > > I'll try to dive deeper tomorrow to find a fix, but it feels like we > are doing something wrong here. Hmm, this is a go

Re: Few untranslated error messages in OAuth

2025-12-12 Thread Álvaro Herrera
Hello, These patches look good to me. On 2025-Dec-11, Jacob Champion wrote: > Oh, those catch logic errors in the parsing engine. v3-0002 removes > those from the translation files as well. Sounds good. > On Thu, Nov 27, 2025 at 10:24 AM Álvaro Herrera wrote: > > There's also the strings in C

Re: Proposal: Conflict log history table for Logical Replication

2025-12-12 Thread shveta malik
On Fri, Dec 12, 2025 at 3:04 PM Amit Kapila wrote: > > On Thu, Dec 11, 2025 at 7:49 PM Dilip Kumar wrote: > > > > I was considering the interdependence between the subscription and the > > conflict log table (CLT). IMHO, it would be logical to establish the > > subscription as dependent on the CL

Re: Fix and improve allocation formulas

2025-12-12 Thread Michael Paquier
On Thu, Dec 11, 2025 at 11:43:27AM -0500, Tom Lane wrote: > And before that, you'd have to get consensus that sizeof(*var) *is* > the preferred style. I for one don't like it a bit. IMO what it > mostly accomplishes is to remove a cue as to what we are allocating. > I don't agree that it removes

Re: Add a greedy join search algorithm to handle large join problems

2025-12-12 Thread Chengpeng Yan
> On Dec 10, 2025, at 18:20, Tomas Vondra wrote: > > I can confirm v2 makes it work for planning all 99 TPC-DS queries, i.e. > there are no more crashes during EXPLAIN. Thanks a lot for testing this — much appreciated. > It's also tricky as plan choices depend on GUCs like random_page_cost, >

Re: Fix memory leak in gist_page_items() of pageinspect

2025-12-12 Thread Michael Paquier
On Fri, Dec 12, 2025 at 09:00:08AM +, Bertrand Drouvot wrote: > On Fri, Dec 12, 2025 at 04:50:09PM +0800, Chao Li wrote: >> where CStringGetTextDatum() has made a copy of buf.data and assigned to >> value[4], however buf.data is never free-ed. > > I did not look in details but I think that we

Re: Enhancing Memory Context Statistics Reporting

2025-12-12 Thread Rahila Syed
Hi, Sorry for the late response. Thank you for your reviewing and testing the patch. On Mon, Dec 8, 2025 at 6:56 AM torikoshia wrote: > On 2025-11-28 18:22, Rahila Syed wrote: > > Hi, > > > I'm attaching the updated patches, which primarily include cleanup and > > have been rebased > > followi

Re: [Proposal] Adding callback support for custom statistics kinds

2025-12-12 Thread Michael Paquier
On Fri, Dec 12, 2025 at 11:58:54AM +0900, Michael Paquier wrote: > FWIW, I have begun putting my hands on your patch, editing it at some > degree. I am not sure that I will be able to finish that today, but > I'm working towards getting something done. Well, I have been able to do enough progress

Re: Proposal: Conflict log history table for Logical Replication

2025-12-12 Thread Amit Kapila
On Thu, Dec 11, 2025 at 7:49 PM Dilip Kumar wrote: > > I was considering the interdependence between the subscription and the > conflict log table (CLT). IMHO, it would be logical to establish the > subscription as dependent on the CLT. This way, if someone attempts to > drop the CLT, the system w

Re: [PATCH] Fix severe performance regression with gettext 0.20+ on Windows

2025-12-12 Thread Nazir Bilal Yavuz
Hi, On Thu, 11 Dec 2025 at 20:49, Andres Freund wrote: > > Hi, > > On 2025-12-11 11:45:01 -0600, Bryan Green wrote: > > On 12/11/2025 10:05 AM, Andres Freund wrote: > > > On 2025-12-11 15:43:36 +0100, Peter Eisentraut wrote: > > >> On 10.12.25 01:45, Bryan Green wrote: > > >>> The attached patch

Re: Fix memory leak in gist_page_items() of pageinspect

2025-12-12 Thread Bertrand Drouvot
Hi, On Fri, Dec 12, 2025 at 04:50:09PM +0800, Chao Li wrote: > Hi Hackers, > > While reading the code of pageinspect, I just found a memory leak > in gist_page_items(): > > ``` >values[4] = CStringGetTextDatum(buf.data); >nulls[4] = false; > ``` > > where CStringGetTextDatum() has made

Re: POC: make mxidoff 64 bits

2025-12-12 Thread Heikki Linnakangas
On 11/12/2025 22:05, Alvaro Herrera wrote: On 2025-Dec-11, Heikki Linnakangas wrote: That's a great question and I've been wondering about it myself. It goes all the way to the initial commit where multixacts were introduced, and I don't see any particular reason for it even back then. Even in

Fix memory leak in gist_page_items() of pageinspect

2025-12-12 Thread Chao Li
Hi Hackers, While reading the code of pageinspect, I just found a memory leak in gist_page_items(): ``` values[4] = CStringGetTextDatum(buf.data); nulls[4] = false; ``` where CStringGetTextDatum() has made a copy of buf.data and assigned to value[4], however buf.data is never free-ed. This

Re: Fix and improve allocation formulas

2025-12-12 Thread Bertrand Drouvot
Hi, On Thu, Dec 11, 2025 at 11:43:27AM -0500, Tom Lane wrote: > Andres Freund writes: > > I tend to agree that what you propose is the better style, but I seriously > > doubt that > > > a) changing over everything at once is worth the backpatch hazard and review > >pain > > b) that to judge

Re: Add WALRCV_CONNECTING state to walreceiver

2025-12-12 Thread Xuneng Zhou
Hi Noah, On Fri, Dec 12, 2025 at 1:05 PM Noah Misch wrote: > > On Fri, Dec 12, 2025 at 12:51:00PM +0800, Xuneng Zhou wrote: > > Bug #19093 [1] reported that pg_stat_wal_receiver.status = 'streaming' > > does not accurately reflect streaming health. In that discussion, > > Noah noted that even be

Re: Fix and improve allocation formulas

2025-12-12 Thread Bertrand Drouvot
Hi, On Thu, Dec 11, 2025 at 05:56:13PM +0100, Álvaro Herrera wrote: > I have my part of blame for having committed the mass change to > XLogRecPtrIsValid in a2b02293bc65. I'm starting to regret that now. After reflecting on this one, I do agree that this one was probably not worth the mass chang

Re: Fix and improve allocation formulas

2025-12-12 Thread Bertrand Drouvot
Hi, On Thu, Dec 11, 2025 at 10:39:55AM -0500, Andres Freund wrote: > Hi, > > On 2025-12-11 13:27:56 +, Bertrand Drouvot wrote: > > - 0002 is a very large patch. I think that it provides added value as > > mentioned > > above but I'm not sure it is worth the noise. Anyway it is done, so shari