Re: [PATCH] Add an ldflags_sl meson build option

2025-06-17 Thread Matt Smith (matts3)
Yes I understand what you're saying. I know Meson tries to set some of these flags. But I want the source of truth for my flags for each target type to be outside Meson. Which Meson is not designed to do. When you're building many 3rd party deps all with different build systems and all trying

Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx

2025-06-17 Thread Anthonin Bonnefoy
On Tue, Jun 17, 2025 at 4:05 PM Jelte Fennema-Nio wrote: > > Agreed. My vote is for \closeprepared as that aligns with the libpq function. Since \bind_named is also new, we can also rename it to make it consistent with close meta-command. So what about renaming \bind_named to \bindprepared and \c

Re: Allow pg_dump --statistics-only to dump foreign table statistics?

2025-06-17 Thread Fujii Masao
On 2025/06/17 12:39, Fujii Masao wrote: On 2025/06/17 7:44, Corey Huinker wrote:     The proposed patch [0] adds RELKIND_FOREIGN_TABLE to this list.  That     appears to be the only missing relation kind that ANALYZE handles.     [0] https://postgr.es/m/attachment/177608/v1-0001-pg_dump-A

Re: Enhance pg_createsubscriber to create required standby.

2025-06-17 Thread David G. Johnston
On Tue, Jun 17, 2025 at 9:22 PM Amit Kapila wrote: > > As shown in Vignesh's email [1] (point 4), there could be multiple > additional parameters required for the first option suggested by you, > which will make it longer. Additionally, there are some other benefits > of having the second option

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-06-17 Thread Peter Smith
On Wed, Jun 18, 2025 at 2:22 PM Amit Kapila wrote: > > On Tue, Jun 17, 2025 at 2:14 PM Peter Eisentraut wrote: > > > > I have been trying to reconstruct how the new pg_createsubscriber option > > --remove/-R came about, specifically the name. There was a dizzying > > number of messages in this t

Re: minimum Meson version

2025-06-17 Thread Peter Eisentraut
On 17.06.25 23:10, Jelte Fennema-Nio wrote: I'm not saying we shouldn't support compiling Postgres on these systems. But having Postgres compile with just the default system packages seems an unreasonably high bar. People running ancient systems like this should be comfortable enough with getting

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-06-17 Thread David G. Johnston
On Tue, Jun 17, 2025 at 9:22 PM Amit Kapila wrote: > On Tue, Jun 17, 2025 at 2:14 PM Peter Eisentraut > wrote: > > > I'm also suggesting that "clean" or "cleanup" may be even better than > > "drop". Because if you look at related tools such as pg_basebackup, > > pg_receivewal, etc., the "create

Re: [PATCH] Add an ldflags_sl meson build option

2025-06-17 Thread Peter Eisentraut
On 18.06.25 03:11, Matt Smith (matts3) wrote: An example of a shared library-specific flag is -shared on linux or - dynamiclib on darwin. But those options are already added by the build system itself. LDFLAGS_SL would be if you wanted to pass some additional custom linker flag just for share

Re: [PATCH] Split varlena.c into varlena.c and bytea.c

