Re: Don't treat virtual generated columns as missing statistics in vacuumdb --missing-stats-only

2025-08-21 Thread Corey Huinker
On Thu, Aug 21, 2025 at 9:56 AM Nathan Bossart wrote: > On Thu, Aug 21, 2025 at 11:13:44AM +0900, Fujii Masao wrote: > > On Thu, Aug 21, 2025 at 4:19 AM Nathan Bossart > wrote: > >> Nice find. I would suggest adding the virtual generated column to > >> regression_vacuumdb_test when it is first

Re: Weird error message from Postgres 18

2025-08-21 Thread Ranier Vilela
Em qui., 21 de ago. de 2025 às 12:17, Tom Lane escreveu: > Ranier Vilela writes: > > create table inserttest (col1 serial PRIMARY KEY, col2 int4 NOT NULL, > col3 > > text NOT NULL, col4 text NULL); > > insert into inserttest select 0 AS col2, NULL AS col3, NULL AS col4; > > ERROR: null value in

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

2025-08-21 Thread Masahiko Sawada
On Thu, Aug 21, 2025 at 3:50 AM Shlok Kyal wrote: > > On Fri, 15 Aug 2025 at 04:38, Masahiko Sawada wrote: > > > > On Tue, Aug 12, 2025 at 1:26 AM Shlok Kyal wrote: > > > > > > > > > Hi Sawada-san, > > > > > > I have reviewed the patch and have few comments: > > > > Thank you for reviewing the

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

2025-08-21 Thread Masahiko Sawada
On Wed, Aug 20, 2025 at 3:11 AM shveta malik wrote: > > Please find a few comments: Thank you for reviewing the patch! > > 1) > ReplicationSlotsDropDBSlots: > + bool dropped = false; > > We can name 'dropped ' as 'dropped_logical' similar to ReplicationSlotCleanup. I think we don't necessarily

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

2025-08-21 Thread Andrew Dunstan
On 2025-08-19 Tu 10:14 AM, Nazir Bilal Yavuz wrote: Hi, On Tue, 19 Aug 2025 at 15:33, Nazir Bilal Yavuz wrote: I am able to reproduce the regression you mentioned but both regressions are %20 on my end. I found that (by experimenting) SIMD causes a regression if it advances less than 5 chara

Re: vacuumdb --missing-stats-only and permission issue

2025-08-21 Thread Corey Huinker
On Thu, Aug 21, 2025 at 9:44 AM Nathan Bossart wrote: > On Thu, Aug 21, 2025 at 03:19:40AM -0400, Corey Huinker wrote: > > Assuming that I'm not missing something, the fix seems straightforward. > > I'll set about coding it up tomorrow if nobody has done so by then. > > I've added an open item fo

misleading error message in ProcessUtilitySlow T_CreateStatsStmt

