Re: psql: tab-completion support for COPY ... TO/FROM STDIN, STDOUT, and PROGRAM

2025-11-13 Thread Yugo Nagata
Hi Sawada-san, I still cannot confirm that my previous email has been archived [1], so let me resend it. I apologize again for the repeated emails. [1] https://www.postgresql.org/list/pgsql-hackers/since/20251113/ On Tue, 4 Nov 2025 10:57:14 -0800 Masahiko Sawada wrote: > On Mon, Oct 6, 20

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-13 Thread Yugo Nagata
On Thu, 13 Nov 2025 22:55:53 +0900 Fujii Masao wrote: > On Thu, Nov 13, 2025 at 4:09 PM Yugo Nagata wrote: > > Thank you for your review! > > I've attached an updated patch reflecting your suggestion. > > Thanks for updating the patch! LGTM. > > You mentioned that the assertion failure could o

Re: CREATE/ALTER PUBLICATION improvements for syntax synopsis

2025-11-13 Thread Fujii Masao
On Fri, Nov 14, 2025 at 10:23 AM Peter Smith wrote: > > A rebase was needed. Here is patch v3. Thanks for the patch! LGTM. For example, in the CREATE PUBLICATION synopsis, the part that can be repeated is "[ ONLY ] table_name ... [ WHERE ( expression ) ]" not just the WHERE clause, so using curl

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-13 Thread Chao Li
> On Nov 13, 2025, at 21:55, Fujii Masao wrote: > > On Thu, Nov 13, 2025 at 4:09 PM Yugo Nagata wrote: >> Thank you for your review! >> I've attached an updated patch reflecting your suggestion. > > Thanks for updating the patch! LGTM. > > You mentioned that the assertion failure could occu

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

2025-11-13 Thread Masahiko Sawada
On Thu, Nov 13, 2025 at 7:53 PM shveta malik wrote: > > On Wed, Nov 12, 2025 at 10:42 PM Masahiko Sawada > wrote: > > > > On Wed, Nov 12, 2025 at 3:42 AM shveta malik wrote: > > > > > > On Wed, Nov 12, 2025 at 3:36 PM Masahiko Sawada > > > wrote: > > > > > > > > On Tue, Nov 11, 2025 at 6:05 P

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-13 Thread Chao Li
Hi Akshay, I quick went through the patch, I do see some problems, but I need some time to wrap up, so I will do a deep review next week. In the meantime, I want to first ask that why there is no privilege check? I think that’s a serious issue. > On Nov 13, 2025, at 16:32, Akshay Joshi wrote:

Re: Document NULL

2025-11-13 Thread Chao Li
> On Nov 11, 2025, at 23:34, Álvaro Herrera wrote: > > On 2025-Jun-18, David G. Johnston wrote: > >> Version 8. >> >> Marking this Ready to Commit in CF 2025-09 (CF PG19-1) > > I have rebased this; here's v9. I haven't reviewed it in depth, but > intend to give it a read and get it pushed

Re: Skipping schema changes in publication

2025-11-13 Thread Peter Smith
Hi Shlok. Some review comments for patch v27-0001. == doc/src/sgml/ref/alter_publication.sgml 1. + + The RESET clause will reset the publication to the default + state. This includes resetting all publication parameters, setting the + ALL TABLES and ALL SEQUENCES flags to + false,

Re: [Patch] Windows relation extension failure at 2GB and 4GB

2025-11-13 Thread Michael Paquier
On Thu, Nov 13, 2025 at 10:58:54AM -0600, Bryan Green wrote: > On 11/12/2025 10:05 PM, Michael Paquier wrote: >> > Moving on to the I/O routine changes. There was a little bit of >> noise in the diffs, like one more comment removed that should still be >> around. Indentation has needed some adjus

Re: Extended Statistics set/restore/clear functions.

2025-11-13 Thread Michael Paquier
On Fri, Nov 14, 2025 at 12:49:23AM -0500, Corey Huinker wrote: > Negative numbers represent the Nth expression defined in the extended > statistics object. So if you have extended statistics on a, b, length(a), > length(b) then you can legally have -1 and -2 in the attributes, but > nothing lower t

Re: [WIP]Vertical Clustered Index (columnar store extension) - take2

2025-11-13 Thread Japin Li
On Wed, 12 Nov 2025 at 19:11, Timur Magomedov wrote: > Hello Peter! > I've succeeded in making a reproducer for a infrequent bug I've seen > several times with ROS control daemon enabled. > Looks like WAL records produced by ROS control daemon while processing > "vci_rc_update_del_vec" command ar

Re: Issue with logical replication slot during switchover