2025-06-17 Thread Michael Paquier
On Mon, Jun 16, 2025 at 01:33:20PM +0300, Aleksander Alekseev wrote: > Thanks, fixed. clangd complained that utils/fmgroids.h is not going to > be used, as it complained about funcapi.h before. So I choose not to > include fmgroids.h. v3 seems sensible here. Thanks for the updated patch. /* text

Re: Transactional behavior of pg_create_logical_replication_slot

2025-06-17 Thread Mats Kindahl
On Tue, Jun 17, 2025 at 1:22 PM Andres Freund wrote: > Hi, > > On 2025-06-17 10:30:34 +0200, Mats Kindahl wrote: > > Hi PostgreSQL Hackers, > > > > If you try to create a logical replication slot inside a transaction > where > > you have issued writes, it will abort with an error message: > > > >

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-06-17 Thread Amit Kapila
On Tue, Jun 17, 2025 at 2:14 PM Peter Eisentraut wrote: > > I have been trying to reconstruct how the new pg_createsubscriber option > --remove/-R came about, specifically the name. There was a dizzying > number of messages in this thread about and around that, and in the end > I don't think the

Re: Enhance pg_createsubscriber to create required standby.

2025-06-17 Thread Amit Kapila
On Thu, Jun 5, 2025 at 1:50 AM Peter Eisentraut wrote: > > On 04.06.25 11:56, Amit Kapila wrote: > >> It's not clear to me how this change now would substantially improve the > >> user experience. The number of characters you type is approximately the > >> same. You still need to support the old

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2025-06-17 Thread John Naylor
On Wed, Jun 18, 2025 at 8:05 AM Melanie Plageman wrote: > What's odd is that I'm seeing now that I need at least 8000 tuples to > get > 1 pass of index vacuuming locally with a 64-bit assert build -- > which is more than you are reporting and more than I remember having > needed for 64-bit builds

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

2025-06-17 Thread shveta malik
On Wed, Jun 18, 2025 at 6:06 AM Masahiko Sawada wrote: > > Thank you for the comments! > > > > > 2) > > I see that when primary switches back its effective wal_level to > > replica while standby has wal_level=logical in conf file, then standby > > has this status: > > > > postgres=# show wal_level

Re: Make COPY format extendable: Extract COPY TO format implementations

2025-06-17 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Tue, 17 Jun 2025 09:38:54 +0900, Michael Paquier wrote: > On Tue, Jun 17, 2025 at 08:50:37AM +0900, Sutou Kouhei wrote: >> OK. I'll implement the initial version with this >> design. (Allocating IDs local n

Re: Huge commitfest app update upcoming: Tags, Draft CF, Help page, and automated commitfest creat/open/close

2025-06-17 Thread Peter Eisentraut
On 16.06.25 14:47, Jelte Fennema-Nio wrote: And our already well-known commitfests for PG19 will be called as follows: - PG19-1 (previously 2025-07) - PG19-2 (previously 2025-09) - PG19-3 (previously 2025-11) - PG19-4 (previously 2026-01) - PG19-Final (previously 2026-03) The dates will be the

Re: [PATCH] PGSERVICEFILE as part of a normal connection string

2025-06-17 Thread Michael Paquier
On Sun, Jun 15, 2025 at 09:02:31PM +0900, Ryo Kanbayashi wrote: > Thanks for review :) Thanks for the new patch. While testing the patch, I've bumped into this scenario which feels incomplete: - Rely on a default location of the service file, like $HOME/.pg_service.conf. - Define a service, with

Re: Replication slot is not able to sync up

2025-06-17 Thread shveta malik
On Tue, Jun 17, 2025 at 12:01 PM Amit Kapila wrote: > > This whole paragraph sounds like a duplicate of its previous section, > and the line alignment in the first paragraph has some issues. > Sorry for the wrong upload, duplicacy was the merge issue. Removed the duplicate paragraph and corrected

Re: relrewrite not documented at the top of heap_create_with_catalog()

2025-06-17 Thread Yugo Nagata
On Wed, 18 Jun 2025 11:12:48 +0900 Michael Paquier wrote: > On Mon, Jun 16, 2025 at 10:37:43PM +0900, Yugo Nagata wrote: > > I think it's a good idea to move the description of heap_create_with_catalog > > directly above the function itself, as it seems better to keep the > > explanation > > clo

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2025-06-17 Thread jian he
hi. The following are changes I made based on v47. mainly comments refactoring, variable/argument renaming. please see the attached patch. + + /* Create the relation. */ + newRelId = heap_create_with_catalog(newPartName->relname, + namespaceId, + modelRel->rd_rel->reltablespace, + + allowSyst

Re: pg_dump misses comments on NOT NULL constraints

2025-06-17 Thread Fujii Masao
On 2025/06/18 9:13, Fujii Masao wrote: Hi, In v18, we can now add comments on NOT NULL constraints. However, I noticed that pg_dump doesn't include those comments in its output. For example: -- $ psql < 0); COMMENT ON CONSTRAINT my_not_null ON t IS 'my not null'; COMM

Re: relrewrite not documented at the top of heap_create_with_catalog()

2025-06-17 Thread Michael Paquier
On Mon, Jun 16, 2025 at 10:37:43PM +0900, Yugo Nagata wrote: > I think it's a good idea to move the description of heap_create_with_catalog > directly above the function itself, as it seems better to keep the explanation > close to the function definition rather than placing it before related > fu

Re: [PATCH] Add an ldflags_sl meson build option

2025-06-17 Thread Matt Smith (matts3)
An example of a shared library-specific flag is -shared on linux or -dynamiclib on darwin. From: Peter Eisentraut Sent: Tuesday, June 17, 2025 7:01 PM To: Matt Smith (matts3) ; pgsql-hack...@postgresql.org Subject: Re: [PATCH] Add an ldflags_sl meson build opt

Re: Vacuum ERRORs out considering freezing dead tuples from before OldestXmin

2025-06-17 Thread Melanie Plageman
On Tue, Jun 17, 2025 at 3:23 AM John Naylor wrote: > > On Mon, Jun 16, 2025 at 9:58 PM Melanie Plageman > wrote: > > > > Test in attached patch seems to do the job on 32 bit and 64 bit when tested. > > Great! > > +log_recovery_conflict_waits = true > > I don't see this on pg16 -- If this is good

Re: Skipping schema changes in publication

2025-06-17 Thread Peter Smith
On Tue, Jun 17, 2025 at 5:41 PM Shlok Kyal wrote: ... > I have attached a patch support excluding columns for publication. > > I have added a syntax: "FOR TABLE table_name EXCEPT (c1, c2, ..)" > It can be used with CREATE or ALTER PUBLICATION. > > v12-0003 patch contains the changes for the same.

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

2025-06-17 Thread Masahiko Sawada
On Mon, Jun 16, 2025 at 11:48 PM shveta malik wrote: > > On Wed, Jun 11, 2025 at 2:31 AM Masahiko Sawada wrote: > > > > I think it's the user's responsibility to keep at least one logical > > slot. It seems that setting wal_level to 'logical' would be the most > > reliable solution for this case.

pg_dump misses comments on NOT NULL constraints

2025-06-17 Thread Fujii Masao
Hi, In v18, we can now add comments on NOT NULL constraints. However, I noticed that pg_dump doesn't include those comments in its output. For example: -- $ psql < 0); COMMENT ON CONSTRAINT my_not_null ON t IS 'my not null'; COMMENT ON CONSTRAINT my_check ON t IS 'my chec

Re: Fwd: dsm_registry: Add detach and destroy features

2025-06-17 Thread Sungwoo Chang
Hi, I created a new patch that throws an exception if we try to call destroy on a dsm segment that is still in use. I added a function in dsm.h that returns a refcnt of a given dsm segment. The destroy function uses that refcnt getter to check if the dsm segment is in use. 2025년 6월 16일 (월) 오후 11:

Re: Proposal: Global Index for PostgreSQL

2025-06-17 Thread Masahiko Sawada
On Sat, Jun 14, 2025 at 2:32 AM Dilip Kumar wrote: > > On Mon, Jun 9, 2025 at 3:28 PM Dilip Kumar wrote: > > > > On Mon, Jun 9, 2025 at 2:03 PM Nikita Malakhov wrote: > > > > 4) Update-heavy partitioned tables that should run vacuum frequently. > > > Significant > > > vacuum slowdown would resu