2025-08-21 Thread jian he
hi. while reviewing other work, some error messages in src/backend/tcop/utility.c seem not accurate. static void ProcessUtilitySlow(ParseState *pstate, PlannedStmt *pstmt, const char *queryString, ProcessUtilityContext context,

Re: [BUG] temporary file usage report with extended protocol and unnamed portals

2025-08-21 Thread Frédéric Yhuel
On 4/26/25 20:57, Sami Imseih wrote: I found several issues with v4. It does not deal correctly with pipelining, and we should only really be concerned with dropping an unnamed portal only. So, v5 now moves the DropPortal call after the unnamed portal was executed to completion ( as v4 was doi

Weird error message from Postgres 18

2025-08-21 Thread Ranier Vilela
Hi. I noticed a weird message error from Postgres 18. sql reproducible test: create table inserttest (col1 serial PRIMARY KEY, col2 int4 NOT NULL, col3 text NOT NULL, col4 text NULL); insert into inserttest select 0 AS col2, NULL AS col3, NULL AS col4; ERROR: null value in column "col2" of relat

Re: Logical Replication of sequences

2025-08-21 Thread Masahiko Sawada
On Wed, Aug 20, 2025 at 9:04 PM Amit Kapila wrote: > > On Wed, Aug 20, 2025 at 11:00 PM Masahiko Sawada > wrote: > > > > On Tue, Aug 19, 2025 at 9:14 PM Amit Kapila wrote: > > > > > > If so, I don't think we can do much with the design > > > choice we made. During DDL replication of sequences,

Re: Identifying function-lookup failures due to argument name mismatches

2025-08-21 Thread Tom Lane
Dominique Devienne writes: > I like the new messages in func_lookup_failure_details(). Very much > so in fact. BUT I still don't like the fallback "traditional" > message, because the way I read it, it fails to mention argument > *names* could be the reason for the lookup failure. Now maybe tha

Re: Identifying function-lookup failures due to argument name mismatches

2025-08-21 Thread Tom Lane
Chao Li writes: > On Aug 8, 2025, at 09:29, Tom Lane wrote: >> I couldn't quite let go of this, and after some thought I hit on the >> idea of making FuncnameGetCandidates pass back a bitmask of flags >> showing how far the match succeeded. > I traced this problem today, and I agree that making

Inconsistent update in the MERGE command

2025-08-21 Thread Dmitry
Hi hackers, I noticed an inconsistent update when executing MERGE commands, which looks more like a bug. In my test example, the value of 'val' should increase in an ascending monotonous sequence. Test system === - Architecture: x86_64 - OS: Ubuntu 24.04.3 LTS (Noble Numbat) - Tested

Re: Add os_page_num to pg_buffercache

2025-08-21 Thread Mircea Cadariu
Hi, A small addendum might make sense for this patch, given a recent change to master. A CHECK_FOR_INTERRUPTS() call was added in several pg_buffercache functions in commit eab9e4e. See also the corresponding discussion [1]. Shall we add it to the function introduced in this patch as well?

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

2025-08-21 Thread Shlok Kyal
On Fri, 15 Aug 2025 at 04:38, Masahiko Sawada wrote: > > On Tue, Aug 12, 2025 at 1:26 AM Shlok Kyal wrote: > > > > > > Hi Sawada-san, > > > > I have reviewed the patch and have few comments: > > Thank you for reviewing the patch! > > > > > 1. There are some spelling mistakes in logicaldecoding.s

Re: Don't treat virtual generated columns as missing statistics in vacuumdb --missing-stats-only

2025-08-21 Thread Nathan Bossart
On Thu, Aug 21, 2025 at 11:13:44AM +0900, Fujii Masao wrote: > On Thu, Aug 21, 2025 at 4:19 AM Nathan Bossart > wrote: >> Nice find. I would suggest adding the virtual generated column to >> regression_vacuumdb_test when it is first created so that we can just rely >> on the existing test cases.

Remove unneeded cast in heap_xlog_lock.

2025-08-21 Thread Kirill Reshke
Hi! I was looking at how PostgreSQL handles VM map bits, when I noticed $subj. PFA small refactoring patch. -- Best regards, Kirill Reshke v1-0001-Remove-unneeded-cast-in-heap_xlog_lock.patch Description: Binary data

Re: Conflict detection for update_deleted in logical replication

2025-08-21 Thread shveta malik
On Thu, Aug 21, 2025 at 2:09 PM Zhijie Hou (Fujitsu) wrote: > > On Thursday, August 21, 2025 2:01 PM shveta malik > wrote: > > > > On Wed, Aug 20, 2025 at 12:12 PM Zhijie Hou (Fujitsu) > > wrote: > > > > > > > > > I agree. Here is V63 version which implements this approach. > > > > > > > Thank

Re: Add GUC to enable libxml2's XML_PARSE_HUGE

2025-08-21 Thread Jim Jones
On 21.08.25 04:26, Erik Wienhold wrote: > I guess the excuse for xmloption is that the SQL standard defines SET > XML OPTION. I guess you're right... in this case the standard dictates what should be done. It just doesn't change the fact that depending on the parameter value the same query succ

Re: Memory leak of SMgrRelation object on standby

2025-08-21 Thread Jingtang Zhang
Hi~ > On Sat, Aug 16, 2025 at 12:50 AM Jingtang Zhang > wrote: >> Back to v17, commit 21d9c3ee gave SMgrRelation a well-defined lifetime, and >> smgrclose nolonger removes SMgrRelation object from the hashtable, leaving >> the work to smgrdestroyall. But I find a place that relies on the removin

Re: vacuumdb --missing-stats-only and permission issue

2025-08-21 Thread Nathan Bossart
On Thu, Aug 21, 2025 at 03:19:40AM -0400, Corey Huinker wrote: > Assuming that I'm not missing something, the fix seems straightforward. > I'll set about coding it up tomorrow if nobody has done so by then. I've added an open item for this. -- nathan

Re: Report reorder buffer size

2025-08-21 Thread Ashutosh Bapat
Hi Bertrand, Thanks for your response. I am glad that you have found the proposal to be generally useful. On Thu, Aug 14, 2025 at 3:50 PM Bertrand Drouvot wrote: > > > Using these trendlines, a user may decide to keep > > logical_decoding_work_mem to minimum and thus let all the large > > transac

Re: Don't treat virtual generated columns as missing statistics in vacuumdb --missing-stats-only

2025-08-21 Thread Yugo Nagata
On Thu, 21 Aug 2025 10:37:10 -0500 Nathan Bossart wrote: > On Thu, Aug 21, 2025 at 11:29:56AM -0400, Corey Huinker wrote: > > On Thu, Aug 21, 2025 at 9:56 AM Nathan Bossart > > wrote: > >> Since we're running out of time for v18, I went ahead and updated the > >> patch. I've also added an open

Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt

2025-08-21 Thread Kirill Reshke
On Thu, 21 Aug 2025 at 17:00, jian he wrote: > > hi. Hi! > RangeVar *rel = (RangeVar *) linitial(stmt->relations); > if (!IsA(rel, RangeVar)) These two lines are weird. Looks like linitial(stmt->relations) should be assigned to variable with type Node* first? > > for example: > > create

Re: Don't treat virtual generated columns as missing statistics in vacuumdb --missing-stats-only

2025-08-21 Thread Nathan Bossart
On Thu, Aug 21, 2025 at 11:29:56AM -0400, Corey Huinker wrote: > On Thu, Aug 21, 2025 at 9:56 AM Nathan Bossart > wrote: >> Since we're running out of time for v18, I went ahead and updated the >> patch. I've also added an open item for this. > > +1 on the fix, works for me. Thanks. I'll plan

Re: pgaio_io_get_id() type (was Re: Datum as struct)

2025-08-21 Thread Peter Eisentraut
On 08.08.25 22:07, Andres Freund wrote: On 2025-08-05 19:20:20 +0200, Peter Eisentraut wrote: On 31.07.25 19:17, Tom Lane wrote: Also I see a "// XXX" in pg_get_aios, which I guess is a note to confirm the data type to use for ioh_id? Yes, the stuff returned from pgaio_io_get_id() should be i

Re: Adding REPACK [concurrently]

2025-08-21 Thread Antonin Houska
Mihail Nikalayeu wrote: > Also, I think I found an issue (or lost something during rebase): we > must preserve xmin,cmin during initial copy > to make sure that data is going to be visible by snapshots of > concurrent changes later: > > static void > reform_and_rewrite_tuple(..) > . >

Re: Adding REPACK [concurrently]

2025-08-21 Thread Antonin Houska
Andres Freund wrote: > Hi, > > On 2025-08-20 16:22:41 +0200, Antonin Houska wrote: > > Álvaro Herrera wrote: > > > > > On 2025-Aug-20, Antonin Houska wrote: > > > > > > > There's an issue with the symlink, maybe some meson expert can help. In > > > > particular, the CI on Windows ends up with t

Re: vacuumdb --missing-stats-only and permission issue

2025-08-21 Thread Nathan Bossart
On Thu, Aug 21, 2025 at 12:59:52PM -0500, Nathan Bossart wrote: > I think there's a problem with the privilege checks for pg_stats (and > friends) versus ANALYZE. pg_stats checks for SELECT privileges on the > column, while ANALYZE checks for MAINTAIN privileges. If a role lacks > SELECT on the c

Re: Adding REPACK [concurrently]

2025-08-21 Thread Andres Freund
Hi, On 2025-08-21 20:14:14 +0200, Antonin Houska wrote: > ok, installing a copy of the same executable with a different name seems more > reliable. At least that's how the postmaster->postgres link used to be > handled, if I read Makefile correctly. Thanks. I have not followed this thread, but I

Re: vacuumdb --missing-stats-only and permission issue

2025-08-21 Thread Nathan Bossart
On Thu, Aug 21, 2025 at 12:52:17PM -0400, Corey Huinker wrote: > Here's the query changes, no regression test just yet. I think there's a problem with the privilege checks for pg_stats (and friends) versus ANALYZE. pg_stats checks for SELECT privileges on the column, while ANALYZE checks for MAIN

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

2025-08-21 Thread KAZAR Ayoub
> On Thu, 14 Aug 2025 at 18:00, KAZAR Ayoub wrote: > >> Thanks for running that benchmark! Would you mind sharing a reproducer > >> for the regression you observed? > > > > Of course, I attached the sql to generate the text and csv test files. > > If having a 1/3 of line length of special characte

Re: Identifying function-lookup failures due to argument name mismatches

2025-08-21 Thread Tom Lane
I wrote: > Dunno, I think the new messages already cover all the interesting > cases of argument name mismatch. I'm hesitant to touch the > longstanding hint, and if I did I'd probably change it more than that, > to something like > ERROR: function foo(integer) does not exist > DETAIL: No funct

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

2025-08-21 Thread Matheus Alcantara
On Thu Aug 21, 2025 at 7:25 PM -03, Masahiko Sawada wrote: > What about backend processes that don't have any xid or xmin (i.e., > are read-only query and in idle-in-transaction)? > > IIUC we process the notification entries at the beginning of the > server loop (see L4608 in postgres.c) and when r

Re: VM corruption on standby

2025-08-21 Thread Tom Lane
Alexander Korotkov writes: > On Tue, Aug 19, 2025 at 10:50 PM Tom Lane wrote: >> Therefore, I vote for reverting bc22dc0e0. Hopefully only >> temporarily, but it's too late to figure out another way for v18, >> and I don't think that bc22dc0e0 is such an essential improvement >> that we can't af

Re: Adding REPACK [concurrently]

2025-08-21 Thread Robert Treat
On Tue, Aug 19, 2025 at 2:53 PM Álvaro Herrera wrote: > Note choice of shell command name: though all the other programs in > src/bin/scripts do not use the "pg_" prefix, this one does; we thought > it made no sense to follow the old programs as precedent because there > seems to be a lament for t

Re: vacuumdb --missing-stats-only and permission issue

2025-08-21 Thread Corey Huinker
> > Unfortunately, pg_stats_ext is also different. The data for that view is > restricted to table owners (or roles that inherit privileges of the table > owner). Ok, I took the RLS and permissions quals from pg_stats and pg_stats_ext and put them in the corresponding EXISTs tests. The queries

Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt

2025-08-21 Thread Tom Lane
Kirill Reshke writes: > On Thu, 21 Aug 2025 at 17:00, jian he wrote: >> RangeVar *rel = (RangeVar *) linitial(stmt->relations); >> if (!IsA(rel, RangeVar)) > These two lines are weird. Looks like linitial(stmt->relations) > should be assigned to variable with type Node* first? We take that s

Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring

2025-08-21 Thread torikoshia
On 2025-08-20 13:27, Naga Appani wrote: Thanks for working on this! On Tue, Aug 19, 2025 at 1:32 AM Michael Paquier wrote: FWIW, I think that you should be a bit more careful before sending updated patch sets. You have missed an extra point I have raised upthread about the refactoring pieces

Re: memory leak in logical WAL sender with pgoutput's cachectx

2025-08-21 Thread Masahiko Sawada
On Thu, Aug 21, 2025 at 2:55 AM Amit Kapila wrote: > > On Thu, Aug 21, 2025 at 2:03 PM 赵宇鹏(宇彭) > wrote: > > > > From what we see in our users’ production environments, the situation is > > exactly > > as previously described. Creating a “publication for all tables” is very > > common, > > beca

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

2025-08-21 Thread Masahiko Sawada
On Wed, Aug 20, 2025 at 2:18 PM Matheus Alcantara wrote: > > On Tue Aug 19, 2025 at 2:37 PM -03, Daniil Davydov wrote: > > Hi, > > > > On Tue, Aug 19, 2025 at 6:31 PM Matheus Alcantara > > wrote: > >> > >> On Tue Aug 19, 2025 at 12:57 AM -03, Daniil Davydov wrote: > >> > You have started a very l

Re: VM corruption on standby

2025-08-21 Thread Michael Paquier
On Fri, Aug 22, 2025 at 01:27:17AM +0300, Alexander Korotkov wrote: > I'm OK about this. Do you mind if I revert bc22dc0e0 myself? > And let's retry it for v19. Yes, agreed that it may be the best thing to do for v18 based on the information we have gathered until now. -- Michael signature.asc

Re: Weird error message from Postgres 18

2025-08-21 Thread Tom Lane
Ranier Vilela writes: > create table inserttest (col1 serial PRIMARY KEY, col2 int4 NOT NULL, col3 > text NOT NULL, col4 text NULL); > insert into inserttest select 0 AS col2, NULL AS col3, NULL AS col4; > ERROR: null value in column "col2" of relation "inserttest" violates > not-null constraint

Re: Redesigning postmaster death handling

2025-08-21 Thread Thomas Munro
On Thu, Aug 21, 2025 at 5:45 PM Tom Lane wrote: > One other thought here: do we *really* want such a critical-and-hard- > to-test aspect of our behavior to be handled completely differently > on different platforms? I'd lean to ignoring the Linux/FreeBSD > facilities, because otherwise we're basi

Re: Remove redundant assignment of a variable in function AlterPublicationTables

2025-08-21 Thread Peter Smith
On Thu, Aug 21, 2025 at 10:11 AM Michael Paquier wrote: ... > > It does not matter to leave the code as is. We have a bunch of these > depending on how people feel on the day when they implement something. > Hi Michael. Some declaration assignments may be arbitrary, but I think 'isNull' follows

Re: Remove unneeded cast in heap_xlog_lock.

2025-08-21 Thread Chao Li
> On Aug 21, 2025, at 22:10, Kirill Reshke wrote: > > Hi! > > I was looking at how PostgreSQL handles VM map bits, when I noticed $subj. > PFA small refactoring patch. > > -- > Best regards, > Kirill Reshke > LGTM. BufferGetPage() returns a “Page” type, and the receiving variable “page”

Re: VM corruption on standby

2025-08-21 Thread Alexander Korotkov
Hi, Tom! On Tue, Aug 19, 2025 at 10:50 PM Tom Lane wrote: > I'm inclined to think that we do want to prohibit WaitEventSetWait > inside a critical section --- it just seems like a bad idea all > around, even without considering this specific failure mode. > Therefore, I vote for reverting bc22dc0

Re: Standardize LSN-based filename

2025-08-21 Thread Japin Li
On Thu, 21 Aug 2025 at 15:52, Fujii Masao wrote: > On Wed, Aug 20, 2025 at 10:37 AM Japin Li wrote: >> Yeah. It's for both consistency and for proper file sorting. >> >> Zero-padding ensures that when a file system or tool sorts the snapshot files >> alphabetically, the order is also chronologic

Re: Don't treat virtual generated columns as missing statistics in vacuumdb --missing-stats-only

2025-08-21 Thread Fujii Masao
On Fri, Aug 22, 2025 at 2:23 AM Yugo Nagata wrote: > > On Thu, 21 Aug 2025 10:37:10 -0500 > Nathan Bossart wrote: > > > On Thu, Aug 21, 2025 at 11:29:56AM -0400, Corey Huinker wrote: > > > On Thu, Aug 21, 2025 at 9:56 AM Nathan Bossart > > > wrote: > > >> Since we're running out of time for v18,

Re: VM corruption on standby

2025-08-21 Thread Thomas Munro
On Fri, Aug 22, 2025 at 10:27 AM Alexander Korotkov wrote: > And let's retry it for v19. +1 I'm hoping we can fix PM death handling soon, and then I assume this can go straight back in without modification. CVs are an essential low level synchronisation component that really should work in lots

Re: Remove unneeded cast in heap_xlog_lock.

2025-08-21 Thread Richard Guo
On Fri, Aug 22, 2025 at 9:44 AM Chao Li wrote: > On Aug 21, 2025, at 22:10, Kirill Reshke wrote: > I was looking at how PostgreSQL handles VM map bits, when I noticed $subj. > PFA small refactoring patch. > LGTM. BufferGetPage() returns a “Page” type, and the receiving variable > “page” is of “

Re: event trigger support for PL/Python

2025-08-21 Thread Euler Taveira
On Thu, Aug 21, 2025, at 4:46 AM, Peter Eisentraut wrote: > On 16.07.25 14:01, Euler Taveira wrote: >> There is an old thread [1] that proposed $SUBJECT. That patch was not >> committed and the thread died. I use the referred patch as base for the >> attached version. The key differences between

Re: [Proposal] Expose internal MultiXact member count function for efficient monitoring

2025-08-21 Thread torikoshia
On 2025-08-22 09:28, torikoshia wrote: On 2025-08-20 13:27, Naga Appani wrote: Thanks for working on this! On Tue, Aug 19, 2025 at 1:32 AM Michael Paquier wrote: FWIW, I think that you should be a bit more careful before sending updated patch sets. You have missed an extra point I have rais

Re: [BUG?] check_exclusion_or_unique_constraint false negative

2025-08-21 Thread Mihail Nikalayeu
Hello, Added one more test - for invalid "update_deleted" conflict detection. Best regards, Mikhail. v10-0002-Fix-btree-index-scan-concurrency-issues-with-dir.patch Description: Binary data v10-0001-This-patch-introduces-new-injection-points-and-T.patch Description: Binary data

doc patch: correct function name for slot synchronization.

2025-08-21 Thread Hayato Kuroda (Fujitsu)
Dear hackers, (CC: Amit and Shveta, who were the committer and author) While working on the translation project of manuals, I found below sentence: > When slot synchronization is configured as recommended, and the initial synchronization is performed either automatically or manually via pg_sync_r

RE: Conflict detection for update_deleted in logical replication

2025-08-21 Thread Zhijie Hou (Fujitsu)
On Thursday, August 21, 2025 2:01 PM shveta malik wrote: > > On Wed, Aug 20, 2025 at 12:12 PM Zhijie Hou (Fujitsu) > wrote: > > > > > > I agree. Here is V63 version which implements this approach. > > > > Thank You for the patches. > > > The retention status is recorded in the pg_subscription

Re: memory leak in logical WAL sender with pgoutput's cachectx

2025-08-21 Thread 赵宇鹏(宇彭)
Hi, From what we see in our users’ production environments, the situation is exactly as previously described. Creating a “publication for all tables” is very common, because manually choosing individual tables to publish can be cumbersome. Regular CREATE/DROP TABLE activity is also normal, and

Re: doc patch: correct function name for slot synchronization.

2025-08-21 Thread Amit Kapila
On Thu, Aug 21, 2025 at 2:24 PM Hayato Kuroda (Fujitsu) wrote: > > Dear hackers, > (CC: Amit and Shveta, who were the committer and author) > > While working on the translation project of manuals, I found below sentence: > > > > When slot synchronization is configured as recommended, and the initi

Re: Add support for specifying tables in pg_createsubscriber.

2025-08-21 Thread Shubham Khanna
On Fri, Aug 15, 2025 at 12:46 PM Peter Smith wrote: > > Hi Shubham, > > Some review comments for patch v2-0001 > > == > 1. General - compile errors! > > Patch applies OK, but I cannot build pg_createsubscriber. e.g. > > pg_createsubscriber.c: In function ‘main’: > pg_createsubscriber.c:2237:5:

Re: Conflict detection for update_deleted in logical replication

2025-08-21 Thread Mihail Nikalayeu
Hello! Sorry for being noisy - just want to remind: conflict detection system (including new updated_deleted) is giving invalid reports because of the issue related to SnapshotDirty vs btree. So, it is not possible to rely on that at the moment. You may check TAP tests here [0] and some explanati

Re: When deleting the plpgsql function, release the CachedPlan of the function

2025-08-21 Thread 章晨曦
It seems not an easy task. And here is my new work of such task. The main idea is register a sys cache callback in cached_function_compile when not registered. So it will effect for all SPL. And also introduce a new hash table to track the function for cache inval callback. The procedure in callbac

Re: Add log_autovacuum_{vacuum|analyze}_min_duration

2025-08-21 Thread kasaharatt
2025-08-14 17:56 に kasaharatt wrote: Hi, 2025-08-14 13:26 に Shinya Kato wrote: Hi, On Wed, Aug 13, 2025 at 5:44 PM kasaharatt wrote: > Approach 2: > - log_autovacuum_min_duration: Changed behavior, which controls only > autovacuum logging. > - log_autoanalyze_min_durat

Re: vacuumdb --missing-stats-only and permission issue

2025-08-21 Thread Corey Huinker
On Wed, Aug 20, 2025 at 11:06 PM Fujii Masao wrote: > > I'm not sure whether --missing-stats-only was intended to work for > non-superusers, but if so, this restriction is inconvenient. Would it > make sense to use the views pg_stats and pg_stats_ext instead? > Since the catalogs are only consult

Re: Conflict detection for update_deleted in logical replication

2025-08-21 Thread Nisha Moond
On Wed, Aug 20, 2025 at 12:12 PM Zhijie Hou (Fujitsu) wrote: > > I agree. Here is V63 version which implements this approach. > Thank you Hou-san for the patches. Here are couple of comments: 1) Once retention is stopped for all subscriptions and conflict_slot.xmin is reset to NULL, we are no lo

Re: event trigger support for PL/Python

2025-08-21 Thread Peter Eisentraut
On 16.07.25 14:01, Euler Taveira wrote: There is an old thread [1] that proposed $SUBJECT. That patch was not committed and the thread died. I use the referred patch as base for the attached version. The key differences between them are: documentation, tests, refactor (0001) and a few cleanups

Re: Fix replica identity checks for MERGE command on published table.

2025-08-21 Thread Chao Li
Hi Zhijie, > On Aug 21, 2025, at 11:41, Zhijie Hou (Fujitsu) > wrote: > > > Thanks for working on the patch. I tested it locally, and it worked for me properly. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/

Re: memory leak in logical WAL sender with pgoutput's cachectx

2025-08-21 Thread Amit Kapila
On Thu, Aug 21, 2025 at 2:03 PM 赵宇鹏(宇彭) wrote: > > From what we see in our users’ production environments, the situation is > exactly > as previously described. Creating a “publication for all tables” is very > common, > because manually choosing individual tables to publish can be cumbersome. >

Re: memory leak in logical WAL sender with pgoutput's cachectx

2025-08-21 Thread Amit Kapila
On Thu, Aug 21, 2025 at 10:53 AM Hayato Kuroda (Fujitsu) wrote: > > > I have concerns about the performance implications of iterating > > through all entries in the caches within > > maybe_cleanup_rel_sync_cache(). If the cache contains numerous > > entries, this iteration could potentially cause

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2025-08-21 Thread jian he
On Thu, Aug 21, 2025 at 2:45 PM jian he wrote: > > On Thu, Aug 21, 2025 at 10:53 AM jian he wrote: > > > > > this time, I only checked > > > v52-0001-Implement-ALTER-TABLE-.-MERGE-PARTITIONS-.-comma.patch hi. +static void +check_two_partitions_bounds_range(Relation parent, +{ + + ereport(E

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

2025-08-21 Thread shveta malik
On Thu, Aug 21, 2025 at 10:34 PM Masahiko Sawada wrote: > > On Wed, Aug 20, 2025 at 3:11 AM shveta malik wrote: > > > > Please find a few comments: > > Thank you for reviewing the patch! > > > > > 1) > > ReplicationSlotsDropDBSlots: > > + bool dropped = false; > > > > We can name 'dropped ' as 'd

Re: Remove unneeded cast in heap_xlog_lock.

2025-08-21 Thread Michael Paquier
On Fri, Aug 22, 2025 at 10:41:15AM +0900, Richard Guo wrote: > Although these casts are unnecessary for sure, I'm not sure if it's > worth making the code changes to fix them. That's sort of the point. This is not code that needs to be fixed, because it's not broken. -- Michael signature.asc De

Re: Remove unneeded cast in heap_xlog_lock.

2025-08-21 Thread Kirill Reshke
On Fri, 22 Aug 2025 at 06:41, Richard Guo wrote: > > If you run 'git grep', you'll find a lot more instances where the > result of BufferGetPage() is explicitly cast to Page. > > git grep -rn "(Page) BufferGetPage" | wc -l > 69 > > Although these casts are unnecessary for sure, I'm not sure if it'

Re: Remove redundant assignment of a variable in function AlterPublicationTables

2025-08-21 Thread Michael Paquier
On Fri, Aug 22, 2025 at 09:55:23AM +1000, Peter Smith wrote: > To summarise: > Only ~4 places are redundantly assigning isNull values before calling > functions that use &isNull. > But ~400 function calls that are passing &isNull do not pre-assignment > of that variable. > > Choosing to keep this

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

2025-08-21 Thread shveta malik
On Wed, Aug 20, 2025 at 10:53 AM Ajin Cherian wrote: > > > I've removed them. > Attaching patch v8 addressing the above comments. > Thanks for the patch. Please find a few comments: 1) When the API is in progress, and meanwhile in another session we turn off hot_standby_feedback, the API session

RE: [Patch] add new parameter to pg_replication_origin_session_setup

2025-08-21 Thread Hayato Kuroda (Fujitsu)
Dear Doruk, > That sounds reasonable. I’ve updated the patch and added more > information to the documentation covering the topics you mentioned. > I also added a Caution block so potential users won’t miss it. I hope > this patch meets your expectations. Can you explain more why we must extend t

Re: Report reorder buffer size

2025-08-21 Thread Bertrand Drouvot
Hi Ashutosh, On Thu, Aug 21, 2025 at 07:26:41PM +0530, Ashutosh Bapat wrote: > Hi Bertrand, > Thanks for your response. I am glad that you have found the proposal > to be generally useful. > > On Thu, Aug 14, 2025 at 3:50 PM Bertrand Drouvot > wrote: > > > > > Using these trendlines, a user may

Re: Add support for specifying tables in pg_createsubscriber.

2025-08-21 Thread Euler Taveira
On Thu, Aug 21, 2025, at 6:08 AM, Shubham Khanna wrote: > Attachments: > * v3-0001-Support-tables-via-pg_createsubscriber.patch > * v3-0002-Support-WHERE-clause-and-COLUMN-list-in-table-arg.patch + --table=table + + + Adds one or more specific tables to the publication for the

Re: Remove traces of long in dynahash.c

2025-08-21 Thread Michael Paquier
On Thu, Aug 21, 2025 at 12:53:09AM -0400, Tom Lane wrote: > If you prefer to regard this as an independent issue, that's okay with > me ... but it's touching most of the same lines of code, so it seems > to me that it'd be about as easy to deal with both items at once. I'd rather do that after a s

Re: Logical Replication of sequences

2025-08-21 Thread Amit Kapila
On Thu, Aug 21, 2025 at 10:52 PM Masahiko Sawada wrote: > > On Wed, Aug 20, 2025 at 9:04 PM Amit Kapila wrote: > > > > On Wed, Aug 20, 2025 at 11:00 PM Masahiko Sawada > > wrote: > > > > > > On Tue, Aug 19, 2025 at 9:14 PM Amit Kapila > > > wrote: > > > > > > > > If so, I don't think we can d