2025-11-13 Thread Masahiko Sawada
On Thu, Nov 13, 2025 at 7:16 PM shveta malik wrote: > > On Thu, Nov 13, 2025 at 6:39 PM Alexander Kukushkin > wrote: > > > > > > > >> But the system can die/crash before shutdown. > > > > > > You mean it will not write WAL? > > When a logical replication slot is created we build a snapshot and a

Re: pgsql: Drop unnamed portal immediately after execution to completion

2025-11-13 Thread Michael Paquier
On Thu, Nov 13, 2025 at 04:02:24PM -0600, Sami Imseih wrote: > I am not sure I like this idea as-is, because besides that fact > that it's still a wire level change, it's not safe at all to > re-enter exec_execute_message after you just cleaned the > portal but did not drop it. This will come at t

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-13 Thread Japin Li
On Thu, Nov 13, 2025 at 02:02:30PM +0530, Akshay Joshi wrote: > On Thu, Nov 13, 2025 at 10:18 AM Quan Zongliang > wrote: > > > > > > > On 11/13/25 12:17 PM, Quan Zongliang wrote: > > > > > > > > > On 11/12/25 8:04 PM, Akshay Joshi wrote: > > >> Hi Hackers, > > >> > > >> I’m submitting a patch as

Re: Confused static assertion implementation

2025-11-13 Thread Chao Li
> On Nov 14, 2025, at 10:13, Thomas Munro wrote: > > Hi, > > I won't be surprised if Peter (CC'd) already has a patch for this in > his C11 incubation branch, but if not, maybe this will be useful. > > While experimenting with threads and atomics on various systems, I > didn't like the way o

Re: DOCS: Missing tags for some SEQUENCE fields

2025-11-13 Thread Peter Smith
On Fri, Nov 14, 2025 at 2:53 PM Amit Kapila wrote: > > On Thu, Nov 13, 2025 at 4:46 PM Chao Li wrote: > > > On Nov 13, 2025, at 13:17, Peter Smith wrote: > > > > > > Hi, > > > > > > While reviewing the recent patches for SEQUENCE documentation I found > > > [1] a few more instances where the ta

Re: Compile error on the aarch64 platform: Missing asm/hwcap.h