Re: POC: Parallel processing of indexes in autovacuum

2025-06-17 Thread Masahiko Sawada
On Sun, May 25, 2025 at 10:22 AM Daniil Davydov <3daniss...@gmail.com> wrote: > > Hi, > > On Fri, May 23, 2025 at 6:12 AM Masahiko Sawada wrote: > > > > On Thu, May 22, 2025 at 12:44 AM Daniil Davydov <3daniss...@gmail.com> > > wrote: > > > > > > On Wed, May 21, 2025 at 5:30 AM Masahiko Sawada

Re: minimum Meson version

2025-06-17 Thread Jelte Fennema-Nio
On Tue, 17 Jun 2025 at 22:19, Andres Freund wrote: > Please do note that I was not suggesting removing support for it from minor > versions and that the earliest we, IMO, would conceivably remove autoconf > support would be PG 20. > > I'm sure there will be some folks desperate to run PG 20 on RHE

Re: minimum Meson version

2025-06-17 Thread Andres Freund
Hi, On 2025-06-17 16:09:19 -0400, Greg Sabino Mullane wrote: > On Tue, Jun 17, 2025 at 2:23 PM Andres Freund wrote: > > > From my POV, which I am sure is not uniformly shared, we don't need to > > support > > new major PG versions on things like RHEL 8. > > > Ha ha ha ha! (wipes tears from eye

Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly

2025-06-17 Thread Tom Lane
vignesh C writes: > While tracking buildfarm for one of other commits, I noticed this failure: > TRAP: failed Assert("s->data.restart_lsn >= > s->last_saved_restart_lsn"), File: > "../pgsql/src/backend/replication/slot.c", Line: 1813, PID: 3945797 My animal mamba is also showing this assertion fa

Re: minimum Meson version

2025-06-17 Thread Greg Sabino Mullane
On Tue, Jun 17, 2025 at 2:23 PM Andres Freund wrote: > From my POV, which I am sure is not uniformly shared, we don't need to > support > new major PG versions on things like RHEL 8. Ha ha ha ha! (wipes tears from eyes). RHEL 8 is still cutting edge / very active for many companies out there. A

Re: minimum Meson version

2025-06-17 Thread Andres Freund
Hi, On 2025-06-17 14:33:39 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2025-06-17 13:48:33 -0400, Tom Lane wrote: > >> RHEL 8 does include meson 0.58.2. However, it also ships ninja 1.8.2 > >> which is too old: > > > IIRC we discussed this before, in some other thread. We could make

Re: wrong comments in rewriteTargetListIU

2025-06-17 Thread Dean Rasheed
On Tue, 17 Jun 2025 at 13:56, jian he wrote: > > On Tue, Jun 17, 2025 at 7:42 PM Peter Eisentraut wrote: > > > > However, I see your point that it contrasts with the attidentity code > > just above. > > > > Perhaps a way to resolve this would be to rewrite the comment something > > like: > > > >

Re: add function for creating/attaching hash table in DSM registry

2025-06-17 Thread Nathan Bossart
On Tue, Jun 17, 2025 at 11:57:33AM -0500, Nathan Bossart wrote: > I like this idea, but I took it one step further in the attached patch and > made the registry entry struct flexible enough to store any type of entry. > Specifically, I've added a new "type" enum followed by a union of the > differe

Re: minimum Meson version

