Re: proposal: schema variables

2024-11-15 Thread Pavel Stehule
st 13. 11. 2024 v 17:35 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > > On Sun, Nov 10, 2024 at 06:51:40PM GMT, Pavel Stehule wrote: > > ne 10. 11. 2024 v 17:19 odesílatel Pavel Stehule < > pavel.steh...@gmail.com> > > napsal: > > I thought a lot of time about better solutions for ide

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

2024-11-15 Thread Masahiko Sawada
\230void (*)(struct PlannerInfo *, struct IndexPath *, double, double *, double *, double *, double *, double *)\342\200\231} [-Wincompatible-pointer-types] 331 | info->amcostestimate = amroutine->amcostestimate; |

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Tom Lane
Noah Misch writes: > Currently, we have Christoph Berg writing "I'd say the ship has sailed, a new > release would now break things the other way round." and you writing in favor > of undoing. It think it boils down to whether you want N people to recompile > twice or M>N people to recompile once

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread David E. Wheeler
On Nov 15, 2024, at 16:13, Tom Lane wrote: > In other words, our current guidelines > for preserving ABI compatibility actually *created* this disaster, > because the HEAD change was fine from an ABI standpoint but what > was done in back branches was not. So we do need to rethink how > that's w

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Tom Lane
"David E. Wheeler" writes: > On Nov 15, 2024, at 16:13, Tom Lane wrote: >> In other words, our current guidelines >> for preserving ABI compatibility actually *created* this disaster, >> because the HEAD change was fine from an ABI standpoint but what >> was done in back branches was not. So we

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Noah Misch
On Fri, Nov 15, 2024 at 05:37:01PM -0500, Tom Lane wrote: > Noah Misch writes: > > Currently, we have Christoph Berg writing "I'd say the ship has sailed, a > > new > > release would now break things the other way round." and you writing in > > favor > > of undoing. It think it boils down to wh

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Noah Misch
On Fri, Nov 15, 2024 at 03:29:21PM -0500, Tom Lane wrote: > Noah Misch writes: > > On Fri, Nov 15, 2024 at 10:09:54AM -0500, Tom Lane wrote: > >> I'm starting to lean to the opinion that we need a re-wrap. > > > Perhaps. Even if we do rewrap for some reason, it's not a given that > > restoring t

IMPORTANT: Out-of-cycle release scheduled for November 21, 2024

2024-11-15 Thread Jonathan S. Katz
We're scheduling an out-of-cycle release on November 21, 2024 to address two regressions that were released as part of the November 14, 2024 update release[1]. As part of this release, we will issue fixes for all supported versions (17.2, 16.6, 15.10, 14.15, 13.20), and for 12.22, even though P

Re: Parallel heap vacuum

2024-11-15 Thread Masahiko Sawada
On Wed, Nov 13, 2024 at 3:10 AM Hayato Kuroda (Fujitsu) wrote: > > Dear Sawada-san, > > > TidStoreBeginIterateShared() is designed for multiple parallel workers > > to iterate a shared TidStore. During an iteration, parallel workers > > share the iteration state and iterate the underlying radix tr

Re: Optimizing FastPathTransferRelationLocks()

2024-11-15 Thread Heikki Linnakangas
On 12/11/2024 03:16, Fujii Masao wrote: Hi, I've identified some opportunities to optimize FastPathTransferRelationLocks(), which transfers locks with a specific lock tag from per-backend fast- path arrays to the shared hash table. The attached patch includes these enhancements. Currently, Fa

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Tom Lane
After some quick checking with "git diff", I can confirm that there is no ABI break for ResultRelInfo in v12 or v13. To fix it in v14-v17, we could do this: diff --git a/src/include/nodes/execnodes.h b/src/include/nodes/execnodes.h index 418c81f4be..17b0ec5138 100644 --- a/src/include/nodes/execn

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Tom Lane
Noah Misch writes: > On Fri, Nov 15, 2024 at 10:09:54AM -0500, Tom Lane wrote: >> I'm starting to lean to the opinion that we need a re-wrap. > Perhaps. Even if we do rewrap for some reason, it's not a given that > restoring the old struct size is net beneficial. If we restore the old struct >

Re: CSN snapshots in hot standby