2025-11-13 Thread John Naylor
On Fri, Nov 14, 2025 at 11:02 AM 高增琦 wrote: > Compile error on CentOS Linux release 7.6.1810 (AltArch) with the message > “‘HWCAP_CRC32’ undeclared”. We still have at least one CentOS 7 aarch64 machine that gets regular testing (not sure of the reason, since it's been EOL for a year and a half I

Re: Rename sync_error_count to tbl_sync_error_count in subscription statistics

2025-11-13 Thread Chao Li
> On Nov 13, 2025, at 17:52, vignesh C wrote: > > On Thu, 13 Nov 2025 at 09:12, Amit Kapila wrote: >> >> On Thu, Nov 13, 2025 at 4:31 AM Peter Smith wrote: >>> >>> CURRENT >>> seq_sync_error_count >>> sync_error_count >>> >>> MY SUGGESTION >>> sync_seq_error_count >>> sync_table_error_cou

Re: SQL:2011 Application Time Update & Delete

2025-11-13 Thread Chao Li
> On Nov 13, 2025, at 12:07, Paul A Jungwirth > wrote: > > I'll reply to Chao Li separately, but those changes are included in > the patches here. > > Rebased to 705601c5ae. > > Yours, > > -- > Paul ~{:-) > [email protected] > I continue reviewing ... Even if I

Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt

2025-11-13 Thread jian he
On Thu, Nov 13, 2025 at 5:41 PM Álvaro Herrera wrote: > > On 2025-Nov-13, jian he wrote: > > > @@ -15658,10 +15658,19 @@ ATPostAlterTypeParse(Oid oldId, Oid oldRelId, Oid > > refRelId, char *cmd, > > querytree_list = list_concat(querytree_list, > > afterStmts); > >

Compile error on the aarch64 platform: Missing asm/hwcap.h

2025-11-13 Thread 高增琦
Hi, Compile error on CentOS Linux release 7.6.1810 (AltArch) with the message “‘HWCAP_CRC32’ undeclared”. Relevant code from discussion: https://www.postgresql.org/message-id/4496616.iHFcN1HehY%40portable-bastien It mentions: "It doesn't look like I need to include from Bastien's original messag

Re: DOCS: Missing tags for some SEQUENCE fields

2025-11-13 Thread Amit Kapila
On Thu, Nov 13, 2025 at 4:46 PM Chao Li wrote: > > On Nov 13, 2025, at 13:17, Peter Smith wrote: > > > > Hi, > > > > While reviewing the recent patches for SEQUENCE documentation I found > > [1] a few more instances where the tag should have been > > used for some of the sequence fields (per the

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

2025-11-13 Thread shveta malik
On Wed, Nov 12, 2025 at 10:42 PM Masahiko Sawada wrote: > > On Wed, Nov 12, 2025 at 3:42 AM shveta malik wrote: > > > > On Wed, Nov 12, 2025 at 3:36 PM Masahiko Sawada > > wrote: > > > > > > On Tue, Nov 11, 2025 at 6:05 PM Masahiko Sawada > > > wrote: > > > > > > > > On Mon, Nov 10, 2025 at 8

Re: Rename sync_error_count to tbl_sync_error_count in subscription statistics

2025-11-13 Thread Peter Smith
On Thu, Nov 13, 2025 at 8:52 PM vignesh C wrote: > > On Thu, 13 Nov 2025 at 09:12, Amit Kapila wrote: > > > > On Thu, Nov 13, 2025 at 4:31 AM Peter Smith wrote: > > > > > > CURRENT > > > seq_sync_error_count > > > sync_error_count > > > > > > MY SUGGESTION > > > sync_seq_error_count > > > sync_t

Re: Add support for COPY TO in tablesync for partitioned tables.

2025-11-13 Thread Ajin Cherian
On Thu, Nov 13, 2025 at 8:49 AM Masahiko Sawada wrote: > > On Mon, Nov 10, 2025 at 7:37 PM Ajin Cherian wrote: > > > > On Tue, Nov 11, 2025 at 2:19 PM Amit Kapila wrote: > > > > > > In the commit message, you mentioned: "Performance tests show it's > > > faster than the COPY (SELECT ...) TO vari

Re: Issue with logical replication slot during switchover

2025-11-13 Thread shveta malik
On Thu, Nov 13, 2025 at 6:39 PM Alexander Kukushkin wrote: > > > >> But the system can die/crash before shutdown. > > > You mean it will not write WAL? > When a logical replication slot is created we build a snapshot and also write > to WAL: > postgres=# select pg_current_wal_insert_lsn(); select

回复:回复:another autovacuum scheduling thread

2025-11-13 Thread 段坤仁(刻韧)
Thank you for your reply. You are absolutely right, and I apologize for straying off-topic in this thread. I have moved my thoughts to a separate thread [0]. [0]https://www.postgresql.org/message-id/fffdd62e-4d97-4701-ad57-0cd3ef1ebef4.duankunren.dkr%40alibaba-inc.com

回复:autovacuum cost delay improvement thread

2025-11-13 Thread 段坤仁(刻韧)
-- 发件人:段坤仁(刻韧) 发送时间:2025年11月14日(周五) 10:17 收件人:"pgsql-hackers" 主 题:autovacuum cost delay improvement thread Hi all, Recently I noticed an interesting thread about table scheduling in autovacuum in [0], which contained some constructiv

autovacuum cost delay improvement thread

2025-11-13 Thread 段坤仁(刻韧)
Hi all, Recently I noticed an interesting thread about table scheduling in autovacuum in [0], which contained some constructive discussions. After testing nathan's patch, I attempted to make improvements on some issues mentioned in the discussion, mainly related to cost delay. Cost delay was orig

Confused static assertion implementation

2025-11-13 Thread Thomas Munro
Hi, I won't be surprised if Peter (CC'd) already has a patch for this in his C11 incubation branch, but if not, maybe this will be useful. While experimenting with threads and atomics on various systems, I didn't like the way our macros failed in the ancient fallback code on Visual Studio. That

Re: Implement waiting for wal lsn replay: reloaded

2025-11-13 Thread Xuneng Zhou
Hi Tomas, On Fri, Nov 14, 2025 at 4:32 AM Tomas Vondra wrote: > > On 11/5/25 10:51, Alexander Korotkov wrote: > > Hi! > > > > On Mon, Nov 3, 2025 at 5:13 PM Andres Freund wrote: > >> On 2025-11-03 16:06:58 +0100, Álvaro Herrera wrote: > >>> On 2025-Nov-03, Alexander Korotkov wrote: > >>> >

Re: DOCS: ALTER PUBLICATION - Synopsis for DROP is a bit misleading

2025-11-13 Thread Peter Smith
On Wed, Nov 12, 2025 at 6:06 PM Fujii Masao wrote: > > On Wed, Nov 5, 2025 at 1:44 PM Fujii Masao wrote: > > > > On Wed, Nov 5, 2025 at 8:26 AM Peter Smith wrote: > > > > > > Bump. I found this old thread of mine had received no responses for > > > several months. > > > > > > Any thoughts about

Re: CREATE/ALTER PUBLICATION improvements for syntax synopsis

2025-11-13 Thread Peter Smith
A rebase was needed. Here is patch v3. == Kind Regards, Peter Smith. Fujitsu Australia v3-0001-Add-curly-brackets-before-ellipsis.patch Description: Binary data

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-13 Thread Quan Zongliang
On 11/13/25 8:28 PM, Álvaro Herrera wrote: But what about the following scenario? If there is no permission to access pg_database. Shouldn't the DDL be returned? postgres=> SELECT * FROM pg_database; ERROR: permission denied for table pg_database postgres=> SELECT pg_get_database_ddl('testd

Fix GetOperatorFromCompareType

2025-11-13 Thread Paul A Jungwirth
Hi Hackers, I found a few problems with GetOperatorFromCompareType and fixed them here. First of all, the comment was out of date: we never return InvalidStrategy; instead we ereport. Second, we were potentially using uninitialized Oids to build error messages (if get_opclass_opfamily_and_input_

Re: Few untranslated error messages in OAuth

2025-11-13 Thread Jacob Champion
On Thu, Nov 13, 2025 at 3:08 PM Jacob Champion wrote: > I'm writing up a patch that combines all of that. And here's what I have so far. I could use help double-checking the .po result; I'm not entirely sure my usage of update-po is correct. I took this opportunity to address a complaint from Al

Re: Use streaming read I/O in BRIN vacuuming

2025-11-13 Thread Masahiko Sawada
On Wed, Nov 12, 2025 at 11:57 AM Arseniy Mukhin wrote: > > Hi, > > On Mon, Oct 13, 2025 at 5:54 PM Arseniy Mukhin > wrote: > > > > Hi, > > > > On Thu, Oct 9, 2025 at 2:03 AM Masahiko Sawada > > wrote: > > > > > > On Sun, Aug 31, 2025 at 12:48 PM Arseniy Mukhin > > > wrote: > > > > > > > > Hi!

Re: Few untranslated error messages in OAuth

2025-11-13 Thread Jacob Champion
On Thu, Nov 13, 2025 at 8:23 AM Jacob Champion wrote: > On Thu, Nov 13, 2025 at 4:49 AM Daniel Gustafsson wrote: > > If so, should that be extended to oauth_json_set_error as well? (and > > possibly others?) > > That should be covered already by nls.mk, unless I messed that up > too... I'll do a

Re: Performance issues with parallelism and LIMIT

2025-11-13 Thread Tomas Vondra
Hi David, Sorry for not responding to this thread earlier. On 9/2/25 13:38, David Geier wrote: > Hi Tomas! > > I've finally got time again to work on PostgreSQL. > > On 03.11.2023 21:48, Tomas Vondra wrote: >> On 2/22/23 13:22, Tomas Vondra wrote: >>> ... >>> > No opinion on these options,

Re: Use merge-based matching for MCVs in eqjoinsel

2025-11-13 Thread Tom Lane
Ilia Evdokimov writes: > Good point. I addressed this in a separate patch: eqjoinsel_inner() now > saves matchfreq1, matchfreq2, nmatches so that eqjoinsel_semi() can > reuse them when (clamped_nvalues2 == sslot2->nvalues). If the MCV list > on the RHS is clamped, we still recompute locally. If

Re: pgsql: Drop unnamed portal immediately after execution to completion

2025-11-13 Thread Sami Imseih
> Thinking a bit outside the box.. I was wondering about a plan D (plan > A is what's on HEAD, plan B is copying around the query string, plan C > this Vfd approach) where we shut down the executor when we have > finished the execution of an unnamed portal, with something like the > attached based

Re: Patch: dumping tables data in multiple chunks in pg_dump

2025-11-13 Thread Hannu Krosing
Added to https://commitfest.postgresql.org/patch/6219/ On Thu, Nov 13, 2025 at 9:26 PM Hannu Krosing wrote: > > The reason for small chunk sizes is that they are determined by main > heap table, and that was just over 1GB > > largetoastdb=> SELECT format('%I.%I', t.schemaname, t.relname) as table

Re: Implement waiting for wal lsn replay: reloaded

2025-11-13 Thread Tomas Vondra
On 11/5/25 10:51, Alexander Korotkov wrote: > Hi! > > On Mon, Nov 3, 2025 at 5:13 PM Andres Freund wrote: >> On 2025-11-03 16:06:58 +0100, Álvaro Herrera wrote: >>> On 2025-Nov-03, Alexander Korotkov wrote: >>> I'd like to give this subject another chance for pg19. I'm going to push th

Re: Patch: dumping tables data in multiple chunks in pg_dump

2025-11-13 Thread Hannu Krosing
The reason for small chunk sizes is that they are determined by main heap table, and that was just over 1GB largetoastdb=> SELECT format('%I.%I', t.schemaname, t.relname) as table_name, pg_table_size(t.relid) AS table_size, sum(pg_relation_size(i.indexrelid)) AS total_index_size,

Re: Patch: dumping tables data in multiple chunks in pg_dump

2025-11-13 Thread Hannu Krosing
Ran another test with a 53GB database where most of the data is in TOAST CREATE TABLE just_toasted( id serial primary key, toasted1 char(2200) STORAGE EXTERNAL, toasted2 char(2200) STORAGE EXTERNAL, toasted3 char(2200) STORAGE EXTERNAL, toasted4 char(2200) STORAGE EXTERNAL ); and the to

Re: Newly created replication slot may be invalidated by checkpoint

2025-11-13 Thread Vitaly Davydov
Re-sending the original message due to a fail... Hi Zhijie Hou, Amit > > I think the main issue here lies in the possibility that the minimum > > restart_lsn > > obtained during a checkpoint could be less than the WAL position that is > > being > > reserved concurrently. So, instead of serializ

Re: Patch: dumping tables data in multiple chunks in pg_dump

2025-11-13 Thread Hannu Krosing
Going up to 16 workers did not improve performance , but this is expected, as the disk behind the database can only do 4TB/hour of reads, which is now the bottleneck. (408/352/*3600 = 4172 GB/h) $ time ./pg_dump --format=directory -h 10.58.80.2 -U postgres --huge-table-chunk-pages=131072 -j 16 -f

Re: [PATCH] Speed up of vac_update_datfrozenxid.

2025-11-13 Thread Rustam Khamidullin
>How significant is that speedup in the grand scheme of things? What >fraction is vac_update_datfrozenxid of the overall work that autovacuum >does? To answer this question, I conducted additional measurements. To find out how long vacuum takes, I decided to measure the execution time of the `

Re: Patch: dumping tables data in multiple chunks in pg_dump

2025-11-13 Thread Hannu Krosing
I just ran a test by generating a 408GB table and then dumping it both ways $ time pg_dump --format=directory -h 10.58.80.2 -U postgres -f /tmp/plain.dump largedb real39m54.968s user37m21.557s sys 2m32.422s $ time ./pg_dump --format=directory -h 10.58.80.2 -U postgres --huge-table-ch

Re: [Patch] Windows relation extension failure at 2GB and 4GB

2025-11-13 Thread Bryan Green
On 11/12/2025 10:05 PM, Michael Paquier wrote: > On Wed, Nov 12, 2025 at 04:58:43PM +0900, Michael Paquier wrote: >> Thanks. As the stamps have been pushed for the next minor release, I >> have applied and backpatched the meson check for now. I'll look at >> your patch next, for HEAD. > > Moving

Re: Few untranslated error messages in OAuth

2025-11-13 Thread Jacob Champion
On Thu, Nov 13, 2025 at 4:49 AM Daniel Gustafsson wrote: > If so, should that be extended to oauth_json_set_error as well? (and possibly > others?) That should be covered already by nls.mk, unless I messed that up too... I'll do a deeper dive. Another way to fix this would be to wrap the assign

Re: pg_getaddrinfo_all() with hintp=NULL

2025-11-13 Thread Daniel Gustafsson
> On 13 Nov 2025, at 16:26, Tom Lane wrote: > > Daniel Gustafsson writes: >> That's my thinking as well, unless objected to I will apply the below which >> use >> the same phrasing as the comment on pg_getnameinfo_all. > > WFM. Thanks, done. -- Daniel Gustafsson

Re: Proposal: Conflict log history table for Logical Replication

2025-11-13 Thread Dilip Kumar
On Thu, Nov 13, 2025 at 2:39 PM shveta malik wrote: > > > Few observations related to publication. > > -- Thanks Shveta, for testing and sharing your thoughts. IMHO for conflict log tables it should be good enough if we restrict it when ALL TABLE options are used, I d

Re: pg_getaddrinfo_all() with hintp=NULL

2025-11-13 Thread Tom Lane
Daniel Gustafsson writes: > That's my thinking as well, unless objected to I will apply the below which > use > the same phrasing as the comment on pg_getnameinfo_all. WFM. regards, tom lane

Re: Document NULL

2025-11-13 Thread Marcos Pegoraro
Em ter., 11 de nov. de 2025 às 12:34, Álvaro Herrera escreveu: > I have rebased this; here's v9. I haven't reviewed it in depth, but > intend to give it a read and get it pushed sometime in the > not-too-distant future, so if anybody wants to review it some more, it'd > be appreciated Maybe th

Re: Include extension path on pg_available_extensions

2025-11-13 Thread Matheus Alcantara
On Thu Nov 13, 2025 at 6:11 AM -03, Chao Li wrote: >> > > 1 - commit comment > ``` > User-defined locations are only visible for users that has the > pg_read_extension_paths role, otherwise is > returned as a column value, the same behaviour that we already have on > pg_stat_activity. > ``` > > F

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-11-13 Thread Bertrand Drouvot
On Fri, Nov 07, 2025 at 02:37:32PM +0100, Álvaro Herrera wrote: > Hmm, I tried to recreate your patch using this .cocci file, and in my > run, there's a few changes in your patch that my spatch run didn't > detect. I wonder if that's because my spatch version is buggy, or > because you hacked the

Re: 2025-11-13 release announcement draft

2025-11-13 Thread Jonathan S. Katz
On 11/11/25 5:14 PM, Nathan Bossart wrote: On Mon, Nov 10, 2025 at 08:57:32PM -0500, Jonathan S. Katz wrote: For the point that Nathan nit'd, I just removed it because I couldn't come up with a pithy way to describe it after reading the release note a bunch of times. Open to suggestions if we wa

Comment possible shared memory re-attach failure

2025-11-13 Thread Ivan Kovmir
EXEC_BACKEND on Linux leads to failures when processes try to attach to shared memory if kernel.randomize_va_space != 0. There is a comment in the source code explaining this, but it is far from where the error occurs. This patch introduces a comment navigating the programmer to the explanation. F

Re: pg_getaddrinfo_all() with hintp=NULL

2025-11-13 Thread Daniel Gustafsson
> On 13 Nov 2025, at 01:17, Tom Lane wrote: > Daniel Gustafsson writes: >> It's still not clear to ne that we should make pg_getaddr_info() mimic the >> API >> of getaddrinfo since it's not a thin wrapper over getaddrinfo. The >> alternative >> option would be to return EAI_FAIL on a null hin

Re: Issue with logical replication slot during switchover

2025-11-13 Thread Alexander Kukushkin
But the system can die/crash before shutdown. You mean it will not write WAL? When a logical replication slot is created we build a snapshot and also write to WAL: postgres=# select pg_current_wal_insert_lsn(); select pg_create_logical_replication_slot('foo', 'pgoutput'); select pg_current_wal_in

Re: Consistently use the XLogRecPtrIsInvalid() macro

2025-11-13 Thread Álvaro Herrera
On 2025-Nov-07, Bertrand Drouvot wrote: > What do you think of the attached? It contains the ones you mentioned and some > others. The patch attached has been generated by the .cocci script [1]. > > [1]: > https://github.com/bdrouvot/coccinelle_on_pg/blob/main/replace_literal_0_assignement_with_

Re: Few untranslated error messages in OAuth

2025-11-13 Thread Daniel Gustafsson
> On 13 Nov 2025, at 13:32, Álvaro Herrera wrote: > > On 2025-Nov-13, Daniel Gustafsson wrote: > >> I was pondering that since auth error messages in backend libpq does this, >> but >> since we don't use gettext_noop anywhere else in frontend libpq today it >> makes >> sense to go with libpq_g

Re: Few untranslated error messages in OAuth

2025-11-13 Thread Álvaro Herrera
On 2025-Nov-13, Daniel Gustafsson wrote: > I was pondering that since auth error messages in backend libpq does this, but > since we don't use gettext_noop anywhere else in frontend libpq today it makes > sense to go with libpq_gettext and update the docs instead. > > Unless you, who has more tran

Re: pgsql: Drop unnamed portal immediately after execution to completion

2025-11-13 Thread Mircea Cadariu
On 13/11/2025 06:27, Michael Paquier wrote: This is new, attaching the information to a Vfd in fd.c. Not sure that adding this information to this structure is a good concept. This layer of the code has no idea of query strings currently, so that feels a bit like a layer violation. Thanks for

Re: [BUG?] check_exclusion_or_unique_constraint false negative

2025-11-13 Thread Mihail Nikalayeu
Hello, Amit! On Tue, Aug 26, 2025 at 1:08 PM Amit Kapila wrote: > I think it is better to document this race somewhere in a logical > replication document for now unless we have a consensus on a way to > move forward. I have added a draft of the documentation patch in related thread [0]. [0]:

Re: Few untranslated error messages in OAuth

2025-11-13 Thread Daniel Gustafsson
> On 13 Nov 2025, at 09:13, Álvaro Herrera wrote: > On 2025-Nov-13, Zhijie Hou (Fujitsu) wrote: >> During testing of libpq, I noticed several error messages not processed by >> libpq_gettext, resulting in their exclusion from *.pot files. The attached >> patch >> wraps these messages. Thanks fo

Re: misleading error message in ProcessUtilitySlow T_CreateStatsStmt

2025-11-13 Thread Álvaro Herrera
On 2025-Nov-13, jian he wrote: > @@ -15658,10 +15658,19 @@ ATPostAlterTypeParse(Oid oldId, Oid oldRelId, Oid > refRelId, char *cmd, > querytree_list = list_concat(querytree_list, > afterStmts); > } > else if (IsA(stmt, CreateStatsStmt)) > +

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-13 Thread Yugo Nagata
On Thu, 13 Nov 2025 18:17:37 +0800 Chao Li wrote: > > > > On Nov 13, 2025, at 17:40, Yugo Nagata wrote: > > > > The following script: > > > > \startpipeline > > > > \syncpipeline > > > > \endpipeline > > > > can be considered equivalent to: > > > > BEGIN; > > > > END; > > BEGIN; > > >

Re: Rename sync_error_count to tbl_sync_error_count in subscription statistics

2025-11-13 Thread vignesh C
On Thu, 13 Nov 2025 at 09:12, Amit Kapila wrote: > > On Thu, Nov 13, 2025 at 4:31 AM Peter Smith wrote: > > > > CURRENT > > seq_sync_error_count > > sync_error_count > > > > MY SUGGESTION > > sync_seq_error_count > > sync_table_error_count > > > > +1. Along with consistency with other column name

Re: Few untranslated error messages in OAuth

2025-11-13 Thread Álvaro Herrera
On 2025-Nov-13, Zhijie Hou (Fujitsu) wrote: > Hi, > > During testing of libpq, I noticed several error messages not processed by > libpq_gettext, resulting in their exclusion from *.pot files. The attached > patch > wraps these messages. Yeah, this roughly makes sense. I think the documentatio

Re: Extended Statistics set/restore/clear functions.

2025-11-13 Thread jian he
hi. now looking at v12-0003-Add-working-input-function-for-pg_ndistinct.patch again. + * example input: + * [{"attributes": [6, -1], "ndistinct": 14}, + * {"attributes": [6, -2], "ndistinct": 9143}, + * {"attributes": [-1,-2], "ndistinct": 13454}, + * {"attributes": [6, -1, -2],

Re: Include extension path on pg_available_extensions

2025-11-13 Thread Chao Li
Hi Matheus, I just reviewed and tested the patch again, got a few more comments: > On Nov 11, 2025, at 20:47, Matheus Alcantara wrote: > > > On this new v5 version I also swap the order of "comment" and "location" > columns as it was suggested by Michael. > > -- > Matheus Alcantara > EDB: htt

Re: Checkpointer write combining

2025-11-13 Thread Chao Li
> On Nov 4, 2025, at 07:34, Melanie Plageman wrote: > > Thanks for continuing to review! I've revised the patches to > incorporate all of your feedback except for where I mention below. > > There were failures in CI due to issues with max batch size, so > attached v8 also seeks to fix those.

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-13 Thread Chao Li
> On Nov 13, 2025, at 15:09, Yugo Nagata wrote: > > On Thu, 13 Nov 2025 11:55:25 +0900 > Fujii Masao wrote: > >> On Wed, Nov 12, 2025 at 6:34 PM Yugo Nagata wrote: >>> I've attached an updated patch. >> >> Thanks for updating the patch! >> >>> The comment for the PQpipelineSync() call has

Re: Issue with logical replication slot during switchover

2025-11-13 Thread Amit Kapila
On Wed, Nov 12, 2025 at 12:58 PM Alexander Kukushkin wrote: > > On Wed, 12 Nov 2025 at 05:22, Amit Kapila wrote: >> >> It is difficult to tell when this can happen but you detailed there is >> a theoretical possibility of the same. If we had an in-core cluster >> tool that manages nodes on its ow

Re: Issue with logical replication slot during switchover

2025-11-13 Thread Amit Kapila
On Thu, Nov 13, 2025 at 2:37 PM Alexander Kukushkin wrote: > > Hi Amit, > > On Thu, 13 Nov 2025 at 09:42, Amit Kapila wrote: >> >> >> Say, the only operations that happened are slot-drop-recreate and or >> some operations on unlogged tables. Why then pg_rewind is required? > > > Clean shut down a

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-13 Thread Yugo Nagata
On Thu, 13 Nov 2025 16:13:30 +0800 Chao Li wrote: > Now, all transactions are processed, there is no failure, I think that is > expected, because syncpipeline should rollback failures, so that all script > should succeed. > > Feels to me like, because of introducing the new discardAvailableRes

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-13 Thread Yugo Nagata
On Thu, 13 Nov 2025 16:13:30 +0800 Chao Li wrote: > Now, all transactions are processed, there is no failure, I think that is > expected, because syncpipeline should rollback failures, so that all script > should succeed. > > Feels to me like, because of introducing the new discardAvailableRes

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-13 Thread Akshay Joshi
On Thu, Nov 13, 2025 at 10:18 AM Quan Zongliang wrote: > > > On 11/13/25 12:17 PM, Quan Zongliang wrote: > > > > > > On 11/12/25 8:04 PM, Akshay Joshi wrote: > >> Hi Hackers, > >> > >> I’m submitting a patch as part of the broader Retail DDL Functions > >> project described by Andrew Dunstan http

Re: Proposal: Conflict log history table for Logical Replication

2025-11-13 Thread shveta malik
On Wed, Nov 12, 2025 at 3:14 PM shveta malik wrote: > > On Wed, Nov 12, 2025 at 2:40 PM Dilip Kumar wrote: > > > > On Wed, Nov 12, 2025 at 12:21 PM shveta malik > > wrote: > > > > > > On Fri, Sep 26, 2025 at 4:42 PM Dilip Kumar wrote: > > > > > > > > > I agree that marking tables with a flag t

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-13 Thread Akshay Joshi
On Thu, Nov 13, 2025 at 9:47 AM Quan Zongliang wrote: > > > On 11/12/25 8:04 PM, Akshay Joshi wrote: > > Hi Hackers, > > > > I’m submitting a patch as part of the broader Retail DDL Functions > > project described by Andrew Dunstan https://www.postgresql.org/message- > > id/945db7c5-be75-45bf-b55

Re: Idea to enhance pgbench by more modes to generate data (multi-TXNs, UNNEST, COPY BINARY)

2025-11-13 Thread Ashutosh Bapat
Hi Boris, On Wed, Nov 12, 2025 at 3:25 AM Boris Mironov wrote: > > Hello hackers, > > For some of my specific hardware tests I needed to generate big databases > well beyond RAM size. Hence I turned to pgbench tool and its default 2 modes > for client- and server-side generation for TPC-B tests

Re: Suggestion to add --continue-client-on-abort option to pgbench

2025-11-13 Thread Chao Li
> On Nov 13, 2025, at 17:40, Yugo Nagata wrote: > > The following script: > > \startpipeline > > \syncpipeline > > \endpipeline > > can be considered equivalent to: > > BEGIN; > > END; > BEGIN; > > END; This looks like that every \sysnpipeline will start a new transaction, is that tru

Re: DOCS: Missing tags for some SEQUENCE fields

2025-11-13 Thread Chao Li
> On Nov 13, 2025, at 13:17, Peter Smith wrote: > > Hi, > > While reviewing the recent patches for SEQUENCE documentation I found > [1] a few more instances where the tag should have been > used for some of the sequence fields (per the recent push [2]). > > PSA patch v1 to address these. >

Re: [PATCH] Add pg_get_database_ddl() function to reconstruct CREATE DATABASE statement

2025-11-13 Thread Quan Zongliang
On 11/13/25 4:30 PM, Akshay Joshi wrote: On Thu, Nov 13, 2025 at 9:47 AM Quan Zongliang > wrote: On 11/12/25 8:04 PM, Akshay Joshi wrote: > Hi Hackers, > > I’m submitting a patch as part of the broader Retail DDL Functions > project d

Re: [PATCH] Refactor bytea_sortsupport(), take two

2025-11-13 Thread John Naylor
On Mon, Nov 10, 2025 at 6:22 PM Aleksander Alekseev wrote: > OK, I made sure all the comments are in place. I referenced > corresponding varlena.c functions where the comments were too long to > my taste to repeat them entirely. Looks mostly okay. The "See varstr_abbrev_abort() for more details.

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

2025-11-13 Thread Amit Kapila
On Wed, Nov 12, 2025 at 3:36 PM Masahiko Sawada wrote: > > I've attached the updated version patch. I addressed all comments I > got so far, and made some cosmetic changes. > Few comments: 1. BTW, to accomplish what we do in UpdateLogicalDecodingStatusEndOfRecovery(), can't we follow a logic simi

Re: Issue with logical replication slot during switchover

2025-11-13 Thread Alexander Kukushkin
Hi Amit, On Thu, 13 Nov 2025 at 09:42, Amit Kapila wrote: > > Say, the only operations that happened are slot-drop-recreate and or > some operations on unlogged tables. Why then pg_rewind is required? Clean shut down always writes checkpoint record to WAL and updates pg_control. Regards, -- A

Re: [PATCH] Add pg_get_subscription_ddl() function

2025-11-13 Thread Álvaro Herrera
On 2025-Nov-13, Peter Smith wrote: > 1. Question - is it deliberate to *always* return DLL with every > possible option assigned, even if those are just the option default > values? e.g. For something like the CREATE PUBLICATION command the > string returned could be only half the size if it acc