Re: proposal: schema variables

2024-11-16 Thread Pavel Stehule
so 16. 11. 2024 v 15:56 odesílatel Wolfgang Walther napsal: > Dmitry Dolgov: > > This sounds to me like an argument against allowing name clashing between > > variables and tables. It makes even more sense, since session variables > are in > > many ways similar to tables. > > +1 > It doesn't hel

Re: define pg_structiszero(addr, s, r)

2024-11-16 Thread Bertrand Drouvot
Hi, On Sat, Nov 16, 2024 at 11:42:54AM -0300, Ranier Vilela wrote: > > Em sex., 15 de nov. de 2024 às 11:43, Bertrand Drouvot < > > bertranddrouvot...@gmail.com> escreveu: > > > >> while that should be: > >> > >> " > >> static inline bool > >> pg_memory_is_all_zeros_simd(const void *p, const void

Re: proposal: schema variables

2024-11-16 Thread Pavel Stehule
so 16. 11. 2024 v 23:07 odesílatel Pavel Stehule napsal: > > > so 16. 11. 2024 v 18:13 odesílatel Wolfgang Walther < > walt...@technowledgy.de> napsal: > >> Pavel Stehule: >> > (global (temp)) table can hold 0, 1 or more rows (and rows are always >> > composite of 0..n fields). The variable holds

Re: proposal: schema variables

2024-11-16 Thread Pavel Stehule
so 16. 11. 2024 v 23:49 odesílatel Pavel Stehule napsal: > > > so 16. 11. 2024 v 15:27 odesílatel Dmitry Dolgov <9erthali...@gmail.com> > napsal: > >> > On Sat, Nov 16, 2024 at 07:10:31AM GMT, Pavel Stehule wrote: >> >> Sorry, got distracted. Let me try to answer step by step. >> >> > > As far as

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-11-16 Thread Alexander Lakhin
Hello Tom and Andres, 17.11.2024 05:33, Tom Lane wrote: Andres Freund writes: Another failure in CI, that cleared up after a retry: +WARNING: could not get result of cancel request due to timeout Yeah. This has been happening off-and-on in the buildfarm ever since we added that test. I'm

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-11-16 Thread Tom Lane
Andres Freund writes: > On 2024-10-01 15:00:00 +0300, Alexander Lakhin wrote: >> One month later, treehopper has found a way to break that test: [1]. >> The failure log contains: >> 2024-09-30 19:35:01.485 UTC [3201033:12] pg_regress/query_cancel WARNING:  >> could not get result of cancel request

CI CompilerWarnings test fails on 15 in mingw_cross_warning

2024-11-16 Thread Andres Freund
Hi, See https://cirrus-ci.com/task/5880116075560960 [18:14:04.821] time make -s -j${BUILD_JOBS} world-bin [18:15:49.090] pg_locale.c: In function ‘get_collation_actual_version’: [18:15:49.090] pg_locale.c:1763:42: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long u

ci: Macos failures due to MacPorts behaviour change

2024-11-16 Thread Andres Freund
Hi, I noticed that CI tasks on the postgres' github repo fail for some branches on macos [1]. Initially I thought the problem was related to some outdated cache of the macports installation. And indeed clearing that out does fix the issue - but only temporarily and fixing one branch would cause s

Re: Index AM API cleanup

