Re: Changing shared_buffers without restart

2025-09-28 Thread Ashutosh Bapat
On Fri, Sep 26, 2025 at 11:34 PM Dmitry Dolgov <[email protected]> wrote: > > Sorry for late reply folks. > > > On Thu, Sep 18, 2025 at 09:52:03AM -0400, Andres Freund wrote: > > > From 0a13e56dceea8cc7a2685df7ee8cea434588681b Mon Sep 17 00:00:00 2001 > > > From: Dmitrii Dolgov <9erthali...@gma

Re: Clear logical slot's 'synced' flag on promotion of standby

2025-09-28 Thread shveta malik
On Fri, Sep 26, 2025 at 3:26 PM Ajin Cherian wrote: > > > Attaching v4 which addresses all the above comments. > Few trivial comments: 1) # Confirm the synced slot 'lsub1_slot' is retained on the new primary is( $standby1->safe_psql( 'postgres', - q{SELECT count(*) = 2 FROM pg_replication_sl

Re: Logical Replication of sequences

2025-09-28 Thread shveta malik
On Fri, Sep 26, 2025 at 12:55 PM vignesh C wrote: > > On Thu, 25 Sept 2025 at 12:23, shveta malik wrote: > > > > sequencesync_list_invalidate_cb(): > > 5) > > > > + /* invalidate all entries */ > > + hash_seq_init(&status, sequences_to_copy); > > + while ((entry = (LogicalRepSequenceInfo *) hash_

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

2025-09-28 Thread Chao Li
> On Sep 29, 2025, at 05:36, David Rowley wrote: > > On Sat, 27 Sept 2025 at 21:54, jian he wrote: >> if (pass == AT_PASS_ALTER_TYPE || pass == AT_PASS_SET_EXPRESSION) >> - ATPostAlterTypeCleanup(wqueue, tab, lockmode); >> + { >> + if (!list_member_oid(relids, tab->relid)) >> + { >> + ATPostAl

Re: GB18030-2022 Support in PostgreSQL

2025-09-28 Thread John Naylor
On Wed, Sep 24, 2025 at 4:18 PM Chao Li wrote: > I am not sure if you should also upgrade the UCM file to 2022 version, but if > we need, let’s do it with a separate commit. If they can all use the same file, we should just do that for the sake of simplicity, in which case a separate commit is j

Re: pgstattuple "unexpected zero page" for gist and hash indexes

2025-09-28 Thread Dilip Kumar
On Tue, Sep 16, 2025 at 1:06 PM Nitin Motiani wrote: > > For hash indexes, this error comes from pgstat_hash_page() -> > _hash_getbuf_with_strategy() -> _hash_checkpage() for a zero page. > Similarly gistcheckpage() is the cause for gist indexes. > > Since after a crash recovery a zero page is nor

Re: Clear logical slot's 'synced' flag on promotion of standby

2025-09-28 Thread shveta malik
On Wed, Sep 24, 2025 at 10:18 AM Ashutosh Sharma wrote: > > On Wed, Sep 24, 2025 at 9:42 AM shveta malik wrote: > > > > On Tue, Sep 23, 2025 at 6:41 PM Ashutosh Sharma > > wrote: > > > > > > > 3) > > > > + ereport(LOG, > > > > + (errmsg("reset synced flag for replication slot \"%s\"", > > > > +

Re: Skipping schema changes in publication

2025-09-28 Thread Peter Smith
Hi Shlok, I was looking at the recent v24 changes. == GENERAL. I saw that you modified the system view to add a new flag: + + + exceptcol bool + + + True if a column list with EXCEPT clause is specified + for the table in the publication. + +

Re: Eager aggregation, take 3

2025-09-28 Thread Richard Guo
On Thu, Sep 25, 2025 at 1:23 PM Richard Guo wrote: > Attached is an updated version of the patch with these optimizations > applied. FWIW, I plan to do another self-review of this patch soon, with the goal of assessing whether it's ready to be pushed. If anyone has any concerns about any part of

Fix locking issue with fixed-size stats template in injection_points

2025-09-28 Thread Michael Paquier
Hi all, While doing some concurrency benchmarking with injection_points stats enabled in a server, I have been able to trigger an assertion failure in pgstat_begin_changecount_write(): #4 0x564917fdc816 in ExceptionalCondition (conditionName=0x7f60af0dc5c8 "(*cc & 1) == 0", fileName=0x7f60af0

Re: Add support for entry counting in pgstats

2025-09-28 Thread Michael Paquier
On Fri, Sep 26, 2025 at 12:09:45PM -0500, Sami Imseih wrote: > Thanks for v3. The only remaining comment I have is: Thanks for the extra lookup. I have fixed this one, incorporated the feedback from Chao, and applied the result after more tests with pgbench to check the state of the counter. Wit

Re: [PATCH] GROUP BY ALL

2025-09-28 Thread David Christensen
On Sun, Sep 28, 2025 at 2:18 PM David Christensen wrote: > > On Sat, Sep 27, 2025 at 5:23 PM Tom Lane wrote: > > > > Here's a v6 that's rebased up to HEAD and contains fixes for the > > semantic issues we discussed. It still lacks documentation, but > > otherwise I think it's about ready to go.

Re: RFC: extensible planner state

2025-09-28 Thread Tom Lane
Robert Haas writes: > Done now. Here's a rebase of the rest, plus I tweaked the GEQO patch > to try to avoid a compiler warning that cfbot was complaining about. I'm good with the v7 patch set, except for the complaint I raised previously that we really ought to have more than zero documentation

Re: [PATCH] GROUP BY ALL

2025-09-28 Thread Tom Lane
Chao Li writes: > Do we want to specifically check “ctid”? No. Complete waste of effort. regards, tom lane

Re: Why cannot alter column type when a view depends on it?

2025-09-28 Thread David G. Johnston
On Sunday, September 28, 2025, Chao Li wrote: > > > I tried to understand why this restriction is set, then I found that, when > a function uses a view, the view can actually be dropped, only when the > function is executed, it will raise an error saying the view doesn’t exist. > I’m doubting thi

Re: Add jsonb_translate(jsonb, from, to)

2025-09-28 Thread Pavel Stehule
ne 28. 9. 2025 v 12:11 odesílatel Florents Tselai napsal: > Thanks for taking the time Evan > > On Sun, Sep 28, 2025, 12:34 Chao Li wrote: > >> Hi Florents, >> >> Thanks for the patch. I once had the same pain on a similar task, I had >> to create a PL/SQL function at the time. >> >> I haven’t r

Re: Optimize LISTEN/NOTIFY

2025-09-28 Thread Joel Jacobson
On Fri, Sep 26, 2025, at 11:44, Chao Li wrote: >> On Sep 26, 2025, at 17:32, Joel Jacobson wrote: >> >> On Fri, Sep 26, 2025, at 04:26, Chao Li wrote: >> >>> I think what you explained is partially correct. >>> >>> Based on my understanding, any backend process may call >>> SignalBackends(), w

Re: Add jsonb_translate(jsonb, from, to)

2025-09-28 Thread Chao Li
Hi Florents, Thanks for the patch. I once had the same pain on a similar task, I had to create a PL/SQL function at the time. I haven’t read the code change yet, but I think the function name jsonb_translate() sounds to generic. To make the name more meaningful, I would suggest a few candidate

Re: allow benign typedef redefinitions (C11)

2025-09-28 Thread Álvaro Herrera
Hello, Here's another simple piece that I noticed while fooling around with the doxygen report -- genam.h was including tidbitmap.h and relcache.h for the sake of one typedefs each, and this was bleeding in other places in a rather random fashion, particularly through amapi.h. I propose the fo

Re: [PATCH] GROUP BY ALL

2025-09-28 Thread Chao Li
> On Sep 28, 2025, at 06:23, Tom Lane wrote: > > + /* Iterate over targets, adding acceptable ones to the result > list */ > + foreach_ptr(TargetEntry, tle, *targetlist) > + { > + /* Ignore junk TLEs */ > + if (tle->re

Re: Why cannot alter column type when a view depends on it?

2025-09-28 Thread jian he
On Sun, Sep 28, 2025 at 4:19 PM Chao Li wrote: > > ``` > evantest=# create table t (c char(20)); > CREATE TABLE > evantest=# create view v_t as select * from t; > CREATE VIEW > > evantest=# alter table t alter column c type char(25); > ERROR: cannot alter type of a column used by a view or rule >

Re: Implement waiting for wal lsn replay: reloaded

2025-09-28 Thread Xuneng Zhou
Hi, On Fri, Sep 26, 2025 at 7:22 PM Xuneng Zhou wrote: > > Hi Álvaro, > > Thanks for your review. > > On Tue, Sep 16, 2025 at 4:24 AM Álvaro Herrera wrote: > > > > On 2025-Sep-15, Alexander Korotkov wrote: > > > > > > It's LGTM. The same pattern is observed in VACUUM, EXPLAIN, and CREATE > > > >

Why cannot alter column type when a view depends on it?

2025-09-28 Thread Chao Li
Hi Hacker, We have received a complain many times from our customers, especially those switched to PG from Oracle, that when they need to alter a column’s type, if there are views depend on the column, then users have to drop the view first and recreate the view after altering the column type.

Re: Limit eartdistance regression testcase to the public schema

2025-09-28 Thread Zsolt Parragi
> why do you have other stuff in the search_path? That seems > to cause all kinds of risks of accidentally interfering with > assorted test cases. That was a workaround that seemed to work with everything, except the earthdistance testcase. * If I create the extension in the public schema, that