Re: On disable_cost

2024-10-02 Thread Laurenz Albe
On Wed, 2024-10-02 at 10:08 -0400, Robert Haas wrote: > On Fri, Sep 27, 2024 at 4:42 AM Laurenz Albe wrote: > > 1. The "disabled nodes" are always displayed. > >     I'd be happier if it were only shown for COSTS ON, but I think it > >     would be best if they were only shown with VERBOSE ON. > >

Re: On disable_cost

2024-10-02 Thread Laurenz Albe
On Wed, 2024-10-02 at 21:55 +1300, David Rowley wrote: > On Tue, 1 Oct 2024 at 06:17, Laurenz Albe wrote: > > Why did you change "Disabled" from an integer to a boolean? > > I just don't think "Disabled Nodes" is all that self-documenting and > I'm also unsure why the full integer value of disabl

Re: pg_parse_json() should not leak token copies on failure

2024-10-02 Thread Andrew Dunstan
On 2024-10-01 Tu 3:04 PM, Jacob Champion wrote: (Tom, thank you for the fixup in 75240f65!) Off-list, Andrew suggested an alternative approach to the one I'd been taking: let the client choose whether it wants to take token ownership to begin with. v3 adds a new flag (and associated API) which

Re: Add support to TLS 1.3 cipher suites and curves lists

2024-10-02 Thread Jacob Champion
On Wed, Sep 25, 2024 at 6:39 AM Daniel Gustafsson wrote: > I can't recall specific bounds for supporting LibreSSL even being discussed, > the support is also not documented as an official thing. Requiring TLS 1.3 > APIs for supporting a library in 2025 (when 18 ships) doesn't seem entirely > unre

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-10-02 Thread Masahiko Sawada
On Tue, Oct 1, 2024 at 8:57 PM Tom Lane wrote: > > Noah Misch writes: > > On Tue, Oct 01, 2024 at 11:55:48AM -0700, Masahiko Sawada wrote: > >> Considering that the population of database cluster signedness will > >> converge to signedness=true in the future, we can consider using > >> -fsigned-c

Re: Rename PageData to XLogPageData

2024-10-02 Thread Heikki Linnakangas
On 02/10/2024 14:30, Peter Eisentraut wrote: I was fiddling a bit with making some Page-related APIs const-proof, which might involve changing something like "Page p" to "const PageData *p", but I was surprised that a type PageData exists but it's an unrelated type local to generic_xlog.c. Go

Re: bgwrite process is too lazy

2024-10-02 Thread Tomas Vondra
On 10/2/24 17:02, Tony Wayne wrote: > > > On Wed, Oct 2, 2024 at 8:14 PM Laurenz Albe > wrote: > > On Wed, 2024-10-02 at 16:48 +0800, wenhui qiu wrote: > > Whenever I check the checkpoint information in a log, most dirty > pages are written by the ch

Re: bgwrite process is too lazy

2024-10-02 Thread Tony Wayne
On Wed, Oct 2, 2024 at 8:14 PM Laurenz Albe wrote: > On Wed, 2024-10-02 at 16:48 +0800, wenhui qiu wrote: > > Whenever I check the checkpoint information in a log, most dirty pages > are written by the checkpoint process > > That's exactly how it should be! > > is it because if bgwriter frequentl

Re: general purpose array_sort