2025-06-17 Thread Jesper Pedersen
Hi, On 6/17/25 2:23 PM, Andres Freund wrote: After all full support for RHEL 8 has ended a year ago. Yes, full support ended May 31, 2024 - but extended support ends May 31, 2029. Devrim, feedback ? Best regards, Jesper

Re: minimum Meson version

2025-06-17 Thread Tom Lane
Andres Freund writes: > On 2025-06-17 13:48:33 -0400, Tom Lane wrote: >> RHEL 8 does include meson 0.58.2. However, it also ships ninja 1.8.2 >> which is too old: > IIRC we discussed this before, in some other thread. We could make that work, > but at the time we didn't consider it worth working

Re: minimum Meson version

2025-06-17 Thread Andres Freund
Hi, On 2025-06-17 13:48:33 -0400, Tom Lane wrote: > Peter Eisentraut writes: > > I see that Rocky Linux 8 ships with Meson 0.58.2 [0], so maybe that is a > > good target to aim for. (I don't know if that carried over from RHEL 8 > > or is their own doing.) But there aren't any compelling feat

Re: pg_recvlogical cannot create slots with failover=true

2025-06-17 Thread Masahiko Sawada
On Tue, Jun 17, 2025 at 12:59 AM Peter Eisentraut wrote: > > On 14.06.25 07:26, Amit Kapila wrote: > > On Sat, Jun 14, 2025 at 3:11 AM Masahiko Sawada > > wrote: > >> > >> On Thu, Jun 12, 2025 at 10:42 PM Peter Eisentraut > >> wrote: > > > > -The --two-phase and > > --falo

Re: Add CASEFOLD() function.

2025-06-17 Thread Jeff Davis
On Tue, 2025-06-17 at 17:37 +0200, Vik Fearing wrote: > If the character set of is UTF8, UTF16, or UTF32, > then FR is replaced by > Case: > i) If the S IS NORMALIZED evaluates to > True, then NORMALIZE (FR) > ii) Otherwise, FR. I read that as "if the input is normalized,

Re: minimum Meson version