2024-11-15 Thread Heikki Linnakangas
On 29/10/2024 18:33, Heikki Linnakangas wrote: I added two tests to the test suite:     master patched insert-all-different-xids: 0.00027    0.00019 s / iteration insert-all-different-subxids:  0.00023    0.00020 s / iteration insert-all-different-xids: Open

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Noah Misch
On Sat, Nov 16, 2024 at 12:10:06AM +0530, Pavan Deolasee wrote: > On Fri, Nov 15, 2024 at 11:39 PM Pavan Deolasee > wrote: > > Looking more carefully at the usage of `ResultRelInfo` in the PGD code, I > > think we might also be impacted by it. At one place, we loop through the > > `es_result_rela

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Pavan Deolasee
On Fri, Nov 15, 2024 at 11:39 PM Pavan Deolasee wrote: > > Looking more carefully at the usage of `ResultRelInfo` in the PGD code, I > think we might also be impacted by it. At one place, we loop through the > `es_result_relations` array and a size mismatch there will cause problems. > Interestin

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

2024-11-15 Thread Shlok Kyal
On Fri, 15 Nov 2024 at 20:31, vignesh C wrote: > > On Fri, 15 Nov 2024 at 16:45, Shlok Kyal wrote: > > > > Thanks for providing the comments > > > > On Fri, 15 Nov 2024 at 10:59, vignesh C wrote: > > > > > > On Thu, 14 Nov 2024 at 15:51, Shlok Kyal wrote: > > > > > > > > Thanks for providing th

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Noah Misch
On Fri, Nov 15, 2024 at 11:39:24PM +0530, Pavan Deolasee wrote: > On Fri, Nov 15, 2024 at 11:22 PM Noah Misch wrote: > > > I'm starting to lean to the opinion that we need a re-wrap. > > > > Perhaps. Even if we do rewrap for some reason, it's not a given that > > restoring the old struct size is

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread David E. Wheeler
On Nov 15, 2024, at 12:52, Noah Misch wrote: > Either way, users of timescaledb should rebuild timescaledb for every future > PostgreSQL minor release. Ugh, was really hoping to get to a place where we could avoid requiring rebuilds of any extension for every minor release. :-( We even added AB

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-15 Thread Masahiko Sawada
On Thu, Nov 14, 2024 at 7:07 PM Peter Smith wrote: > > Hi Sawada-Sn, > > Here are some review comments for patch v8-0001. Thank you for the comments. > > == > contrib/test_decoding/sql/stats.sql > > 1. > +-- The INSERT changes are large enough to be spilled but not, because the > +-- transac

Re: Difference in dump from original and restored database due to NOT NULL constraints on children

2024-11-15 Thread Ashutosh Bapat
On Thu, Nov 14, 2024 at 6:08 PM Alvaro Herrera wrote: > > Hello Ashutosh, > > On 2024-Nov-14, Ashutosh Bapat wrote: > > > Because of the test I am developing under discussion at [1], I noticed > > that the DDLs dumped for inheritance children with NOT NULL > > constraints defer between original da

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

2024-11-15 Thread Tomas Vondra
On 11/15/24 04:26, Amit Kapila wrote: > On Wed, Nov 13, 2024 at 5:23 PM Tomas Vondra wrote: >> >> On 11/13/24 11:59, Amit Kapila wrote: >>> On Tue, Nov 12, 2024 at 12:43 PM Ashutosh Bapat >>> wrote: On Tue, Nov 12, 2024 at 12:02 PM Masahiko Sawada wrote: > > On Mon, Nov 1

Re: Improve error messages for database object stats manipulation functions during recovery

2024-11-15 Thread Fujii Masao
On 2024/11/15 20:59, Maxim Orlov wrote: +1 for the patch. Recently, one of our customer have tried to upgrade the replica, and, obviously, failed. I don't remember the exact error message, but for him it was not so clear that server is in recovery. Explicitly declaring error is the way to

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Pavan Deolasee
On Fri, Nov 15, 2024 at 11:22 PM Noah Misch wrote: > > > > I'm starting to lean to the opinion that we need a re-wrap. > > Perhaps. Even if we do rewrap for some reason, it's not a given that > restoring the old struct size is net beneficial. If we restore the old > struct > size in v16.6, thos

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

2024-11-15 Thread Tomas Vondra
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: >>> >>> Sure. I've attached the updated patch. I just added the commit message. >>> >> >> @@ -1815,6 +1818,8 @@ LogicalIncreaseRestar

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Noah Misch
On Fri, Nov 15, 2024 at 10:09:54AM -0500, Tom Lane wrote: > Aleksander Alekseev writes: > > Hi Macro, > >> The problem here is that because TimescaleDB compiled against 17.0 > >> assumes a struct size of 376 (on my laptop) while PostgreSQL allocated > >> the array with a struct size of 384, so the

Re: Improve error messages for database object stats manipulation functions during recovery

2024-11-15 Thread Fujii Masao
On 2024/11/13 6:09, Heikki Linnakangas wrote: On 25/10/2024 20:07, Fujii Masao wrote: Hi, When database object stats manipulation functions like pg_set_relation_stats() are run, they currently produce the following error and hint messages, which are "internal" and make it hard for users to

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

2024-11-15 Thread Masahiko Sawada
On Thu, Nov 14, 2024 at 10:16 PM Amit Kapila wrote: > > On Thu, Nov 14, 2024 at 7:08 AM Masahiko Sawada wrote: > > > > Sure. I've attached the updated patch. I just added the commit message. > > > > @@ -1815,6 +1818,8 @@ LogicalIncreaseRestartDecodingForSlot(XLogRecPtr > current_lsn, XLogRecPtr r

Re: psql: Add leakproof field to \dAo+ meta-command results

2024-11-15 Thread Dean Rasheed
On Fri, 15 Nov 2024 at 09:55, Yugo Nagata wrote: > > I'll fixed the patch to add leakproof info to \do+ results, but is it worth > leaving this info in \dAo+ results, too? > I suppose that might still be useful in some contexts. Looking through the complete list of psql meta-commands, "leakproof

Re: Remove a unnecessary backslash in CopyFrom

2024-11-15 Thread Fujii Masao
On 2024/11/12 12:31, Fujii Masao wrote: On 2024/11/12 11:58, Tender Wang wrote: Yugo Nagata mailto:nag...@sraoss.co.jp>> 于2024年11月12日周二 10:46写道:     Hi,     I found a unnecessary backslash in CopyFrom().             if (cstate->opts.reject_limit > 0 && \                 csta

nbtree VACUUM's REDO routine doesn't clear page's VACUUM cycle ID

2024-11-15 Thread Peter Geoghegan
Attached patch teaches btree_xlog_vacuum, nbtree VACUUM's REDO routine, to reset the target page's opaque->btpo_cycleid to 0. This makes the REDO routine match original execution, which seems like a good idea on consistency grounds. I propose this for the master branch only. -- Peter Geoghegan

Re: Extract numeric filed in JSONB more effectively

2024-11-15 Thread Dmitry Dolgov
> On Thu, Sep 12, 2024 at 03:03:18AM GMT, Andy Fan wrote: > > > I imagined you'd the patch should create a SupportRequestSimplify > > support function for jsonb_numeric() that checks if the input > > expression is an OpExpr with funcid of jsonb_object_field(). All you > > do then is ditch the cast

Re: POC: make mxidoff 64 bits

2024-11-15 Thread Maxim Orlov
On Fri, 15 Nov 2024 at 14:06, Heikki Linnakangas wrote: > Hmm, so if I understand correctly, this is related to how we determine > the length of the members array, by looking at the next multixid's > offset. This is explained in GetMultiXactIdMembers: > Correct. > If we accept that, we don't ne

Re: Update Unicode data to Unicode 16.0.0

2024-11-15 Thread Peter Eisentraut
On 12.11.24 10:40, Laurenz Albe wrote: On Mon, 2024-11-11 at 14:52 -0500, Joe Conway wrote: On 11/11/24 01:27, Peter Eisentraut wrote: Here is the patch to update the Unicode data to version 16.0.0. Normally, this would have been routine, but a few months ago there was some debate about how th

Re: Support LIKE with nondeterministic collations

2024-11-15 Thread Peter Eisentraut
On 15.11.24 05:26, jian he wrote: /* * Now build a substring of the text and try to match it against * the subpattern. t is the start of the text, t1 is one past the * last byte. We start with a zero-length string. */ t1 = t t1len = tlen; for (;;) { int cmp; CHECK_FOR_INTERRUPTS(); cmp = pg_str

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Tom Lane
Aleksander Alekseev writes: > Hi Macro, >> The problem here is that because TimescaleDB compiled against 17.0 >> assumes a struct size of 376 (on my laptop) while PostgreSQL allocated >> the array with a struct size of 384, so the pointer math no longer >> holds and the whichrel value becomes nons

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

2024-11-15 Thread vignesh C
On Fri, 15 Nov 2024 at 16:45, Shlok Kyal wrote: > > Thanks for providing the comments > > On Fri, 15 Nov 2024 at 10:59, vignesh C wrote: > > > > On Thu, 14 Nov 2024 at 15:51, Shlok Kyal wrote: > > > > > > Thanks for providing the comments. > > > > > > On Thu, 14 Nov 2024 at 12:22, vignesh C wro

Re: altering a column's collation leaves an invalid foreign key

2024-11-15 Thread Peter Eisentraut
On 14.11.24 12:35, jian he wrote: On Thu, Nov 14, 2024 at 4:04 PM Peter Eisentraut wrote: I propose that I go ahead with committing the v7 patch (with your typo fixes) and then we continue discussing these other issues afterwards in a separate thread. looks good to me. done but in create

Re: define pg_structiszero(addr, s, r)

2024-11-15 Thread Bertrand Drouvot
Hi, On Fri, Nov 15, 2024 at 09:54:33AM -0300, Ranier Vilela wrote: > There is a tiny typo with V13. > + /* "len" in the [sizeof(size_t) * 8, inf] range */ I think "[sizeof(size_t) * 8, inf[ range" is correct. Infinity can not be included into a interval. Thinking about it, actually, "[sizeof(si

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Noah Misch
On Fri, Nov 15, 2024 at 02:45:42PM +0100, Christoph Berg wrote: > Re: Noah Misch > > I'm hearing the only confirmed impact on non-assert builds is the need to > > recompile timescaledb. (It's unknown whether recompiling will suffice for > > timescaledb. For assert builds, six PGXN extensions need

Re: Interrupts vs signals

2024-11-15 Thread Heikki Linnakangas
Here is also a version of Thomas's "Use Latch for bgworker state change notification patch", rebased over the "Replace latches with Interrupts" patch. I used INTERRUPT_GENERAL_WAKEUP for the notification, as a straightforward replacement of setting the latch, but I wonder if we should have a

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Christoph Berg
Re: Noah Misch > I'm hearing the only confirmed impact on non-assert builds is the need to > recompile timescaledb. (It's unknown whether recompiling will suffice for > timescaledb. For assert builds, six PGXN extensions need recompilation.) Which 6 extensions are these? I re-ran the tests on a

Re: Enhancing Memory Context Statistics Reporting

2024-11-15 Thread Rahila Syed
Hi, On Thu, Nov 14, 2024 at 5:18 PM Alvaro Herrera wrote: > On 2024-Nov-14, Michael Paquier wrote: > > > Already mentioned previously at [1] and echoing with some surrounding > > arguments, but I'd suggest to keep it simple and just remove entirely > > the part of the patch where the stats infor

RE: doc: pgevent.dll location

2024-11-15 Thread Ryohei Takahashi (Fujitsu)
Hi, Thank you for your patch. The patch worked in my Windows build environment and pgevent.dll is installed to lib/ directory. Regards, Ryohei Takahashi

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

2024-11-15 Thread vignesh C
On Fri, 15 Nov 2024 at 15:57, Shubham Khanna wrote: > > I have fixed the given comments. The attached Patch contains the > required changes. Few comments: 1) a)You can mention that "If ismissing is true, report the error message as 'Missing replicated columns.' Otherwise, report the error message

Catching query cancelations in PLPython3u

2024-11-15 Thread Mat Arye
Hi All, We've been using plpython3u in our pgai project recently and recently got a PR[1] that uses some async code to communicate with openAI. That code uses async to be able to respond in a timely manner to queries being cancelled. Right now it uses a timed loop to test for query cancellations u

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Mats Kindahl
On Fri, Nov 15, 2024 at 12:51 PM Marco Slot wrote: > On Fri, Nov 15, 2024 at 9:57 AM Aleksander Alekseev > wrote: > > I'm working with the TimescaleDB dev team to fix these issues on the > > TimescaleDB side. > > I looked a bit at this out of interest. I see an assert failure in the > lines belo

Re: POC, WIP: OR-clause support for indexes

2024-11-15 Thread Alexander Korotkov
Hi, Alena! On Mon, Oct 28, 2024 at 6:55 PM Alena Rybakina wrote: > I may be wrong, but the original idea was to double-check the result with the > original expression. > > But I'm willing to agree with you. I think we should add transformed rinfo > variable through add_predicate_to_index_quals

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Mats Kindahl
On Thu, Nov 14, 2024 at 11:41 PM Noah Misch wrote: > On Thu, Nov 14, 2024 at 09:33:32PM +0100, Alvaro Herrera wrote: > > On 2024-Nov-14, Tom Lane wrote: > > > Alvaro Herrera writes: > > > > But timescale did crash: > > > > > > So what is timescale doing differently? > > > src/ts_catalog/catalog.

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Mats Kindahl
On Thu, Nov 14, 2024 at 9:33 PM Alvaro Herrera wrote: > On 2024-Nov-14, Tom Lane wrote: > > > Alvaro Herrera writes: > > > On 2024-Nov-14, Christoph Berg wrote: > > >> It didn't actually crash, true. > > > > > But timescale did crash: > > > > So what is timescale doing differently? > > No idea.

Re: FW: Building Postgres 17.0 with meson

2024-11-15 Thread Nazir Bilal Yavuz
Hi Mark, On Fri, 15 Nov 2024 at 16:01, Mark Hill wrote: > > On Wed, 14 Nov 2024 at 2:55PM(EST), Mark Hill wrote: > > > With openssl, zlib, and icu enabled in the setup, the ninja build fails > > trying to link src/backend/postgres.exe. > > There are 40 unresolved external symbol errors (see bel

Re: POC, WIP: OR-clause support for indexes

2024-11-15 Thread Alexander Korotkov
Hi, Jian! On Mon, Oct 28, 2024 at 9:19 AM jian he wrote: > > * NOTE: returns NULL if clause is an OR or AND clause; it is the > * responsibility of higher-level routines to cope with those. > */ > static IndexClause * > match_clause_to_indexcol(PlannerInfo *root, > Re

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Mats Kindahl
On Thu, Nov 14, 2024 at 5:13 PM Peter Eisentraut wrote: > On 14.11.24 15:35, Noah Misch wrote: > > The postgr.es/c/e54a42a standard would have us stop here. But I'm open > to > > treating the standard as mistaken and changing things. > > That text explicitly calls out that adding struct members

Re: define pg_structiszero(addr, s, r)

2024-11-15 Thread Ranier Vilela
Em sex., 15 de nov. de 2024 às 03:46, Bertrand Drouvot < bertranddrouvot...@gmail.com> escreveu: > Hi, > > On Fri, Nov 15, 2024 at 09:30:25AM +0900, Michael Paquier wrote: > > On Thu, Nov 14, 2024 at 12:33:20PM +, Bertrand Drouvot wrote: > > Anyway, as you say, the > > portability of v12 is OK

Re: pg_rewind WAL segments deletion pitfall

2024-11-15 Thread Alvaro Herrera
Hello Alexander, On 2024-Nov-14, Alexander Kukushkin wrote: > The commit message looks good to me, except maybe using a "master" word, > which I would suggest to replace with "primary". Oh wow, thanks for noticing that. I had already rewritten the commit message to some extent, but "master" had

Re: [PATCH] Fixed assertion issues in "pg_get_viewdef"

2024-11-15 Thread Man Zeng
Hi everyone, The following bug has been logged on the website: Bug reference: 18710 Logged by: Man Zeng Email address: zengman(at)halodbtech(dot)com PostgreSQL version: 14.14 Operating system: centos-8 Description: A prototype of the problem from https://github.com/

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Aleksander Alekseev
Hi Macro, > I looked a bit at this out of interest. I see an assert failure in the > lines below when running tests with TimescaleDB compiled against 17.0 > with 17.1 installed. Without the assertion it would anyway segfault > below. > > /* > * Usually, mt_lastResultIndex matches the targ

Re: Improve error messages for database object stats manipulation functions during recovery

2024-11-15 Thread Maxim Orlov
+1 for the patch. Recently, one of our customer have tried to upgrade the replica, and, obviously, failed. I don't remember the exact error message, but for him it was not so clear that server is in recovery. Explicitly declaring error is the way to go in my view. So, I consider this patch useful

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Marco Slot
On Fri, Nov 15, 2024 at 9:57 AM Aleksander Alekseev wrote: > I'm working with the TimescaleDB dev team to fix these issues on the > TimescaleDB side. I looked a bit at this out of interest. I see an assert failure in the lines below when running tests with TimescaleDB compiled against 17.0 with 1

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Alvaro Herrera
On 2024-Nov-14, Noah Misch wrote: > I'm hearing the only confirmed impact on non-assert builds is the need to > recompile timescaledb. (It's unknown whether recompiling will suffice for > timescaledb. For assert builds, six PGXN extensions need recompilation.) I > don't see us issuing another s

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

2024-11-15 Thread Shlok Kyal
Thanks for providing the comments On Fri, 15 Nov 2024 at 10:59, vignesh C wrote: > > On Thu, 14 Nov 2024 at 15:51, Shlok Kyal wrote: > > > > Thanks for providing the comments. > > > > On Thu, 14 Nov 2024 at 12:22, vignesh C wrote: > > > > > > On Wed, 13 Nov 2024 at 11:15, Shlok Kyal wrote: > >

Re: POC: make mxidoff 64 bits

2024-11-15 Thread Heikki Linnakangas
On 13/11/2024 17:44, Maxim Orlov wrote: On Tue, 12 Nov 2024 at 02:31, Heikki Linnakangas > wrote: On a different note, I'm surprised you're rewriting member segments from scratch, parsing all the individual member groups and writing them out again. There's

[PATCH] Fixed assertion issues in "pg_get_viewdef"

2024-11-15 Thread 曾满
Hi everyone, The following bug has been logged on the website: Bug reference:      18710 Logged by:          Man Zeng Email address:      zengman(at)halodbtech(dot)com PostgreSQL version: 14.14 Operating system:   centos-8 Description:         A prototype of the problem from https://github

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

2024-11-15 Thread Shubham Khanna
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 review comments for patch v1-0001. > > == > Commit message. > > 1. > The er

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

2024-11-15 Thread Shubham Khanna
On Fri, Nov 15, 2024 at 8:19 AM Hayato Kuroda (Fujitsu) wrote: > > Dear Shubham, > > Thanks for creating a patch! I checked yours and I have comments. > > 01. > ``` > + StringInfoData gencolsattsbuf; > + int generatedatts = 0; > + > + i

