Re: [PATCH] Add native PIVOT syntax for SQL Server/Oracle compatibility

2025-11-26 Thread Kirill Reshke
On Tue, 25 Nov 2025 at 13:11, Myles Lewis wrote: > > I've developed a patch that adds native PIVOT syntax to PostgreSQL, > enabling SQL Server and Oracle-style pivot queries. > > Example: > SELECT region > FROM sales > PIVOT (SUM(revenue) FOR quarter IN ('Q1', 'Q2', 'Q3', 'Q4')); > > Key fea

Re: [PATCH] psql: add size-based sorting options (O/o) for tables and indexes

2025-11-26 Thread Euler Taveira
On Wed, Nov 26, 2025, at 4:48 AM, M.Atıf Ceylan wrote: > Hello, > This patch adds two new meta-command modifiers for \dt(+) and \di(+): > > - O : sort by total relation size descending > - o : sort by total relation size ascending > Thanks for your contribution. Register your patch in the ne

Re: Patch: VACUUM should ignore (CREATE |RE)INDEX CONCURRENTLY for xmin horizon calculations

2025-11-26 Thread Matthias van de Meent
On Wed, 26 Nov 2025 at 12:07, Hannu Krosing wrote: > > So what are the options for a clean fix ? > (the "Discussion: > https://postgr.es/m/17485-396609c6925b982d%40postgresql.org"; link > gives 503 back so can't immediately check myself) > > Do we also need to make sure that CIC will not miss hot-

Re: Second RewriteQuery complains about first RewriteQuery in edge case

2025-11-26 Thread Kirill Reshke
On Wed, 26 Nov 2025 at 13:34, Bernice Southey wrote: > > Hi, Hi! > I get an odd error if a CTE inserts a GENERATED ALWAYS AS IDENTITY > column, and then tries to modify an automatically updatable view. > > create table t(i int generated always as identity); > create table base(j int); > create v

Re: Refactoring: Use soft error reporting for *_opt_overflow functions of date/timestamp

2025-11-26 Thread Amit Langote
Hi, On Wed, Nov 26, 2025 at 8:43 PM Michael Paquier wrote: > On Wed, Nov 26, 2025 at 03:09:25PM +0530, Amul Sul wrote: > > This continues the previous refactoring commit [1] where we adopted > > soft error reporting for some numeric functions. This patch applies > > the same pattern to the date/t

Re: IPC/MultixactCreation on the Standby server

2025-11-26 Thread Álvaro Herrera
On 2025-Nov-25, Heikki Linnakangas wrote: > Álvaro, are you planning to commit this? I've been looking at this code > lately for the 64-bit mxoffsets patch, so I could also pick it up if you'd > like. I would be glad if you can get it over the finish line. I haven't found time/energy to review i

Re: refactor AlterDomainAddConstraint (alter domain add constraint)

2025-11-26 Thread Alvaro Herrera
On 2025-Nov-26, jian he wrote: > (IMHO, it looks like big efforts to solve the same problem, also these bit > fiddling for domain constraint unlikely to change in the future, e.g. we are > unlike to add DEFERRABLE, INITIALLY DEFERRED, NO INHERIT constraints to > domain.) True. I was thinking we

Re: transformJsonFuncExpr pathspec cache lookup failed

2025-11-26 Thread Kirill Reshke
On Wed, 26 Nov 2025 at 10:32, Amit Langote wrote: > > Hi, > > On Wed, Nov 19, 2025 at 11:55 AM jian he wrote: > > On Fri, Nov 7, 2025 at 2:26 PM Kirill Reshke wrote: > > > > > > Hi! > > > I tried your fix and this indeed fixes an issue. Two minor comments: > > > > > > First, > > > in the `src/ba

Re: transformJsonFuncExpr pathspec cache lookup failed

2025-11-26 Thread jian he
On Wed, Nov 26, 2025 at 3:32 PM Amit Langote wrote: > > > > First, > > > in the `src/backend/parser/parse_expr.c` fil there are multiple > > > examples of working with `coerce_to_target_type`, they all share > > > different coding practice: > > > > > > ``` > > > coerced_expr = coerce_to_target_typ

Re: Some optimizations for COALESCE expressions during constant folding

2025-11-26 Thread Richard Guo
On Tue, Nov 25, 2025 at 10:16 PM David Rowley wrote: > uhh, of course it is. That's what I did in [1] for Consts. Doing it > this way means we'll not need to modify the constant folding code (or > whichever other code wants to know when an Expr can't be NULL) every > time we think of something new

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

2025-11-26 Thread KAZAR Ayoub
Hello, On Wed, Nov 19, 2025 at 10:01 PM Nathan Bossart wrote: > On Tue, Nov 18, 2025 at 05:20:05PM +0300, Nazir Bilal Yavuz wrote: > > Thanks, done. > > I took a look at the v3 patches. Here are my high-level thoughts: > > +/* > + * Parse data and transfer into line_buf. To get benefit f

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

2025-11-26 Thread Amit Kapila
On Wed, Nov 26, 2025 at 10:31 AM Amit Kapila wrote: > > On Wed, Nov 26, 2025 at 5:59 AM Masahiko Sawada wrote: > > > > > > After thinking of this case, I'm concerned that we would hit the > > existing similar assertion failures or assertions that future changes > > could introduce because the val

Re: Refactoring: Use soft error reporting for *_opt_overflow functions of date/timestamp

2025-11-26 Thread Michael Paquier
On Wed, Nov 26, 2025 at 03:09:25PM +0530, Amul Sul wrote: > This continues the previous refactoring commit [1] where we adopted > soft error reporting for some numeric functions. This patch applies > the same pattern to the date/timestamp function. The change ensures > consistency by utilizing the

Re: Additional info for CREATE ROLE with REPLICATION

2025-11-26 Thread Marcos Pegoraro
Em ter., 25 de nov. de 2025 às 23:22, Chao Li escreveu: > > <0001-Master - Additional info for create role with REPLICATION.diff> > ok, I understand that, but the REPLICATION paragraph says "A role having the REPLICATION attribute is a very highly privileged role". So the user thinks, well, if t

Re: The pgperltidy diffs in HEAD

2025-11-26 Thread Daniel Gustafsson
> On 26 Nov 2025, at 12:11, Dagfinn Ilmari Mannsåker wrote: > This seems unrelated to the rest of the patch patch. Yeah, I was working on a docs-patch in the same tree and only realized this morning that I had accidentally included that part =) >> diff --git a/src/tools/pgindent/pgperltidy b/sr

Re: The pgperltidy diffs in HEAD

2025-11-26 Thread Dagfinn Ilmari Mannsåker
Daniel Gustafsson writes: > [2. text/x-diff; v2_perltidyversion.diff] > diff --git a/doc/src/sgml/func/func-string.sgml > b/doc/src/sgml/func/func-string.sgml > index 7ad1436e5f8..646b5d6d8c4 100644 > --- a/doc/src/sgml/func/func-string.sgml > +++ b/doc/src/sgml/func/func-string.sgml > @@ -173,7

Re: Patch: VACUUM should ignore (CREATE |RE)INDEX CONCURRENTLY for xmin horizon calculations

2025-11-26 Thread Hannu Krosing
So what are the options for a clean fix ? (the "Discussion: https://postgr.es/m/17485-396609c6925b982d%40postgresql.org"; link gives 503 back so can't immediately check myself) Do we also need to make sure that CIC will not miss hot-pruned tuples ? What is the exact mechanism for missing them ? O

Re: Proposal: Conflict log history table for Logical Replication

2025-11-26 Thread shveta malik
On Wed, Nov 26, 2025 at 2:05 PM shveta malik wrote: > > On Tue, Nov 25, 2025 at 4:06 PM Dilip Kumar wrote: > > > > On Tue, Nov 25, 2025 at 1:59 PM Dilip Kumar wrote: > > > > > > > On a separate note, I've been considering how to manage conflict log > > insertions when an error causes the outer t

Second RewriteQuery complains about first RewriteQuery in edge case

2025-11-26 Thread Bernice Southey
Hi, I get an odd error if a CTE inserts a GENERATED ALWAYS AS IDENTITY column, and then tries to modify an automatically updatable view. create table t(i int generated always as identity); create table base(j int); create view v as select * from base; with cte as (insert into t default values ret

Re: [PATCH] Expose checkpoint timestamp and duration in pg_stat_checkpointer

2025-11-26 Thread Soumya S Murali
On Mon, Nov 24, 2025 at 3:37 PM Álvaro Herrera wrote: > > On 2025-Nov-24, Michael Banck wrote: > > > In general I doubt how much those gauges (as oppposed to counters) only > > pertaining to the last checkpoint are useful in pg_stat_checkpointer. > > What would be the use case for those two values

Re: How can end users know the cause of LR slot sync delays?

2025-11-26 Thread Shlok Kyal
On Wed, 26 Nov 2025 at 14:23, Zhijie Hou (Fujitsu) wrote: > > On Wednesday, November 26, 2025 2:29 PM Shlok Kyal > wrote: > > I have also addressed the remaining comments and attached the updated > > patch. > > Thanks for updating the patch, I have few comments: > > 1. > +/* > + * Map a SlotSync

Re: [PATCH] Expose checkpoint timestamp and duration in pg_stat_checkpointer

2025-11-26 Thread Soumya S Murali
On Mon, Nov 24, 2025 at 2:48 PM Michael Banck wrote: > > Hi, > > On Mon, Nov 24, 2025 at 11:40:44AM +0530, Soumya S Murali wrote: > > While debugging checkpointer write behavior, I recently found some of the > > enhancements related to extending pg_stat_checkpointer by including > > checkpoint typ

Refactoring: Use soft error reporting for *_opt_overflow functions of date/timestamp

2025-11-26 Thread Amul Sul
Hi, The attached patch proposes to use soft error reporting infrastructure for the date/timestamp conversion function, which currently depends on integer variables to control error throwing. This continues the previous refactoring commit [1] where we adopted soft error reporting for some numeric

Re: Re: Serverside SNI support in libpq

2025-11-26 Thread Dewei Dai
Hi Daniel, I just reviewed the v11 patch and got a few comments: 1 - commit message ```This adds support for serverside SNI such that certficate/key handling ``` Typo: certficate -> certificate 2 -be-secure-openssl.c ```* host/snimode match, but we need something to drive the hand- shake t

Re: [PATCH] Add error hints for invalid COPY options

2025-11-26 Thread Sugamoto Shinya
2025年11月25日(火) 6:50 Nathan Bossart : > On Mon, Nov 24, 2025 at 11:56:34AM -0800, Masahiko Sawada wrote: > > On Sat, Nov 22, 2025 at 8:33 PM Sugamoto Shinya > wrote: > >> This follows the pattern already used elsewhere in PostgreSQL for > providing > >> helpful error hints to users. > > > > Given

RE: How can end users know the cause of LR slot sync delays?

2025-11-26 Thread Zhijie Hou (Fujitsu)
On Wednesday, November 26, 2025 2:29 PM Shlok Kyal wrote: > I have also addressed the remaining comments and attached the updated > patch. Thanks for updating the patch, I have few comments: 1. +/* + * Map a SlotSyncSkipReason enum to a human-readable string + */ +static char * +GetSlotSyncSkip

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

2025-11-26 Thread shveta malik
A few comments: 1) +/* + * Structure holding parameters that need to be freed on error in + * pg_sync_replication_slots() + */ +typedef struct SlotSyncApiFailureParams +{ + WalReceiverConn *wrconn; + List *slot_names; +} SlotSyncApiFailureParams; + We can get rid of it now as we do not use it.

Re: Proposal: Conflict log history table for Logical Replication

2025-11-26 Thread shveta malik
On Tue, Nov 25, 2025 at 4:06 PM Dilip Kumar wrote: > > On Tue, Nov 25, 2025 at 1:59 PM Dilip Kumar wrote: > > > > On a separate note, I've been considering how to manage conflict log > insertions when an error causes the outer transaction to abort, which > seems to be a non-trivial. > > Here is w

Re: Bug in amcheck?

2025-11-26 Thread Heikki Linnakangas
On 25/11/2025 22:51, Peter Geoghegan wrote: On Tue, Nov 25, 2025 at 3:03 PM Heikki Linnakangas wrote: To fix this, I guess we need to teach bt_index_parent_check() about half-dead pages. Anyone volunteer to write that patch? It's not like bt_index_parent_check doesn't generally know about the

Re: Performance issues with parallelism and LIMIT

2025-11-26 Thread David Geier
On 19.11.2025 21:03, Tomas Vondra wrote: > Right, that's why I suggested to have a function the nodes would call in > suitable places. > I like that idea, even though it would still not work while a node is doing the crunching. That is after it has pulled all rows and before it can

Re: [buildfarm related] Machines gcc experimental failed test_lfind

2025-11-26 Thread John Naylor
On Wed, Nov 26, 2025 at 1:08 PM Hayato Kuroda (Fujitsu) wrote: > While seeing the buildfarm, I found that recently regression test for modules > sometimes failed [1]. Typical example is [2] and failed at simd.h. > The issue happened over branches, and they use gcc experimental. Based on that > I f