Re: remove unnecessary include in src/backend/commands/policy.c

2025-10-21 Thread Shinya Kato
On Tue, Oct 21, 2025 at 1:01 PM jian he wrote: > > Thank you, I agree with Álvaro. So, I think it is better to leave them > > as they are, except for access/relation.h. And, replacing > > relation_open to table_open looks good to me. > > > > ok. > > The attached patch only replaces relation_open t

RE: Question for coverage report

2025-10-21 Thread Hayato Kuroda (Fujitsu)
Dear Álvaro, Tom, Thanks for giving some low-layer information. I understood like: gcov does not actually count each line, counts a chunk of codes. Boundaries are not same as code paths, before-and-after the if {} can be in the same chunk. Per above, I could consider in pguotput.c., line 1495 was

Re: Skip unregistered custom kinds on stats load

2025-10-21 Thread Michael Paquier
On Wed, Oct 22, 2025 at 08:44:27AM +0300, Alvaro Herrera wrote: > FWIW I don't necessarily agree with what Sami is proposing, but (if I > understand the situation correctly) I think throwing away the whole > contents of stats when a module is removed is the opposite of > availability, as it will le

Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options

2025-10-21 Thread Tatsuo Ishii
> On Mon, 20 Oct 2025 at 16:59, Tatsuo Ishii wrote: >> >> > A very trivial commit: >> > >> > ``` >> > + else >> > + >> > + /* >> > + * For other cases we have no idea what position of row >> > callers would >> > + * fetch next time. Also for relpos < 0 ca

Re: Skip unregistered custom kinds on stats load

2025-10-21 Thread Álvaro Herrera
On 2025-Oct-21, Michael Paquier wrote: > The existing implementation is a choice of simplicity, prioritizing > availability, FWIW, to keep the contents of the on-disk file simpler. FWIW I don't necessarily agree with what Sami is proposing, but (if I understand the situation correctly) I think th

Re: Logical Replication of sequences

2025-10-21 Thread Amit Kapila
On Wed, Oct 22, 2025 at 7:52 AM Peter Smith wrote: > > Hi Vignesh, Here are a few small review comments just for the docs > part of patch 0001: > > == > Commit message > > 1. > In addition to the new command, the following subscription commands have > been enhanced to automatically refresh seq

Re: Logical Replication of sequences

2025-10-21 Thread Amit Kapila
On Wed, Oct 22, 2025 at 10:53 AM Peter Smith wrote: > > Hi Vignesh, > > Here are a few review comments for patch 0001: > > == > src/backend/catalog/pg_subscription.c > > GetSubscriptionRelations: > > 1. > List * > -GetSubscriptionRelations(Oid subid, bool not_ready) > +GetSubscriptionRelation

Re: Logical Replication of sequences

2025-10-21 Thread shveta malik
On Wed, Oct 22, 2025 at 10:36 AM Amit Kapila wrote: > > > I think the case where both WARNINGs will be displayed is rare so it > should be okay as it simplifies the code quite a bit. Another thing is > we need to query twice but as this happens during DDL and only for > very specific cases that sh

Re: Logical Replication of sequences

2025-10-21 Thread Peter Smith
Hi Vignesh, Here are a few review comments for patch 0001: == src/backend/catalog/pg_subscription.c GetSubscriptionRelations: 1. List * -GetSubscriptionRelations(Oid subid, bool not_ready) +GetSubscriptionRelations(Oid subid, bool otherwise return all the relations of the subscription, boo

Re: on_error table, saving error info to a table

2025-10-21 Thread jian he
hi. The previous discussion mentioned using built-in typed tables for the error saving table. It's doable. first create an build-in composite type in system_functions.sql: CREATE TYPE copy_error_saving AS( useridoid, copy_tbl oid, filename text COLLATE "C", linenobigint,

Re: Logical Replication of sequences

2025-10-21 Thread Amit Kapila
On Tue, Oct 21, 2025 at 8:11 PM vignesh C wrote: > > On Tue, 21 Oct 2025 at 03:49, Masahiko Sawada wrote: > > > --- > > /* > > - * Check and log a warning if the publisher has subscribed to the same > > table, > > - * its partition ancestors (if it's a partition), or its partition > > children

Re: Improve pg_sync_replication_slots() to wait for primary to advance

2025-10-21 Thread Ajin Cherian
On Wed, Oct 15, 2025 at 7:38 PM shveta malik wrote: > > On Wed, Oct 15, 2025 at 9:57 AM Ajin Cherian wrote: > > > > > > Updated the patch with a tap test. > > Attaching patch v17 which has a tap test to test the feature added. > > > > Thanks for the patch. I noticed that in the case of API, we ar

Re: Skip unregistered custom kinds on stats load

2025-10-21 Thread Michael Paquier
On Tue, Oct 21, 2025 at 01:26:30PM -0500, Sami Imseih wrote: > Hmm, since the pgstat.stat file is managed by core and not by the > extension, I think this should be handled semi-automatically by > pgstats. Even with the checks you mention above, validating that we > are indeed loading the same kind

Re: CI: Add task that runs pgindent

2025-10-21 Thread Michael Paquier
On Tue, Oct 21, 2025 at 05:04:50PM +0200, Daniel Gustafsson wrote: > Indeed there is, I admittedly was under the impression that koel ran > pgperltidy > but clearly I was wrong. The original thread about forcing a stronger indentation policy was that we could begin with the C code, leaving everyt

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-10-21 Thread Masahiko Sawada
On Tue, Oct 21, 2025 at 4:16 PM Matheus Alcantara wrote: > > On 21/10/25 18:42, Masahiko Sawada wrote: > > On Mon, Oct 20, 2025 at 11:19 AM Matheus Alcantara > > wrote: > >> > >> On Mon Oct 20, 2025 at 11:18 AM -03, Álvaro Herrera wrote: > >>> On 2025-Oct-20, Matheus Alcantara wrote: > >>> >

Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options

2025-10-21 Thread David Rowley
On Mon, 20 Oct 2025 at 16:59, Tatsuo Ishii wrote: > > > A very trivial commit: > > > > ``` > > + else > > + > > + /* > > + * For other cases we have no idea what position of row > > callers would > > + * fetch next time. Also for relpos < 0 case (we go >

Re: AIX support

2025-10-21 Thread AIX PG user
Hi Team, We look forward to your comments and kindly request you to share your feedback on the proposed changes(in the annotations). Your input is greatly appreciated and will help us refine the solution while ensuring all aspects are thoughtfully addressed. Thank you in advance for your time an

Re: Invalid primary_slot_name triggers warnings in all processes on reload

2025-10-21 Thread Fujii Masao
On Tue, Oct 21, 2025 at 7:27 PM Amit Kapila wrote: > > On Tue, Oct 21, 2025 at 2:36 PM Hayato Kuroda (Fujitsu) > wrote: > > > > > Just to confirm - you'd prefer backpatching errhint_internal() to v17 and > > > earlier branches, and then updating the patch to use it to avoid double > > > translati

Re: Add RESPECT/IGNORE NULLS and FROM FIRST/LAST options

2025-10-21 Thread Tatsuo Ishii
2. AFAICS there is only one notnull_info array, which amounts to assuming that the window function will have only one argument position that it calls WinGetFuncArgInFrame or WinGetFuncArgInPartition for. That may be true for the built-in functions but it seems mighty restri

Re: Fix race condition in SSI when reading PredXact->SxactGlobalXmin

2025-10-21 Thread Josh Curtis
Thanks for taking a look. I tried adding a reproduction with injection points, but had some trouble with them. I'll give it another go this weekend. I guess one of the commitfest entries should be deleted? I had already made one already. I don't see a way to do that though. https://commitfest.pos

Re: Why cannot alter a column's type when it's used by a generated column

2025-10-21 Thread jian he
On Tue, Oct 21, 2025 at 3:56 PM Chao Li wrote: > > On Oct 21, 2025, at 15:30, jian he wrote: > > > > +-- So, you can change a column's type as long as any dependent generated > > +-- column already has a set expression defined: > > +ALTER TABLE gtest27 > > + ALTER COLUMN a TYPE float8, > > + A

Re: Fix lag columns in pg_stat_replication not advancing when replay LSN stalls

2025-10-21 Thread Fujii Masao
On Tue, Oct 21, 2025 at 11:52 PM Xuneng Zhou wrote: > The patch LGTM. Thanks for the review! I've pushed the patch and backpatched it to all supported versions. > I am wondering whether it is helpful to add some > comments for this overflowed array Yes, do you have any specific suggestions?

Re: Logical Replication of sequences

2025-10-21 Thread Peter Smith
Hi Vignesh, Here are a few small review comments just for the docs part of patch 0001: == Commit message 1. In addition to the new command, the following subscription commands have been enhanced to automatically refresh sequence mappings: ~ Is "mappings" the right word? == doc/src/sgml

Re: [PATCH] Add error_on_null() to produce an error if the input is null

2025-10-21 Thread Michael Paquier
On Tue, Oct 21, 2025 at 05:16:32PM +0900, Michael Paquier wrote: > Why not if this simple solution works for you, using error_on_null() > as the function name. I'll double-check the whole, probably tomorrow. Applied after a couple of tweaks applied to the code (like added pg_* to the source funct

Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)

2025-10-21 Thread Bryan Green
On 10/20/2025 3:10 AM, Jakub Wartak wrote: On Thu, Oct 9, 2025 at 5:50 PM Bryan Green wrote: Hi Bryan! I've implemented Windows support for the backtrace_functions configuration parameter using the DbgHelp API. This brings Windows debugging capabilities closer to parity with Unix/Linux plat

Meson install warnings when running postgres build from a sandbox

2025-10-21 Thread Matt Smith (matts3)
If I run postgres builds from a bazel sandbox whereby the source directory consists of symlinks that point to the original source files. Meson has traditionally followed these symlinks, but since 1.3

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-10-21 Thread Joel Jacobson
On Wed, Oct 22, 2025, at 02:16, Matheus Alcantara wrote: >> Regarding the v8 patch, it introduces a fundamentally new way of >> managing notification entries (adding entries with 'committed' state >> and marking them 'aborted' in abort paths). This affects all use >> cases, not just those involving

Re: Should we say "wal_level = logical" instead of "wal_level >= logical"

2025-10-21 Thread Peter Smith
On Tue, Oct 21, 2025 at 2:11 AM Robert Haas wrote: > > On Mon, Oct 20, 2025 at 3:20 AM Peter Smith wrote: > > Do you have thoughts about the patch? > > I agree with the rationale that Ashutosh states but I don't see a > strong need to patch the code to make this a 100% invariable rule. (Of > cour

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-10-21 Thread Matheus Alcantara
On 21/10/25 18:42, Masahiko Sawada wrote: > On Mon, Oct 20, 2025 at 11:19 AM Matheus Alcantara > wrote: >> >> On Mon Oct 20, 2025 at 11:18 AM -03, Álvaro Herrera wrote: >>> On 2025-Oct-20, Matheus Alcantara wrote: >>> This is similar to what was already proposed at [1]. This approach was

Re: Making pg_rewind faster

2025-10-21 Thread John H
Hi Srinath, On Mon, Oct 20, 2025 at 9:36 PM Srinath Reddy Sadipiralla wrote: > ... > maybe something like this > + "Expected WAL segment $corrupt_wal_seg to have later mtime > on target than source after rewind as it was copied"); > + "Expected WAL segment $corrupt_wal_seg file sizes to be same >

Re: POC: enable logical decoding when wal_level = 'replica' without a server restart

2025-10-21 Thread Peter Smith
Hi Sawada-San. I reviewed the test code of patch v19; below are some minor comments. == 1. +# Initialize the primary server with wal_level = 'replica'. +my $primary = PostgreSQL::Test::Cluster->new('primary'); +$primary->init(allows_streaming => 1); +$primary->append_conf('postgresql.conf',

Re: Use CompactAttribute more often, when possible

2025-10-21 Thread David Rowley
On Mon, 20 Oct 2025 at 21:43, David Rowley wrote: > > On Mon, 20 Oct 2025 at 21:15, Michael Paquier wrote: > > > > On Mon, Oct 20, 2025 at 05:46:33PM +1300, David Rowley wrote: > > @@ -5146,10 +5146,6 @@ ReorderBufferToastReplace(ReorderBuffer *rb, > > ReorderBufferTXN *txn, > > dlist_i

Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement

2025-10-21 Thread Jim Jones
On 21/10/2025 18:01, Tom Lane wrote: > Philip Alger writes: >> I attached v7 but it looks like that one of the CI tests failed, but I >> reran though my Github branch and they all passed. The error had nothing to >> do with the patch though. Wondering if I need to resubmit a v8 to kick it >> of

Re: [PATCH] parallel pg_restore: move offset-building phase to before forking

2025-10-21 Thread Tom Lane
Dimitrios Apostolou writes: > A pg_dump custom format archive without offsets in the table of > contents, is usually generated when pg_dump writes to stdout instead of > a file. When doing parallel pg_restore (-j) from such a file, every > worker process was scanning the full archive sequentially,

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-21 Thread Nathan Bossart
On Tue, Oct 21, 2025 at 10:44:19PM +0200, David E. Wheeler wrote: > On Oct 21, 2025, at 22:21, Nathan Bossart wrote: >> I see that baza is currently using the latest tags for > it start using the .abi-compliance-history file on the rest of the >> back-branches once it is added? > > It should, yes

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-10-21 Thread Masahiko Sawada
On Mon, Oct 20, 2025 at 11:19 AM Matheus Alcantara wrote: > > On Mon Oct 20, 2025 at 11:18 AM -03, Álvaro Herrera wrote: > > On 2025-Oct-20, Matheus Alcantara wrote: > > > >> This is similar to what was already proposed at [1]. This approach was > >> abandoned because a notification on the queue m

Re: There is a redundant check in check_outerjoin_delay() in version 15.14 and below

2025-10-21 Thread Tom Lane
"=?utf-8?B?aW9zaWY=?=" <[email protected]> writes: > The following snippet is cited from version 15.14, function > check_outerjoin_delay() > ... > The check at line 2074 is redundant and can be safely removed. I'm not entirely sure whether I believe that ... but it doesn't matter. Since check_out

Re: Question for coverage report

2025-10-21 Thread Tom Lane
=?utf-8?Q?=C3=81lvaro?= Herrera writes: > On 2025-Oct-21, Jacob Champion wrote: >> Are you able to double-check the compiler invocation for pgoutput.c? > Yep -- it does get -O0. Is there some other flag this is missing? I think this is probably a gcc artifact. I looked at the assembly code gen

There is a redundant check in check_outerjoin_delay() in version 15.14 and below

2025-10-21 Thread iosif
Hi: The following snippet is cited from version 15.14, function check_outerjoin_delay() 2055:/* yes; have we included all its rels in relids? */ 2056:if (!bms_is_subset(sjinfo->min_lefthand, relids) || 2057:  !bms_is_su

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-21 Thread David E. Wheeler
On Oct 21, 2025, at 22:21, Nathan Bossart wrote: > I see that baza is currently using the latest tags for it start using the .abi-compliance-history file on the rest of the > back-branches once it is added? It should, yes. I added the latest changes from Mankirat to add support for it. D

Re: Question for coverage report

2025-10-21 Thread Álvaro Herrera
On 2025-Oct-21, Jacob Champion wrote: > Are you able to double-check the compiler invocation for pgoutput.c? Yep -- it does get -O0. Is there some other flag this is missing? make -C backend/replication/pgoutput all make[2]: Entering directory '/home/coverage/pgsrc/pgsql/src/backend/replicatio

Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue

2025-10-21 Thread Arseniy Mukhin
On Tue, Oct 21, 2025 at 4:32 AM Masahiko Sawada wrote: > > On Mon, Oct 20, 2025 at 5:37 AM Matheus Alcantara > wrote: > > > > On Sat Oct 18, 2025 at 2:43 AM -03, Joel Jacobson wrote: > > > On Fri, Oct 17, 2025, at 22:50, Arseniy Mukhin wrote: > > > What a funny coincidence that the approach in th

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-21 Thread Nathan Bossart
On Tue, Oct 21, 2025 at 04:13:37PM -0400, Tom Lane wrote: > I propose that we should make .abi-compliance-history point at these > commits rather than REL_17_6 et al. If there is anything later than > this that affected ABI, it'd be worth finding out I think, even though > we might choose not to d

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-21 Thread Tom Lane
Nathan Bossart writes: > For the rest of the back-branches, I'm considering starting with a baseline > of the latest minor version stamps. While it would be nice to have a > comprehensive history of the ABI compatibility for each major version, > we've lived this long without it, and I think it's

Re: another autovacuum scheduling thread

2025-10-21 Thread David Rowley
On Wed, 22 Oct 2025 at 03:38, Nathan Bossart wrote: > I did something similar to this in v3, although I used the *_freeze_max_age > parameters as the point to start scaling aggressively, and I simply raised > the score to the power of 10. > > I've yet to do any real testing with this stuff. I've

Re: [PATCH] Remove make_temptable_name_n()

2025-10-21 Thread Nathan Bossart
On Tue, Oct 21, 2025 at 03:36:46PM +0300, Aleksander Alekseev wrote: > + { > + char *nsp = > get_namespace_name(RelationGetNamespace(tempRel)); > + char *temprelname = RelationGetRelationName(tempRel); > + char *diffrelname = psprintf("%s_%

Unicode 17

2025-10-21 Thread Alexander Borisov
Hi, hackers! On September 9, 2025, a new version of Unicode was released — Unicode 17.0.0. Considering that Postgres was updated to version 16 just a few months ago, I have a question: is there any update policy? Does it happen that some projects wait a while and then get updated, as is customar

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

2025-10-21 Thread Nathan Bossart
On Tue, Oct 21, 2025 at 08:17:01AM +0200, KAZAR Ayoub wrote: >>> I'm also trying the idea of doing SIMD inside quotes with prefix XOR >>> using carry less multiplication avoiding the slow path in all cases even >>> with weird looking input, but it needs to take into consideration the >>> availabili

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

2025-10-21 Thread Nathan Bossart
On Tue, Oct 21, 2025 at 12:09:27AM +0300, Nazir Bilal Yavuz wrote: > I think the problem is deciding how many lines to process before > deciding for the rest. 1000 lines could work for the small sized data > but it might not work for the big sized data. Also, it might cause a > worse regressions fo

downcase_identifier(): use method table from locale provider

2025-10-21 Thread Jeff Davis
The attached patch refactors downcase_identifier() to use a method from the locale provider. The main advantage is that we can bring the tolower() call into the libc provider, and make it tolower_l() to avoid the global LC_CTYPE dependency. It's also generally aligned with the idea that provider-

Re: Skip unregistered custom kinds on stats load

2025-10-21 Thread Sami Imseih
> > The more worrying case is if the struct of this other kind has > > the same length, and the data ends up being read back > > into the wrong fields. > > More to the point. If I were to put defenses when reading back a > stats file that includes custom stats kinds before reading the file > entri

Re: Question for coverage report

2025-10-21 Thread Jacob Champion
On Fri, Oct 17, 2025 at 2:15 PM Álvaro Herrera wrote: > Hmm, these reports are supposed to have been generated with -O0. This > is the configure line: > > ./configure --cache-file=/home/coverage/pgsrc/configure.cache --enable-depend > --enable-coverage --enable-tap-tests --enable-nls --with-pyth

Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement

2025-10-21 Thread Philip Alger
> Just ignore it if you're pretty sure the error is unrelated. The > cfbot cycles through all open patches and will re-run CI for yours > in a day or three (not sure of the exact cycle time right now). > If the same error persists then you'd better look closer. > Thanks Tom. Actually, it's funny

Re: CI: Add task that runs pgindent

2025-10-21 Thread Peter Eisentraut
On 21.10.25 14:19, Jelte Fennema-Nio wrote: At PGConf.dev 2025 one thing that came up in the "Scaling PostgreSQL Development" unconference session is that new hackers don't know all the details of our development flow by heart yet. Of course it's documented on the wiki, but even if they find the

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

2025-10-21 Thread Tom Lane
Dimitrios Apostolou writes: > On Tuesday 2025-10-21 00:15, Tom Lane wrote: >> Not sure where we go from here, but clearly a bunch of research >> is going to be needed to decide whether this is committable. > pg_dump files from before your latest fix still exist, and they possibly > contain block

Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()

2025-10-21 Thread Nathan Bossart
On Mon, Oct 20, 2025 at 11:22:29PM +0200, David E. Wheeler wrote: > I suggest mentioning that new entries should be at the top, that the list > should be in reverse chronological order. I felt that this was already covered in the existing commentary. > Otherwise this looks great, love seeing it!

Re: CI: Add task that runs pgindent

2025-10-21 Thread Tom Lane
Jelte Fennema-Nio writes: > On Tue, 21 Oct 2025 at 16:40, Tom Lane wrote: >> So I think there is plenty of room for workflows where the committer >> is expected to reindent just before commit. > Interesting, but yeah that makes sense. Also, it's far from un-heard-of to actually make two separat

Re: Client-only Meson Build From Sources

2025-10-21 Thread Tom Lane
Benjamin Leff writes: >> I believe the prevailing opinion was that the amount >> of time saved by not building all of PG didn't justify the maintenance >> effort to keep the build scripts working for that case > IMO, it’s not just about time. For bare bones package managers when there’s > no need

Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement

2025-10-21 Thread Tom Lane
Philip Alger writes: > I attached v7 but it looks like that one of the CI tests failed, but I > reran though my Github branch and they all passed. The error had nothing to > do with the patch though. Wondering if I need to resubmit a v8 to kick it > off again? Thoughts? Just ignore it if you're p

Re: Client-only Meson Build From Sources

2025-10-21 Thread Benjamin Leff
> I believe the prevailing opinion was that the amount of time saved by not building all of PG didn't justify the maintenance effort to keep the build scripts working for that case IMO, it’s not just about time. For bare bones package managers when there’s no need to build the server, this saves a

Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement

2025-10-21 Thread Philip Alger
Hi Jim I attached v7 but it looks like that one of the CI tests failed, but I reran though my Github branch and they all passed. The error had nothing to do with the patch though. Wondering if I need to resubmit a v8 to kick it off again? Thoughts? -- Best, Phil Alger

Re: Client-only Meson Build From Sources

2025-10-21 Thread Tom Lane
Peter Eisentraut writes: > On 20.10.25 22:43, Benjamin Leff wrote: >> Are there any plans to support a client-only (no server) build in meson? > I'm not aware of such plans. But that doesn't mean somebody couldn't > propose one. Years ago we had support for client-only builds on at least some

Re: CI: Add task that runs pgindent

2025-10-21 Thread Daniel Gustafsson
> On 21 Oct 2025, at 16:31, Jelte Fennema-Nio wrote: > > On Tue, 21 Oct 2025 at 15:27, Daniel Gustafsson wrote: >> >>> On 21 Oct 2025, at 15:22, Nazir Bilal Yavuz wrote: >> >>> Do you think that this task should format perl files as well? >> >> +1, if we do this we should run pgperltidy as w

Re: Fix lag columns in pg_stat_replication not advancing when replay LSN stalls

2025-10-21 Thread Xuneng Zhou
Hi Fujii-san, On Tue, Oct 21, 2025 at 7:45 AM Fujii Masao wrote: > > On Mon, Oct 20, 2025 at 1:45 PM Shinya Kato wrote: > > > > On Mon, Oct 20, 2025 at 10:17 AM Fujii Masao wrote: > > > > > > On Sun, Oct 19, 2025 at 2:04 AM Shinya Kato > > > wrote: > > > > Thank you for the patch. I have one

Re: CI: Add task that runs pgindent

2025-10-21 Thread Jelte Fennema-Nio
On Tue, 21 Oct 2025 at 16:40, Tom Lane wrote: > > Daniel Gustafsson writes: > > Conforming to indentation rules in v1 of a patchset isn't the most > > interesting > > aspect of a submission, especially for WIP and POC style patches. > > I have a more concrete argument: sometimes, it's helpful to

Re: Optimizing ResouceOwner to speed up COPY

2025-10-21 Thread Tomas Vondra
On 10/21/25 09:10, Heikki Linnakangas wrote: > On 18/10/2025 01:49, Tomas Vondra wrote: >> On 10/17/25 12:32, Tomas Vondra wrote: >>> >>> >>> On 10/17/25 10:31, Heikki Linnakangas wrote: >   typedef struct ResourceElem >   { >   Datum    item; > +    uint32    count;  

Re: CI: Add task that runs pgindent

2025-10-21 Thread Tom Lane
Daniel Gustafsson writes: > Conforming to indentation rules in v1 of a patchset isn't the most interesting > aspect of a submission, especially for WIP and POC style patches. I have a more concrete argument: sometimes, it's helpful to submit an un-pgindent'd patch because correct indentation will

Re: another autovacuum scheduling thread

2025-10-21 Thread Nathan Bossart
On Sun, Oct 12, 2025 at 07:27:10PM +1300, David Rowley wrote: > On Sat, 11 Oct 2025 at 07:43, Robert Haas wrote: >> I think this is a reasonable starting point, although I'm surprised >> that you chose to combine the sub-scores using + rather than Max. > > Adding up the component scores doesn't m

Re: CI: Add task that runs pgindent

2025-10-21 Thread Jelte Fennema-Nio
On Tue, 21 Oct 2025 at 15:22, Nazir Bilal Yavuz wrote: > What do you think about moving this inside of another CI task instead > of creating a new one? I think that creating a new VM and cloning > Postgres into it would be unnecessary but I could not decide which > task would be a good choice for

Re: CI: Add task that runs pgindent

2025-10-21 Thread Jelte Fennema-Nio
On Tue, 21 Oct 2025 at 15:27, Daniel Gustafsson wrote: > > > On 21 Oct 2025, at 15:22, Nazir Bilal Yavuz wrote: > > > Do you think that this task should format perl files as well? > > +1, if we do this we should run pgperltidy as well. I definitely agree that we should run that too. But currentl

Re: postgres_fdw: Use COPY to speed up batch inserts

2025-10-21 Thread Matheus Alcantara
Thanks for testing and for the comments! On Fri Oct 17, 2025 at 6:28 AM -03, Jakub Wartak wrote: > On Thu, Oct 16, 2025 at 10:42 PM Tomas Vondra wrote: >> Thanks for the patch. Please add it to the next committfest (PG19-3) at > > Hi Matheus! same here - thanks for the patch! > >> > The attached

Re: postgres_fdw: Use COPY to speed up batch inserts

2025-10-21 Thread Matheus Alcantara
Thanks for the review! On Thu Oct 16, 2025 at 5:39 PM -03, Tomas Vondra wrote: > Thanks for the patch. Please add it to the next committfest (PG19-3) at > > https://commitfest.postgresql.org/ > > so that we don't lose track of the patch. > Here it is: https://commitfest.postgresql.org/patch/6137

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

2025-10-21 Thread Dimitrios Apostolou
On Tuesday 2025-10-21 00:15, Tom Lane wrote: So for me, the proposed patch actually makes it 2X slower. I went and tried this same test case on a 2024 Mac Mini M4 Pro. Cutting to the chase: HEAD: $ time pg_restore -f /dev/null -t zedtable bench1.dump real1m26.525s user0m0.364s s

RE: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE

2025-10-21 Thread Aya Iwata (Fujitsu)
Hi Peter-san, Michael-san, Thank you for your comments. I updated patch to v0009. Please review attached patch. > -Original Message- > From: Peter Smith > Sent: Monday, October 20, 2025 11:02 AM > Some comments for the latest v8 patch. > > == > src/backend/postmaster/bgworker.c >

Re: CI: Add task that runs pgindent

2025-10-21 Thread Nazir Bilal Yavuz
Hi, On Tue, 21 Oct 2025 at 16:46, Daniel Gustafsson wrote: > > > On 21 Oct 2025, at 15:39, Florents Tselai wrote: > > > > That wouldn’t preclude having a CI task as well, of course. > > The hook would mainly help contributors catch formatting issues locally, > > while the CI task would serve as

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

2025-10-21 Thread Dimitrios Apostolou
On Tuesday 2025-10-21 00:23, Tom Lane wrote: HEAD repeats read(4k) lseek(~128k forward) which is to be expected if we have to read data block headers that are ~128K apart; while patched repeats read(4k) read(~128k) which is a bit odd in itself, why isn't it merg

Re: CI: Add task that runs pgindent

2025-10-21 Thread Daniel Gustafsson
> On 21 Oct 2025, at 15:39, Florents Tselai wrote: > >> On 21 Oct 2025, at 3:19 PM, Jelte Fennema-Nio wrote: >> >> At PGConf.dev 2025 one thing that came up in the "Scaling PostgreSQL >> Development" unconference session is that new hackers don't know all the >> details of our development flow

Re: CI: Add task that runs pgindent

2025-10-21 Thread Florents Tselai
> On 21 Oct 2025, at 3:19 PM, Jelte Fennema-Nio wrote: > > At PGConf.dev 2025 one thing that came up in the "Scaling PostgreSQL > Development" unconference session is that new hackers don't know all the > details of our development flow by heart yet. Of course it's documented > on the wiki, bu

Re: CI: Add task that runs pgindent

2025-10-21 Thread Daniel Gustafsson
> On 21 Oct 2025, at 15:22, Nazir Bilal Yavuz wrote: > Do you think that this task should format perl files as well? +1, if we do this we should run pgperltidy as well. -- Daniel Gustafsson

Re: CI: Add task that runs pgindent

2025-10-21 Thread Nazir Bilal Yavuz
Hi, On Tue, 21 Oct 2025 at 15:19, Jelte Fennema-Nio wrote: > > At PGConf.dev 2025 one thing that came up in the "Scaling PostgreSQL > Development" unconference session is that new hackers don't know all the > details of our development flow by heart yet. Of course it's documented > on the wiki, b

Re: [PATCH] Remove make_temptable_name_n()

2025-10-21 Thread Aleksander Alekseev
Hi Shinya, Thanks for your feedback. > The v1 revision removed make_temptable_name_n and added psprintf, > which reduced the code size. However, the code size in v3 is almost > unchanged, so it's unclear how beneficial this change actually is. Right, the concept has changed a bit, see Álvaro's c

CI: Add task that runs pgindent

2025-10-21 Thread Jelte Fennema-Nio
At PGConf.dev 2025 one thing that came up in the "Scaling PostgreSQL Development" unconference session is that new hackers don't know all the details of our development flow by heart yet. Of course it's documented on the wiki, but even if they find the relevant wiki pages they often still miss/for

Re: Add \pset options for boolean value display

2025-10-21 Thread Pavel Stehule
út 21. 10. 2025 v 9:38 odesílatel Álvaro Herrera napsal: > On 2025-Oct-20, David G. Johnston wrote: > > > Thank you. Seems good from a quick read. I’m regretting the choice of > the > > display_ prefix; is there any technical limitation or other opposition to > > using just true and false? > >

Re: Invalid primary_slot_name triggers warnings in all processes on reload

2025-10-21 Thread Amit Kapila
On Tue, Oct 21, 2025 at 2:36 PM Hayato Kuroda (Fujitsu) wrote: > > > Just to confirm - you'd prefer backpatching errhint_internal() to v17 and > > earlier branches, and then updating the patch to use it to avoid double > > translation, right? > > Exactly, but I want to ask other Seniors as well. >

Re: Fix incorrect comment in pg_get_shmem_allocations_numa()

2025-10-21 Thread Michael Paquier
On Mon, Jul 21, 2025 at 09:06:22AM +, Bertrand Drouvot wrote: > One comment in pg_get_shmem_allocations_numa() incorrectly describes the > function > as dealing with database blocks when it actually processes shared memory > allocations > from the shmem index. (Noticed this one while browsin

Re: Logical Replication of sequences

2025-10-21 Thread shveta malik
Few trivial comments on 001: patch001: 1) FetchRelationStates /* Fetch tables and sequences that are in non-ready state. */ - rstates = GetSubscriptionRelations(MySubscription->oid, true); + rstates = GetSubscriptionRelations(MySubscription->oid, true, false, +true); We are passing get_Seq

Re: [PATCH] Add pg_get_policy_ddl() function to reconstruct CREATE POLICY statement

2025-10-21 Thread Chao Li
> On Oct 16, 2025, at 20:50, Akshay Joshi wrote: > > Please find attached the v3 patch, which resolves all compilation errors and > warnings. > > On Thu, Oct 16, 2025 at 6:06 PM Philip Alger wrote: > Hi Akshay, > > > As for the statement terminator, it’s useful to include it, while runnin

Re: Invalid primary_slot_name triggers warnings in all processes on reload

2025-10-21 Thread Fujii Masao
On Fri, Oct 10, 2025 at 2:52 PM Fujii Masao wrote: > > On Thu, Oct 9, 2025 at 2:26 PM Fujii Masao wrote: > > > Please note that since you're using already translated strings as > > > arguments, you must use errmsg_internal() and errhint_internal(), to > > > avoid doubly-translating these messages

RE: Invalid primary_slot_name triggers warnings in all processes on reload

2025-10-21 Thread Hayato Kuroda (Fujitsu)
Dear Fujii-san, > I first applied the patch to v15, then used git cherry-pick to backpatch it > to v14 and v13 without any issues. You can probably do the same to apply it > to those branches. I did same approach and confirmed it could be applied well. > > Cosmetic comments: > > > > ``` > > +

Re: Invalid primary_slot_name triggers warnings in all processes on reload

2025-10-21 Thread Fujii Masao
On Tue, Oct 21, 2025 at 5:00 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Fujii-san, Thanks for testing and reviewing! > > No comments on the latest patches — maybe that’s a good > > sign of their quality? ;) > > > > Anyway, unless there are any objections, I plan to commit at least > > the 0001

Re: Extended Statistics set/restore/clear functions.

2025-10-21 Thread Michael Paquier
On Sat, Oct 18, 2025 at 08:27:58PM -0400, Corey Huinker wrote: > And rebased again to conform to 688dc6299 and 4bd919129. The format redesign for extended stats is pretty nice, as done in 0001. I think that this patch should be split in two, actually, as it tackles two issues: - One patch for th

Re: [PATCH] Add error_on_null() to produce an error if the input is null

2025-10-21 Thread Michael Paquier
On Sun, Aug 31, 2025 at 04:16:42PM +0200, Vik Fearing wrote: > Thank you.  Updated. This one was marked as committer, so I am looking at it. The original proposal can also be tracked in this message, where you want to have a trick for SQL bodies to be able to detect if exactly one row is returned

Re: Accessing an invalid pointer in BufferManagerRelation structure

2025-10-21 Thread Álvaro Herrera
On 2025-Oct-21, Daniil Davydov wrote: > On Sun, Oct 19, 2025 at 6:32 PM Álvaro Herrera wrote: > > > > I edited your comments a bit. What do you think of this version? > > Thanks for looking into this! All added changes LGTM. Okay, pushed, thanks. -- Álvaro Herrera 48°01'N 7°57'

Re: PATCH: jsonpath string methods: lower, upper, initcap, l/r/btrim, replace, split_part

2025-10-21 Thread Álvaro Herrera
This was lacking rebase after the func.sgml changes. Here it is again. I have not reviewed it. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ >From 70c08c3e835eb753c7bd30aed67a9a786eb144e7 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Mon, 2 Jun 2025

RE: Invalid primary_slot_name triggers warnings in all processes on reload

2025-10-21 Thread Hayato Kuroda (Fujitsu)
Dear Fujii-san, > No comments on the latest patches — maybe that’s a good > sign of their quality? ;) > > Anyway, unless there are any objections, I plan to commit at least > the 0001 patch and backpatch it to all supported branches. I've > attached the patches for the back branches for reference

Re: BRIN: Prevent the heapblk overflow during index summarization on very large tables resulting in an infinite loop

2025-10-21 Thread David Rowley
On Tue, 21 Oct 2025 at 18:53, Michael Paquier wrote: > FWIW, I am on the same line as you. Your suggestions are better than > what the proposed patch does, as far as I've looked. Pushed with the agreed comment change and type change to pageno. David

Re: Why cannot alter a column's type when it's used by a generated column

2025-10-21 Thread Chao Li
> On Oct 21, 2025, at 15:30, jian he wrote: > > +-- So, you can change a column's type as long as any dependent generated > +-- column already has a set expression defined: > +ALTER TABLE gtest27 > + ALTER COLUMN a TYPE float8, > + ALTER COLUMN x SET EXPRESSION AS ((a::int + b) * 2); > +\d g

Re: Why cannot alter a column's type when it's used by a generated column

2025-10-21 Thread Chao Li
Hi Jian, Thanks for looking into this problem. > The attached patch removes this restriction. > it need more polish, but it's good enough to use it to verify the bug I > reported > on > > https://postgr.es/m/cacjufxhzsgn3zm5g-x7ymtfgzndnrwr07s+gyfius+tz45m...@mail.gmail.com I think we can keep

Re: bug, ALTER TABLE call ATPostAlterTypeCleanup twice for the same relation

2025-10-21 Thread Chao Li
> On Oct 13, 2025, at 16:08, jian he wrote: > > On Wed, Oct 1, 2025 at 11:04 AM jian he wrote: >> >> we can simply change from >> >>if (pass == AT_PASS_ALTER_TYPE || pass == AT_PASS_SET_EXPRESSION) >>ATPostAlterTypeCleanup(wqueue, tab, lockmode); >> >> to >>

Re: CREATE POLICY IF NOT EXISTS

2025-10-21 Thread Álvaro Herrera
Hello, On 2025-Oct-21, jian he wrote: > People have complained about the lack of CREATE POLICY IF NOT EXISTS > syntax in [1]. Hmm, see my reply there just now. I think we've purposefully not added many additional CREATE IF NOT EXISTS commands. -- Álvaro Herrera PostgreSQL Developer —

  1   2   >