Add support for Tcl 9

2024-11-15 Thread Peter Eisentraut
Tcl 9 changed several API functions to take Tcl_Size, which is ptrdiff_t, instead of int, for 64-bit enablement. We have to change a few local variables to be compatible with that. We also provide a fallback typedef of Tcl_Size for older Tcl versions. Here is a patch for that. The affected

Re: Tweak some codes format in gist.c

2024-11-15 Thread Tender Wang
Andrey M. Borodin 于2024年11月15日周五 17:57写道: > > > > On 15 Nov 2024, at 14:48, Tender Wang wrote: > > > > Hi, > > > > I found some inconsistent code format in gist.c. > > See the attached. > > I’d suggest to combine such changes with some real code modification done > nearby. There’s plenty of GiST

Re: Proper object locking for GRANT/REVOKE

2024-11-15 Thread Peter Eisentraut
On 11.11.24 08:53, Bertrand Drouvot wrote: Maybe it would be better to push the assertion into get_object_address(), something like Assert(!relation || relp) near the end. That looks like a good idea to me, that would make the code cleaner and easier to understand. Meaning, if you pass

Re: Tweak some codes format in gist.c

2024-11-15 Thread Andrey M. Borodin
> On 15 Nov 2024, at 14:48, Tender Wang wrote: > > Hi, > > I found some inconsistent code format in gist.c. > See the attached. I’d suggest to combine such changes with some real code modification done nearby. There’s plenty of GiST patches on commitfest. Thanks! Best regards, Andrey Boro