2024-11-16 Thread Kirill Reshke
On Thu, 31 Oct 2024 at 15:02, Mark Dilger wrote: > > > > > On Oct 30, 2024, at 12:54 PM, Peter Eisentraut wrote: > > > > So this is the idea. To take a step back, I can see the following > > options: > > > > 1. Require all index AMs to use btree-compatible strategy numbers. > > (Previously rej

Re: proposal: schema variables

2024-11-16 Thread Pavel Stehule
so 16. 11. 2024 v 15:27 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > > On Sat, Nov 16, 2024 at 07:10:31AM GMT, Pavel Stehule wrote: > > Sorry, got distracted. Let me try to answer step by step. > > > > As far as I recall, last time this topic was discussed in hackers, two > > > optio

Re: proposal: schema variables

2024-11-16 Thread Pavel Stehule
so 16. 11. 2024 v 18:13 odesílatel Wolfgang Walther napsal: > Pavel Stehule: > > (global (temp)) table can hold 0, 1 or more rows (and rows are always > > composite of 0..n fields). The variable holds a value of some type. > > Proposed session variables are like plpgsql variables (only with > > d

Re: Set query_id for query contained in utility statement

2024-11-16 Thread Alvaro Herrera
On 2024-Oct-24, Michael Paquier wrote: > Track more precisely query locations for nested statements I just noticed that this commit broke pgaudit pretty thoroughly. I'm not sure if this means pgaudit needs changes, or this commit needs to be reconsidered in some way; at this point I'm just raisi

Re: CI and test improvements

2024-11-16 Thread Justin Pryzby
On Sat, Nov 16, 2024 at 03:22:57PM -0500, Andres Freund wrote: > Hi, > > On 2024-08-06 14:10:15 -0500, Justin Pryzby wrote: > > > > + # The commit that this branch is rebased on. There's no easy way to > > > > find this. > > > > > > I don't think that's true, IIRC I've complained about it befo

Re: CI and test improvements

2024-11-16 Thread Andres Freund
Hi, On 2024-08-06 14:10:15 -0500, Justin Pryzby wrote: > > > + # The commit that this branch is rebased on. There's no easy way to > > > find this. > > > > I don't think that's true, IIRC I've complained about it before. We can do > > something like: > > cfbot now exposes it, so it'd be trivi

Re: UUID v7

2024-11-16 Thread Andrey M. Borodin
> On 15 Nov 2024, at 06:44, Masahiko Sawada wrote: > > IIUC v29 patch implements UUIDv7 generation in this way. So I've > reviewed v29 patch and here are some review comments: I believe I've addressed all your comments in v31 with one exception: get_clock_timestamp_ns() does not return ascendin

Re: Potential ABI breakage in upcoming minor releases

2024-11-16 Thread Tom Lane
Christoph Berg writes: > Re: Noah Misch >> I'm no longer arguing against the undo, but I'm trying to explain the >> consequences rigorously. > I'll just have to explain what happened here to the Debian security > team who just released the 16.5 update. We can do 16.6 on top of that. Fixes are pu

Re: proposal: schema variables

2024-11-16 Thread Wolfgang Walther
Pavel Stehule: (global (temp)) table can hold 0, 1 or more rows (and rows are always composite of 0..n fields). The variable holds a value of some type. Proposed session variables are like plpgsql variables (only with different scope). In Postgres there is a difference between a scalar variabl

Re: proposal: schema variables

2024-11-16 Thread Pavel Stehule
Hi > As a side note, I've recently caught myself thinking "it would be cool to > have > session variables here". The use case was preparing a policy for RLS, > based on > some session-level data set by an application. This session-level data is > of a > composite data type, so simple current_sett

Improved psql tab completion for joins

2024-11-16 Thread Andreas Karlsson
Hi, Here is a set of small patches which improve the tab completion of joins in psql. The completion of select queries and DML is very primitive in psql but since we already have completion of relation names after FROM and JOIN I think these small additions fit and at least I find them useful

Re: Improving btree performance through specializing by key shape, take 2

2024-11-16 Thread Dmitry Dolgov
> On Mon, Mar 04, 2024 at 09:39:37PM GMT, Matthias van de Meent wrote: > Performance > > > I haven't retested the results separately yet, but I assume the > performance results of [2] hold mostly true in comparing 0002 vs 0007. > I will do a performance (re-)evaluation of only this patch i

Re: Potential ABI breakage in upcoming minor releases

2024-11-16 Thread David E. Wheeler
On Nov 15, 2024, at 19:30, Tom Lane wrote: > That text says exactly nothing about what specific code changes to > make or not make. I'm not sure offhand where (or if) we have this > documented, but there's an idea that adding fields at the end of > a struct is safer ABI-wise than putting them in

Re: logical replication: restart_lsn can go backwards (and more), seems broken since 9.4

2024-11-16 Thread Tom Lane
Tomas Vondra writes: > Thanks. I see you only backpatched to 13, but I believe 12 will be > rewrapped too. So maybe backpatch to 12 too? Please don't. The release team already discussed this and determined that we want to push 12.22 with only the ROLE-regression fix. v12 is not "back in support

Re: proposal: schema variables

2024-11-16 Thread Wolfgang Walther
Dmitry Dolgov: This sounds to me like an argument against allowing name clashing between variables and tables. It makes even more sense, since session variables are in many ways similar to tables. +1 My mental model of a session variable is similar to a single-row, optionally global temporary

Re: proposal: schema variables

2024-11-16 Thread Dmitry Dolgov
> On Sat, Nov 16, 2024 at 07:10:31AM GMT, Pavel Stehule wrote: Sorry, got distracted. Let me try to answer step by step. > > As far as I recall, last time this topic was discussed in hackers, two > > options were proposed: the one with VARIABLE(name), what you mention > > here; and another one wi

Re: define pg_structiszero(addr, s, r)

2024-11-16 Thread Ranier Vilela
Em sáb., 16 de nov. de 2024 às 11:40, Ranier Vilela escreveu: > > Em sex., 15 de nov. de 2024 às 11:43, Bertrand Drouvot < > bertranddrouvot...@gmail.com> escreveu: > >> Hi, >> >> On Fri, Nov 15, 2024 at 09:54:33AM -0300, Ranier Vilela wrote: >> > There is a tiny typo with V13. >> > + /* "len" in

Re: Potential ABI breakage in upcoming minor releases

2024-11-16 Thread Christoph Berg
Re: Noah Misch > I'm no longer arguing against the undo, but I'm trying to explain the > consequences rigorously. I'll just have to explain what happened here to the Debian security team who just released the 16.5 update. We can do 16.6 on top of that. Christoph

Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2024-11-16 Thread jian he
On Sat, Nov 9, 2024 at 8:55 PM Kirill Reshke wrote: > > > > But while I was trying to implement that, I realized that I don't > > > understand v4 of this patch. My misunderstanding is about > > > `t_on_error_null` tests. We are allowed to insert a NULL value for the > > > first column of t_on_err

Re: Improve the error message for logical replication of regular column to generated column.

2024-11-16 Thread Shlok Kyal
On Fri, 15 Nov 2024 at 15:57, Shubham Khanna wrote: > > On Thu, Nov 14, 2024 at 2:09 PM Peter Smith wrote: > > > > Hi Shubham, > > > > +1 for the patch idea. > > > > Improving this error message for subscriber-side generated columns > > will help to remove some confusion. > > > > Here are my revi

Re: Disallow UPDATE/DELETE on table with unpublished generated column as REPLICA IDENTITY

2024-11-16 Thread vignesh C
On Sat, 16 Nov 2024 at 00:10, Shlok Kyal wrote: > > Thanks for providing the comments. I have fixed all the comments and > attached the updated patch. Few comments: 1) The replident_has_valid_gen_cols flag is set when either an update or delete operation is published by the publication. +

Re: Allowing pg_recvlogical to create temporary replication slots

2024-11-16 Thread Torsten Förtsch
On Tue, Nov 12, 2024 at 3:30 PM Dickson S. Guedes wrote: Are you planning to add changes in docs? Would be important to have > this clarification in there also, IMHO. > Thanks. Here is an updated version of the patch including documentation. From 80e2894d3289cebd9c12d457620bf2965cc0252d Mon Sep

Re: logical replication: restart_lsn can go backwards (and more), seems broken since 9.4

2024-11-16 Thread Tomas Vondra
On 11/16/24 08:26, Masahiko Sawada wrote: > On Fri, Nov 15, 2024 at 9:48 AM Tomas Vondra wrote: >> >> >> >> On 11/15/24 18:40, Masahiko Sawada wrote: >>> On Thu, Nov 14, 2024 at 10:16 PM Amit Kapila >>> wrote: On Thu, Nov 14, 2024 at 7:08 AM Masahiko Sawada wrote: > >

Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2024-11-16 Thread Kirill Reshke
On Sat, 16 Nov 2024 at 13:27, jian he wrote: > > On Sat, Nov 9, 2024 at 8:55 PM Kirill Reshke wrote: > > > > > > > But while I was trying to implement that, I realized that I don't > > > > understand v4 of this patch. My misunderstanding is about > > > > `t_on_error_null` tests. We are allowed to

memory leak in pgoutput

2024-11-16 Thread by Yang
Hello, I recently noticed a unusually large memory consumption in pgoutput where "RelationSyncCache" is maintaining approximately 3 GB of memory while handling 15,000 tables. Upon investigating the cause, I found that "tts_tupleDescriptor" in both "old_slot" and "new_slot" wouldn't be freed befor