Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-11-18 Thread Nisha Moond
On Thu, Nov 14, 2024 at 5:29 AM Peter Smith wrote: > > Hi Nisha. > > Thanks for the recent patch updates. Here are my review comments for > the latest patch v48-0001. > Thank you for the review. Comments are addressed in v49 version. Below is my response to comments that may require further discu

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-11-18 Thread Nisha Moond
On Thu, Nov 14, 2024 at 9:14 AM vignesh C wrote: > > On Wed, 13 Nov 2024 at 15:00, Nisha Moond wrote: > > > > Please find the v48 patch attached. > > > > On Thu, Sep 19, 2024 at 9:40 AM shveta malik wrote: > > > > > > When we promote hot standby with synced logical slots to become new > > > prim

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

2024-11-18 Thread Shlok Kyal
On Tue, 19 Nov 2024 at 10:22, vignesh C wrote: > > On Tue, 19 Nov 2024 at 00:36, Shlok Kyal wrote: > > > > On Mon, 18 Nov 2024 at 19:19, vignesh C wrote: > > > > > > On Mon, 18 Nov 2024 at 13:07, Shlok Kyal wrote: > > > > > > > > Thanks for providing the comments. > > > > > > > > On Sat, 16 Nov

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-11-18 Thread Nisha Moond
Attached is the v49 patch set: - Fixed the bug reported in [1]. - Addressed comments in [2] and [3]. I've split the patch into two, implementing the suggested idea in comment #5 of [2] separately in 001: Patch-001: Adds additional error reports (for all invalidation types) in ReplicationSlotAcqui

Re: Skip collecting decoded changes of already-aborted transactions

2024-11-18 Thread vignesh C
On Fri, 15 Nov 2024 at 23:32, Masahiko Sawada wrote: > > 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. > > +-- Th

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

2024-11-18 Thread Shlok Kyal
On Tue, 19 Nov 2024 at 09:50, Zhijie Hou (Fujitsu) wrote: > > On Tuesday, November 19, 2024 3:06 AM Shlok Kyal > wrote: > > > > I have fixed the comments and attached an updated patch. > > Thanks for the patch. > > I slightly refactored the codes a bit: > > * make the codes in replident_has_unpu

Re: memory leak in pgoutput

2024-11-18 Thread by Yang
> By the way, if possible, could you send an updated version of the > patch to show what you have in mind? Yeah, here is the new patch: I have verifed that this patch works for REL_[15-17]_STABLE and master. The memory consumption of "logical replication cache context" remains consistently at 112 

Re: fix deprecation mention for age() and mxid_age()

2024-11-18 Thread Bertrand Drouvot
Hi, On Tue, Nov 19, 2024 at 10:09:57AM +0900, Michael Paquier wrote: > On Mon, Nov 18, 2024 at 08:11:57AM +, Bertrand Drouvot wrote: > > Also it looks like that for PG 16, 7471230cc6, did put the functions > > description > > in the "Control Data Functions". That looks unintentional too, so m

README.tuplock and SHARE lock

