commit_baseurl is broken in postgres.sgml

2025-10-12 Thread Chao Li
Hi Hacker, I just noticed $SUBJECT: In doc/src/sgml/postgres.sgml, line 12: ``` https://postgr.es/c/";> ``` https://postgr.es/c/ is resolved to https://git.postgresql.org/pg/commitdiff/, but the URL now returns 404. Looks like Bruce fixed the URL 13 months ago, but it’s broken again. I am not

Re: Expanding HOT updates for expression and partial indexes

2025-10-12 Thread Jeff Davis
On Wed, 2025-10-08 at 15:48 -0500, Nathan Bossart wrote: > > The theory being that > > my new code using the old/new tts to form and test the index tuples > > resulting from executing expressions was using the resultsRelInfo > > struct > > created during plan execution, not the information found on

pgstattuple: Use streaming read API in pgstatindex functions

2025-10-12 Thread Xuneng Zhou
Hi hackers, While reading the code related to streaming reads and their current use cases, I noticed that pgstatindex could potentially benefit from adopting the streaming read API. The required change is relatively simple—similar to what has already been implemented in the pg_warm and pg_visibili

Re: Support getrandom() for pg_strong_random() source

2025-10-12 Thread Jacob Champion
On Tue, Oct 7, 2025 at 1:40 AM Daniel Gustafsson wrote: > None come to mind, and it seems increasingly likely that designing API which > we > confidently can document how to use is too complicated. Maybe it's better to > re-focus on just the usecase in the UUID code and leave the API at pg_prng(

Re: Improve docs for n_distinct_inherited

2025-10-12 Thread Chao Li
Hi David, I think your revision is good and accurate. > On Oct 13, 2025, at 07:42, David Rowley wrote: > > Just picking this one up again. I forgot to come back to this after > PGConf.dev. > > I came up with: > > Ordinarily n_distinct is used. > n_distinct_inherited exists to allow

Re: finish TODOs in to_json_is_immutable, to_jsonb_is_immutable also add tests on it

2025-10-12 Thread jian he
hi. rebase and regress tests changes. From 99f3cb1fefa579aee759232e9495f7b4180628d7 Mon Sep 17 00:00:00 2001 From: jian he Date: Mon, 13 Oct 2025 09:42:40 +0800 Subject: [PATCH v3 1/1] improve function to_json_is_immutable and to_jsonb_is_immutable this will make to_json_is_immutable, to_jsonb_

Core dumps from recovery/017_shm

2025-10-12 Thread Thomas Munro
While looking for something else, I noticed that we occasionally see assertion failures like this: TRAP: failed Assert("latch->maybe_sleeping == false"), File: "latch.c", Line: 378, PID: 28023 Here's one in the build farm: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mamba&dt=2025-08-

Re: Finalizing read stream users' flag choices

2025-10-12 Thread Arseniy Mukhin
Hi, Could you please help to clarify the READ_STREAM_SEQUENTIAL usage policy. There are several places that use the callback 'block_range_read_stream_cb'. So it means all of them have the same sequential access pattern. But only one of them (amcheck verify_heapam) uses READ_STREAM_SEQUENTIAL. Why

Re: Logical Replication of sequences

2025-10-12 Thread Peter Smith
HI Vignesh, Here are some minor review comments for patches 0001 and 0002. Patch 0001 AlterSubscription: 1.1. (errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE), - errmsg("ALTER SUBSCRIPTION ... REFRESH is not allowed for disabled subscriptions"))); +

Re: Invalid pointer access in logical decoding after error

2025-10-12 Thread vignesh C
On Thu, 9 Oct 2025 at 23:33, Masahiko Sawada wrote: > > On Thu, Oct 9, 2025 at 10:07 AM Masahiko Sawada wrote: > > > > On Thu, Oct 9, 2025 at 8:23 AM Euler Taveira wrote: > > > > > > On Thu, Oct 9, 2025, at 10:40 AM, vignesh C wrote: > > > > On Thu, 9 Oct 2025 at 00:16, Masahiko Sawada > > > >

Re: Is there public API to fetch errcode?

2025-10-12 Thread Sergey Fukanchik
sqlstate is saved into conn->last_sqlstate along with the error message in pqGetErrorNotice3:     if (id == PG_DIAG_SQLSTATE)     strlcpy(conn->last_sqlstate, workBuf.data,     sizeof(conn->last_sqlstate)); is this usable? Can it be extracted somehow? --- Sergey

Re: Is there public API to fetch errcode?

2025-10-12 Thread Tom Lane
Sergey Fukanchik writes: > Does libpq have an API to extract this code? PQresultErrorField(res, PG_DIAG_SQLSTATE) should do, no? regards, tom lane

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

2025-10-12 Thread Tatsuo Ishii
Hi Tom, > While I'd paid basically zero attention to this patch (the claim > in the commit message that I reviewed it is a flight of fancy), > I've been forced to look through it as a consequence of the mop-up > that's been happening to silence compiler warnings. Sorry for taking up your time to