Re: Conflict Detection and Resolution

2024-09-29 Thread shveta malik
On Mon, Sep 30, 2024 at 11:04 AM Peter Smith wrote: > > On Mon, Sep 30, 2024 at 2:27 PM shveta malik wrote: > > > > On Fri, Sep 27, 2024 at 1:00 PM Peter Smith wrote: > ... > > > > > > 13. General - ordering of conflict_type. > > > > > > nit - Instead of just some apparent random order, let's pu

Re: Normalize queries starting with SET for pg_stat_statements

2024-09-29 Thread Michael Paquier
On Wed, Sep 25, 2024 at 12:10:02PM +0900, Michael Paquier wrote: > The remaining 0002 is attached for now. I am planning to wrap that > next week after a second lookup, except if there are any comments, of > course. And done with that, after a second round, tweaking some comments. Thanks Greg fo

Doc: typo in config.sgml

2024-09-29 Thread Tatsuo Ishii
I think there's an unnecessary underscore in config.sgml. Attached patch fixes it. Best reagards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 0aec11f443..08173ecb5c 1

Re: May be BUG. Periodic burst growth of the checkpoint_req counter on replica.

2024-09-29 Thread Fujii Masao
On 2024/09/22 13:55, Anton A. Melnikov wrote: On 20.09.2024 19:19, Fujii Masao wrote: I've attached the updated version (0001.patch). I made some cosmetic changes, including reverting the switch in the entries for pg_stat_get_checkpointer_write_time and pg_stat_get_checkpointer_sync_time in

Re: [Bug Fix]standby may crash when switching-over in certain special cases

2024-09-29 Thread Yugo NAGATA
On Wed, 21 Aug 2024 09:11:03 +0800 px shi wrote: > Yugo Nagata 于2024年8月21日周三 00:49写道: > > > > > > > > Is s1 a cascading standby of s2? If otherwise s1 and s2 is the standbys > > of > > > the primary server respectively, it is not surprising that s2 has > > progressed > > > far than s1 when the

pg_walsummary, Character-not-present-in-option

2024-09-29 Thread btsugieyuusuke
Hi hackers, I found probably something to fix in pg_walsummary. pg_walsummary specifies “f:iqw:” as the third argument of getopt_long(). /* process command-line options */ while ((c = getopt_long(argc, argv, "f:iqw:", long_options, &optindex)) != -1) However, o

Re: Pgoutput not capturing the generated columns

2024-09-29 Thread Peter Smith
Here are my review comments for patch v34-0001 == doc/src/sgml/ddl.sgml 1. - Generated columns are skipped for logical replication and cannot be - specified in a CREATE PUBLICATION column list. + Generated columns may be skipped during logical replication according to the +

Re: msys inet_pton strangeness

2024-09-29 Thread Alexander Lakhin
29.09.2024 18:47, Andrew Dunstan wrote: Yeah, src/include/port/win32/sys/socket.h has: #include #include #include I'm inclined to think we might need to reverse the order of the last two. TBH I don't really understand how this has worked up to now. As far as I can see, in my

a litter question about mdunlinkfiletag function

