Re: Time to add a Git .mailmap?

2024-11-06 Thread Michael Paquier
On Wed, Nov 06, 2024 at 11:36:42AM +0100, Alvaro Herrera wrote: > Funnily enough, I'm the only committer that has ever used "Michaël", but > I'm not the only one to have used the mistaken "Paquiër". Go figure. I haven't noticed this one. That's new :DD -- Michael signature.asc Description: PGP

Re: Inconsistent RestrictInfo serial numbers

2024-11-06 Thread Richard Guo
On Tue, Oct 8, 2024 at 8:20 PM Richard Guo wrote: > > I ran into an "ERROR: variable not found in subplan target lists" > error, which can be reproduced with the following query. > To fix, I think we can reset the root->last_rinfo_serial counter after > generating the additional constant-FALSE R

Re: Commit Timestamp and LSN Inversion issue

2024-11-06 Thread Amit Kapila
On Tue, Nov 5, 2024 at 7:28 PM Jan Wieck wrote: > > > > > We can't forget CDR completely as this could only be a potential > > problem in that context. Right now, we don't have any built-in > > resolution strategies, so this can't impact but if this is a problem > > then we need to have a solution

Re: Add column name to error description

2024-11-06 Thread Vladlen Popolitov
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: not tested Spec compliant: not tested Documentation:not tested Only tests checked. I applied patch (no errors) and did build (no errors

Re: Rename Function: pg_postmaster_start_time

2024-11-06 Thread David G. Johnston
On Wed, Nov 6, 2024 at 1:17 PM Maiquel Grassi wrote: > >I can agree that pg_postmaster_ has the potential to be confusing to > users, but > >I agree that if we are to do anything it should be alias while > maintaining the > >old name for compatibility. > > > >Looking at similar functions it's cle

RE: Rename Function: pg_postmaster_start_time

2024-11-06 Thread Maiquel Grassi

RE: Rename Function: pg_postmaster_start_time

2024-11-06 Thread Maiquel Grassi
>Except it doesn't seem like users are confused. It is just someone in the >ivory tower thinking they could be. It feels like make-work for a problem >that doesn't actually exist. Hello. I understand that this type of comment could be interpreted as discouraging and detrimental to the developm

RE: Rename Function: pg_postmaster_start_time

2024-11-06 Thread Maiquel Grassi
>This function has this name since 600da67fbe5e back from 2008. >Changing that 16 years later will break things. Certainly, there are more considerations to take into account than I initially realized. One possibility would be to create an alias (or synonym) for the function "pg_postmaster_start_t

Re: Rename Function: pg_postmaster_start_time

2024-11-06 Thread Daniel Gustafsson
> On 6 Nov 2024, at 20:28, Maiquel Grassi wrote: > > >This function has this name since 600da67fbe5e back from 2008. > >Changing that 16 years later will break things. > > Certainly, there are more considerations to take into account > than I initially realized. One possibility would be to creat

RE: Rename Function: pg_postmaster_start_time

2024-11-06 Thread Maiquel Grassi
>I can agree that pg_postmaster_ has the potential to be confusing to users, but >I agree that if we are to do anything it should be alias while maintaining the >old name for compatibility. > >Looking at similar functions it's clear they don't use the pg_postgres_ prefix, >like for example pg_conf_

Re: index prefetching

2024-11-06 Thread Peter Geoghegan
On Wed, Nov 6, 2024 at 12:25 PM Tomas Vondra wrote: > Attached is an updated version of this patch series. The first couple > parts (adding batching + updating built-in index AMs) remain the same, > the new part is 0007 which switches index scans to read stream API. The first thing that I notice

Re: define pg_structiszero(addr, s, r)

2024-11-06 Thread Michael Paquier
On Thu, Nov 07, 2024 at 08:10:17AM +1300, David Rowley wrote: > Did you try with a size where there's a decent remainder, say 124 > bytes? FWIW, one of the cases has 112 bytes, and I think that is > aligned memory meaning we'll do the first 64 in the SIMD loop and have > to do 48 bytes in the byte-

Re: define pg_structiszero(addr, s, r)

2024-11-06 Thread Michael Paquier
On Thu, Nov 07, 2024 at 08:05:10AM +1300, David Rowley wrote: > That might be quite good for small lengths or for use cases where the > memory is always or almost always zero. The problem is there's no > early exit when you find the first non-zero which means, for larger > lengths, reading much mor

Re: per backend I/O statistics

2024-11-06 Thread Michael Paquier
On Wed, Nov 06, 2024 at 01:51:02PM +, Bertrand Drouvot wrote: > That's not needed, the patch I'm working on stores the proc number in the > objid field of the key. Relying on the procnumber for the object ID gets a +1 here. That provides an automatic cap on the maximum number of entries that

Re: New function normal_rand_array function to contrib/tablefunc.

2024-11-06 Thread Andy Fan
Hi, Looks I miss some interesting dicussions in the recent days, the pretty neat API random_array, random_array or array_random (I prefer the random_array because of the setseed stuff as Dean said). These dicussions absoluatly enrichs my API / decoument design experience. I'm still not sure if

Re: optimize the value of vacthresh and anlthresh

2024-11-06 Thread Frédéric Yhuel
On 11/4/24 09:30, wenhui qiu wrote: Hi hackers     A few days ago, I was looking at the sql server documentation and found that sql server has optimized the algorithm related to updating statistics in the 2016 ,version,I think we can also learn from the implementation method of sql server

Re: Converting contrib SQL functions to new style

2024-11-06 Thread Ronan Dunklau
Le mercredi 6 novembre 2024, 06:52:16 heure normale d’Europe centrale Michael Paquier a écrit : > On Tue, Nov 05, 2024 at 08:05:16PM -0500, Tom Lane wrote: > > No, I don't think so. For one thing, it would not help existing > > installations unless they issue "ALTER EXTENSION UPDATE", which > > p

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

2024-11-06 Thread Amit Kapila
On Thu, Oct 31, 2024 at 11:05 PM Bruce Momjian wrote: > > Yes, all good suggestions, updated patch attached. > LGTM. -- With Regards, Amit Kapila.

Re: Eager aggregation, take 3

2024-11-06 Thread Richard Guo
On Fri, Nov 1, 2024 at 9:42 PM Robert Haas wrote: > On Fri, Nov 1, 2024 at 2:21 AM Richard Guo wrote: > > ... an aggregated row from the partial > > aggregation matches the other side of the join if and only if each row > > in the partial group does, thereby ensuring that all rows in the same > >

Re: Using read stream in autoprewarm

2024-11-06 Thread Nazir Bilal Yavuz
Hi, On Fri, 1 Nov 2024 at 21:06, Andrey M. Borodin wrote: > > > On 1 Nov 2024, at 12:51, Nazir Bilal Yavuz wrote: > > > > am not > > sure whether 'BufferStrategyControl.lastFreeBuffer - > > BufferStrategyControl.firstFreeBuffer' is safe to use. > > Ugh... it will work. But it seems to me too di

Re: doc issues in event-trigger-matrix.html

2024-11-06 Thread Peter Eisentraut
On 29.10.24 23:33, Michael Paquier wrote: On Tue, Oct 29, 2024 at 03:53:43PM +0100, Daniel Gustafsson wrote: +1, I think this is a net improvement. Agreed. I have spent some time looking in the past few years looking at patches that tweaked this table, and it was always hard to figure out if

Re: Inconsistent RestrictInfo serial numbers

2024-11-06 Thread Ashutosh Bapat
On Wed, Nov 6, 2024 at 4:10 PM Richard Guo wrote: > > On Tue, Oct 8, 2024 at 8:20 PM Richard Guo wrote: > > > > I ran into an "ERROR: variable not found in subplan target lists" > > error, which can be reproduced with the following query. > > > To fix, I think we can reset the root->last_rinfo_s

Re: doc issues in event-trigger-matrix.html

2024-11-06 Thread Peter Eisentraut
On 30.10.24 13:31, jian he wrote: On Tue, Oct 29, 2024 at 7:54 PM Peter Eisentraut wrote: I made a patch for this. I have expanded the narrative discussion on what commands are supported for event triggers, also made a few corrections/additions there, based on inspecting the source code. And

Re: optimize the value of vacthresh and anlthresh

2024-11-06 Thread wenhui qiu
Hi Frédéric many thanks for your email。 I'll go and see. On Wed, 6 Nov 2024 at 17:47, Frédéric Yhuel wrote: > > > On 11/4/24 09:30, wenhui qiu wrote: > > Hi hackers > > A few days ago, I was looking at the sql server documentation and > > found that sql server has optimized the algorith

Re: define pg_structiszero(addr, s, r)

2024-11-06 Thread Bertrand Drouvot
Hi, On Wed, Nov 06, 2024 at 01:44:58PM +0900, Michael Paquier wrote: > Should the last loop check only 1 byte at a time or should this stuff > include one more step before the last one you wrote to do a couple of > checks with size_t? That may matter for areas small enough (len < > sizeof(size_t)

Re: doc: pgevent.dll location

2024-11-06 Thread Peter Eisentraut
On 06.11.24 13:57, Ryohei Takahashi (Fujitsu) wrote: The dll install paths are changed as follows on Windows. (1) pgevent.dll PG16: lib/ PG17: bin/ (2) dll for user (like libpq.dll, libecpg.dll) PG16: Both in lib/ and bin/ PG17: bin/ (3) contrib dll (like amcheck.dll) PG16: lib/ PG17: lib/ I

Re: index_delete_sort: Unnecessary variable "low" is used in heapam.c

2024-11-06 Thread Daniel Gustafsson
> On 5 Nov 2024, at 22:08, Daniel Gustafsson wrote: > >> On 5 Nov 2024, at 17:40, Fujii Masao wrote: >> >> On 2024/09/24 21:31, Daniel Gustafsson wrote: On 24 Sep 2024, at 10:32, btnakamurakoukil wrote: I noticed unnecessary variable "low" in index_delete_sort() (/postgre

Re: Eager aggregation, take 3

2024-11-06 Thread Robert Haas
On Wed, Nov 6, 2024 at 3:22 AM Richard Guo wrote: > Yeah, ordered aggregates could be a blocker. I think it might be best > to prevent the use of eager aggregation if root->numOrderedAggs > 0 > for now. > > I've been thinking about the window functions case, as Jian He also > mentioned it some ti

Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT

2024-11-06 Thread Alvaro Herrera
On 2024-Nov-06, Amit Langote wrote: > On Tue, Nov 5, 2024 at 9:01 PM Alvaro Herrera wrote: > > While doing final review for not-null constraints, I noticed that the > > ALTER TABLE ATTACH PARTITION have this phrase: > > > > If any of the CHECK constraints of the table being attached are mark

Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails

2024-11-06 Thread Alvaro Herrera
On 2024-Nov-05, Tom Lane wrote: > I'm trying to write release notes for commits 53af9491a et al, > and it seems to me that we need to explain how to get out of > the mess that would be left behind by the old DETACH code. > There's no hint about that in the commit message :-( > Clearly, if you hav

Re: pg_upgrade check for invalid databases

2024-11-06 Thread Daniel Gustafsson
> On 1 Nov 2024, at 01:36, Bruce Momjian wrote: > On Fri, Oct 25, 2024 at 01:55:57PM +0200, Daniel Gustafsson wrote: >> In the meantime, the OP has a good point that it's a tad silly that >> pg_upgrade >> fails hard on invalid databases instead of detecting and reporting like how >> other errors

Re: Add missing tab completion for ALTER TABLE ADD COLUMN IF NOT EXISTS

2024-11-06 Thread Karina Litskevich
Hi Kirill, I looked through your patches. First of all, please note that TAB completion doesn't have to complete all valid grammatical constructions. See the comment on the top of tab-complete.in.c: * This file implements a somewhat more sophisticated readline "TAB * completion" in psql. It is

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

2024-11-06 Thread Shlok Kyal
Hi Aleksander, > > > Here the generated column 'b' is set as REPLICA IDENTITY for table > > 'testpub_gencol'. When we create publication 'pub_gencol' we do not > > specify any column list, so column 'b' will not be published. > > So, the update message generated by the last UPDATE would have NULL

Re: define pg_structiszero(addr, s, r)

2024-11-06 Thread Bertrand Drouvot
Hi, On Wed, Nov 06, 2024 at 12:16:33PM +1300, David Rowley wrote: > On Wed, 6 Nov 2024 at 04:03, Bertrand Drouvot > wrote: > > Another option could be to use SIMD instructions to check multiple bytes > > is zero in a single operation. Maybe just an idea to keep in mind and > > experiment > > if

RE: doc: pgevent.dll location

2024-11-06 Thread Ryohei Takahashi (Fujitsu)
Hi, Thank you for your reply. The dll install paths are changed as follows on Windows. (1) pgevent.dll PG16: lib/ PG17: bin/ (2) dll for user (like libpq.dll, libecpg.dll) PG16: Both in lib/ and bin/ PG17: bin/ (3) contrib dll (like amcheck.dll) PG16: lib/ PG17: lib/ I understand that Dave

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

2024-11-06 Thread Tomas Vondra
Hi, I've been investigating some issues reported by users, related to logical replication unexpectedly breaking with messages like: LOG: invalidating slot "s" because its restart_lsn X/Y exceeds max_slot_wal_keep_size which is pretty confusing, because the system has that GUC set to -1

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

2024-11-06 Thread Aleksander Alekseev
Hi Shlok, > So, I think this behavior would be acceptable. Thoughts? That's a fair point, thanks for sharing. Personally I find this behavior somewhat suboptimal but since we already have it in certain cases I guess what you propose might be acceptable. I'm still not entirely happy about breakin

RE: COPY performance on Windows

2024-11-06 Thread Ryohei Takahashi (Fujitsu)
Hi, Thank you for your reply. I don't want to "speed up" the COPY command. I just want to "prevent speed down" compared with PG16. But anyway, my current analysis is not convincing. So, I will do more analysis and get back to you. Regards, Ryohei Takahashi

Re: per backend I/O statistics

2024-11-06 Thread Bertrand Drouvot
Hi, On Wed, Nov 06, 2024 at 08:39:07AM +0900, Michael Paquier wrote: > On Tue, Nov 05, 2024 at 05:37:15PM +, Bertrand Drouvot wrote: > > I'm starting working on option 2, I think it will be easier to discuss with > > a patch proposal to look at. > > > > If in the meantime, one strongly disagr

Re: Logical replication timeout

2024-11-06 Thread Ashutosh Bapat
On Wed, Nov 6, 2024 at 1:07 PM RECHTÉ Marc wrote: > > Hello, > > For some unknown reason (probably a very big transaction at the source), we > experienced a logical decoding breakdown, > due to a timeout from the subscriber side (either wal_receiver_timeout or > connexion drop by network equipme

Re: Fix for Extra Parenthesis in pgbench progress message

2024-11-06 Thread Fujii Masao
On 2024/11/02 20:43, Tatsuo Ishii wrote: Hi, I noticed an issue in the pgbench progress message where an extra closing parenthesis )) appears, as shown below: 700 of 1000 tuples (70%) of pgbench_accounts done (elapsed 19.75 s, remaining 8.46 s)) Yeah, annoying. This occurs when r

Re: Fix for Extra Parenthesis in pgbench progress message

2024-11-06 Thread Tatsuo Ishii
>> The patch works perfectly for the case that there is one extra brace >> as shown in your example. However I think it will not work if there >> are two or more extra braces. > > Are you suggesting adding more space characters before the carriage > return > in the progress reporting line, like th

Re: Changing shared_buffers without restart

2024-11-06 Thread Thomas Munro
On Sat, Oct 19, 2024 at 8:21 AM Dmitry Dolgov <9erthali...@gmail.com> wrote: > Currently it > supports only an increase of shared_buffers. Just BTW in case it is interesting, Palak and I experimented with how to shrink the buffer pool while PostgreSQL is running, while we were talking about 13453e

Re: Converting contrib SQL functions to new style

2024-11-06 Thread Michael Paquier
On Wed, Nov 06, 2024 at 10:51:29AM +0100, Ronan Dunklau wrote: > For most of them I agree, but one side effect of the current implementation > is > that we have a bug when pg_upgrad'ing if earthdistance is installed: > https://www.postgresql.org/message-id/flat/ > 152106914669.1223.5104148605998

Add html-serve target to autotools and meson

2024-11-06 Thread Tristan Partin
When working on documentation, I find it useful to spawn an HTTP server to serve docs for me to consume in a web browser. I went ahead and used Python's builtin http.server module, but it could also be a run target which just spawned `xdg-open builddir/doc/src/sgml/html/index.html`, though I wo

FW: Building Postgres 17.0 with meson

2024-11-06 Thread Mark Hill
Srinath is in India I believe and not available currently. Does anybody have any idea why meson is not finding the paths I'm specifying with the -Dextra_lib_dirs and -Dextra_include_dirs? See below. Thanks, Mark From: Mark Hill Sent: Wednesday, November 6, 2024 10:33 AM To: 'Srinath Reddy S

Re: UUID v7

2024-11-06 Thread Andrey M. Borodin
> On 5 Nov 2024, at 23:56, Andrey M. Borodin wrote: > > Some more thoughts on this patch version: 0. Comment mentioning nanoseconds, while we do not need to carry anything /* Convert TimestampTz back and carry nanoseconds. */ 1. There's unnecessary &3 in uuid->data[7] = uuid->data[7] | ((u

Re: Windows meson build

2024-11-06 Thread Andres Freund
Hi, On 2024-11-05 06:32:51 +, Kohei Harikae (Fujitsu) wrote: > I do not use pkgconf in my Windows environment. > In my Windows environment, I could not build the following OSS with meson. > - 0001 icu > - 0002 libxml > - 0003 libxslt > - 0004 lz4 > - 0005 tcl > - 0006 zlib > - 0007 zstd > > [

Re: Add parallel columns for pg_stat_statements

2024-11-06 Thread Michael Paquier
On Wed, Oct 09, 2024 at 08:32:52AM +0900, Michael Paquier wrote: > Okay, applied 0001 and 0002 then after a second lookup. I'll spend > some more time thinking about 0003 and the other threads. Considered 0003, and I'm still not sure that this is something that is really required based on the cor

Re: [PATCH] pg_stat_activity: make slow/hanging authentication more visible

2024-11-06 Thread Michael Paquier
On Wed, Nov 06, 2024 at 02:48:31PM +0900, Michael Paquier wrote: > I'm OK with 0002 to add the wait parameter to BackgroundPsql and be > able to take some actions until a manual wait_connect(). I'll go do > this one. Also perhaps 0001 while on it but I am a bit puzzled by the > removal of the thr

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

2024-11-06 Thread Amit Kapila
On Wed, Nov 6, 2024 at 5:48 PM Aleksander Alekseev wrote: > > > So, I think this behavior would be acceptable. Thoughts? > > That's a fair point, thanks for sharing. Personally I find this > behavior somewhat suboptimal but since we already have it in certain > cases I guess what you propose might

Re: Parallel workers stats in pg_stat_database

2024-11-06 Thread Michael Paquier
On Sat, Oct 12, 2024 at 01:14:54AM +0200, Benoit Lobréau wrote: > Here is an updated version, I modified it to: > > * have the same wording in the doc and code (planned => to_launch) > * split de declaration from the rest (and have the same code as the parallel > worker logging patch) Thanks for

Doc: typo in ddl.sgml

2024-11-06 Thread kasaharatt
Hi. I noticed that it seems to me a mistake in the sample code in the document. https://www.postgresql.org/docs/devel/ddl-constraints.html#DDL-CONSTRAINTS-FK I think it is a typo for user_id instead of author_id. See bellow. Best reghards, diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/dd

Re: Fix for Extra Parenthesis in pgbench progress message

2024-11-06 Thread Tatsuo Ishii
>>> The patch works perfectly for the case that there is one extra brace >>> as shown in your example. However I think it will not work if there >>> are two or more extra braces. >> >> Are you suggesting adding more space characters before the carriage >> return >> in the progress reporting line,

Re: Doc: typo in ddl.sgml

2024-11-06 Thread David G. Johnston
On Wednesday, November 6, 2024, kasaharatt wrote:. > > > I noticed that it seems to me a mistake in the sample code in the document. > https://www.postgresql.org/docs/devel/ddl-constraints.html# > DDL-CONSTRAINTS-FK > > I think it is a typo for user_id instead of author_id. It’s hard to argue a

Linkify mentions of the primary/subscriber's max_replication_slots

2024-11-06 Thread Tristan Partin
In the replication server configuration documentation[0], there are 3 sections: sending, primary, standby, and subscriber. These sections mention various GUCs and how they apply to each server configuration. The max_replication_slots GUC is mentioned twice, once in the sending section[1]: [

split func.sgml to separated individual sgml files

2024-11-06 Thread jian he
hi. move to a new thread. Since the old thread[1], many things have interacted together. we are going to split func.sgml to 31 inviduaul sgml files. the new file name pattern is "func-" as the prefix. all the func-*.sgml files stored in doc/src/sgml/func based on the original func.sgml line numbe

Re: Pgoutput not capturing the generated columns

2024-11-06 Thread Amit Kapila
On Wed, Nov 6, 2024 at 4:18 PM vignesh C wrote: > > The attached v50 version patch has the changes for the same. > Pushed. -- With Regards, Amit Kapila.

Re: Incremental Sort Cost Estimation Instability

2024-11-06 Thread Andrei Lepikhov
On 10/8/24 11:33, Andrei Lepikhov wrote: On 9/23/24 20:02, Andrei Lepikhov wrote: On 12/9/2024 12:12, David Rowley wrote: On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov Minor change to make compiler and cfbot happy Now, this thread looks connected to the [1]. However, it still has independen

Re: not null constraints, again

2024-11-06 Thread jian he
sql-altertable.html SET/DROP NOT NULL These forms change whether a column is marked to allow null values or to reject null values. If this table is a partition, one cannot perform DROP NOT NULL on a column if it is marked NOT NULL in the paren

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

2024-11-06 Thread Amit Kapila
On Tue, Nov 5, 2024 at 12:53 PM Shlok Kyal wrote: > > To avoid the issue, we can disallow UPDATE/DELETE on table with > unpublished generated column as REPLICA IDENTITY. I have attached a > patch for the same. > +CREATE PUBLICATION pub_gencol FOR TABLE testpub_gencol; +UPDATE testpub_gencol SET a

Re: Remove an obsolete comment in gistinsert()

2024-11-06 Thread Michael Paquier
On Thu, Nov 07, 2024 at 10:57:08AM +0800, Tender Wang wrote: > Thanks for reviewing this. I have added it to the 2015-01 commitfest. Right. I don't quite see why this comment would apply anymore, and the commit you are pointing to looks right. Will fix. -- Michael signature.asc Description: PG

Re: Remove an obsolete comment in gistinsert()

2024-11-06 Thread Tender Wang
Michael Paquier 于2024年11月7日周四 14:11写道: > On Thu, Nov 07, 2024 at 10:57:08AM +0800, Tender Wang wrote: > > Thanks for reviewing this. I have added it to the 2015-01 commitfest. > > Right. I don't quite see why this comment would apply anymore, and > the commit you are pointing to looks right. Wi

Re: Proposals for EXPLAIN: rename ANALYZE to EXECUTE and extend VERBOSE

2024-11-06 Thread Peter Eisentraut
On 05.11.24 19:19, Robert Haas wrote: 1) EXPLAIN ANALYZE Is sometimes very confusing (because there is ANALYZE). Let's rename it to EXPLAIN EXECUTE? The trouble is that EXPLAIN EXECUTE already means something. robert.haas=# explain execute foo; ERROR: prepared statement "foo" does not exist

Re: magical eref alias names

2024-11-06 Thread Peter Eisentraut
On 06.11.24 20:06, Robert Haas wrote: I can make nothing of*TLOCRN* or*TROCRN*, even after looking at the relevant source code, These are from the SQL standard text. So they are more guidance to the implementer than anything else. I think something had to be put there, because erefs are req

Re: Pgoutput not capturing the generated columns

2024-11-06 Thread Peter Eisentraut
On 07.11.24 05:13, Amit Kapila wrote: On Wed, Nov 6, 2024 at 4:18 PM vignesh C wrote: The attached v50 version patch has the changes for the same. Could you (everybody on this thread) please provide guidance how this feature is supposed to interact with virtual generated columns [0]. I do

Re: Doc: typo in ddl.sgml

2024-11-06 Thread kasaharatt
Hi, thanks for your comment. On Wednesday, November 6, 2024, kasaharatt wrote:. I noticed that it seems to me a mistake in the sample code in the document. https://www.postgresql.org/docs/devel/ddl-constraints.html#DDL-CONSTRAINTS-FK [1] I think it is a typo for user_id instead of author_

Re: not null constraints, again

2024-11-06 Thread jian he
RemoveInheritance if (copy_con->coninhcount <= 0) /* shouldn't happen */ elog(ERROR, "relation %u has non-inherited constraint \"%s\"", RelationGetRelid(child_rel), NameStr(copy_con->conname)); dropconstraint_internal if (childcon->coninhcoun

Re: UUID v7

2024-11-06 Thread Masahiko Sawada
On Wed, Nov 6, 2024 at 10:14 AM Andrey M. Borodin wrote: > > > > > On 5 Nov 2024, at 23:56, Andrey M. Borodin wrote: > > > > > > Some more thoughts on this patch version: > > 0. Comment mentioning nanoseconds, while we do not need to carry anything > /* Convert TimestampTz back and carry nanosec

Re: Windows meson build

2024-11-06 Thread Peter Eisentraut
On 05.11.24 07:32, Kohei Harikae (Fujitsu) wrote: I do not use pkgconf in my Windows environment. In my Windows environment, I could not build the following OSS with meson. - 0001 icu - 0002 libxml - 0003 libxslt - 0004 lz4 - 0005 tcl - 0006 zlib - 0007 zstd [1]thread, I created a patch like the

Re: define pg_structiszero(addr, s, r)

2024-11-06 Thread David Rowley
On Thu, 7 Nov 2024 at 07:34, Peter Eisentraut wrote: > Speaking of which, couldn't you just use > > pg_popcount(ptr, len) == 0 That might be quite good for small lengths or for use cases where the memory is always or almost always zero. The problem is there's no early exit when you find the

Re: Adding skip scan (including MDAM style range skip scan) to nbtree

2024-11-06 Thread Peter Geoghegan
On Mon, Nov 4, 2024 at 4:58 PM Matthias van de Meent wrote: > This is a review on v11, not the latest v13. I suspect most comments > still apply, but I haven't verified this. v11 is indeed quite similar to v13, so this shouldn't really matter. > I'm a bit concerned about the additional operation

Re: Changing shared_buffers without restart

2024-11-06 Thread Vladlen Popolitov
Hi I tried to apply patches, but failed. I suppose the problem with CRLF in the end of lines in the patch files. At least, after manual change of v1-0001 and v1-0002 from CRLF to LF patches applied, but it was not helped for v1-0003 - v1.0005 - they have also other mistakes during patch process

magical eref alias names

2024-11-06 Thread Robert Haas
Hi, When a query references a normal relation, the RangeTblEntry we construct sets rte->eref->aliasname to either the user-specified alias name, if there is one, or otherwise to the table name. But if there's neither a user-specified alias name nor a table name, then we make up a name. I have two

Re: define pg_structiszero(addr, s, r)

2024-11-06 Thread David Rowley
On Thu, 7 Nov 2024 at 00:40, Bertrand Drouvot wrote: > Do you mean add: > > " > for (; p < aligned_end; p += sizeof(size_t)) > { >if (*(size_t *)p != 0) >return false; > } > " > > just before the last loop? > > If so, I did a few tests and did not see any major improvements. So, I thou

Re: Commit Timestamp and LSN Inversion issue

2024-11-06 Thread Jan Wieck
On 11/6/24 06:23, Amit Kapila wrote: I think we avoid calling hook/callback functions after holding a lock (spinlock or LWLock) as the user may do an expensive operation or acquire some other locks in those functions which could lead to deadlocks or impact the concurrency. So, it would be better

optimize file transfer in pg_upgrade

2024-11-06 Thread Nathan Bossart
For clusters with many relations, the file transfer step of pg_upgrade can take the longest. This step clones, copies, or links the user relation files from the older cluster to the new cluster, so the amount of time it takes is closely related to the number of relations. However, since v15, we'v

Re: define pg_structiszero(addr, s, r)

2024-11-06 Thread Peter Eisentraut
On 05.11.24 16:03, Bertrand Drouvot wrote: On Tue, Nov 05, 2024 at 05:08:41PM +1300, David Rowley wrote: On Tue, 5 Nov 2024 at 06:39, Ranier Vilela wrote: I think we can add a small optimization to this last patch [1]. I think if you want to make it faster, you could partially unroll the inn

Re: FW: Building Postgres 17.0 with meson

2024-11-06 Thread Robert Haas
On Wed, Nov 6, 2024 at 2:59 PM Mark Hill wrote: > Srinath is in India I believe and not available currently. Does anybody > have any idea why meson > > is not finding the paths I’m specifying with the -Dextra_lib_dirs and > -Dextra_include_dirs? See below. I am not an expert on this topic,

Re: Rename Function: pg_postmaster_start_time

2024-11-06 Thread Tom Lane
Daniel Gustafsson writes: > Looking at similar functions it's clear they don't use the pg_postgres_ > prefix, > like for example pg_conf_load_time. Should this if so be pg_start_time? No, because it's not clear what start time you're talking about; aside from the postmaster, this could plausibl

Re: Popcount optimization using AVX512

2024-11-06 Thread Nathan Bossart
rebased -- nathan >From d0fb7e0e375f7b76d4df90910c21e9448dd3b380 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 16 Oct 2024 15:57:55 -0500 Subject: [PATCH v3 1/1] use __attribute__((target(...))) for AVX-512 stuff --- config/c-compiler.m4 | 64 +- configure

RE: Commit Timestamp and LSN Inversion issue

2024-11-06 Thread Zhijie Hou (Fujitsu)
On Tuesday, November 5, 2024 9:59 PM Jan Wieck wrote: > > Hi Hackers, > > On 9/5/24 01:39, Amit Kapila wrote: > > > > We can't forget CDR completely as this could only be a potential > > problem in that context. Right now, we don't have any built-in > > resolution strategies, so this can't impac

Re: Proposals for EXPLAIN: rename ANALYZE to EXECUTE and extend VERBOSE

2024-11-06 Thread Michael Christofides
> > I'm not against analyze = on turning buffers on by default. However, I > think it would be quite painful to fix the tests if it were on without > analyze. > This would be amazing. I'm finding BUFFERS are especially helpful for giving developers a clearer idea of why their queries are slow (esp

Re: further #include cleanup (IWYU)

2024-11-06 Thread Peter Eisentraut
Seeing no further comments (or any easy alternatives), I have committed this last patch as is. On 28.10.24 10:45, Peter Eisentraut wrote: On 20.10.24 11:53, Alvaro Herrera wrote: On 2024-Oct-20, Peter Eisentraut wrote: diff --git a/src/bin/pg_dump/pg_backup_utils.c b/src/bin/pg_dump/ pg_back

Re: Time to add a Git .mailmap?

2024-11-06 Thread Alvaro Herrera
On 2024-Nov-06, Michael Paquier wrote: > And now I'm going to ask how you figured out about the ë in my name, > because it's right ;) Hah, I got it from Fabien Coelho, https://postgr.es/m/alpine.DEB.2.10.1512240729160.17411@sto and then searched around to confirm that it was correct. Funnily eno

Re: New GUC autovacuum_max_threshold ?

2024-11-06 Thread wenhui qiu
Hi frederic.yhuel > Thank you. FWIW, I would prefer a sub-linear growth, so maybe something > like this > vacthresh = Min(vac_base_thresh + vac_scale_factor * reltuples, > vac_base_thresh + vac_scale_factor * pow(reltuples, 0.7) * 100); > This would give : > * 386M (instead of 5.1 billi

Re: [BUG] Fix DETACH with FK pointing to a partitioned table fails

2024-11-06 Thread Alvaro Herrera
On 2024-Nov-06, Alvaro Herrera wrote: > Perhaps one more task for me is to figure out a way to get a list of all > the constraints that are broken because of this ... let me see if I can > figure that out. It's gotta be something like this, SELECT conrelid::regclass AS "constrained table",

Re: SQL:2011 application time

2024-11-06 Thread Paul Jungwirth
On 11/4/24 13:16, Sam Gabrielsson wrote: Foreign key violation errors are incorrectly raised in a few cases for a temporal foreign key with default ON UPDATE NO ACTION. Test is based on the commited v39 patches (used a snapshot version of PG18 devel available from PGDG). Thank you for the repo

Re: Remove an obsolete comment in gistinsert()

2024-11-06 Thread Tender Wang
Aleksander Alekseev 于2024年11月5日周二 22:08写道: > Hi Tender, > > > While learning the GIST codes, I find an obsolete comment in gistinsert > (). > > > > itup = gistFormTuple(giststate, r, > > values, isnull, true /* size is > currently bogus */ ); > > Thanks for repor