2024-10-02 Thread Junwang Zhao
On Wed, Oct 2, 2024 at 9:51 AM jian he wrote: > > > > > > > + typentry = (TypeCacheEntry *) fcinfo->flinfo->fn_extra; > > > + if (typentry == NULL || typentry->type_id != elmtyp) > > > + { > > > + typentry = lookup_type_cache(elmtyp, sort_asc ? TYPECACHE_LT_OPR : > > > TYPECACHE_GT_OPR); > > > + f

Re: bgwrite process is too lazy

2024-10-02 Thread Laurenz Albe
On Wed, 2024-10-02 at 16:48 +0800, wenhui qiu wrote: > Whenever I check the checkpoint information in a log, most dirty pages are > written by the checkpoint process That's exactly how it should be! Yours, Laurenz Albe

Re: not null constraints, again

2024-10-02 Thread Alvaro Herrera
On 2024-Oct-02, Alvaro Herrera wrote: > On 2024-Oct-02, jian he wrote: > > > On Tue, Oct 1, 2024 at 11:20 PM Alvaro Herrera > > wrote: > > after v7, still not bullet-proof. as before, pg_dump/restore will fail > > for the following: > > > > drop table if exists t2, t2_0 > > create table t2 (a

Re: pg_verifybackup: TAR format backup verification

2024-10-02 Thread Robert Haas
On Tue, Oct 1, 2024 at 1:32 PM Tom Lane wrote: > Yes, mamba thinks this is OK. Committed. -- Robert Haas EDB: http://www.enterprisedb.com

Re: On disable_cost

2024-10-02 Thread Robert Haas
On Fri, Sep 27, 2024 at 4:42 AM Laurenz Albe wrote: > 1. The "disabled nodes" are always displayed. >I'd be happier if it were only shown for COSTS ON, but I think it >would be best if they were only shown with VERBOSE ON. > >After all, the messages are pretty verbose... I agree that

Re: On disable_cost

2024-10-02 Thread Robert Haas
On Wed, Oct 2, 2024 at 4:55 AM David Rowley wrote: > On Tue, 1 Oct 2024 at 06:17, Laurenz Albe wrote: > > Why did you change "Disabled" from an integer to a boolean? > > I just don't think "Disabled Nodes" is all that self-documenting and > I'm also unsure why the full integer value of disabled_n

Re: not null constraints, again

2024-10-02 Thread Alvaro Herrera
e the same. > > > for partitioned table > now both ALTER TABLE ONLY ADD CONSTRAINT NOT NULL, > ALTER TABLE ONLY ALTER COLUMN SET NOT NULL > will error out. > I am fine with partitioned table behavior. Yeah, this naughty relationship between ONLY and NO INHERIT is bothersome and maybe we need to re-examine it. -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.com/ #error "Operator lives in the wrong universe" ("Use of cookies in real-time system development", M. Gleixner, M. Mc Guire)

Re: Allowing parallel-safe initplans

2024-10-02 Thread Frédéric Yhuel
Le 12/04/2023 à 20:06, Robert Haas a écrit : There's only one existing test case that visibly changes plan with these changes. The new plan is clearly saner-looking than before, and testing with some data loaded into the table confirms that it is faster. I'm not sure if it's worth devising m

Re: pg_basebackup and error messages dependent on the order of the arguments

2024-10-02 Thread Daniel Westermann (DWE)
>> My point was not so much about --compress but rather giving a good error >> message. >Right, and my point was that the issue is bigger than --compress. >For example, you get exactly the same misbehavior with >$ pg_basebackup --checkpoint=fast --format=t -d --pgdata=/var/tmp/dummy >pg_baseback

Re: Psql meta-command conninfo+

2024-10-02 Thread Jim Jones
On 02.10.24 06:48, Hunaid Sohail wrote: > Should I revert to the v34 docs for Session User, or is it fine as is? What I tried to say is that the current description is a bit vague --- specially "Authenticated User". > Authenticated User: The name of the user returned by PQuser() > Session User

Re: [BUG FIX]Connection fails with whitespace after keepalives parameter value

2024-10-02 Thread Fujii Masao
On 2024/10/02 11:35, Michael Paquier wrote: On Tue, Oct 01, 2024 at 12:29:15PM -0400, Tom Lane wrote: Fujii Masao writes: Is a connection URL with whitespace, like "tcp:postgresql://localhost:5432/postgres?keepalives=1 & ...", considered valid? If not, the issue seems to be that ecpg adds

Re: Parallel workers stats in pg_stat_database

2024-10-02 Thread Benoit Lobréau
Hi, Thanks for your imput ! I will fix the doc as proposed and do the split as soon as I have time. On 10/1/24 09:27, Michael Paquier wrote: I'm less a fan of the addition for utilities because these are less common operations. My thought process was that in order to size max_parallel_worke

Re: Return pg_control from pg_backup_stop().

2024-10-02 Thread David Steele
On 10/2/24 10:11, Michael Paquier wrote: On Fri, May 17, 2024 at 12:46:49PM +1000, David Steele wrote: The basic idea is to harden recovery by returning a copy of pg_control from pg_backup_stop() that has a flag set to prevent recovery if the backup_label file is missing. Instead of backup soft

Re: On disable_cost

2024-10-02 Thread David Rowley
On Tue, 1 Oct 2024 at 06:17, Laurenz Albe wrote: > Why did you change "Disabled" from an integer to a boolean? I just don't think "Disabled Nodes" is all that self-documenting and I'm also unsure why the full integer value of disabled_nodes is required over just displaying the boolean value of if

Re: Conflict Detection and Resolution

2024-10-02 Thread Peter Smith
Hi, here are my code/test review comments for patch v14-0001. (the v14-0001 docs review was already previously posted) == src/backend/commands/subscriptioncmds.c parse_subscription_conflict_resolvers: 1. + /* Check if the conflict type already exists in the list */ + if (list_member(SeenTyp

Re: not null constraints, again

2024-10-02 Thread jian he
On Tue, Oct 1, 2024 at 11:20 PM Alvaro Herrera wrote: > > On 2024-Oct-01, jian he wrote: > > > create table t2 (a int primary key constraint foo not null no inherit); > > primary key cannot coexist with not-null no inherit? > > here t2, pg_dump/restore will fail. > > Yeah, this needs to throw an

Re: Enhance create subscription reference manual

2024-10-02 Thread Yugo NAGATA
On Wed, 02 Oct 2024 16:25:35 +0900 (JST) Tatsuo Ishii wrote: > > Also, the "public" parameter in CREATE PUBLICATION doc, > > You mean "publish"? Yes. Sorry for the typo. > > > "vacuum_index_cleanup" and > > "vacuum_truncate" storage parameters in CREATE TABLE doc might be also > > targets t

Re: Enhance create subscription reference manual

2024-10-02 Thread Tatsuo Ishii
>> > I agreed with adding tag to "failover" since it is done in the >> > description on "slot_name" parameter. >> > >> > How about also rewrite it to "enable the failover option" rather than >> > simply >> > "enable the failover" to clarify that the parameter is refereed to. >> > >> > We could

Re: Return pg_control from pg_backup_stop().

2024-10-02 Thread Michael Paquier
On Fri, May 17, 2024 at 12:46:49PM +1000, David Steele wrote: > This is greatly simplified implementation of the patch proposed in [1] and > hopefully it addresses the concerns expressed there. Since the > implementation is quite different it seemed like a new thread was > appropriate, especially s

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

2024-10-01 Thread Andrei Lepikhov
On 1/10/2024 12:25, Alexander Korotkov wrote: I think this patchset got much better, and it could possible be committed after another round of cleanup and comment/docs improvement. It would be very kind if you share your view on the decisions made in this patchset. I went through the code one mor

Re: Enhance create subscription reference manual

2024-10-01 Thread Yugo NAGATA
On Wed, 02 Oct 2024 14:52:58 +0900 (JST) Tatsuo Ishii wrote: > >> Currently the manual explains create subscription's "failover" > >> parameter as follows: > >> > >> > >> Since no connection is made when this option is > >> false, no tables are subscribed. To initia

Re: Add on_error and log_verbosity options to file_fdw

2024-10-01 Thread Fujii Masao
On 2024/10/02 9:27, Masahiko Sawada wrote: Sorry for being late in joining the review of this patch. Both 0001 and 0003 look good to me. I have two comments on the 0002 patch: Thanks for the review! I think that while scanning a file_fdw foreign table with log_verbosity='silent' the query i

RE: Conflict detection for update_deleted in logical replication

2024-10-01 Thread Hayato Kuroda (Fujitsu)
Dear Hou, Thanks for updating the patch! Here are my comments. My comments do not take care which file contains the change, and the ordering may be random. 1. ``` + and detect_conflict + are enabled. ``` "detect_conflict" still exists, it should be "detect_update_deleted". 2. maybe_

Re: Enhance create subscription reference manual

2024-10-01 Thread Tatsuo Ishii
>> Currently the manual explains create subscription's "failover" >> parameter as follows: >> >> >> Since no connection is made when this option is >> false, no tables are subscribed. To initiate >> replication, you must manually create the replication slot,

Re: Enhance create subscription reference manual

2024-10-01 Thread Yugo Nagata
On Wed, 02 Oct 2024 12:15:50 +0900 (JST) Tatsuo Ishii wrote: > Currently the manual explains create subscription's "failover" > parameter as follows: > > > Since no connection is made when this option is > false, no tables are subscribed. To initiate > rep

Re: coupling of index and table access methods

2024-10-01 Thread Aleksey Demakov
As far as I see a possible way to do this is to add two optional functions to table AM interface: char * (*default_index_am)(void) ; bool (*validate_index_am)(char *); If the first one is not provided then DEFAULT_INDEX_TYPE, that is "btree", has to be used instead. If the second one is not provi

Re: Split index and table statistics into different types of stats

2024-10-01 Thread Michael Paquier
in the CF as returned with feedback: https://commitfest.postgresql.org/49/4792/ It could always be re-created later on, as required. -- Michael signature.asc Description: PGP signature

Re: Psql meta-command conninfo+

2024-10-01 Thread Hunaid Sohail
Hi, On Tue, Oct 1, 2024 at 10:50 AM Jim Jones wrote: > Right. I meant "Session User" > > > Authenticated User: The name of the user returned by PQuser() > > Session User: The session user's name. > Should I revert to the v34 docs for Session User, or is it fine as is? Session User: The session

Re: Set query_id for query contained in utility statement

2024-10-01 Thread Michael Paquier
On Fri, Aug 30, 2024 at 09:37:03AM +0200, Anthonin Bonnefoy wrote: > Thanks for the review. I think the parser state is mostly used for the > error callbacks and parser_errposition but I'm not 100% sure. Either > way, you're right and it probably shouldn't be in the patch. I've > modified the patch

Re: Converting README documentation to Markdown

2024-10-01 Thread Tristan Partin
On Sat Jun 29, 2024 at 5:24 AM EDT, Jelte Fennema-Nio wrote: On Fri, 28 Jun 2024 at 20:40, Peter Eisentraut wrote: I have my "less" set up so that "less somefile.md" automatically renders the markdown. That's been pretty useful. But if that now keeps making a mess out of PostgreSQL's README f

Re: Fix some ubsan/asan related issues

2024-10-01 Thread Tristan Partin
On Mon Sep 16, 2024 at 9:29 AM EDT, Junwang Zhao wrote: I tried your v1-0002, it works at compile phase but failed to run initdb with the following leak detected: = ==64983==ERROR: LeakSanitizer: detected memory leaks Direct leak o

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-10-01 Thread Tom Lane
Noah Misch writes: > On Tue, Oct 01, 2024 at 11:55:48AM -0700, Masahiko Sawada wrote: >> Considering that the population of database cluster signedness will >> converge to signedness=true in the future, we can consider using >> -fsigned-char to prevent similar problems for the future. We need to >

Re: query_id, pg_stat_activity, extended query protocol

2024-10-01 Thread Michael Paquier
On Wed, Oct 02, 2024 at 06:00:00AM +0300, Alexander Lakhin wrote: > Fortunately, it's still pretty warm here, so I'm wearing T-shirt and my > sleeve isn't long enough for that, but if you gave me 2-3 days, I would > focus on researching this area... Sure, thanks. I am also spending a few days thi

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-10-01 Thread Noah Misch
On Tue, Oct 01, 2024 at 11:55:48AM -0700, Masahiko Sawada wrote: > On Mon, Sep 30, 2024 at 11:49 AM Noah Misch wrote: > > This has initdb set the field to the current C implementation's signedness. > > I > > wonder if, instead, initdb should set signedness=true unconditionally. Then > > the onl

Re: query_id, pg_stat_activity, extended query protocol

2024-10-01 Thread Alexander Lakhin
Hello Michael, 02.10.2024 03:52, Michael Paquier wrote: Alexander, I've thought about a couple of fancy cases for ExecutorRun() but I could not break it. Perhaps you have something in your sleeve that would also break this case? -- Fortunately, it's still pretty warm here, so I'm wearing T-sh

Re: Requiring LLVM 14+ in PostgreSQL 18

2024-10-01 Thread Thomas Munro
On Tue, Oct 1, 2024 at 11:23 PM Peter Eisentraut wrote: > I have committed the two remaining patches. I'll go nudge any affected > buildfarm members to upgrade as needed. Thanks! FWIW next on my list of LLVM maintenance work are: fix ARM crash in the next week or so (CF #5220), and figure out w

Re: [BUG FIX]Connection fails with whitespace after keepalives parameter value

2024-10-01 Thread Michael Paquier
On Tue, Oct 01, 2024 at 12:29:15PM -0400, Tom Lane wrote: > Fujii Masao writes: >> Is a connection URL with whitespace, like >> "tcp:postgresql://localhost:5432/postgres?keepalives=1 & ...", >> considered valid? If not, the issue seems to be that ecpg adds unnecessary >> whitespace >> to the con

Re: Call rm_redo in a temporary memory context

2024-10-01 Thread Michael Paquier
On Tue, Oct 01, 2024 at 03:29:19PM +0500, Kirill Reshke wrote: > Compiler warns about `src/backend/access/transam/xlogrecovery.c:1860`, > where we switch to maybe-uninitialized memory context. Lets assign > this to something. + yourself e.g. in rm_startup. Starting with version + 18.0, it'

Re: Inconsistency in reporting checkpointer stats

2024-10-01 Thread Fujii Masao
On 2024/10/02 1:50, Nitin Jadhav wrote: Before committing the patch, I revised it with the following changes: - I added "shared" to the description of pg_stat_checkpointer.buffers_written to clarify that it tracks shared buffers. - In the checkpoint log message, I replaced "slru" with "SLR

Re: general purpose array_sort

2024-10-01 Thread jian he
> > > > + typentry = (TypeCacheEntry *) fcinfo->flinfo->fn_extra; > > + if (typentry == NULL || typentry->type_id != elmtyp) > > + { > > + typentry = lookup_type_cache(elmtyp, sort_asc ? TYPECACHE_LT_OPR : > > TYPECACHE_GT_OPR); > > + fcinfo->flinfo->fn_extra = (void *) typentry; > > + } > > you ne

Re: query_id, pg_stat_activity, extended query protocol

2024-10-01 Thread Michael Paquier
On Tue, Oct 01, 2024 at 10:00:00PM +0300, Alexander Lakhin wrote: > Hello Michael, > > 01.10.2024 05:07, Michael Paquier wrote: > > On Mon, Sep 30, 2024 at 10:07:55AM +0900, Michael Paquier wrote: > > ... > > And done this part. > > If I'm not missing something, all the patches discussed here are

Re: Add on_error and log_verbosity options to file_fdw

2024-10-01 Thread Masahiko Sawada
Hi, On Mon, Sep 30, 2024 at 8:36 AM Fujii Masao wrote: > > > > On 2024/09/26 21:57, torikoshia wrote: > > Updated the patches. > > Thanks for updating the patches! I’ve made some changes based on your work, > which are attached. > Barring any objections, I'm thinking to push these patches. > > F

Re: Truncate logs by max_log_size

2024-10-01 Thread Jim Jones
On 01.10.24 17:46, Kirill Gavrilov wrote: >  My apologies, attached patch should work on master branch. Nice. I tested the feature and it does what it is intended to. postgres=# SHOW max_log_size;  max_log_size --  10 (1 row) postgres=# INSERT INTO t VALUES (1,2,3,4,5,6,7,8,9,0);

Re: Patch: Make pg_waldump.sgml less confusing

2024-10-01 Thread Michael Paquier
On Tue, Oct 01, 2024 at 11:44:40PM +0200, Christoph Berg wrote: > While that is technically correct because it then explains that > FORK is something like "_main", I think this is just confusing and > moving the underscore into the file name format description is much > cleaner. (And inside the res

Re: Fixing backslash dot for COPY FROM...CSV

2024-10-01 Thread Tom Lane
"Daniel Verite" writes: > Tom Lane wrote: >> Returning to my upthread thought that >>> I think we should fix it so that \. that's not alone on a line >>> throws an error, but I wouldn't go further than that. >> here's a quick follow-on patch to make that happen. It could >> probably do with a tes

Re: Converting README documentation to Markdown

2024-10-01 Thread Daniel Gustafsson
> On 1 Oct 2024, at 16:53, Jelte Fennema-Nio wrote: > On Tue, 1 Oct 2024 at 15:52, Daniel Gustafsson wrote: >>> Apart from this, I don't changing the placeholders like to < foo >. >>> In some cases, this really decreases readability. Maybe we should look for >>> different approaches there.

Re: Using per-transaction memory contexts for storing decoded tuples

2024-10-01 Thread Masahiko Sawada
On Tue, Oct 1, 2024 at 5:15 AM Amit Kapila wrote: > > On Fri, Sep 27, 2024 at 10:24 PM Masahiko Sawada > wrote: > > > > On Fri, Sep 27, 2024 at 12:39 AM Shlok Kyal > > wrote: > > > > > > On Mon, 23 Sept 2024 at 09:59, Amit Kapila > > > wrote: > > > > > > > > On Sun, Sep 22, 2024 at 11:27 AM

Re: Changing the state of data checksums in a running cluster

2024-10-01 Thread Daniel Gustafsson
> On 1 Oct 2024, at 00:43, Michael Banck wrote: > > Hi, > > On Mon, Sep 30, 2024 at 11:21:30PM +0200, Daniel Gustafsson wrote: >>> Yeah, I think a view like pg_stat_progress_checksums would work. >> >> Added in the attached version. It probably needs some polish (the docs for >> sure do) but i

Re: Fixing backslash dot for COPY FROM...CSV

2024-10-01 Thread Daniel Verite
Tom Lane wrote: > > [ v6-0001-Support-backslash-dot-on-a-line-by-itself-as-vali.patch ] > > I did some more work on the docs and comments, and pushed that. Thanks! > Returning to my upthread thought that > > >>> I think we should fix it so that \. that's not alone on a line > >>> throw

Re: pg_parse_json() should not leak token copies on failure

2024-10-01 Thread Jacob Champion
(Tom, thank you for the fixup in 75240f65!) Off-list, Andrew suggested an alternative approach to the one I'd been taking: let the client choose whether it wants to take token ownership to begin with. v3 adds a new flag (and associated API) which will allow libpq to refuse ownership of those token

Re: query_id, pg_stat_activity, extended query protocol

2024-10-01 Thread Alexander Lakhin
Hello Michael, 01.10.2024 05:07, Michael Paquier wrote: On Mon, Sep 30, 2024 at 10:07:55AM +0900, Michael Paquier wrote: ... And done this part. If I'm not missing something, all the patches discussed here are committed now, so maybe I've encountered a new anomaly. Please try the following sc

Re: pg_trgm comparison bug on cross-architecture replication due to different char implementation

2024-10-01 Thread Masahiko Sawada
On Mon, Sep 30, 2024 at 11:49 AM Noah Misch wrote: > > On Wed, Sep 25, 2024 at 03:46:27PM -0700, Masahiko Sawada wrote: > > On Wed, Sep 18, 2024 at 6:46 PM Noah Misch wrote: > > > On Tue, Sep 17, 2024 at 09:43:41PM -0700, Masahiko Sawada wrote: > > > > On Mon, Sep 16, 2024 at 9:24 AM Noah Misch

Re: pg_upgrade check for invalid databases

2024-10-01 Thread Daniel Gustafsson
> On 1 Oct 2024, at 00:20, Tom Lane wrote: > > Daniel Gustafsson writes: >>> On 30 Sep 2024, at 16:55, Tom Lane wrote: >>> TBH I'm not finding anything very much wrong with the current >>> behavior... this has to be a rare situation, do we need to add >>> debatable behavior to make it easier? >

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

2024-10-01 Thread Alexander Korotkov
Hi Tom, On Mon, Sep 23, 2024 at 2:10 PM Alexander Korotkov wrote: > On Mon, Sep 16, 2024 at 3:44 PM Andrei Lepikhov wrote: > > On 9/9/2024 12:36, Alexander Korotkov wrote: > > > Also, I agree it get it's wrong to directly copy RestrictInfo struct > > > in group_similar_or_args(). Instead, I've

Re: Proposal to Enable/Disable Index using ALTER INDEX

2024-10-01 Thread Shayon Mukherjee
Hello, Also added this as a post in Commit Fest [0] [0] https://commitfest.postgresql.org/50/5274/ Thank you Shayon > On Sep 26, 2024, at 1:39 PM, Shayon Mukherjee wrote: > > Hello, > > I am back with a PATCH :). Thanks to everyone in the threads for all the > helpful discussions. > > This

Re: pg_verifybackup: TAR format backup verification

2024-10-01 Thread Tom Lane
I wrote: > Robert Haas writes: >> Here is an attempt at cleaning this up. I'm far from convinced that >> it's fully correct; my local compiler (clang version 15.0.7) doesn't >> seem fussed about conflating size_t with uint64, not even with -Wall >> -Werror. I don't suppose you have a fussier compi

Re: Requiring LLVM 14+ in PostgreSQL 18

2024-10-01 Thread Peter Eisentraut
On 21.08.24 16:00, Peter Eisentraut wrote: On 17.05.24 00:54, Thomas Munro wrote: On Fri, May 17, 2024 at 3:17 AM Nazir Bilal Yavuz wrote: Actually, 32 bit builds are working but the Perl version needs to be updated to 'perl5.36-i386-linux-gnu' in .cirrus.tasks.yml. I changed 0001 with the wor

Re: SET or STRICT modifiers on function affect planner row estimates

2024-10-01 Thread Michał Kłeczek
Hi Tom, > On 30 Sep 2024, at 21:24, Tom Lane wrote: > > =?utf-8?Q?Micha=C5=82_K=C5=82eczek?= writes: >>> > >> The table structure is as follows: > >> CREATE TABLE tbl (…) PARTITION BY RANGE year(col02_date) > > You're still expecting people to magically intuit what all those > "..."s are.

Re: Inconsistency in reporting checkpointer stats

2024-10-01 Thread Nitin Jadhav
> Before committing the patch, I revised it with the following changes: > > - I added "shared" to the description of pg_stat_checkpointer.buffers_written > to clarify that it tracks shared buffers. > - In the checkpoint log message, I replaced "slru" with "SLRU" for > consistency, > as upperca

Re: [PATCH] Replace magic constant 3 with NUM_MERGE_MATCH_KINDS

2024-10-01 Thread Peter Eisentraut
On 13.05.24 12:22, Aleksander Alekseev wrote: Hi, Thanks. I see a few pieces of code that use special FOO_NUMBER enum values instead of a macro. Should we refactor these pieces accordingly? PFA another patch. I think this is a sensible improvement. But please keep the trailing commas on the

Re: Conflict detection for update_deleted in logical replication

2024-10-01 Thread Amit Kapila
On Mon, Sep 30, 2024 at 12:02 PM Zhijie Hou (Fujitsu) wrote: > > On Wednesday, September 25, 2024 2:23 AM Masahiko Sawada > wrote: > > > > I think the remote wal flush location is asked using a replication protocol. > > Therefore, if a new worker is responsible for asking wal flush location from

Re: Inconsistency in reporting checkpointer stats

2024-10-01 Thread Fujii Masao
On 2024/10/01 3:33, Fujii Masao wrote: On 2024/09/22 20:44, Nitin Jadhav wrote: +   CheckpointStats.ckpt_slru_written, +   (double) CheckpointStats.ckpt_slru_written * 100 / NBuffers, I don't think NBu

Re: Call rm_redo in a temporary memory context

2024-10-01 Thread Kirill Reshke
Hi! On Wed, 7 Aug 2024 at 16:24, Heikki Linnakangas wrote: > > Many resource managers set up a temporary memory context which is reset > after replaying the record. It seems a bit silly for each rmgr to do > that on their own, so I propose that we do it in a centralized fashion. > The attached pa

Re: [BUG FIX]Connection fails with whitespace after keepalives parameter value

2024-10-01 Thread Tom Lane
Fujii Masao writes: > On 2024/10/01 14:11, Yuto Sasaki (Fujitsu) wrote: >> Root cause: The method for parsing the keepalives parameter in the >> useKeepalives >> function of the libpq library is not appropriate. Specifically, it doesn't >> account for whitespace following the numeric value. > Is

Re: Set query_id for query contained in utility statement

2024-10-01 Thread Anthonin Bonnefoy
On Mon, Sep 30, 2024 at 5:14 PM jian he wrote: > Is it possible to normalize top level utilities explain query, make > these two have the same queryid? > explain(verbose) EXECUTE test_prepare_pgss1(1, 2); > explain(verbose) EXECUTE test_prepare_pgss1(1, 3); > > I guess this is a corner case. This

Re: Truncate logs by max_log_size

2024-10-01 Thread Greg Sabino Mullane
On Fri, Sep 27, 2024 at 6:37 AM Andrey M. Borodin wrote: > Consider max_log_size = 10Mb. The perspective might look very different. > It’s not about WHERE anymore. It's a guard against heavy abuse. > Can you elaborate on this? Do you mean someone purposefully writing large entries to your log fi

Re: Parallel workers stats in pg_stat_database

2024-10-01 Thread Michael Paquier
On Tue, Sep 17, 2024 at 02:22:59PM +0200, Benoit Lobréau wrote: > Here is an updated patch fixing the aforementionned problems > with tests and vacuum stats. Your patch needs a rebase. + Number of parallel workers obtained by utilities on this database s/obtained/launched/ for consistency?

Re: Conflict Detection and Resolution

2024-10-01 Thread shveta malik
On Tue, Oct 1, 2024 at 9:54 AM shveta malik wrote: > > On Tue, Oct 1, 2024 at 9:48 AM shveta malik wrote: > > > > I have started reviewing patch002, it is WIP, but please find initial > set of comments: > Please find second set of comments for patch002: 9) can_create_full_tuple(): + for (i = 0;

Re: Row pattern recognition

2024-10-01 Thread Jacob Champion
On Sun, Sep 29, 2024 at 5:08 PM Tatsuo Ishii wrote: > > I think implementing MEASURES is challenging. Especially we need to > > find how our parser accepts "colname OVER > > window_definition". Currently PostgreSQL's parser only accepts "func() > > OVER window_definition" Even it is technically po

Re: pg_verifybackup: TAR format backup verification

2024-10-01 Thread Robert Haas
On Mon, Sep 30, 2024 at 6:05 PM Tom Lane wrote: > Robert Haas writes: > > On Mon, Sep 30, 2024 at 11:31 AM Tom Lane wrote: > >> WFM, modulo the suggestion about changing data types. > > > I would prefer not to make the data type change here because it has > > quite a few tentacles. > > I see you

Re: [BUG FIX]Connection fails with whitespace after keepalives parameter value

2024-10-01 Thread Fujii Masao
On 2024/10/01 14:11, Yuto Sasaki (Fujitsu) wrote: Hi hackers, I've discovered a bug in ECPG that causes database connection failures. This issue appears to stem from libpq layer. Found bug: The EXEC SQL CONNECT TO statement fails to connect to the database. Specifically, the following code: `

Re: pg_verifybackup: TAR format backup verification

2024-10-01 Thread Robert Haas
On Tue, Oct 1, 2024 at 10:48 AM Tom Lane wrote: > Sure, I can try it on mamba's host. It's slow though ... OK, thanks. > I apologize for rubbing you the wrong way on this. It was not my > intent. (But, in fact, I had not realized you copied that code > from somewhere else.) That's good to he

Re: Truncate logs by max_log_size

2024-10-01 Thread Kirill Gavrilov
On Tue, Oct 1, 2024 at 2:46 PM Jim Jones wrote: > > On 27.09.24 12:36, Andrey M. Borodin wrote: > > Consider max_log_size = 10Mb. The perspective might look very different. > > It’s not about WHERE anymore. It's a guard against heavy abuse. > > > > The feature looks very important for me. > I ha

Re: On non-Windows, hard depend on uselocale(3)

2024-10-01 Thread Peter Eisentraut
On 28.08.24 20:50, Peter Eisentraut wrote: I suggest that the simplification of the xlocale.h configure tests could be committed separately.  This would also be useful independent of this, and it's a sizeable chunk of this patch. To keep this moving along a bit, I have extracted this part and

Re: Expand applicability of aggregate's sortop optimization

2024-10-01 Thread Andrei Lepikhov
On 18/7/2024 00:03, David Rowley wrote: On Wed, 17 Jul 2024 at 17:12, Andrei Lepikhov wrote: Also, I don't clearly understand the case you mentioned here - does it mean that you want to nullify orders for other aggregate types if they are the same as the incoming order? No, I mean uncondition

Re: not null constraints, again

2024-10-01 Thread jian he
CREATE TABLE a (aa TEXT); CREATE TEMP TABLE z (b TEXT, UNIQUE(aa, b)) inherits (a); \d+ z Table "pg_temp_0.z" Column | Type | Collation | Nullable | Default | Storage | Compression | Stats target | Description +--+---+--+--

Re: not null constraints, again

2024-10-01 Thread jian he
create table t2 (a int primary key constraint foo not null no inherit); primary key cannot coexist with not-null no inherit? here t2, pg_dump/restore will fail. create table t7 (a int generated by default as identity, constraint foo not null a no inherit, b int); create table t7 (a int generated

Re: Truncate logs by max_log_size

2024-10-01 Thread Jim Jones
On 27.09.24 12:36, Andrey M. Borodin wrote: > Consider max_log_size = 10Mb. The perspective might look very different. > It’s not about WHERE anymore. It's a guard against heavy abuse. > > The feature looks very important for me. I have the same opinion. As a fail safe it sounds very useful to m

Re: not null constraints, again

2024-10-01 Thread Alvaro Herrera
On 2024-Oct-01, jian he wrote: > create table t2 (a int primary key constraint foo not null no inherit); > primary key cannot coexist with not-null no inherit? > here t2, pg_dump/restore will fail. Yeah, this needs to throw an error. If you use a table constraint, it does fail as expected: cre

Re: SQLFunctionCache and generic plans

2024-10-01 Thread Alexander Pyhalov
only + * once + */ + foreach(lc, cplans) + { + CachedPlan *cplan = lfirst(lc); + + ReleaseCachedPlan(cplan, NULL); + } + + /* Cleanup the list itself */ + list_free(cplans); +} + /* * fmgr_sql: function call manager for SQL functions */ @@ -1040,6 +1203,7 @@ fmgr_sql(PG_FUNCTION_A

Re: Enable data checksums by default

2024-10-01 Thread Peter Eisentraut
On 27.08.24 17:26, Nathan Bossart wrote: On Tue, Aug 27, 2024 at 05:16:51PM +0200, Peter Eisentraut wrote: On 27.08.24 15:44, Greg Sabino Mullane wrote: On Mon, Aug 26, 2024 at 3:46 PM Nathan Bossart mailto:nathandboss...@gmail.com>> wrote: Should we error if both --data-checksum and --no

Re: not null constraints, again

2024-10-01 Thread jian he
ATExecDropInherit /* * If the parent has a primary key, then we decrement counts for all NOT * NULL constraints */ ObjectAddressSet(address, RelationRelationId, RelationGetRelid(parent_rel)); only not-null constraint, with ALTER TABLE NO INHERIT we still

Re: Converting README documentation to Markdown

2024-10-01 Thread Jelte Fennema-Nio
On Tue, 1 Oct 2024 at 15:52, Daniel Gustafsson wrote: > > So we need to think about a way to make this more robust for future people > > editing. Maybe something in .gitattributes or some editor settings. > > Otherwise, it will be all over the places after a while. > > Maybe we can add some fo

Re: pg_upgrade check for invalid databases

2024-10-01 Thread Daniel Gustafsson
> On 1 Oct 2024, at 02:35, Thomas Krennwallner wrote: > > On 30/09/2024 17.29, Daniel Gustafsson wrote: >>> On 30 Sep 2024, at 16:55, Tom Lane wrote: >>> TBH I'm not finding anything very much wrong with the current >>> behavior... this has to be a rare situation, do we need to add >>> debatable

Re: pg_verifybackup: TAR format backup verification

2024-10-01 Thread Tom Lane
Robert Haas writes: > Here is an attempt at cleaning this up. I'm far from convinced that > it's fully correct; my local compiler (clang version 15.0.7) doesn't > seem fussed about conflating size_t with uint64, not even with -Wall > -Werror. I don't suppose you have a fussier compiler locally tha

Re: Set query_id for query contained in utility statement

2024-10-01 Thread Michael Paquier
On Tue, Oct 01, 2024 at 09:26:40AM +0200, Anthonin Bonnefoy wrote: > This seems to be a known issue. The test_prepare_pgss1's parameters > are A_Const nodes. Those nodes have a custom query jumble which > doesn't record location[1] and thus can't be normalised by pgss. > > That could be fixed by re

Re: Using per-transaction memory contexts for storing decoded tuples

2024-10-01 Thread Amit Kapila
On Fri, Sep 27, 2024 at 10:24 PM Masahiko Sawada wrote: > > On Fri, Sep 27, 2024 at 12:39 AM Shlok Kyal wrote: > > > > On Mon, 23 Sept 2024 at 09:59, Amit Kapila wrote: > > > > > > On Sun, Sep 22, 2024 at 11:27 AM David Rowley > > > wrote: > > > > > > > > On Fri, 20 Sept 2024 at 17:46, Amit Ka

Re: Patch: Show queries of processes holding a lock

2024-10-01 Thread wenhui qiu
Hi Alexey Orlov Thank you for your work on this path,The lock information is recorded in detail,Easy to trace the lock competition at that time there is a detailed lock competition log,But I have a concern,Frequent calls to this function (pgstat_get_backend_current_activity) in heavy lock cont

Re: Doc: typo in config.sgml

2024-10-01 Thread Yugo Nagata
On Tue, 1 Oct 2024 15:16:52 +0900 Yugo NAGATA wrote: > On Tue, 01 Oct 2024 10:33:50 +0900 (JST) > Tatsuo Ishii wrote: > > > >> That's because non-breaking space (nbsp) is not encoded as 0xa0 in > > >> UTF-8. nbsp in UTF-8 is "0xc2 0xa0" (2 bytes) (A 0xa0 is a nbsp's code > > >> point in Unicode

Re: pg_verifybackup: TAR format backup verification

2024-10-01 Thread Robert Haas
On Mon, Sep 30, 2024 at 6:01 PM Tom Lane wrote: > > But then how do you think we should print > > that? Cast to unsigned long long and use %llu? > > Our two standard solutions are to do that or to use UINT64_FORMAT. > But UINT64_FORMAT is problematic in translatable strings because > then the .po

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

2024-10-01 Thread Alexander Lakhin
Hello Tom and Jelte, 31.08.2024 07:04, Alexander Lakhin wrote: I've tested your fix with the modification I proposed upthread: idle_session_timeout_enabled = false; } +if (rand() % 10 == 0) pg_usleep(1); /*   * (5) disable async signal conditions again.

Re: Improving tracking/processing of buildfarm test failures

2024-10-01 Thread Alexander Lakhin
Hello hackers, Please take a look at the September report on buildfarm failures: # SELECT br, count(*) FROM failures WHERE dt >= '2024-09-01' AND  dt < '2024-10-01' GROUP BY br; REL_12_STABLE: 12 REL_13_STABLE: 11 REL_14_STABLE: 12 REL_15_STABLE: 22 REL_16_STABLE: 35 REL_17_STABLE: 19 master: 33

<    2   3   4   5   6   7   8   9   10   11   >