2025-06-17 Thread Tom Lane
Peter Eisentraut writes: > I see that Rocky Linux 8 ships with Meson 0.58.2 [0], so maybe that is a > good target to aim for. (I don't know if that carried over from RHEL 8 > or is their own doing.) But there aren't any compelling features new in > 0.58 (format strings seem nice but are prett

minimum Meson version

2025-06-17 Thread Peter Eisentraut
meson.build currently says # We want < 0.56 for python 3.5 compatibility on old platforms. EPEL for # RHEL 7 has 0.55. < 0.54 would require replacing some uses of the fs # module, < 0.53 all uses of fs. So far there's no need to go to >=0.56. meson_version: '>=0.54', Since the current minimum su

Re: pg_dump --with-* options

2025-06-17 Thread Jeff Davis
On Mon, 2025-06-16 at 15:35 -0400, Corey Huinker wrote: > > I think this is the exact sort of confusion caused by having two of > the three types default to on in all circumstances, and one default > to off in one special circumstance. That's certainly a part of the confusion, but the "--x-only"

Re: add function for creating/attaching hash table in DSM registry

2025-06-17 Thread Nathan Bossart
On Tue, Jun 17, 2025 at 05:43:24PM +0530, Rahila Syed wrote: >> Using a DSA from the registry is cumbersome. You essentially need >> another batch of shared memory to keep track of the pointers and do >> locking, so it might not be tremendously useful on its own > > Isn't this true while using ds

RE: Improve CRC32C performance on SSE4.2

2025-06-17 Thread Devulapalli, Raghuveer
> In case Andy is asking about "how" rather than "under what circumstances", my > guess is: -O1+ may have just chosen instructions that also happen to > zero-extend, > which are common. -O0 doesn't represent the naive straightforward structure of > what the programmer wrote, it's more like an "ex

Re: ALTER TABLE ALTER CONSTRAINT misleading error message

2025-06-17 Thread Fujii Masao
On 2025/06/13 16:10, jian he wrote: On Wed, Jun 11, 2025 at 10:20 PM Fujii Masao wrote: We discussed this already, didn't we? There's a thread with IIRC three proposed patches for this. I think I liked this one the most: https://postgr.es/m/caaj_b97hd-jmts7ajgu6tdbczdx_kyukxg+k-dtymoieg

Re: Revisiting {CREATE INDEX, REINDEX} CONCURRENTLY improvements

2025-06-17 Thread Sergey Sargsyan
Hello Mihail, In patch v20-0006-Add-STIR-access-method-and-flags-related-to-auxi.patch, within the "StirMarkAsSkipInserts" function, a critical section appears to be left unclosed. This resulted in an assertion failure during ANALYZE of a table containing a leftover STIR index. Best regards, Serg

Re: Add CASEFOLD() function.

2025-06-17 Thread Vik Fearing
On 16/12/2024 18:49, Jeff Davis wrote: One question I have is whether we want this function to normalize the output. Yes, we do. I am sorry that I am so late to the party, but I am currently writing the Change Proposal for the SQL Standard for this function. For (which includes LOWER()

Re: autoprewarm_dump_now

2025-06-17 Thread Daria Shanina
Hi, I launched pgindent and created a new patch. Here it is. *quakes in fear of incoming buildfarm results* I hope there will be good results at buildfarm. пт, 6 июн. 2025 г. в 16:19, Robert Haas : > On Tue, Jun 3, 2025 at 2:58 PM Andres Freund wrote: > > > I think the proposed patch should b

Re: Non-reproducible AIO failure

2025-06-17 Thread Andres Freund
On 2025-06-17 18:08:30 +0300, Konstantin Knizhnik wrote: > > On 17/06/2025 4:47 pm, Andres Freund wrote: > > > I and Alexandr are using completely different devices with different > > > hardware, OS and clang version. > > Both of you are running Ventura, right? > > > No, Alexandr is using darwin2

Re: Non-reproducible AIO failure

2025-06-17 Thread Andres Freund
On 2025-06-17 17:54:12 +0300, Konstantin Knizhnik wrote: > > On 12/06/2025 4:57 pm, Andres Freund wrote: > > The problem appears to be in that switch between "when submitted, by the IO > > worker" and "then again by the backend". It's not concurrent access in the > > sense of two processes writin

Re: Non-reproducible AIO failure

2025-06-17 Thread Konstantin Knizhnik
On 17/06/2025 4:47 pm, Andres Freund wrote: I and Alexandr are using completely different devices with different hardware, OS and clang version. Both of you are running Ventura, right? No, Alexandr is using darwin23.5 Alexandr also noticed that he can reproduce the problem only with --with-l

Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly

2025-06-17 Thread Alexander Korotkov
Hi, Vitaly! On Tue, Jun 17, 2025 at 6:02 PM Vitaly Davydov wrote: > Thank you for reporting the issue. > > >While tracking buildfarm for one of other commits, I noticed this failure: > >TRAP: failed Assert("s->data.restart_lsn >= > >s->last_saved_restart_lsn"), File: > >"../pgsql/src/backend/repl

Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)

2025-06-17 Thread Daniel Gustafsson
> On 17 Jun 2025, at 15:43, Tomas Vondra wrote: > .. if we > get a failure here, it's not clear to me we can really keep the system > running anyway. It's not just the usual "relcache miss" and if the user > retries it will probably work fine. The catalog is borked, and who knows > in what way.

Re: Non-reproducible AIO failure

2025-06-17 Thread Konstantin Knizhnik
On 12/06/2025 4:57 pm, Andres Freund wrote: The problem appears to be in that switch between "when submitted, by the IO worker" and "then again by the backend". It's not concurrent access in the sense of two processes writing to the same value, it's that when switching from the worker updating

Re: Proposal: Adding compression of temporary files

2025-06-17 Thread Andres Freund
Hi, On 2025-04-25 23:54:00 +0200, Filip Janus wrote: > The latest rebase. This often seems to fail during tests: https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F5382 E.g. https://api.cirrus-ci.com/v1/artifact/task/4667337632120832/testrun/build-32/testrun/recovery/027_stream_regres

Re: Allow to collect statistics on virtual generated columns

2025-06-17 Thread Andres Freund
Hi, On 2025-04-22 18:10:06 +0900, Yugo Nagata wrote: > With your feedback, I would like to progress or rework the patch. Right now the tests seem to always fail: https://cirrus-ci.com/github/postgresql-cfbot/postgresql/cf%2F5714 Fails e.g. with: https://api.cirrus-ci.com/v1/artifact/task/5921189

Re: Add partial :-variable expansion to psql \copy

2025-06-17 Thread Andres Freund
Hi, On 2025-05-13 09:57:46 -0400, Andres Freund wrote: > On 2025-05-01 16:37:18 +, Akshat Jaimini wrote: > > I am unable to apply the patch on master. Can you please confirm if the > > patch is rebased? > > cfbot seems to be able to apply the patch. > > However, the tests have not passed in

Re: Amcheck verification of GiST and GIN

2025-06-17 Thread Tomas Vondra
On 6/17/25 16:19, Thom Brown wrote: > On Mon, 16 Jun 2025 at 21:00, Tomas Vondra wrote: >> >> On 6/16/25 21:09, Arseniy Mukhin wrote: >>> On Mon, Jun 16, 2025 at 6:58 PM Tomas Vondra wrote: Thanks. I went through the patches, polished the commit messages and did some mino

Re: Improve CRC32C performance on SSE4.2

2025-06-17 Thread Nathan Bossart
On Tue, Jun 17, 2025 at 03:55:06PM +0700, John Naylor wrote: >> "Devulapalli, Raghuveer" writes: >> > Replacing that with _mm512_zextsi128_si512 fixes the problem. > > Here's a patch for testing, which also reverts the previous > workaround. Help welcome, but I still promise to test it in the nea

Re: Amcheck verification of GiST and GIN

2025-06-17 Thread Thom Brown
On Mon, 16 Jun 2025 at 21:00, Tomas Vondra wrote: > > On 6/16/25 21:09, Arseniy Mukhin wrote: > > On Mon, Jun 16, 2025 at 6:58 PM Tomas Vondra wrote: > >> > >> Thanks. > >> > >> I went through the patches, polished the commit messages and did some > >> minor tweaks in patch 0002 (to make the vari

Re: Add progressive backoff to XactLockTableWait functions

2025-06-17 Thread Andres Freund
Hi, On 2025-06-08 22:33:39 +0800, Xuneng Zhou wrote: > This patch implements progressive backoff in XactLockTableWait() and > ConditionalXactLockTableWait(). > > As Kevin reported in this thread [1], XactLockTableWait() can enter a > tight polling loop during logical replication slot creation on

Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)

2025-06-17 Thread Ranier Vilela
Em ter., 17 de jun. de 2025 às 11:10, Aleksander Alekseev < aleksan...@timescale.com> escreveu: > Hi Ranier, > > > To me this is a contradiction, whether you consider waiting for a > segfault or consider adding an Assert. > > For the user it is better to have a log, where he can quickly find the >

Re: Non-reproducible AIO failure

2025-06-17 Thread Tom Lane
Andres Freund writes: > Both of you are running Ventura, right? FTR, the machines I'm trying this on are all running current Sequoia: [tgl@minim4 ~]$ uname -a Darwin minim4.sss.pgh.pa.us 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:53:27 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T604

Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)

2025-06-17 Thread Aleksander Alekseev
Hi Ranier, > To me this is a contradiction, whether you consider waiting for a segfault or > consider adding an Assert. > For the user it is better to have a log, where he can quickly find the > problem, rather than having to investigate on his own. That's the point. User's shouldn't encounter

Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx

2025-06-17 Thread Jelte Fennema-Nio
On Fri, 13 Jun 2025 at 15:57, Peter Eisentraut wrote: > That doesn't address the concern that it's confusing what kind of object > \close operates on. There are named and unnamed cursors (= portals), > after all. Agreed. My vote is for \closeprepared as that aligns with the libpq function.

Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)

