Re: New committer: Jacob Champion

2025-04-14 Thread Euler Taveira
On Fri, Apr 11, 2025, at 5:26 PM, Jonathan S. Katz wrote: > Please join us in wishing Jacob much success and few reverts! Keep up the good work, Jacob! -- Euler Taveira EDB https://www.enterprisedb.com/

Re: [PING] [PATCH v2] parallel pg_restore: avoid disk seeks when jumping short distance forward

2025-04-14 Thread Tom Lane
Dimitrios Apostolou writes: > Any feedback on this one-liner? Or is the lack of feedback a clue that I > have been missing something important in my patch submission? :-) The calendar ;-). At this point we're in feature freeze for v18, so things that aren't bugs aren't likely to get much attent

Re: Built-in Raft replication

2025-04-14 Thread Kirill Reshke
On Mon, 14 Apr 2025 at 22:15, Konstantin Osipov wrote: > > Hi, Hi > I am considering starting work on implementing a built-in Raft > replication for PostgreSQL. > Just some thought on top of my mind, if you need my voice here: I have a hard time believing the community will be positive about t

Fixup some appendPQExpBuffer() calls

2025-04-14 Thread David Rowley
In a similar effort to what I did in [1], there's a bunch of appendPQExpBuffer() calls that could use appendPQExpBufferStr() or appendPQExpBufferChar(). With [1], I've been keeping those appendStringInfo calls in check at this time of year for a few years now. With appendPQExpBuffer I've not been,

RE: Rename injection point names in test_aio

2025-04-14 Thread Hayato Kuroda (Fujitsu)
Dear Michael, > 93bc3d75d8e1 has introduced a couple of new injection points, but > these don't follow the convention in-place where points are named > more-or-less-like-that. Please find attached a patch to make all > these more consistent. I have no objections for the patch, but I feel there a

Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment

2025-04-14 Thread Ilia Evdokimov
As there seems to be general support for the idea behind this patch, and no one has raised strong objections recently, but also no clear consensus on the exact final shape of the output has been reached yet - and I understand other priorities might be taking precedence right now - I’ve register

Re: POC: make mxidoff 64 bits

2025-04-14 Thread wenhui qiu
HI Heikki Pls Kindly help to create task in https://commitfest.postgresql.org/53/ ,I can not found this path in Commitfest 2025-07 Thanks On Wed, Apr 2, 2025 at 2:26 AM Heikki Linnakangas wrote: > On 01/04/2025 21:25, Heikki Linnakangas wrote: > > On 07/03/2025 13:30, Maxim Orlov wrote: >

Support for runtime parameters in injection points, for AIO tests

2025-04-14 Thread Michael Paquier
Hi all, (Andres in CC.) While reading the AIO code I have noticed that the way it uses injection points is limited by the fact that we don't have support for runtime parameters in the existing injection point facility. The code is shaped with two set/get functions that set a static parameter that

rounding_up

2025-04-14 Thread Daria Shanina
Hello everyone! I noticed, when we parse and validate values (in particular, the int type), we use the *rint* method, but unfortunately it does not work according to the round rules. Although on the website https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/rint-rintf-rintl?view=msv

Re: New committer: Jacob Champion

2025-04-14 Thread Jelte Fennema-Nio
On Fri, 11 Apr 2025 at 22:26, Jonathan S. Katz wrote: > > The Core Team would like to extend our congratulations to Jacob > Champion, who has accepted an invitation to become our newest PostgreSQL > committer. > > Please join us in wishing Jacob much success and few reverts! Congrats! Well deser

RE: doc patch: clarify the naming rule for injection_points

2025-04-14 Thread Hayato Kuroda (Fujitsu)
Dear Aleksander, > ``` > - their own code using the same macro. > + their own code using the same macro. The name of injection points must > be > + lower characters, and dashes must separate its terms. > ``` > > Perhaps "must" is a too strong statement. I suggest something like: >

Re: pgsql: Non text modes for pg_dumpall, correspondingly change pg_restore

2025-04-14 Thread Andrew Dunstan
On 2025-04-14 Mo 8:20 AM, Álvaro Herrera wrote: On 2025-Apr-04, Andrew Dunstan wrote: Non text modes for pg_dumpall, correspondingly change pg_restore I think the new oid_string_list stuff in this commit is unnecessary, and we can remove a bunch of lines by simplifying that to using SimplePt

[PING] [PATCH v2] parallel pg_restore: avoid disk seeks when jumping short distance forward

2025-04-14 Thread Dimitrios Apostolou
On Fri, 4 Apr 2025, Dimitrios Apostolou wrote: I just managed to run pgindent, here is v2 with the comment style fixed. Any feedback on this one-liner? Or is the lack of feedback a clue that I have been missing something important in my patch submission? :-) Should I CC people that are freq

Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment

2025-04-14 Thread Robert Haas
On Tue, Apr 1, 2025 at 5:07 PM David Rowley wrote: > I tried to move things along to address Tom's concern about not > wanting to show this in EXPLAIN's standard output. I suggested in [1] > that we could use EXPLAIN ANALYZE, but nobody commented on that. > EXPLAIN ANALYZE is much more verbose tha

Re: pgsql: Non text modes for pg_dumpall, correspondingly change pg_restore

2025-04-14 Thread Álvaro Herrera
On 2025-Apr-04, Andrew Dunstan wrote: > Non text modes for pg_dumpall, correspondingly change pg_restore I think the new oid_string_list stuff in this commit is unnecessary, and we can remove a bunch of lines by simplifying that to using SimplePtrList, as the attached illustrates. (Perhaps the n

Re: BitmapHeapScan streaming read user and prelim refactoring

2025-04-14 Thread James Hunter
On Thu, Apr 10, 2025 at 8:15 PM Thomas Munro wrote: > > On Fri, Apr 11, 2025 at 5:50 AM James Hunter > wrote: > > I am looking at the pre-streaming code, in PG 17, as I am not familiar > > with the PG 18 "streaming" code. Back in PG 17, nodeBitmapHeapscan.c > > maintained two shared TBM iterator

Re: ci: Allow running mingw tests by default via environment variable

2025-04-14 Thread Nathan Bossart
On Sat, Apr 12, 2025 at 08:18:35PM +1200, Thomas Munro wrote: > Is it safe to assume that CI changes come under the same code-freeze > exception as tests and docs? I would assume so, it's just scripting > glue in .cirrus.XXX files not affecting one bit of the software, but I > don't recall that we

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-14 Thread Jacob Champion
On Mon, Apr 14, 2025 at 11:27 AM Wolfgang Walther wrote: >src/interfaces/libpq-oauth/meson.build:18:22: ERROR: File > oauth-curl.c does not exist. > > This.. clears it up, because that file is indeed missing for me on disk. Aha! Okay, glad I don't need to track that down. > libpq.a > libpq-o

Re: ci: Allow running mingw tests by default via environment variable

2025-04-14 Thread Andres Freund
Hi, On April 14, 2025 9:22:40 PM GMT+02:00, Nathan Bossart wrote: >On Sat, Apr 12, 2025 at 08:18:35PM +1200, Thomas Munro wrote: >> Is it safe to assume that CI changes come under the same code-freeze >> exception as tests and docs? I would assume so, it's just scripting >> glue in .cirrus.XXX

Re: doc patch: clarify the naming rule for injection_points

2025-04-14 Thread Aleksander Alekseev
Hi, > Naming rule of points is not determined yet, but most of them have lower cases > and each term are divided by dash "-". I think this is a good chance to > formally > clarify it. PSA adding the description. > > I was confused the correct place for the description. I added at the end of > fi

Re: rounding_up

2025-04-14 Thread Andrey Borodin
Hi Daria! > On 14 Apr 2025, at 13:24, Daria Shanina wrote: > > when we parse and validate values (in particular, the int type), we use the > rint method, but unfortunately it does not work according to the round rules. Are this concerns explainable in SQL query? As far as I can see from your

Re: rounding_up

2025-04-14 Thread Christoph Moench-Tegeder
Hi, ## Daria Shanina (vilensip...@gmail.com): > I noticed, when we parse and validate values (in particular, the int type), > we use the *rint* method, but unfortunately it does not work according to > the round rules. First question would be "which round rule?" as (of course) there're multiple

Re: Adding error messages to a few slash commands

2025-04-14 Thread Abhishek Chanda
Thanks Pavel, done now https://commitfest.postgresql.org/patch/5699/ Thanks On Mon, Apr 14, 2025 at 4:27 AM Pavel Luzanov wrote: > > On 13.04.2025 19:40, Abhishek Chanda wrote: > > Thanks for the feedback, attached an updated patch that changes most > of those "Did not find" messages to empty ta

RE: Rename injection point names in test_aio

2025-04-14 Thread Hayato Kuroda (Fujitsu)
Dear Michael, > > I have no objections for the patch, but I feel there are no concrete naming > > rules > > (I confused while creating patches). > > There has been a sort of implied rule in the code to use lower > characters, with terms separated by dashes. Perhaps we could make > that more off

HELP: SAVEPOINT feature cases

2025-04-14 Thread itumonohito
Dear hackers, I hope this email finds you well. I am writing to inquire about the use cases for the SAVEPOINT feature. I would appreciate it if you could provide some examples of scenarios where this functionality proves particularly useful. Thank you for your time and assistance. I look forwar

Re: HELP: SAVEPOINT feature cases

2025-04-14 Thread Kirill Reshke
On Mon, 14 Apr 2025 at 21:54, itumonohito wrote: > > Dear hackers, > > I hope this email finds you well. > > I am writing to inquire about the use cases for the SAVEPOINT feature. > > I would appreciate it if you could provide some examples of scenarios where > this functionality proves particula

Re: Conflicting updates of command progress

2025-04-14 Thread Sami Imseih
> While working on [1] I realized that some field of pg_stat_progress_cluste has > weird value. Is there a repro that you can share that shows the weird values? It sounds like the repro is on top of [1]. Is that right? > AFAICS the current design does not consider that one progress-reporting > co

Built-in Raft replication

2025-04-14 Thread Konstantin Osipov
Hi, I am considering starting work on implementing a built-in Raft replication for PostgreSQL. Raft's advantage is that it unifies log replication, cluster configuration/membership/topology management and initial state transfer into a single protocol. Currently the cluster configuration/topolo

Re: An incorrect check in get_memoize_path

2025-04-14 Thread wenhui qiu
HI No objections.It's a pity that the postgresql18 version has been code-frozen Thanks On Mon, Apr 14, 2025 at 4:21 PM Andrei Lepikhov wrote: > On 4/14/25 08:49, Richard Guo wrote: > > On Mon, Apr 7, 2025 at 4:50 PM Richard Guo > wrote: > >> Hence, I propose the attached patch for the fix.

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-14 Thread Wolfgang Walther
Wolfgang Walther: > So yes, not related to your patch. I do understand that PostgreSQL's > autoconf build system is not designed for "static only", I am certainly > not expecting you to fix that. > > I think meson will do better here, but I was not able to make that work, > yet. I did a basic meso

Re: An incorrect check in get_memoize_path

2025-04-14 Thread Andrei Lepikhov
On 4/14/25 08:49, Richard Guo wrote: On Mon, Apr 7, 2025 at 4:50 PM Richard Guo wrote: Hence, I propose the attached patch for the fix. BTW, there is a XXX comment there saying that maybe we can make the remaining join quals part of the inner scan's filter instead of the join filter. I don't

[WIP] Implement "pg_restore --data-only --clean" as a way to skip WAL

2025-04-14 Thread Dimitrios Apostolou
Hello list, I implemented --clean support for --data-only, in order to avoid logging to the WAL while populating the database. The attached patch issues a TRUNCATE before COPY on each worker process, and provides a significant speed advantage if the cluster is configure with wal_level=minimal.

Re: Logging parallel worker draught

2025-04-14 Thread Benoit Lobréau
On 4/7/25 6:41 PM, Melanie Plageman wrote: On Mon, Feb 3, 2025 at 12:37 AM Sami Imseih wrote: I started looking at this, and I like the idea. Thanks for taking a look! A few comments: I don't understand what 0002 is. For starters, the commit message says something about pg_stat_database, and

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-14 Thread Jacob Champion
On Fri, Apr 11, 2025 at 9:21 AM Wolfgang Walther wrote: > I tried to apply this patch to nixpkgs' libpq build [1]. First, I pinned > a recent commit from master (one where the v5 patch will apply cleanly > later) and enabled --with-libcurl [2]. (The [2] link is missing, I think.) > 2. The static

Re: Fundamental scheduling bug in parallel restore of partitioned tables

2025-04-14 Thread Tom Lane
I wrote: > Here's a draft patch for this. It seems to fix the problem in > light testing. I realized that the "repro" I had for this isn't testing the same thing that Dimitrios is seeing; what it is exposing looks more like a bug or at least a behavioral change due to the v18 work to record not-n

Re: BitmapHeapScan streaming read user and prelim refactoring

2025-04-14 Thread Robert Haas
On Thu, Apr 10, 2025 at 11:15 PM Thomas Munro wrote: > The new streaming BHS isn't just issuing probabilistic hints about > future access obtained from a second iterator. It has just one shared > iterator connected up to the workers' ReadStreams. Each worker pulls > a disjoint set of blocks out

Using pg_bitutils.h in tidbitmap.c.

2025-04-14 Thread Thomas Munro
tidbitmap.c's operations loop over all the bits, but could leap over zeros with bitmap instructions like bitmapset.c. Hard to imagine that matters, but I think it also comes out easier to read? From 7eec670224270c098c2fb3ad4b7748b0769a1e95 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Wed, 19

Re: New committer: Jacob Champion

2025-04-14 Thread Nazir Bilal Yavuz
On Fri, 11 Apr 2025 at 23:26, Jonathan S. Katz wrote: > > The Core Team would like to extend our congratulations to Jacob > Champion, who has accepted an invitation to become our newest PostgreSQL > committer. > > Please join us in wishing Jacob much success and few reverts! Congratulations Jacob

Re: Add pg_get_injection_points() for information of injection points

2025-04-14 Thread Aleksander Alekseev
Hi, > > Also, should we define pg_get_injection_points in the injection_points > > extension maybe? > > As this is global for all libraries, that's not something I would add > there. If I didn't miss anything, all SQL functions dealing with injection points are gathered in injection_points extens

Re: Changing shared_buffers without restart

2025-04-14 Thread Dmitry Dolgov
> On Mon, Apr 14, 2025 at 10:40:28AM GMT, Ashutosh Bapat wrote: > > However, when we put back the patches to shrink buffers, we will evict > the extra buffers, and shrink - if all the processes haven't > participated in the barrier by then, some of them may try to access > those buffers - re-instal

Re: Changing shared_buffers without restart

2025-04-14 Thread Ashutosh Bapat
On Mon, Apr 14, 2025 at 12:50 PM Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > On Mon, Apr 14, 2025 at 10:40:28AM GMT, Ashutosh Bapat wrote: > > > > However, when we put back the patches to shrink buffers, we will evict > > the extra buffers, and shrink - if all the processes haven't > > parti

doc patch: clarify the naming rule for injection_points

2025-04-14 Thread Hayato Kuroda (Fujitsu)
Dear hackers, This is a forked thread from [1]. Naming rule of points is not determined yet, but most of them have lower cases and each term are divided by dash "-". I think this is a good chance to formally clarify it. PSA adding the description. I was confused the correct place for the descri

Re: MergeJoin beats HashJoin in the case of multiple hash clauses

2025-04-14 Thread Tender Wang
Hi, While I debug hashjoin codes, in estimate_multivariate_bucketsize(), I find that the list_copy(hashclauses) below is unnecessary if we have a single join clause. List *clauses = list_copy(hashclauses); ... I adjust the place of list_copy() call as the attached patch. This can save som

Re: New committer: Jacob Champion

2025-04-14 Thread Matheus Alcantara
On 11/04/25 17:26, Jonathan S. Katz wrote: The Core Team would like to extend our congratulations to Jacob Champion, who has accepted an invitation to become our newest PostgreSQL committer. Please join us in wishing Jacob much success and few reverts! Congrats Jacob! Well deserved. -- Mat

Re: Assert failure in base_yyparse

2025-04-14 Thread Richard Guo
On Fri, Mar 28, 2025 at 7:12 PM Евгений Горбанев wrote: > If you replace is_not_null with NOT NULL in the query, everything works > correctly. > It seems that is_not_null is an incorrect keyword and it should not be > used, but I don't understand how it gets here. It seems what happens is that in

Re: New committer: Jacob Champion

2025-04-14 Thread Aleksander Alekseev
> The Core Team would like to extend our congratulations to Jacob > Champion, who has accepted an invitation to become our newest PostgreSQL > committer. Congrats, Jacob! -- Best regards, Aleksander Alekseev

Re: someone else to do the list of acknowledgments

2025-04-14 Thread Aleksander Alekseev
Hi, > >> The whole thing might take about 20 to 30 hours wall-clock time. > > > > After this dev cycle, things with a defined end to them hold a greater > > attraction than they did previously. > > > >> > >> So, there is some time to think about this. Please discuss here if > >> you're intereste

Re: Add pg_get_injection_points() for information of injection points

2025-04-14 Thread Ranier Vilela
Em seg., 14 de abr. de 2025 às 09:46, Ranier Vilela escreveu: > Hi Michael. > > Em dom., 13 de abr. de 2025 às 21:36, Michael Paquier > escreveu: > >> Hi all, >> >> One thing that's been lacking in injection points is the possibility >> to look at the state of the injection points in shared memo

Re: COALESCE with single argument looks like identity function

2025-04-14 Thread Maksim Milyutin
On 4/11/25 17:00, Tom Lane wrote: Maksim Milyutin writes: I've noticed that COALESCE function doesn't converge to argument expression if it is alone in argument list of COALESCE as part simplification routine for expressions in planner. This might suppress further useful transformations when non

Re: rounding_up

2025-04-14 Thread Tom Lane
Christoph Moench-Tegeder writes: > ## Daria Shanina (vilensip...@gmail.com): >> I noticed, when we parse and validate values (in particular, the int type), >> we use the *rint* method, but unfortunately it does not work according to >> the round rules. > First question would be "which round rule?

Re: support create index on virtual generated column.

2025-04-14 Thread jian he
On Wed, Mar 26, 2025 at 5:36 PM Kirill Reshke wrote: > reshke=# CREATE TABLE xx (a int, b int GENERATED ALWAYS AS (a * 2) VIRTUAL) ; > CREATE TABLE > reshke=# create index on xx (b); > CREATE INDEX > reshke=# > reshke=# \d+ xx > Table "public.xx

Re: Adding facility for injection points (or probe points?) for more advanced tests

2025-04-14 Thread Michael Paquier
On Mon, Apr 14, 2025 at 01:24:30PM +0900, Michael Paquier wrote: > IMO, we ought to clean up the way the AIO code does its tests with > injection point with something like the patch of this thread. And > perhaps even do it in v18 to have the code in a cleaner state at > release. I'll start a new

Re: Rename injection point names in test_aio

2025-04-14 Thread Michael Paquier
On Mon, Apr 14, 2025 at 08:13:44AM +, Hayato Kuroda (Fujitsu) wrote: > I have no objections for the patch, but I feel there are no concrete naming > rules > (I confused while creating patches). There has been a sort of implied rule in the code to use lower characters, with terms separated by

Re: support create index on virtual generated column.

2025-04-14 Thread Kirill Reshke
On Mon, 14 Apr 2025 at 16:10, jian he wrote: > > new patch attached. Now, > ALTER TABLE DROP COLUMN works fine. > ALTER INDEX ATTACH PARTITION works fine. > creating such an index on a partitioned table works just fine. > for table inheritance: create index on parent table will not cascade > to ch

Re: New committer: Jacob Champion

2025-04-14 Thread wenhui qiu
Congratulations On Mon, Apr 14, 2025 at 6:56 PM Aleksander Alekseev < aleksan...@timescale.com> wrote: > > The Core Team would like to extend our congratulations to Jacob > > Champion, who has accepted an invitation to become our newest PostgreSQL > > committer. > > Congrats, Jacob! > > -- > Best

Re: Adding error messages to a few slash commands

2025-04-14 Thread Pavel Luzanov
On 13.04.2025 19:40, Abhishek Chanda wrote: Thanks for the feedback, attached an updated patch that changes most of those "Did not find" messages to empty tables. I did not change two sets, listDbRoleSettings and listTables both have comments describing that these are deliberately this way. Tha

Re: COALESCE with single argument looks like identity function

2025-04-14 Thread Maksim Milyutin
Updated patchset is attached On 4/14/25 17:25, Maksim Milyutin wrote: On 4/11/25 17:00, Tom Lane wrote: Maksim Milyutin writes: I've noticed that COALESCE function doesn't converge to argument expression if it is alone in argument list of COALESCE as part simplification routine for expression

Re: Performance issues with v18 SQL-language-function changes

2025-04-14 Thread Robert Haas
On Sun, Apr 13, 2025 at 3:23 PM Tom Lane wrote: > create function fx(p_summa bigint) returns text immutable strict > return ltrim(to_char(p_summa, '999 999 999 999 999 999 999 999')); > > explain analyze select fx(i) from generate_series(1,100) as i(i); > > you arrive at the rude discovery tha

Re: Add pg_get_injection_points() for information of injection points

2025-04-14 Thread Michael Paquier
On Tue, Apr 15, 2025 at 02:49:24AM +, Hayato Kuroda (Fujitsu) wrote: > Should cur_pos be uint32 instead of int? Either of them can work because > cur_pos can be [0, 128], but it may be clearer. > > Apart from above, LGTM. Sure, why not. Thanks for the review. An important thing may be to sp

Re: pg_dump --if-exists --clean when drop index that is partition of a partitioned index

2025-04-14 Thread Pavel Stehule
út 15. 4. 2025 v 7:33 odesílatel jian he napsal: > On Mon, Apr 14, 2025 at 2:09 PM Pavel Stehule > wrote: > > > > Hi > > > > po 14. 4. 2025 v 7:54 odesílatel jian he > napsal: > >> > >> hi. > >> > >> CREATE TABLE tp(c int, a int, b int) PARTITION BY RANGE (b); > >> CREATE TABLE tp_1(c int, a in

Re: Recent pg_rewind test failures in buildfarm

2025-04-14 Thread Alexander Lakhin
Hello Tom, 15.04.2025 05:58, Tom Lane wrote: In the last day or so, both skink and mamba have hit this in the pg_rewind test suite [1][2]: #3 0x01f03f7c in ExceptionalCondition (conditionName=conditionName@entry=0x2119c4c "pending_since == 0", fileName=fileName@entry=0x2119454 "pgstat.c", li

Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment

2025-04-14 Thread David Rowley
On Tue, 15 Apr 2025 at 11:14, Ilia Evdokimov wrote: > On 14.04.2025 23:53, David Rowley wrote: > If we can't get consensus for everything people want to add at once > then maybe the patch could be broken into two, with 0001 being pretty > much the v4 patch and then have 0002 add the Estimated Hit

Re: not null constraints, again

2025-04-14 Thread Tender Wang
Tender Wang 于2025年4月15日周二 11:20写道: > > > Tom Lane 于2025年4月15日周二 05:39写道: > >> Alvaro Herrera writes: >> > On 2025-Apr-14, Tom Lane wrote: >> >> I would not have expected that adding pg_constraint rows implies >> >> stronger locks than what ALTER ADD PRIMARY KEY was using before, >> >> and I sus

Re: FmgrInfo allocation patterns (and PL handling as staged programming)

2025-04-14 Thread Pavel Stehule
Hi út 15. 4. 2025 v 2:32 odesílatel Chapman Flack napsal: > On 04/06/25 22:37, Tom Lane wrote: > > Here's a draft patch to fix the bogus dependencies. As given this'd > > only be okay for HEAD, since I doubt we can get away with changing > > ProcedureCreate()'s signature in stable branches ...

Re: pg_dump --if-exists --clean when drop index that is partition of a partitioned index

2025-04-14 Thread jian he
On Mon, Apr 14, 2025 at 2:09 PM Pavel Stehule wrote: > > Hi > > po 14. 4. 2025 v 7:54 odesílatel jian he napsal: >> >> hi. >> >> CREATE TABLE tp(c int, a int, b int) PARTITION BY RANGE (b); >> CREATE TABLE tp_1(c int, a int, b int); >> ALTER TABLE tp ATTACH PARTITION tp_1 FOR VALUES FROM (0) TO (

Re: Recent pg_rewind test failures in buildfarm

2025-04-14 Thread Michael Paquier
On Mon, Apr 14, 2025 at 10:58:28PM -0400, Tom Lane wrote: > That assert appears to be several years old, and the > 008_min_recovery_point.pl test script that's triggering it hasn't > changed very recently either, so I'm baffled where to start digging. > It has the odor of a timing problem, so maybe

Re: Recent pg_rewind test failures in buildfarm

2025-04-14 Thread Bertrand Drouvot
Hi, On Tue, Apr 15, 2025 at 08:00:00AM +0300, Alexander Lakhin wrote: > Hello Tom, > > 15.04.2025 05:58, Tom Lane wrote: > > In the last day or so, both skink and mamba have hit this > > in the pg_rewind test suite [1][2]: > > > > #3 0x01f03f7c in ExceptionalCondition > > (conditionName=condit

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-14 Thread Wolfgang Walther
Jacob Champion: libpq.a libpq-oauth-18.a The libpq.a file has no references to dlopen, but plenty of references to curl stuff. Which references? libpq-oauth should be the only thing using Curl symbols: $ nm src/interfaces/libpq/libpq.a | grep --count curl 0 $ nm src/interfaces/

Re: pgsql: Non text modes for pg_dumpall, correspondingly change pg_restore

2025-04-14 Thread Andrew Dunstan
On 2025-04-14 Mo 12:28 PM, Andrew Dunstan wrote: I'm also not sure about the double sscanf() business there ... There must be a better way to do this. Yes, probably. I'll look into that if you like. something like this? cheers andrew -- Andrew Dunstan EDB: https://www.enterpri

Re: Fix a resource leak (src/backend/utils/adt/rowtypes.c)

2025-04-14 Thread Tom Lane
Robert Haas writes: > On Sun, Apr 13, 2025 at 7:34 PM Ranier Vilela wrote: >> The function *record_in* has a new report about resource leak. >> I think Coverity is right. > I agree, for small values of "right". The memory isn't formally leaked > because it will be eventually released when the co

use correct variable in error message in _allocAH function (pg_backup_archiver.c)

2025-04-14 Thread Mahendra Singh Thalor
Hi hackers, In _allocAH function(pg_backup_archiver.c), we were using the *fmt* variable in switch case for *default case*, but correct variable is AH->format. Here, I am attaching a patch for the same. -- Thanks and Regards Mahendra Singh Thalor EnterpriseDB: http://www.enterprisedb.com v01-

RE: Add pg_get_injection_points() for information of injection points

2025-04-14 Thread Hayato Kuroda (Fujitsu)
Dear Michael, > Yes. The function could be changed to return an ERROR if the build > does not support this option. It's more portable to return NULL if > you have some queries that do joins. This could be used with > pg_stat_activity and wait events for example, and some points are in > positio

Recent pg_rewind test failures in buildfarm

2025-04-14 Thread Tom Lane
In the last day or so, both skink and mamba have hit this in the pg_rewind test suite [1][2]: #3 0x01f03f7c in ExceptionalCondition (conditionName=conditionName@entry=0x2119c4c "pending_since == 0", fileName=fileName@entry=0x2119454 "pgstat.c", lineNumber=lineNumber@entry=734) at assert.c:66 #

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-14 Thread Wolfgang Walther
Jacob Champion: (The [2] link is missing, I think.) Ah, sry. This is the link: https://github.com/wolfgangwalther/nixpkgs/commits/postgresql-libpq-curl/ It's the last two commits on that branch. I'm confused by this -- the build produces staticlibs alongside the dynamically linked ones, so

Re: Adding support for SSLKEYLOGFILE in the frontend

2025-04-14 Thread Daniel Gustafsson
> On 9 Apr 2025, at 20:45, Daniel Gustafsson wrote: > >> On 9 Apr 2025, at 20:41, Jacob Champion >> wrote: >> >> Hello, >> >> On Thu, Apr 3, 2025 at 8:51 AM Daniel Gustafsson wrote: >>> Committed, after another round of testing and looking. >> >> I think we may want to consider marking sslk

Re: Fix a resource leak (src/backend/utils/adt/rowtypes.c)

2025-04-14 Thread Ranier Vilela
Em seg., 14 de abr. de 2025 às 16:59, Robert Haas escreveu: > On Sun, Apr 13, 2025 at 7:34 PM Ranier Vilela wrote: > > CID 1608916: (#1 of 1): Resource leak (RESOURCE_LEAK) > > 52. leaked_storage: Variable buf going out of scope leaks the storage > buf.data points to. > > > > The function *recor

Re: not null constraints, again

2025-04-14 Thread Alvaro Herrera
On 2025-Apr-14, Tom Lane wrote: > The patch I propose there seems to prevent this, but I wonder if we > shouldn't look closer into why it's failing in the first place. > I would not have expected that adding pg_constraint rows implies > stronger locks than what ALTER ADD PRIMARY KEY was using befo

Re: Add pg_get_injection_points() for information of injection points

2025-04-14 Thread Michael Paquier
On Mon, Apr 14, 2025 at 04:29:37PM +0300, Aleksander Alekseev wrote: > If I didn't miss anything, all SQL functions dealing with injection > points are gathered in injection_points extension so IMO > pg_get_injection_points() belongs there. It would be awkward to have > it in the core considering t

Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment

2025-04-14 Thread Andrei Lepikhov
On 4/14/25 18:31, Robert Haas wrote: On Tue, Apr 1, 2025 at 5:07 PM David Rowley wrote: I tried to move things along to address Tom's concern about not wanting to show this in EXPLAIN's standard output. I suggested in [1] that we could use EXPLAIN ANALYZE, but nobody commented on that. EXPLAIN

Re: [18] Unintentional behavior change in commit e9931bfb75

2025-04-14 Thread Jeff Davis
On Sat, 2025-04-12 at 05:34 -0700, Noah Misch wrote: > I think the code for (2) and for "I/i in Turkish" haven't returned.  > Given > commit e3fa2b0 restored the v17 "I/i in Turkish" treatment for plain > lower(), > the regex code likely needs a similar restoration.  If not, the regex > comments >

Re: Performance issues with v18 SQL-language-function changes

2025-04-14 Thread Pavel Stehule
Hi po 14. 4. 2025 v 16:38 odesílatel Robert Haas napsal: > On Sun, Apr 13, 2025 at 3:23 PM Tom Lane wrote: > > create function fx(p_summa bigint) returns text immutable strict > > return ltrim(to_char(p_summa, '999 999 999 999 999 999 999 999')); > > > > explain analyze select fx(i) from genera

Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment

2025-04-14 Thread David Rowley
On Tue, 15 Apr 2025 at 04:31, Robert Haas wrote: > I don't think we should use ANALYZE for this because, IME, that should > just be about whether the query gets executed. Since this looks like > information that is available at plan time, I think it should be > displayed all the time or made conti

Re: bug in stored generated column over domain with constraints.

2025-04-14 Thread Tom Lane
jian he writes: > new patch attached. I looked this over. It's kind of astonishing that nobody has reported this before, because AFAICT it's been broken since we invented generated columns. > rewriteTargetListIU, expand_insert_targetlist these two places can > make a null Const TargetEntry for

Re: Add pg_get_injection_points() for information of injection points

2025-04-14 Thread Kirill Reshke
On Mon, 14 Apr 2025 at 17:32, Michael Paquier wrote: > > As this is global for all libraries, that's not something I would add > there. Same applies for pg_stat_statements, but it is defined in extension. Also, injection points are tests-only, so maybe no need to have this function callable in p

Re: Call for Posters: PGConf.dev 2025

2025-04-14 Thread Noah Misch
Thanks for running this. Four logistical questions: 1. By what timestamp should one submit? 2. Where does one send the submission? On Sun, Apr 13, 2025 at 04:01:56PM +0500, Andrey Borodin wrote: > The goal of the poster session is to visually present your patch or project > on an A2-sized poste

Re: Call for Posters: PGConf.dev 2025

2025-04-14 Thread Andrey Borodin
> On 15 Apr 2025, at 01:52, Noah Misch wrote: > > Thanks for running this. Four logistical questions: > > 1. By what timestamp should one submit? If prospect participant is going to bring their poster to Montreal themself (or hand via friends) - it’s good to have on conf venue on May 13, so

Re: Proposal: Limitations of palloc inside checkpointer

2025-04-14 Thread Xuneng Zhou
Hi, I've moved this entry to the July CommitFest. The CI reported an unused variable warning in patch v5, so I've addressed it by removing the unused one. Sorry for not catching the issue locally. Xuneng Zhou 于2025年4月10日周四 23:43写道: > Hi, > > I’ve updated and rebased Maxim's patch version 4 with

pg_combinebackup: correct code comment.

2025-04-14 Thread Amul Sul
Hi, Cc: Robert Attached is a patch that corrects the code comment for process_directory_recursively() in pg_combinebackup, where the comment incorrectly refers to "output_directory" instead of the intended "input_directory". -- Regards, Amul Sul EDB: http://www.enterprisedb.com From 80765206dcdc5

Re: not null constraints, again

2025-04-14 Thread Tom Lane
The attached script simply creates two partitioned tables that are connected by a foreign key constraint, then pg_dumps that setup and tries to do a parallel restore. This works up until 14e87ffa5c543b5f30ead7413084c25f7735039f is the first bad commit commit 14e87ffa5c543b5f30ead7413084c25f773503

Re: [PoC] Federated Authn/z with OAUTHBEARER

2025-04-14 Thread Jacob Champion
On Mon, Apr 14, 2025 at 12:46 PM Wolfgang Walther wrote: > But that means we'd need a -lpq-oauth-18 or something like that in > Libs.private in libpq.pc, right? I believe so. I'm in the middle of the .pc stuff right now; v6 should have the fixes as long as I don't get stuck. Thanks, --Jacob

Re: Built-in Raft replication

2025-04-14 Thread Konstantin Osipov
* Kirill Reshke [25/04/14 20:48]: > > I am considering starting work on implementing a built-in Raft > > replication for PostgreSQL. > > > > Just some thought on top of my mind, if you need my voice here: > > I have a hard time believing the community will be positive about this > change in-core

Typos in the comment for the estimate_multivariate_ndistinct()

2025-04-14 Thread Tender Wang
Hi, While reading the estimate_multivariate_ndistinct(), I think "If a match it found, *varinfos is * updated to remove the list of matched varinfos" should be "If a match is found, *varinfos is * updated to remove the list of matched varinfos" I've attached a patch for that. -- Thanks, Tende

Re: pgsql: Non text modes for pg_dumpall, correspondingly change pg_restore

2025-04-14 Thread Mahendra Singh Thalor
On Mon, 14 Apr 2025 at 21:39, Álvaro Herrera wrote: > > On 2025-Apr-04, Andrew Dunstan wrote: > > > Non text modes for pg_dumpall, correspondingly change pg_restore > > I think the new oid_string_list stuff in this commit is unnecessary, and > we can remove a bunch of lines by simplifying that to

Re: FmgrInfo allocation patterns (and PL handling as staged programming)

2025-04-14 Thread Chapman Flack
On 04/06/25 22:37, Tom Lane wrote: > Here's a draft patch to fix the bogus dependencies. As given this'd > only be okay for HEAD, since I doubt we can get away with changing > ProcedureCreate()'s signature in stable branches ... In the back branches > we could make ProcedureCreate() deconstruct th

Log prefix missing for subscriber log messages received from publisher

2025-04-14 Thread vignesh C
Hi, Currently, when a warning is emitted by the publisher, the corresponding log message does not include the log prefix. This makes it harder to correlate such messages with other log entries. For example, in a simulated error scenario where directory removal fails, the notice message lacks the s

Re: not null constraints, again

2025-04-14 Thread Tom Lane
Alvaro Herrera writes: > On 2025-Apr-14, Tom Lane wrote: >> I would not have expected that adding pg_constraint rows implies >> stronger locks than what ALTER ADD PRIMARY KEY was using before, >> and I suspect that doing so will cause more problems than just >> breaking parallel restore. > I wasn

Re: Add pg_get_injection_points() for information of injection points

2025-04-14 Thread Michael Paquier
On Mon, Apr 14, 2025 at 06:15:07AM +, Hayato Kuroda (Fujitsu) wrote: > Apart from functions related with injection_points, this can be called even > when > postgres has been built with -Dinjection_points=false. This is intentional > because > this function does not have any side-effect and ju

Re: ci: Allow running mingw tests by default via environment variable

2025-04-14 Thread Nathan Bossart
On Mon, Apr 14, 2025 at 09:26:59PM +0200, Andres Freund wrote: > On April 14, 2025 9:22:40 PM GMT+02:00, Nathan Bossart > wrote: >>On Sat, Apr 12, 2025 at 08:18:35PM +1200, Thomas Munro wrote: >>> Is it safe to assume that CI changes come under the same code-freeze >>> exception as tests and docs

Re: Add estimated hit ratio to Memoize in EXPLAIN to explain cost adjustment

2025-04-14 Thread Ilia Evdokimov
On 14.04.2025 23:53, David Rowley wrote: If we can't get consensus for everything people want to add at once then maybe the patch could be broken into two, with 0001 being pretty much the v4 patch and then have 0002 add the Estimated Hit Ratio. Having the physical patches and being able to try i

Re: not null constraints, again

2025-04-14 Thread Tender Wang
Tom Lane 于2025年4月15日周二 05:39写道: > Alvaro Herrera writes: > > On 2025-Apr-14, Tom Lane wrote: > >> I would not have expected that adding pg_constraint rows implies > >> stronger locks than what ALTER ADD PRIMARY KEY was using before, > >> and I suspect that doing so will cause more problems than

  1   2   >