Re: psql: Add leakproof field to \dAo+ meta-command results

2024-11-15 Thread Yugo Nagata
On Mon, 4 Nov 2024 11:00:41 + Dean Rasheed wrote: > > On 2024-07-01 15:08 +0200, Yugo NAGATA wrote: > > I would like to propose to add a new field to psql's \dAo+ meta-command > > to show whether the underlying function of an operator is leak-proof. > > > > I agree that this is useful inform

Tweak some codes format in gist.c

2024-11-15 Thread Tender Wang
Hi, I found some inconsistent code format in gist.c. See the attached. -- Thanks, Tender Wang 0001-Fix-some-codes-format-in-gist.c.patch Description: Binary data

Re: JIT: The nullness of casetest.value can be determined at the JIT compile time.

2024-11-15 Thread Heikki Linnakangas
On 03/09/2024 18:18, Xing Guo wrote: On Tue, Sep 3, 2024 at 8:09 PM Andreas Karlsson wrote: On 8/31/24 10:04 AM, Xing Guo wrote: The nullness of casetest.value can be determined at the JIT compile time. We can emit fewer codes by utilizing this property. The attached patch is trying to fix it

Re: DOCS - pg_replication_slot . Fix the 'inactive_since' description

2024-11-15 Thread Amit Kapila
On Thu, Nov 14, 2024 at 12:12 PM Nisha Moond wrote: > > On Thu, Oct 31, 2024 at 11:05 PM Bruce Momjian wrote: > > > > > > Yes, all good suggestions, updated patch attached. > > > > Few comments for the changes under "inactive_since" description: > > +The time when slot synchronization (se

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Bertrand Drouvot
Hi, On Thu, Nov 14, 2024 at 11:35:25AM -0500, Peter Geoghegan wrote: > On Thu, Nov 14, 2024 at 11:29 AM Alvaro Herrera > wrote: > > ISTM that we have spare bytes where we could place that boolean without > > breaking ABI. In x86_64 there's a couple of 4-byte holes, but those > > won't be there

Re: POC: make mxidoff 64 bits

2024-11-15 Thread Maxim Orlov
Here is the test scripts. The generate.sh script is used to generate data dir with multimple clusters in it. This script will call multixids.py in order to generate data. If you are not use system psql consider using LD_LIBRARY_PATH env to specify path to the lib directory. OLDBIN=/.../pgsql-new ./

Re: general purpose array_sort

2024-11-15 Thread jian he
On Fri, Nov 8, 2024 at 8:52 AM Michael Paquier wrote: > > I am wondering if there are more fancy cases where the saved cache > could force a state that would lead to puzzling results, say with > different collations that should be applied. I'd recommend to > research that more, to reflect that i

Re: Potential ABI breakage in upcoming minor releases

2024-11-15 Thread Aleksander Alekseev
Hi, > > src/ts_catalog/catalog.c-extern TSDLLEXPORT ResultRelInfo * > > src/ts_catalog/catalog.c-ts_catalog_open_indexes(Relation heapRel) > > src/ts_catalog/catalog.c-{ > > src/ts_catalog/catalog.c- ResultRelInfo *resultRelInfo; > > src/ts_catalog/catalog.c- > > src/ts_catalog/catalog.c: resu

Re: EphemeralNamedRelation and materialized view

2024-11-15 Thread Yugo NAGATA
On Sun, 03 Nov 2024 13:42:33 -0500 Tom Lane wrote: > Yugo Nagata writes: > > While looking into the commit b4da732fd64e936970f38c792f8b32c4bdf2bcd5, > > I noticed that we can create a materialized view using Ephemeral Named > > Relation in PostgreSQL 16 or earler. > > Yeah, we should reject th

Re: JIT: Remove some unnecessary instructions.

2024-11-15 Thread Heikki Linnakangas
On 02/09/2024 22:06, Andreas Karlsson wrote: On 9/2/24 4:23 AM, Xing Guo wrote: Thanks for testing it! I spotted another unnecessary store instruction and added it in my V2 patch. Another well-spotted unnecessary store. Nice! I think this patch is ready for committer. It is simple and pretty