2025-06-17 Thread Ranier Vilela
Em ter., 17 de jun. de 2025 às 10:43, Tomas Vondra escreveu: > On 6/17/25 15:09, Aleksander Alekseev wrote: > > Hi, > > > >>> We would be in serious trouble if RelationReloadNailed() could be > >>> called for a non-existing relation. Wouldn't Assert() be more > >>> appropriate? > >> > >> IMO, I t

Re: Avoid possible dereference null pointer (contrib/postgres_fdw/postgres_fdw.c)

2025-06-17 Thread Fujii Masao
On 2025/06/17 20:37, Ranier Vilela wrote: Em ter., 17 de jun. de 2025 às 06:09, Etsuro Fujita mailto:etsuro.fuj...@gmail.com>> escreveu: Hi, On Tue, Jun 17, 2025 at 2:38 PM Fujii Masao mailto:masao.fu...@oss.nttdata.com>> wrote: >                                 adjust_foreign_g

Re: --enable-{debug,cassert} should also activate --enable-depend

2025-06-17 Thread Aleksander Alekseev
Hi Dimitris, > Do you mean autotools are being deprecated in postgres? So people should > better choose meson? Yes, Meson support was added in PostgreSQL 16 and it will eventually replace Autotools [1]. Meson is more convenient and works faster so I encourage you to give it a try. Here is a quic

Re: Fix copy-and-past thinko (src/interfaces/libpq/fe-cancel.c)

2025-06-17 Thread Ranier Vilela
Em ter., 17 de jun. de 2025 às 10:42, Daniel Gustafsson escreveu: > > On 17 Jun 2025, at 15:40, Ranier Vilela wrote: > > > In the function *PQcancelCreate* there is a copy-and-past thinko. > > The pointer that must be checked is cancelConn. > > > > Trivial patch attached. > > Nice catch, will fi

Re: Add progressive backoff to XactLockTableWait functions

2025-06-17 Thread Xuneng Zhou
Hi, On Sun, Jun 15, 2025 at 4:01 PM Xuneng Zhou wrote: > Hi, > > Attached is v2 of the patch to add threshold-based sleep to > XactLockTableWait functions. > > Changes from v1: > - Simplified approach based on Fujii's feedback [1]: instead of > exponential backoff, > we now sleep 1ms for the f

Re: Non-reproducible AIO failure

2025-06-17 Thread Andres Freund
Hi, On 2025-06-17 16:43:05 +0300, Konstantin Knizhnik wrote: > On 17/06/2025 4:35 pm, Andres Freund wrote: > > Konstantin, Alexander - are you using the same device to reproduce this or > > different ones? I wonder if this somehow depends on some MDM / corporate > > enforcement tooling running or

Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)