2024-09-29 Thread px shi
*Hi, hackers* *When calculating the path, *forknum* is hardcoded as *MAIN_FORKNUM*:* /* Compute the path. */ p = relpathperm(ftag->rnode, MAIN_FORKNUM); *But since the *ftag* structure already contains *forknum*:* typedef struct FileTag { int16 handler; /* SyncRequestHandler value, saving space

Re: Conflict Detection and Resolution

2024-09-29 Thread shveta malik
On Fri, Sep 27, 2024 at 1:00 PM Peter Smith wrote: > > Here are some review comments for v14-0001. > > This is a WIP, but here are my comments for all the SGML parts. > > (There will be some overlap here with comments already posted by Shveta) > > == > 1. file modes after applying the patch >

Re: long-standing data loss bug in initial sync of logical replication

2024-09-29 Thread Shlok Kyal
On Thu, 26 Sept 2024 at 11:39, Shlok Kyal wrote: > > > In the v7 patch, I am looping through the reorder buffer of the > > current committed transaction and storing all invalidation messages in > > a list. Then I am distributing those invalidations. > > But I found that for a transaction we alread

Re: general purpose array_sort

2024-09-29 Thread Junwang Zhao
On Sun, Sep 29, 2024 at 10:51 AM David G. Johnston wrote: > > On Sat, Sep 28, 2024 at 7:05 PM Junwang Zhao wrote: >> >> On Sat, Sep 28, 2024 at 10:41 PM jian he wrote: >> > >> > dir can have only two potential values, make it >> > as a boolean would be more easier? >> > you didn't mention inform

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

2024-09-29 Thread Tom Lane
"Daniel Verite" writes: > To clarify the compatibility issue, the attached bash script > compares pre-patch and post-patch client/server combinations with > different cases, submitted with different copy variants. > ... > Also attaching the tables of results with the patch as it stands. > "Failed"

Re: information_schema.view attgenerated

2024-09-29 Thread Peter Eisentraut
On 18.09.24 10:23, jian he wrote: On Wed, Sep 18, 2024 at 4:09 PM Peter Eisentraut wrote: i guess, it will have some minor speed up, also more accurate. I'm having a hard time interpreting this report. Could you be more clear about what is the existing code, and what is the code you are p

Re: First draft of PG 17 release notes

2024-09-29 Thread Yugo NAGATA
On Sat, 28 Sep 2024 21:19:11 -0400 Bruce Momjian wrote: > On Thu, Sep 26, 2024 at 02:19:21PM +0900, Yugo Nagata wrote: > > On Thu, 9 May 2024 00:03:50 -0400 > > Bruce Momjian wrote: > > > > > I have committed the first draft of the PG 17 release notes; you can > > > see the results here: > >

Re: Conflict Detection and Resolution

2024-09-29 Thread Peter Smith
On Mon, Sep 30, 2024 at 2:27 PM shveta malik wrote: > > On Fri, Sep 27, 2024 at 1:00 PM Peter Smith wrote: ... > > > > 13. General - ordering of conflict_type. > > > > nit - Instead of just some apparent random order, let's put each > > insert/update/delete conflict type in alphabetical order, so

Re: query_id, pg_stat_activity, extended query protocol

2024-09-29 Thread Michael Paquier
On Thu, Sep 26, 2024 at 11:01:12PM -0500, Sami Imseih wrote: >> I am not sure. The GUCs pretty much enforce this behavior and I doubt >> that these are going to break moving on. Of course they would, but we >> are usually careful enough about that as long as it is possible to >> grep for them. For

Re: Row pattern recognition

2024-09-29 Thread Tatsuo Ishii
>> While playing with the feature, I've been trying to identify runs of >> matched rows by eye. But it's pretty difficult -- the best I can do is >> manually count rows using a `COUNT(*) OVER ...`. So I'd like to >> suggest that MEASURES be part of the eventual v1 feature, if there's >> no other wa

Re: msys inet_pton strangeness

2024-09-29 Thread Thomas Munro
Just an idea... --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -16,7 +16,7 @@ * get support for GetLocaleInfoEx() with locales. For everything else * the minimum version is Windows XP (0x0501). */ -#if defined(_MSC_VER) && _MSC_VER >= 1900 +#if !defined(_MSC_VER) || _MSC_VE

Re: [PATCH] Support Int64 GUCs

2024-09-29 Thread Aleksander Alekseev
Hi, > I seriously doubt that _age values exceeding INT32_MAX would be > useful, even in the still-extremely-doubtful situation that we > get to true 64-bit XIDs. But if you think we must have that, > we could still use float8 GUCs for them. float8 is exact up > to 2^53 (given IEEE math), and you

pg_upgrade check for invalid databases

2024-09-29 Thread Thomas Krennwallner
Hi, if a cluster contains invalid databases that we cannot connect to anymore, pg_upgrade would currently fail when trying to connect to the first encountered invalid database with Performing Consistency Checks - Checking cluster versions

Re: Logical Replication of sequences

2024-09-29 Thread vignesh C
On Thu, 26 Sept 2024 at 11:07, shveta malik wrote: > > On Fri, Sep 20, 2024 at 9:36 AM vignesh C wrote: > > > > On Wed, 21 Aug 2024 at 11:54, vignesh C wrote: > > > > > > On Wed, 21 Aug 2024 at 08:33, Peter Smith wrote: > > > > > > > > Hi Vignesh, Here are my only review comments for the latest

Re: [PATCH] Add native windows on arm64 support

2024-09-29 Thread Dave Cramer
On Sat, 28 Sept 2024 at 20:03, Thomas Munro wrote: > On Tue, Feb 13, 2024 at 10:01 AM Dave Cramer > wrote: > > > postgres.exe!dsa_free(dsa_area * area, unsigned __int64 dp) Line 869 C > > postgres.exe!resize(dshash_table * hash_table, unsigned __int64 > new_size_log2) Line 879 C > > postgres

Re: msys inet_pton strangeness

2024-09-29 Thread Andrew Dunstan
On 2024-09-29 Su 1:00 AM, Alexander Lakhin wrote: Hello Thomas and Andrew, 28.09.2024 23:52, Thomas Munro wrote: On Sun, Sep 29, 2024 at 6:26 AM Andrew Dunstan wrote: We should have included ws2tcpip.h, which includes this: #define InetPtonA inet_pton WINSOCK_API_LINKAGE INT WSAAPI InetPton

Re: First draft of PG 17 release notes

2024-09-29 Thread Amit Kapila
On Sun, Sep 29, 2024 at 6:50 AM Bruce Momjian wrote: > > On Thu, Sep 26, 2024 at 03:08:52PM +0530, Amit Kapila wrote: > > On Sat, Sep 21, 2024 at 1:50 AM Bruce Momjian wrote: > > > > > > On Fri, Sep 20, 2024 at 04:05:11PM -0400, Tom Lane wrote: > > > > Bruce Momjian writes: > > > > > Patch appli

Re: msys inet_pton strangeness

2024-09-29 Thread Tom Lane
Andrew Dunstan writes: > Yeah, src/include/port/win32/sys/socket.h has: > #include > #include > #include > I'm inclined to think we might need to reverse the order of the last > two. TBH I don't really understand how this has worked up to now. I see the same in src/include/port/

Re: pg_verifybackup: TAR format backup verification

2024-09-29 Thread Tom Lane
Piling on a bit ... Coverity reported the following issues in this new code. I have not analyzed them to see if they're real problems. *** CID 1620458: Resource leaks (RESOURCE_LEAK) /srv/co

SET or STRICT modifiers on function affect planner row estimates

2024-09-29 Thread Michał Kłeczek
Hi Hackers, I am not sure if this is a bug or I am missing something: There is a partitioned table with partitions being a mix of foreign and regular tables. I have a function: report(param text) RETURNS TABLE(…) STABLE LANGUAGE sql AS $$ SELECT col1, expr1(col2), expr2(col2), sum(col3) FROM tb