2024-11-18 Thread Will Mortensen
README.tuplock says: > There is one exception > here: since infomask space is limited, we do not provide a separate bit > for SELECT FOR SHARE, so we have to use the extended info in a MultiXact in > that case. (The other cases, SELECT FOR UPDATE and SELECT FOR KEY SHARE, are > presumably more co

Re: Emitting JSON to file using COPY TO

2024-11-18 Thread jian he
hi. there. new patch attached. v13-1 is from https://postgr.es/m/fbc63db8-94de-45f6-b327-504566302...@app.fastmail.com just refactoring copy format. The author is Joel Jacobson! v13-0002, v13-0003 almost the same as previously v12. some minor change compared to v12: * refactor code, based on

Re: UNION versus collations

2024-11-18 Thread Laurenz Albe
On Mon, 2024-11-18 at 17:56 -0500, Tom Lane wrote: > prepunion.c's plan_union_children(), which merges > identically-propertied UNION operations into one, has this comment: > > * NOTE: currently, we ignore collations while determining if a child has > * the same properties. This is semantically

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

2024-11-18 Thread vignesh C
On Tue, 19 Nov 2024 at 00:36, Shlok Kyal wrote: > > On Mon, 18 Nov 2024 at 19:19, vignesh C wrote: > > > > On Mon, 18 Nov 2024 at 13:07, Shlok Kyal wrote: > > > > > > Thanks for providing the comments. > > > > > > On Sat, 16 Nov 2024 at 17:29, vignesh C wrote: > > > > > > I have attached the up

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-11-18 Thread Masahiko Sawada
On Mon, Nov 18, 2024 at 5:31 PM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Mon, 18 Nov 2024 17:02:41 -0800, > Masahiko Sawada wrote: > > > I have a question about v22. We use pg_attribute_always_inline for > > some fun

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

2024-11-18 Thread Zhijie Hou (Fujitsu)
On Tuesday, November 19, 2024 3:06 AM Shlok Kyal wrote: > > I have fixed the comments and attached an updated patch. Thanks for the patch. I slightly refactored the codes a bit: * make the codes in replident_has_unpublished_gen_col() consistent with other similar functions. * Avoid unnecessa

Re: Interrupts vs signals

2024-11-18 Thread Thomas Munro
Some feedback on v4-0001-Replace-Latches-with-Interrupts.patch: + latch.c -> waiteventset.c +1 + /* +* INTERRUPT_RECOVERY_WAKEUP is used to wake up startup process, to tell +* it that it should continue WAL replay. It's sent by WAL receiver when +* more WAL arrives,

Re: Code cleanup for detoast a expanded datum.

2024-11-18 Thread Andy Fan
Andy Fan writes: > > make check-world passed after applying this patch. v2 changes the places of Assert, which is missed in v1 by mistakes. -- Best Regards Andy Fan >From 0bbd242e034b8461e40bb17aec4fa354f5c97815 Mon Sep 17 00:00:00 2001 From: Andy Fan Date: Tue, 29 Oct 2024 14:05:05 +0800 Su

Re: optimize file transfer in pg_upgrade

2024-11-18 Thread Bruce Momjian
On Wed, Nov 6, 2024 at 04:07:35PM -0600, Nathan Bossart wrote: > 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

Re: Doc: typo in config.sgml

2024-11-18 Thread Bruce Momjian
On Tue, Nov 19, 2024 at 11:29:07AM +0900, Yugo NAGATA wrote: > On Mon, 18 Nov 2024 16:04:20 -0500 > > So, the failure of ligatures is caused usually by not using the right > > Adobe Font Metric (AFM) file, I think. I have seen faulty ligature > > rendering in PDFs but was alway able to fix it by u

Code cleanup for detoast a expanded datum.

2024-11-18 Thread Andy Fan
Hi, When detoasting an expanded datum in detoast_attr, we already know it is an expanded datum, but we use deotast_external_attr function which checks VARATT_IS_EXTERNAL_ONDISK & VARATT_IS_EXTERNAL_INDIRECT again which I think it is impossible to true in this case. so I think we should use a more

Re: Doc: typo in config.sgml

2024-11-18 Thread Yugo NAGATA
On Mon, 18 Nov 2024 16:04:20 -0500 Bruce Momjian wrote: > On Mon, Nov 11, 2024 at 10:02:15PM +0900, Yugo Nagata wrote: > > On Tue, 5 Nov 2024 10:08:17 +0100 > > Peter Eisentraut wrote: > > > > > > > >> So you convert LATIN1 characters to HTML entities so that it's easier > > > >> to detect non

Re: Parallel heap vacuum

2024-11-18 Thread Masahiko Sawada
On Tue, Nov 12, 2024 at 3:21 AM vignesh C wrote: > > On Wed, 30 Oct 2024 at 22:48, Masahiko Sawada wrote: > > > > > > I've attached new version patches that fixes failures reported by > > cfbot. I hope these changes make cfbot happy. > > > > I just started reviewing the patch and found the follow

Re: Making error message more user-friendly with spaces in a URI

2024-11-18 Thread Michael Paquier
On Mon, Nov 18, 2024 at 07:52:08PM -0500, Tom Lane wrote: > +1. Also the grammar seems a bit off; how about > > "unexpected spaces found in \"%s\", use percent-encoded spaces (%%20) instead" That's better, thanks. This one's on me, so I think that I'll just go fix that today with this wording.

Re: Document for wal_log_hints

2024-11-18 Thread Andy Fan
Michael Paquier writes: > On Tue, Nov 19, 2024 at 09:03:57AM +0800, Andy Fan wrote: >> So if data checksums is enabled, nothing can be tested when turning >> wal_log_hints on/off. >> @@ -3319,7 +3319,7 @@ include_dir 'conf.d' >> If data checksums are enabled, hint bit updates are always

Re: Fix an error while building test_radixtree.c with TEST_SHARED_RT

2024-11-18 Thread Tom Lane
Masahiko Sawada writes: > On Mon, Nov 18, 2024 at 3:41 PM Heikki Linnakangas wrote: >> While we're at it, I noticed that lib/radixtree.h includes "postgres.h". >> That's against our usual convention. > Good catch. I've updated the patch accordingly. Probably out of scope for this particular pat

Re: per backend I/O statistics

2024-11-18 Thread Michael Paquier
On Thu, Nov 14, 2024 at 01:30:11PM +, Bertrand Drouvot wrote: > - change the arguments to false in the pgstat_drop_entry_internal() call in > pgstat_drop_all_entries() > - start the engine > - kill -9 postgres > - restart the engine > > You'll see the assert failing due to the startup process

Re: Statistics Import and Export

2024-11-18 Thread Bruce Momjian
On Mon, Nov 18, 2024 at 08:29:10PM -0500, Corey Huinker wrote: > On Mon, Nov 18, 2024 at 2:47 PM Bruce Momjian wrote: > You seem to be optimizing for people using pg_upgrade, and for people > upgrading to PG 18, without adequately considering people using vacuumdb > in non-pg_upgrade s

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-11-18 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Mon, 18 Nov 2024 17:02:41 -0800, Masahiko Sawada wrote: > I have a question about v22. We use pg_attribute_always_inline for > some functions to avoid function call overheads. Applying it to > CopyToTextLik

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-11-18 Thread Masahiko Sawada
On Thu, Nov 14, 2024 at 4:04 PM Masahiko Sawada wrote: > > On Wed, Nov 13, 2024 at 11:19 PM Sutou Kouhei wrote: > > > > Hi, > > > > In <20241105.174328.1705956947135248653@clear-code.com> > > "Re: Make COPY format extendable: Extract COPY TO format implementations" > > on Tue, 05 Nov 2024

Re: Parametrization minimum password lenght

2024-11-18 Thread Emanuele Musella
We notice some errors on CFBot results. In attached the errors fixed Il giorno lun 18 nov 2024 alle ore 16:59 Emanuele Musella < emamus...@gmail.com> ha scritto: > Hello Bertrand, > > thank you for your feedbacks. > > We have done every fixes required. > > In attach the last version. > > Best re

Re: Document for wal_log_hints

2024-11-18 Thread Michael Paquier
On Tue, Nov 19, 2024 at 09:03:57AM +0800, Andy Fan wrote: > So if data checksums is enabled, nothing can be tested when turning > wal_log_hints on/off. > @@ -3319,7 +3319,7 @@ include_dir 'conf.d' > If data checksums are enabled, hint bit updates are always WAL-logged > and this s

Re: Making error message more user-friendly with spaces in a URI

2024-11-18 Thread Tom Lane
Michael Paquier writes: > Could it be better to mention %20 in the error message? Say an > addition like: > "unexpected spaces found \"%s\", use percent-encoded spaces (%%20) instead" +1. Also the grammar seems a bit off; how about "unexpected spaces found in \"%s\", use percent-encoded spaces

Re: fix deprecation mention for age() and mxid_age()

2024-11-18 Thread Michael Paquier
On Mon, Nov 18, 2024 at 08:11:57AM +, Bertrand Drouvot wrote: > Also it looks like that for PG 16, 7471230cc6, did put the functions > description > in the "Control Data Functions". That looks unintentional too, so moving it > to > "Transaction ID and Snapshot Information Functions" section

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

2024-11-18 Thread Michael Paquier
On Fri, Nov 15, 2024 at 05:26:08PM +, Dean Rasheed wrote: > Yes, I think we should do that (in a separate patch). $ git grep "leakproof" | wc -l 544 $ git grep "leak-proof" | wc -l 8 So there's a clear winner here. -- Michael signature.asc Description: PGP signature

Document for wal_log_hints

2024-11-18 Thread Andy Fan
Hi, When I read the document for wal_log_hints, I see: If data checksums are enabled, hint bit updates are always WAL-logged and this setting is ignored. You can use this setting to test how much extra WAL-logging would occur if your database had data checksums enabled. I think if it should b

Re: Allowing pg_recvlogical to create temporary replication slots

2024-11-18 Thread Michael Paquier
On Sat, Nov 16, 2024 at 12:49:05PM +0100, Torsten Förtsch wrote: > Thanks. Here is an updated version of the patch including documentation. + +If used together with --if-not-exists and if a +permanent slot by the requested name exists, that slot is used instead +of c

Re: Making error message more user-friendly with spaces in a URI

2024-11-18 Thread Michael Paquier
On Mon, Nov 18, 2024 at 02:59:18PM -0500, Bruce Momjian wrote: > On Wed, Nov 6, 2024 at 01:09:12AM +0900, Fujii Masao wrote: >> The phrasing "Did you forget" feels a bit indirect to me. >> How about using something clearer and more direct instead? >> >> --- >> psql: error: unexpected spac

Re: Statistics Import and Export

2024-11-18 Thread Corey Huinker
On Mon, Nov 18, 2024 at 3:32 PM Bruce Momjian wrote: > > How would/could this effect tables that have the vacuum and analyze > > scale_factors different from the rest of db via the ALTE RTABLE > statement? > > > > (I do this a lot) > > I don't think it would affect it since those control autovacu

Re: memory leak in pgoutput

2024-11-18 Thread Michael Paquier
On Mon, Nov 18, 2024 at 04:58:38PM +0900, Michael Paquier wrote: > On Mon, Nov 18, 2024 at 07:00:57AM +, by Yang wrote: >> By the way, this issue is introduced in 52e4f0cd472d39d. Therefore, we may >> need >> to backport the patch to v15. > > Yes. Note that nothing can happen on stable branc

Re: Fix an error while building test_radixtree.c with TEST_SHARED_RT

2024-11-18 Thread Masahiko Sawada
On Mon, Nov 18, 2024 at 3:41 PM Heikki Linnakangas wrote: > > On 19/11/2024 01:20, Masahiko Sawada wrote: > > I realized that building test_radixtree.c with TEST_SHARED_RT fails > > because it eventually sets RT_SHMEM when #include'ing radixtree.h but > > it's missing some header files to include.

Re: Fix an error while building test_radixtree.c with TEST_SHARED_RT

2024-11-18 Thread Heikki Linnakangas
On 19/11/2024 01:20, Masahiko Sawada wrote: I realized that building test_radixtree.c with TEST_SHARED_RT fails because it eventually sets RT_SHMEM when #include'ing radixtree.h but it's missing some header files to include. I've attached a patch to include necessary header files in radixtree.h t

Re: Reduce TupleHashEntryData struct size by half

2024-11-18 Thread Heikki Linnakangas
On 18/11/2024 22:22, Jeff Davis wrote: On Mon, 2024-11-18 at 12:13 +0200, Heikki Linnakangas wrote: Hmm, it would seem more straightforward to store it in the beginning, i.e. have something like this: struct {   void *additional;   MinimalTupleData mtup; } ; That was my first approa

Re: ci: Macos failures due to MacPorts behaviour change

2024-11-18 Thread Thomas Munro
On Sun, Nov 17, 2024 at 2:17 PM Andres Freund wrote: > Whenever the cache was built with 15, 16 would fail, because gmake was > installed but not meson. And vice versa. It gets worse, see further down. Argh... > The easiest fix I can see is to simply loop over the to-be-installed installed > pac

Fix an error while building test_radixtree.c with TEST_SHARED_RT

2024-11-18 Thread Masahiko Sawada
Hi, I realized that building test_radixtree.c with TEST_SHARED_RT fails because it eventually sets RT_SHMEM when #include'ing radixtree.h but it's missing some header files to include. I've attached a patch to include necessary header files in radixtree.h to make it self-contained. Regards, --

UNION versus collations

2024-11-18 Thread Tom Lane
prepunion.c's plan_union_children(), which merges identically-propertied UNION operations into one, has this comment: * NOTE: currently, we ignore collations while determining if a child has * the same properties. This is semantically sound only so long as all * collations have the same notion

Re: pg_dump --no-comments confusion

2024-11-18 Thread Bruce Momjian
On Tue, Nov 5, 2024 at 10:12:20AM +0100, Álvaro Herrera wrote: > On 2024-Nov-04, Erik Wienhold wrote: > > > I think Bruce's suggestion is pretty clear that it does not mean line or > > block comments, but rather the COMMENT command. But I also think that > > "SQL" in front of the command name is

Re: pg_dump --no-comments confusion

2024-11-18 Thread Bruce Momjian
On Mon, Nov 18, 2024 at 06:36:45PM -0300, Marcos Pegoraro wrote: > But it would be good to have this patch applied to all supported versions, as > soon as nothing was changed on that pg_dump option, no ? > > Em seg., 18 de nov. de 2024 às 18:30, Bruce Momjian > escreveu: > > On Tue, Nov  5,

Re: pg_dump --no-comments confusion

2024-11-18 Thread Tom Lane
Marcos Pegoraro writes: > But it would be good to have this patch applied to all supported versions, > as soon as nothing was changed on that pg_dump option, no ? Even more to the point, should we change pg_dump's help output? ... --load-via-partition-rootload partitions via the root table

Re: Showing applied extended statistics in explain Part 2

2024-11-18 Thread Tomas Vondra
On 11/18/24 22:15, Tomas Vondra wrote: > ... > > So I think the correct solution is to not pass any expressions with > RestrictInfo to deparse_expression(). Either by stripping the nodes, or > by not adding them at all. > > The patch tries to do the stripping by maybe_extract_actual_clauses(), > b

Re: pg_dump --no-comments confusion

2024-11-18 Thread Marcos Pegoraro
But it would be good to have this patch applied to all supported versions, as soon as nothing was changed on that pg_dump option, no ? regards Marcos Em seg., 18 de nov. de 2024 às 18:30, Bruce Momjian escreveu: > On Tue, Nov 5, 2024 at 10:12:20AM +0100, Álvaro Herrera wrote: > > On 2024-Nov-0

Re: UUID v7

2024-11-18 Thread Masahiko Sawada
On Sun, Nov 17, 2024 at 10:39 AM Andrey M. Borodin wrote: > > > > > On 17 Nov 2024, at 00:06, Andrey M. Borodin wrote: > > > > v31 > > There was a problem with MingWG build. I've considered all options and > decided to include all necessary stuff into instr_time.h. So much fuss for > these 2 bi

Re: Showing applied extended statistics in explain Part 2

2024-11-18 Thread Tomas Vondra
On 11/18/24 13:52, Ilia Evdokimov wrote: > Hi everyone! > > Thank you for your work. > > 1) While exploring extended statistics, I encountered a bug that occurs > when using EXPLAIN (STATS) with queries containing OR conditions: > > CREATE TABLE t (a int, b int, c int, d int); > INSERT INTO t SE

Re: Doc: typo in config.sgml

2024-11-18 Thread Bruce Momjian
On Mon, Nov 11, 2024 at 10:02:15PM +0900, Yugo Nagata wrote: > On Tue, 5 Nov 2024 10:08:17 +0100 > Peter Eisentraut wrote: > > > > >> So you convert LATIN1 characters to HTML entities so that it's easier > > >> to detect non-LATIN1 characters is in the SGML docs? If my > > >> understanding is co

Re: PGSERVICEFILE as part of a normal connection string

2024-11-18 Thread Laurenz Albe
On Mon, 2024-11-18 at 21:21 +0100, Torsten Förtsch wrote: > I like to bundle all my database connections in a .pg_service.conf. Over time > I > collected a bunch of such service files. A while back I discovered that the > service file can only be specified as an environment variable. It cannot be

Re: Statistics Import and Export

2024-11-18 Thread Bruce Momjian
On Mon, Nov 18, 2024 at 08:06:24PM +, Wetmore, Matthew (CTR) wrote: > Sorry to chime in with a dumb question: > > How would/could this effect tables that have the vacuum and analyze > scale_factors different from the rest of db via the ALTE RTABLE statement? > > (I do this a lot) > > ALTER

Re: Reduce TupleHashEntryData struct size by half

2024-11-18 Thread Jeff Davis
On Mon, 2024-11-18 at 12:13 +0200, Heikki Linnakangas wrote: > Seems pretty uncontroversial. You removed the typedef for struct > TupleHashEntryData, which is a bit unusual for our usual source > style. > Was there a reason for that? If it's private to a file and I don't intend to use it a lot,

PGSERVICEFILE as part of a normal connection string

2024-11-18 Thread Torsten Förtsch
Hi, I like to bundle all my database connections in a .pg_service.conf. Over time I collected a bunch of such service files. A while back I discovered that the service file can only be specified as an environment variable. It cannot be given as part of the connection string like psql "service=$MY

Re: Statistics Import and Export

2024-11-18 Thread Wetmore, Matthew (CTR)
Sorry to chime in with a dumb question: How would/could this effect tables that have the vacuum and analyze scale_factors different from the rest of db via the ALTE RTABLE statement? (I do this a lot) ALTER TABLE your_schema.your_table SET (autovacuum_enabled,autovacuum_analyze_scale_factor,au

Re: Making error message more user-friendly with spaces in a URI

2024-11-18 Thread Bruce Momjian
On Wed, Nov 6, 2024 at 01:09:12AM +0900, Fujii Masao wrote: > > > On 2024/10/31 10:22, Yushi Ogiwara wrote: > > Hi, > > > > I made a patch to make the error message more user-friendly when using a > > URI to connect a database with psql. > > > > Current Error Message: > > > > $ psql "postgre

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

2024-11-18 Thread Bruce Momjian
On Mon, Nov 18, 2024 at 01:31:45PM +0530, Amit Kapila wrote: > On Mon, Nov 18, 2024 at 12:24 PM Nisha Moond wrote: > > -- inactive_since will be reset to NULL by the process that acquires > > the slot, making it active or in-use again. > > > > AFAIU, inactive_since indicates the point in time when

Re: Statistics Import and Export

2024-11-18 Thread Bruce Momjian
On Fri, Nov 8, 2024 at 01:25:21PM -0500, Corey Huinker wrote: > WHAT IS NOT DONE - EXTENDED STATISTICS > > It is a general consensus in the community that "nobody uses extended > statistics", though I've had difficulty getting actual figures to back > this > up, even from my own

Re: RFC: Additional Directory for Extensions

2024-11-18 Thread David E. Wheeler
Hi Peter, Making another pass at this proposal, I’m a bit confused by this issue: On Nov 12, 2024, at 09:44, David E. Wheeler wrote: - The biggest problem is that many extensions set in their control file module_pathname = '$libdir/foo' This disables the use of dyna

Sample rate added to pg_stat_statements

2024-11-18 Thread Ilia Evdokimov
Hi hackers, Under high-load scenarios with a significant number of transactions per second, pg_stat_statements introduces substantial overhead due to the collection and storage of statistics. Currently, we are sometimes forced to disable pg_stat_statements or adjust the size of the statistics

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

2024-11-18 Thread Shlok Kyal
On Mon, 18 Nov 2024 at 19:19, vignesh C wrote: > > On Mon, 18 Nov 2024 at 13:07, Shlok Kyal wrote: > > > > Thanks for providing the comments. > > > > On Sat, 16 Nov 2024 at 17:29, vignesh C wrote: > > > > I have attached the updated version of the patch. > > Few comments: > 1) We have the follow

Re: Parametrization minimum password lenght

2024-11-18 Thread Emanuele Musella
Hello Bertrand, thank you for your feedbacks. We have done every fixes required. In attach the last version. Best regards Il giorno lun 18 nov 2024 alle ore 11:39 Bertrand Drouvot < bertranddrouvot...@gmail.com> ha scritto: > Hi, > > On Mon, Nov 18, 2024 at 10:01:41AM +0100, Emanuele Musella

Re: Logging which local address was connected to in log_line_prefix

2024-11-18 Thread Jim Jones
Hi Greg On 11.07.24 18:09, Greg Sabino Mullane wrote: > Thanks for the review. Please find attached a new version with proper > tabs and indenting. > > Cheers, > Greg > I'm testing this new log prefix and I'm wondering whether the following behaviour is expected. The value of '%L' is different in

Re: FW: Building Postgres 17.0 with meson

2024-11-18 Thread Robert Haas
On Thu, Nov 14, 2024 at 2:55 PM 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 below.) I checked a few of the symbols and they > appear in the Postgres s

Re: NOT ENFORCED constraint feature

2024-11-18 Thread Peter Eisentraut
On 18.11.24 13:42, jian he wrote: i only played around with v4-0001-Add-support-for-NOT-ENFORCED-in-CHECK-constraints.patch. create table t(a int); alter table t ADD CONSTRAINT the_constraint CHECK (a > 0) NOT ENFORCED; insert into t select -1; select conname, contype,condeferrable,condeferred,

Re: POC: make mxidoff 64 bits

2024-11-18 Thread Maxim Orlov
Shame on me! I've sent an erroneous patch set. Version 7 is defective. Here is the proper version v8 with minor refactoring in segresize.c. Also, I rename bump cat version patch into txt in order not to break cfbot. -- Best regards, Maxim Orlov. From 73b8663093ff1c58def9a80abab142a12c993bf6 Mon

[PATCH] Fix jsonb comparison for raw scalar pseudo arrays

2024-11-18 Thread Yan Chengpeng
Dear PostgreSQL Hackers, Problem Description I encountered an issue with the B-Tree ordering of `jsonb` values. According to the PostgreSQL documentation[1], the ordering should follow this precedence: `Object > Array > Boolean > Number > String > Null` However, empty arrays (`[]`) are current

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

2024-11-18 Thread Nisha Moond
On Fri, Nov 15, 2024 at 3:01 PM Amit Kapila wrote: > > 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

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

2024-11-18 Thread Shubham Khanna
On Sat, Nov 16, 2024 at 5:43 PM Shlok Kyal wrote: > > 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

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

2024-11-18 Thread vignesh C
On Mon, 18 Nov 2024 at 13:07, Shlok Kyal wrote: > > Thanks for providing the comments. > > On Sat, 16 Nov 2024 at 17:29, vignesh C wrote: > > I have attached the updated version of the patch. Few comments: 1) We have the following check for cols validation and rf validation: /* * If we

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

2024-11-18 Thread Zhijie Hou (Fujitsu)
On Saturday, November 16, 2024 2:41 AM Shlok Kyal wrote: > > > > Thanks for providing the comments. I have fixed all the comments and attached > the updated patch. Thanks for the patch. I have one comment for the following codes: + /* +* Bitmap of published column

Re: Showing applied extended statistics in explain Part 2

2024-11-18 Thread Ilia Evdokimov
Hi everyone! Thank you for your work. 1) While exploring extended statistics, I encountered a bug that occurs when using EXPLAIN (STATS) with queries containing OR conditions: CREATE TABLE t (a int, b int, c int, d int); INSERT INTO t SELECT x/10+1, x, x + 10, x * 2 FROM generate_series(1,10

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

2024-11-18 Thread Shlok Kyal
On Mon, 18 Nov 2024 at 08:57, Zhijie Hou (Fujitsu) wrote: > > On Saturday, November 16, 2024 2:41 AM Shlok Kyal > wrote: > > > > > > > Thanks for providing the comments. I have fixed all the comments and > > attached > > the updated patch. > > Thanks for the patch. I have one comment for the fo

Re: NOT ENFORCED constraint feature

2024-11-18 Thread jian he
On Fri, Nov 15, 2024 at 6:21 PM Amul Sul wrote: > > Updated version attached. hi. i only played around with v4-0001-Add-support-for-NOT-ENFORCED-in-CHECK-constraints.patch. create table t(a int); alter table t ADD CONSTRAINT the_constraint CHECK (a > 0) NOT ENFORCED; insert into t select -1; sel

Re: AIO v2.0

2024-11-18 Thread Jakub Wartak
On Fri, Sep 6, 2024 at 9:38 PM Andres Freund wrote: > Hi, > > Attached is the next version of the patchset. (..) Hi Andres, Thank You for worth admiring persistence on this. Please do not take it as criticism, just more like set of questions regarding the patchset v2.1 that I finally got litt

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

2024-11-18 Thread vignesh C
On Mon, 18 Nov 2024 at 15:47, Shubham Khanna wrote: > > On Fri, Nov 15, 2024 at 7:07 PM vignesh C wrote: > > I have fixed the given comments. The attached Patch contains the > required changes. Couple of minor comments: 1) Since the previous error is going to exit, this pfree is not required: +

Re: Parametrization minimum password lenght

2024-11-18 Thread Bertrand Drouvot
Hi, On Mon, Nov 18, 2024 at 10:01:41AM +0100, Emanuele Musella wrote: > Hi all, > > we have fixed the following warning from the CFbot: > > [07:14:29.637] passwordcheck.c:37:5: error: no previous extern declaration > for non-static variable 'min_password_length' > [-Werror,-Wmissing-variable-dec

Re: Forbid to DROP temp tables of other sessions

2024-11-18 Thread Rafia Sabih
On Thu, 14 Nov 2024 at 09:55, Daniil Davydov <3daniss...@gmail.com> wrote: > On Wed, Oct 30, 2024 at 7:32 PM Rafia Sabih > wrote: > > > Good catch. I agree with this being an unwarranted behaviour. > > A minor comment from my end is the wording of the error message. > > Based on the Postgresql er

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

2024-11-18 Thread Shubham Khanna
On Mon, Nov 18, 2024 at 4:11 PM vignesh C wrote: > > On Mon, 18 Nov 2024 at 15:47, Shubham Khanna > wrote: > > > > On Fri, Nov 15, 2024 at 7:07 PM vignesh C wrote: > > > > I have fixed the given comments. The attached Patch contains the > > required changes. > > Couple of minor comments: > 1) Si

Re: Using read_stream in index vacuum

2024-11-18 Thread Andrey M. Borodin
> On 2 Nov 2024, at 02:36, Kirill Reshke wrote: > > I noticed CI failure for this patch. This does not look like a flap. Seems like vacuum did not start index cleanup. I’ve added "index_cleanup on". Thanks! Best regards, Andrey Borodin. v8-0001-Prototype-B-tree-vacuum-streamlineing.patch D

Re: CI CompilerWarnings test fails on 15 in mingw_cross_warning

2024-11-18 Thread Peter Eisentraut
On 17.11.24 02:59, Andres Freund wrote: 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 ty

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

2024-11-18 Thread Shubham Khanna
On Fri, Nov 15, 2024 at 7:07 PM vignesh C wrote: > > 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

Re: Reduce TupleHashEntryData struct size by half

2024-11-18 Thread Heikki Linnakangas
On 18/11/2024 02:01, Jeff Davis wrote: TupleHashEntryData is the size of a hash bucket, and it's currently 24 bytes. The size of the structure is important for HashAgg and other callers that can build up large hashtables of small tuples. Waste in this structure is even worse when the hash table

Auto Vacuum optimisation

2024-11-18 Thread wenhui qiu
HI hackers and japin li There was an earlier discussion about auto vacuum optimisation( https://www.postgresql.org/message-id/6a2ac9b7-6535-4bb1-8274-0647f7c31c82%40dalibo.com),I referring to the discussion in there, I implemented a parameter selection triggering the calculation of AUTO VACUU

fix deprecation mention for age() and mxid_age()

2024-11-18 Thread Bertrand Drouvot
Hi hackers, 48b5aa3143 mentioned age() and mxid_age() as deprecated. As per the discussion in [1], it looks like that was not intentional. Please find attached a patch to fix this on master and its version for the 17 stable branch backpatch. I think that's worth a backpatch as that could raise c

Re: Parametrization minimum password lenght

2024-11-18 Thread Emanuele Musella
Hi all, we have fixed the following warning from the CFbot: [07:14:29.637] passwordcheck.c:37:5: error: no previous extern declaration for non-static variable 'min_password_length' [-Werror,-Wmissing-variable-declarations] In attach the fixed patch. Best regards Il giorno mer 13 nov 2024 alle

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

2024-11-18 Thread Amit Kapila
On Mon, Nov 18, 2024 at 12:24 PM Nisha Moond wrote: > > On Fri, Nov 15, 2024 at 3:01 PM Amit Kapila wrote: > > > > 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, update