2025-06-17 Thread Tomas Vondra
On 6/17/25 15:09, Aleksander Alekseev wrote: > Hi, > >>> We would be in serious trouble if RelationReloadNailed() could be >>> called for a non-existing relation. Wouldn't Assert() be more >>> appropriate? >> >> IMO, I think no. >> >> In all paths, this check is done, why would this be the only ex

Re: Non-reproducible AIO failure

2025-06-17 Thread Konstantin Knizhnik
On 17/06/2025 4:35 pm, Andres Freund wrote: Konstantin, Alexander - are you using the same device to reproduce this or different ones? I wonder if this somehow depends on some MDM / corporate enforcement tooling running or such. What does: - profiles status -type enrollment - kextstat -l show?

Re: Fix copy-and-past thinko (src/interfaces/libpq/fe-cancel.c)

2025-06-17 Thread Daniel Gustafsson
> On 17 Jun 2025, at 15:40, Ranier Vilela wrote: > In the function *PQcancelCreate* there is a copy-and-past thinko. > The pointer that must be checked is cancelConn. > > Trivial patch attached. Nice catch, will fix. -- Daniel Gustafsson

Fix copy-and-past thinko (src/interfaces/libpq/fe-cancel.c)

2025-06-17 Thread Ranier Vilela
Hi. In the function *PQcancelCreate* there is a copy-and-past thinko. The pointer that must be checked is cancelConn. Trivial patch attached. best regards, Ranier Vilela fix-copy-and-past-thinko-fe-cancel.patch Description: Binary data

Re: --enable-{debug,cassert} should also activate --enable-depend

2025-06-17 Thread Dimitrios Apostolou
On Tue, 17 Jun 2025, Aleksander Alekseev wrote: Hi Dimitris, I just spent 2 miserable days tracking down a very weird issue. I ended up stepping through the code in the debugger. As it turned out, the very same moment of execution, one datastructure (struct _restoreOptions defined in pg_bac

Re: Non-reproducible AIO failure

2025-06-17 Thread Andres Freund
Hi, On 2025-06-16 20:22:00 -0400, Tom Lane wrote: > Konstantin Knizhnik writes: > > On 16/06/2025 6:11 pm, Andres Freund wrote: > >> I unfortunately can't repro this issue so far. > > > But unfortunately it means that the problem is not fixed. > > FWIW, I get similar results to Andres' on a Mac M

Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)

2025-06-17 Thread Ranier Vilela
Em ter., 17 de jun. de 2025 às 10:09, Aleksander Alekseev < aleksan...@timescale.com> escreveu: > Hi, > > >> We would be in serious trouble if RelationReloadNailed() could be > >> called for a non-existing relation. Wouldn't Assert() be more > >> appropriate? > > > > IMO, I think no. > > > > In al

Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)

2025-06-17 Thread Aleksander Alekseev
Hi, >> We would be in serious trouble if RelationReloadNailed() could be >> called for a non-existing relation. Wouldn't Assert() be more >> appropriate? > > IMO, I think no. > > In all paths, this check is done, why would this be the only exception? We use Asserts() for cases that shouldn't happ

Re: wrong comments in rewriteTargetListIU

