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: 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: Split index and table statistics into different types of stats

2024-10-01 Thread Michael Paquier
On Thu, Jan 25, 2024 at 08:36:17AM +, Bertrand Drouvot wrote: > Just a quick update on this: I had a chat with Andres at pgconf.eu and we > agreed > on the above ordering so that: > > 1) I started working on relfilenode stats (I hope to be able to provide a POC > patch soon). > > 2) The CF e

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: 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: 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: 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: 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: 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: 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: [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: 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

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, enable the

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: 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: 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: 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: 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: 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: 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: 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: [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: `

coupling of index and table access methods

2024-10-01 Thread Aleksey Demakov
Hi hackers, My extension introduces a new table access method together with an index access method. Specifically, these AMs work with in-memory data. I would like to make a CREATE TABLE request with PRIMARY KEY, UNIQUE constraints etc, to pick my in-memory index AM over default btree when the tab

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: 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

Patch: Show queries of processes holding a lock

2024-10-01 Thread Alexey Orlov
Hi, there! I created patch improving the log messages generated by log_lock_waits. Sample output (log_lock_waits=on required): session 1: CREATE TABLE foo (val integer); INSERT INTO foo (val) VALUES (1); BEGIN; UPDATE foo SET val = 3; session 2: BEGIN; UPDATE TABLE foo SET val = 2; Output w/o

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: 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: 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: 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: 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: [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: 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: 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: 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: 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: 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: 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: 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: 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 +--+---+--+--

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

2024-10-01 Thread Yuto Sasaki (Fujitsu)
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: ```c EXEC SQL CONNECT TO tcp:postgresql://localhost:5

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: 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: 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: [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: 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: 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: 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: 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: First draft of PG 17 release notes

2024-10-01 Thread Laurenz Albe
I think that the removal of the "adminpack" extension should be listed in the section "migration to v17" as an incompatibility. I have seen one complaint that pg_upgrade fails if the extension is installed, but a dump/restore would also throw an error. Yours, Laurenz Albe From bab39739eb13f57572b

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: 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: 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

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: 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: SQLFunctionCache and generic plans

2024-10-01 Thread Alexander Pyhalov
Hi. What should we do with "pre-parsed" SQL functions (when prosrc is empty)? How should we create cached plans when we don't have raw parsetrees? Currently we can create cached plans without raw parsetrees, but this means that plan revalidation doesn't work, choose_custom_plan() always returns

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: 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: 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: 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: 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

promote request not received timely on slow Windows machines

2024-10-01 Thread Alexander Lakhin
Hello hackers, Windows animal drongo reiterated a failure of 002_archiving_standby.pl [1] recently [2] and this pushed me to run the issue to ground. The log of the failed test contains: [17:11:11.519](0.001s) ok 3 - recovery_end_command not executed yet ### Promoting node "standby" # Running: p

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: 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: 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: 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: 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: 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

Patch: Make pg_waldump.sgml less confusing

2024-10-01 Thread Christoph Berg
The pg_waldump manpage says the --save-fullpage output format was TIMELINE-LSN.RELTABLESPACE.DATOID.RELNODE.BLKNOFORK when the filenames actually have the format 0001--309A88C0.1663.5.64080.0_main with an underscore in front of FORK. While that is technically correct because it

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: 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 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 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: 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: 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: 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: 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: 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: 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,