2025-06-17 Thread jian he
On Tue, Jun 17, 2025 at 7:42 PM Peter Eisentraut wrote: > > However, I see your point that it contrasts with the attidentity code > just above. > > Perhaps a way to resolve this would be to rewrite the comment something > like: > > /* > * Although inserting into a GENERATED BY DEFAULT i

Re: --enable-{debug,cassert} should also activate --enable-depend

2025-06-17 Thread Aleksander Alekseev
Hi Dimitris, > I just spent 2 miserable days tracking down a very weird issue. I ended up > stepping through the code in the debugger. As it turned out, the very same > moment of execution, one datastructure (struct _restoreOptions defined in > pg_backup.h) contained different fields on one data f

Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)

2025-06-17 Thread Ranier Vilela
Hi Aleksander. Em ter., 17 de jun. de 2025 às 09:35, Aleksander Alekseev < aleksan...@timescale.com> escreveu: > Hi, > > > The function *ScanPgRelation* can return a invalid tuple. > > It is necessary to check the function's return, > > as is already done in other parts of the source. > > Good fi

Re: BackendKeyData is mandatory?

2025-06-17 Thread Tatsuo Ishii
>> My question is, BackendKeyData is mandatory or not. Currently >> Pgpool-II raises a fatal error if BackendKeyData is not sent before >> ReadyForQuery arrives. This is because without the message, frontend >> cannot send a CancelRequest message later on, as there's no secret >> key. > > As you s

Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)

2025-06-17 Thread Aleksander Alekseev
Hi, > The function *ScanPgRelation* can return a invalid tuple. > It is necessary to check the function's return, > as is already done in other parts of the source. Good find although I'm not certain if I agree with the patch. We would be in serious trouble if RelationReloadNailed() could be cal

--enable-{debug,cassert} should also activate --enable-depend

2025-06-17 Thread Dimitrios Apostolou
Hello list, I just spent 2 miserable days tracking down a very weird issue. I ended up stepping through the code in the debugger. As it turned out, the very same moment of execution, one datastructure (struct _restoreOptions defined in pg_backup.h) contained different fields on one data frame

Re: add function for creating/attaching hash table in DSM registry

2025-06-17 Thread Rahila Syed
Hi, Thank you for the updated patch. Using a DSA from the registry is cumbersome. You essentially need > another batch of shared memory to keep track of the pointers and do locking, so it might not be tremendously useful on its own > Isn't this true while using dshash from the registry as wel

Re: wrong comments in rewriteTargetListIU

2025-06-17 Thread Peter Eisentraut
On 17.06.25 11:31, Dean Rasheed wrote: On Tue, 17 Jun 2025 at 06:27, Peter Eisentraut wrote: Jian is right, there are no OVERRIDING clauses for generated columns, and the shown code also doesn't check for them, so the comment doesn't match the code. I suspect that commit 17958972fe3b slightly

Re: Avoid possible dereference null pointer (contrib/postgres_fdw/postgres_fdw.c)

2025-06-17 Thread Ranier Vilela
Em ter., 17 de jun. de 2025 às 06:09, Etsuro Fujita escreveu: > Hi, > > On Tue, Jun 17, 2025 at 2:38 PM Fujii Masao > wrote: > > adjust_foreign_grouping_path_cost(root, > pathkeys, > > > retrieved_rows, width, > > - >

Re: Transactional behavior of pg_create_logical_replication_slot

2025-06-17 Thread Andres Freund
Hi, On 2025-06-17 10:30:34 +0200, Mats Kindahl wrote: > Hi PostgreSQL Hackers, > > If you try to create a logical replication slot inside a transaction where > you have issued writes, it will abort with an error message: > > mats=# start transaction; > START TRANSACTION > mats=*# select txid_cur

Re: Non-reproducible AIO failure

2025-06-17 Thread Konstantin Knizhnik
On 17/06/2025 3:22 am, Tom Lane wrote: Konstantin Knizhnik writes: On 16/06/2025 6:11 pm, Andres Freund wrote: I unfortunately can't repro this issue so far. But unfortunately it means that the problem is not fixed. FWIW, I get similar results to Andres' on a Mac Mini M4 Pro using MacPorts'

Re: wrong comments in rewriteTargetListIU

2025-06-17 Thread Dean Rasheed
On Tue, 17 Jun 2025 at 06:27, Peter Eisentraut wrote: > > On 10.04.25 11:46, Amit Langote wrote: > > > > On Thu, Apr 10, 2025 at 5:58 PM jian he wrote: > >> > >> in function, rewriteTargetListIU we have: > >> > >> /* > >> * Can only insert DEFAULT into generated columns

Re: [PATCH] Add an ldflags_sl meson build option

2025-06-17 Thread Peter Eisentraut
On 17.06.25 00:50, Matt Smith (matts3) wrote: I have a Bazel toolchain that sets different linker flags for exe/shared lib. I wanted to build postgresql shared libs with meson using the same toolchain flags that I build all my other 3rd party deps in Bazel. Currently for postgresql builds, w

Re: Improve CRC32C performance on SSE4.2

2025-06-17 Thread John Naylor
On Tue, Jun 17, 2025 at 6:40 AM Andy Fan wrote: > > "Devulapalli, Raghuveer" writes: > > > Great catch! From the intrinsic manual: > > > > Cast vector of type __m128i to type __m512i; the upper 384 bits of the > > result are undefined. Thanks Raghuveer and Nathan, for the diagnosis! > Just be c

Re: Avoid possible dereference null pointer (contrib/postgres_fdw/postgres_fdw.c)

2025-06-17 Thread Etsuro Fujita
Hi, On Tue, Jun 17, 2025 at 2:38 PM Fujii Masao wrote: > adjust_foreign_grouping_path_cost(root, > pathkeys, > > retrieved_rows, width, > -

Re: Adding a '--clean-publisher-objects' option to 'pg_createsubscriber' utility.

2025-06-17 Thread Peter Eisentraut
I have been trying to reconstruct how the new pg_createsubscriber option --remove/-R came about, specifically the name. There was a dizzying number of messages in this thread about and around that, and in the end I don't think the solution is great at the moment. To recap, the first proposal

Transactional behavior of pg_create_logical_replication_slot

2025-06-17 Thread Mats Kindahl
Hi PostgreSQL Hackers, If you try to create a logical replication slot inside a transaction where you have issued writes, it will abort with an error message: mats=# start transaction; START TRANSACTION mats=*# select txid_current(); txid_current -- 406252 (1 row) mats=*# inser

Re: confusing message in check_tuple

2025-06-17 Thread jian he
On Tue, Jun 17, 2025 at 1:21 PM Peter Eisentraut wrote: > > On 12.06.25 08:26, jian he wrote: > > in contrib/amcheck/verify_heapam.c, check_tuple > > report_corruption(ctx, > >psprintf("number of attributes %u exceeds > > maximum expected for table %u", > >

  1   2   >