Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.

2024-12-12 Thread Shubham Khanna
On Fri, Dec 13, 2024 at 12:20 PM Peter Smith wrote: > > Hi Shubham. > > Here are my review comments for v6-0001. > > == > 1. > +# Verify that the subtwophase is enabled ('e') in the pg_subscription catalog > +$node_s->poll_query_until('postgres', > + "SELECT count(1) = 2 FROM pg_subscription W

Re: Patching for increasing the number of columns

2024-12-12 Thread Steven Niu
Mayeul Kauffmann 于2024年12月13日周五 15:11写道: > > On 20/08/14 18:17, Tom Lane wrote: > > Hm. I think the without_oid test is not showing that anything is broken; > > > The other tests aren't showing any functional issue either AFAICS. > Thanks a lot Tom! That's very helpful. > I have written more deta

Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.

2024-12-12 Thread Peter Smith
Hi Shubham. Here are my review comments for v6-0001. == 1. +# Verify that the subtwophase is enabled ('e') in the pg_subscription catalog +$node_s->poll_query_until('postgres', + "SELECT count(1) = 2 FROM pg_subscription WHERE subtwophasestate = 'e';") + or die "Timed out while waiting for s

Re: Allow FDW extensions to support MERGE command via CustomScan

2024-12-12 Thread Önder Kalacı
HI Matheus, all > > > + > > + > > + Postgres doesn't support MERGE on foreign tables, > > + see ExecMerge. Still, extensions may provide > > + custom scan nodes to support MERGE on foreign > > + tables. If your extension provides such custom scan node, this > > + function shoul

Re: fixing tsearch locale support

2024-12-12 Thread Peter Eisentraut
On 12.12.24 19:14, Jeff Davis wrote: On Mon, 2024-12-02 at 11:57 +0100, Peter Eisentraut wrote: t_isdigit() and t_isspace() are just used to parse various configuration and data files, and surely we don't need support for encoding- dependent multibyte support for parsing ASCII digits and ASCII s

Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.

2024-12-12 Thread Shubham Khanna
On Fri, Dec 13, 2024 at 4:42 AM Peter Smith wrote: > > Hi Shubham, > > Here are my review comments for the patch v5-0001. > > == > doc/src/sgml/ref/pg_createsubscriber.sgml > > 1. > -must accept local connections. > +must accept local connections. If you are planning to use the > +

Re: [PATCH] Add roman support for to_number function

2024-12-12 Thread Hunaid Sohail
Hi, > On Mon, Dec 9, 2024 at 3:07 AM Tomas Vondra wrote: > >> Thanks for a nice patch. I did a quick review today, seems almost there, >> I only have a couple minor comments: >> >> 1) Template Patterns for Numeric Formatting >> >> Why the wording change? "input between 1 and 3999" sounds fine to

Re: Statistics Import and Export

2024-12-12 Thread Corey Huinker
Per offline conversation with Jeff, adding a --no-schema to pg_dump option both for completeness (we already have --no-data and --no-statistics), but users who previously got the effect of --no-schema did so by specifying --data-only, which suppresses statistics as well. 0001-0005 - changes to pg_

DOCS: pg_createsubscriber wrong link?

2024-12-12 Thread Peter Smith
Hi, While reviewing the pg_createsubscriber [1] docs I found a potentially wrong linkend. This sentence: "For smaller databases, initial data synchronization is recommended." links to [2] ("29.4.5. Initial Data Synchronization"). This seems to have been deliberately changed (commit [3]) FROM:

Re: Track the amount of time waiting due to cost_delay

2024-12-12 Thread Bertrand Drouvot
Hi, On Thu, Dec 12, 2024 at 10:15:18AM -0600, Nathan Bossart wrote: > On Thu, Dec 12, 2024 at 04:36:21AM +, Bertrand Drouvot wrote: > > --- a/src/backend/catalog/system_views.sql > > +++ b/src/backend/catalog/system_views.sql > > @@ -1222,7 +1222,8 @@ CREATE VIEW pg_stat_progress_vacuum AS > >

Re: Psql meta-command conninfo+

2024-12-12 Thread Hunaid Sohail
Hi, I provided a patch a month ago with a new approach as suggested by David. Unfortunately, it didn't get any attention in the November CF. I would appreciate your feedback on whether we should proceed with this new approach or stick with the previous one. Regards, Hunaid Sohail

Re: Allow subfield references without parentheses

2024-12-12 Thread Kirill Reshke
On Thu, 12 Dec 2024, 21:45 Tom Lane, wrote: > Peter Eisentraut writes: > > This patch allows subfield references in column references without > > parentheses, subject to certain condition. This implements (hopes to, > > anyway) the rules from the SQL standard (since SQL99). > > This has been re

Re: confusing / inefficient "need_transcoding" handling in copy

2024-12-12 Thread Sutou Kouhei
Hi, In "Re: confusing / inefficient "need_transcoding" handling in copy" on Fri, 13 Dec 2024 12:03:45 +0900, Michael Paquier wrote: >> OK. I've added valid cases too by using LATIN1 as you >> suggested. > > I may have missed something but v3 does not use that for a valid > conversion? Oh

DOCS: Make the Server Application docs synopses more consistent

2024-12-12 Thread Peter Smith
Hi, While reviewing the synopsis for pg_createsubscriber I compared it with all the other synopses of the various Server Applications. In doing so I found some minor differences between them all. The differences are more apparent when you list everything together, like below: [1] initdb [option..

Re: Add Postgres module info

2024-12-12 Thread Tom Lane
Andrei Lepikhov writes: > On 12/12/24 21:02, Yurii Rashkovskii wrote: >> 2. Any reasons to dictate MAJ.MIN format? With semantic versioning >> abound, it's rather common to use MAJ.MIN.PATCH. > Okay, thanks; that's a good catch. I wonder how to follow these rules > with a static fixed-sized str

Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2024-12-12 Thread jian he
+ /* + * Here we end processing of current COPY row. + * Update copy state counter for number of erroneous rows. + */ + cstate->num_errors++; + cstate->escontext->error_occurred = true; + + /* Only print this NOTICE message, if it will not be followed by ERROR */ + if (cstate->opts.log_verbosity ==

Re: confusing / inefficient "need_transcoding" handling in copy

2024-12-12 Thread Michael Paquier
On Thu, Dec 12, 2024 at 03:25:41PM +0900, Sutou Kouhei wrote: > In > "Re: confusing / inefficient "need_transcoding" handling in copy" on Tue, > 10 Dec 2024 13:59:25 +0900, > Michael Paquier wrote: >> Another one would be valid conversions back and forth. For example, >> I recall that LATIN

Re: connection establishment versus parallel workers

2024-12-12 Thread Thomas Munro
On Fri, Dec 13, 2024 at 11:00 AM Nathan Bossart wrote: > On Fri, Dec 13, 2024 at 02:29:53AM +1300, Thomas Munro wrote: > > Here's an experimental patch to try changing that policy. It improves > > the connection times on my small computer with your test, but I doubt > > I'm seeing the real issue.

Re: Add Postgres module info

2024-12-12 Thread Andrei Lepikhov
On 12/12/24 21:02, Yurii Rashkovskii wrote: On Thu, Dec 12, 2024 at 3:41 PM Andrei Lepikhov > wrote: On 12/12/24 08:36, Tom Lane wrote: > Andrei Lepikhov mailto:lepi...@gmail.com>> writes: >> It makes sense. But I want to clarify that I avoided changin

Re: Count and log pages set all-frozen by vacuum

2024-12-12 Thread Tomas Vondra
On 12/11/24 20:18, Masahiko Sawada wrote: > > ... > >> Here's an example to exercise the new log message: >> >> create table foo (a int, b int) with (autovacuum_enabled = false); >> insert into foo select generate_series(1,1000), 1; >> delete from foo where a > 500; >> vacuum (verbose) foo; >> -- v

Re: per backend I/O statistics

2024-12-12 Thread Michael Paquier
On Thu, Dec 12, 2024 at 02:02:38PM +, Bertrand Drouvot wrote: > On Thu, Dec 12, 2024 at 01:52:03PM +0900, Michael Paquier wrote: > Yeah, but it's needed in pg_stat_get_backend_io() for the stats filtering (to > display only those linked to this backend type), later in the function here: > > +

Re: pg_createsubscriber TAP test wrapping makes command options hard to read.

2024-12-12 Thread Peter Smith
On Fri, Dec 13, 2024 at 5:03 AM Dagfinn Ilmari Mannsåker wrote: > > On Thu, 12 Dec 2024, at 17:52, Andrew Dunstan wrote: > > On 2024-12-12 Th 12:08 PM, Dagfinn Ilmari Mannsåker wrote: > >> > >> command_ok( > >> [ > >> 'pg_dump', > >> ('--schema', 'pg_catalog'), > >>

Re: pg_createsubscriber TAP test wrapping makes command options hard to read.

2024-12-12 Thread Michael Paquier
On Thu, Dec 12, 2024 at 06:03:33PM +, Dagfinn Ilmari Mannsåker wrote: > On Thu, 12 Dec 2024, at 17:52, Andrew Dunstan wrote: >> I'd rather get rid of those and just use the long options. > > Yeah, that is more self-documenting, so I'll do that while I'm at it. Agreed. I tend to prefer long

Re: Memory leak in WAL sender with pgoutput (v10~)

2024-12-12 Thread Michael Paquier
On Thu, Dec 12, 2024 at 11:52:20AM -0800, Masahiko Sawada wrote: > IIUC the current Vignesh's patch[1] doesn't solve the memory leak in > case of using logical decoding APIs, as you mentioned. I've tried the > idea of using memory context reset callback to reset pubctx. We need > to register the ca

Re: bt_index_parent_check and concurrently build indexes

2024-12-12 Thread Michail Nikolaev
Hello, Andrey! > Interesting bug. It's amazing how long it stand, giving that it would be triggered by almost any check after updating a table. Probably because in real cases, bt_index_check is used much more frequently than bt_index_parent_check. > From my POV correct fix direction is to use ap

IANA timezone abbreviations versus timezone_abbreviations

2024-12-12 Thread Tom Lane
Although we've never documented this, it's been true for ages that timestamptz_out shows timezone abbreviations that are taken from the IANA tzdb data (in datestyles that use non-numeric timezone fields, which is all but ISO). Meanwhile, timestamptz_in recognizes timezone abbreviations if they mat

Re: Parallel heap vacuum

2024-12-12 Thread Tomas Vondra
On 12/13/24 00:04, Tomas Vondra wrote: > > ... > Attached are results.csv with raw data, and a PDF showing the difference > between master and patched build with varying number of workers. The > columns on the right show timing relative to master (with no parallel > workers). Green means "faster"

Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.

2024-12-12 Thread Peter Smith
Hi Shubham, Here are my review comments for the patch v5-0001. == doc/src/sgml/ref/pg_createsubscriber.sgml 1. -must accept local connections. +must accept local connections. If you are planning to use the +--enable-two-phase switch then you will also need to set the + approp

Re: Controlling the usage of a user-defined cast

2024-12-12 Thread Sami Imseih
> The requirement for ownership of at least one type means that the > example you give could only be done by a superuser. That's correct; and superuser should be doing the right thing. > There is currently no way to prevent the usage of a user-defined cast. Should > there be one? >> I don't

Re: Parallel heap vacuum

2024-12-12 Thread Tomas Vondra
On 12/9/24 19:47, Tomas Vondra wrote: > Hi, > > Thanks for working on this. I took a quick look at this today, to do > some basic review. I plan to do a bunch of testing, but that's mostly to > get a better idea of what kind of improvements to expect - the initial > results look quite nice and sen

Re: Proposal for Updating CRC32C with AVX-512 Algorithm.

2024-12-12 Thread Nathan Bossart
On Thu, Dec 12, 2024 at 10:45:29AM -0500, Andres Freund wrote: > Frankly, we should just move away from using CRCs. They're good for cases > where short runs of bit flips are much more likely than other kinds of errors > and where the amount of data covered by them has a low upper bound. That's not

Re: FileFallocate misbehaving on XFS

2024-12-12 Thread Michael Harris
Hi Andres On Fri, 13 Dec 2024 at 08:38, Andres Freund wrote: > > Another interesting snippet: the application has a number of ETL > > workers going at once. The actual number varies depending on a number > > of factors but might be somewhere from 10 - 150. Each worker will have > > a single postg

Re: connection establishment versus parallel workers

2024-12-12 Thread Nathan Bossart
On Fri, Dec 13, 2024 at 02:29:53AM +1300, Thomas Munro wrote: > Here's an experimental patch to try changing that policy. It improves > the connection times on my small computer with your test, but I doubt > I'm seeing the real issue. But in theory, assuming a backlog of > connections and workers

Re: Crash: invalid DSA memory alloc request

2024-12-12 Thread Matthias van de Meent
On Thu, 12 Dec 2024 at 22:28, Andreas 'ads' Scherbaum wrote: > > > Hello, > > I'm running a couple of large tests, and in this particular test I have > a few million tables more. > > At some point it fails, and I gathered the following trace: > > > 2024-12-12 22:22:55.307 CET [1496210] ERROR: inva

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-12 Thread Masahiko Sawada
On Wed, Dec 11, 2024 at 10:01 PM Dilip Kumar wrote: > > On Thu, Dec 12, 2024 at 11:08 AM Amit Kapila wrote: > > > > On Wed, Dec 11, 2024 at 8:21 AM Dilip Kumar wrote: > > > > > > On Wed, Dec 11, 2024 at 3:18 AM Masahiko Sawada > > > wrote: > > > > > > > > On Mon, Dec 9, 2024 at 10:19 PM Dilip

Re: FileFallocate misbehaving on XFS

2024-12-12 Thread Andres Freund
Hi, On 2024-12-12 14:14:20 +1100, Michael Harris wrote: > On Thu, 12 Dec 2024 at 10:50, Andres Freund wrote: > > Just to make sure - you're absolutely certain that you actually have space > > at > > the time of the errors? > > As sure as I can be. The RHEL8 system that I took prints from > yest

Crash: invalid DSA memory alloc request

2024-12-12 Thread Andreas 'ads' Scherbaum
Hello, I'm running a couple of large tests, and in this particular test I have a few million tables more. At some point it fails, and I gathered the following trace: 2024-12-12 22:22:55.307 CET [1496210] ERROR: invalid DSA memory alloc request size 1073741824 2024-12-12 22:22:55.307 CET [

Re: TransactionXmin != MyProc->xmin

2024-12-12 Thread Heikki Linnakangas
On 12/12/2024 21:57, Andres Freund wrote: On 2024-12-12 20:16:39 +0200, Heikki Linnakangas wrote: A straightforward fix is to ensure that TransactionXmin is updated whenever MyProc->xmin is: diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index a1a0c2adeb6..f598

Re: TransactionXmin != MyProc->xmin

2024-12-12 Thread Andres Freund
Hi, On 2024-12-12 20:16:39 +0200, Heikki Linnakangas wrote: > The comment in GetSnapshotData() defines transactionXmin like this: > > > TransactionXmin: the oldest xmin of any snapshot in use in the current > > transaction (this is the same as MyProc->xmin). > However, we don't update Transaction

Re: Support regular expressions with nondeterministic collations

2024-12-12 Thread Jeff Davis
On Tue, 2024-10-22 at 10:16 +0200, Peter Eisentraut wrote: > I also studied the relevant Unicode standard (UTS > #18) and it makes no mention of collations.  So my conclusion is that > regular expressions should pay no attention to collations.  That > makes > it easy. Does normalization play a ro

Re: Memory leak in WAL sender with pgoutput (v10~)

2024-12-12 Thread Masahiko Sawada
On Wed, Dec 11, 2024 at 9:43 PM Amit Kapila wrote: > > On Wed, Dec 11, 2024 at 11:09 AM Masahiko Sawada > wrote: > > > > On Tue, Dec 10, 2024 at 6:13 PM Zhijie Hou (Fujitsu) > > wrote: > > > > > > On Wednesday, December 11, 2024 2:14 AM Masahiko Sawada > > > wrote: > > > > > > > > On Tue, Dec

Re: Remaining dependency on setlocale()

2024-12-12 Thread Jeff Davis
On Wed, 2024-08-14 at 12:00 -0700, Jeff Davis wrote: > On Wed, 2024-08-14 at 14:31 +1200, Thomas Munro wrote: > > 1.  The process global locale is always "C".  If you ever call > > uselocale(), it can only be for short stretches, and you have to > > restore it straight after; perhaps it is only eve

Re: [18] Unintentional behavior change in commit e9931bfb75

2024-12-12 Thread Jeff Davis
On Wed, 2024-12-04 at 12:21 -0500, Tom Lane wrote: > Peter Eisentraut writes: > > On 02.12.24 23:25, Tom Lane wrote: > > > Well, also for compatibility with our SQL parser's understanding > > > of identifier lowercasing. > > > Maybe that was relevant before the "name" type got its own > > collati

Re: Add CASEFOLD() function.

2024-12-12 Thread Joe Conway
On 12/12/24 13:30, Jeff Davis wrote: On Thu, 2024-12-12 at 21:52 +0900, Ian Lawrence Barwick wrote: and it seems to work as advertised, except the function is named "FOLDCASE()" in the patch, so I'm wondering which is intended? Thank you for looking into this, I went back and forth on the name

Re: Add CASEFOLD() function.

2024-12-12 Thread Jeff Davis
On Thu, 2024-12-12 at 21:52 +0900, Ian Lawrence Barwick wrote: > and it seems to work as advertised, except the function is named > "FOLDCASE()" > in the patch, so I'm wondering which is intended? Thank you for looking into this, I went back and forth on the name, and mistyped it a few times. ICU

Re: fixing tsearch locale support

2024-12-12 Thread Jeff Davis
On Mon, 2024-12-09 at 11:11 +0100, Peter Eisentraut wrote: > I have expanded this patch set.  The first three patches are the same > as > before.  I have added a new patch that gets rid of lowerstr() from > ts_locale.c and replaces it with the standard str_tolower() that > everyone else is using

TransactionXmin != MyProc->xmin

2024-12-12 Thread Heikki Linnakangas
The comment in GetSnapshotData() defines transactionXmin like this: TransactionXmin: the oldest xmin of any snapshot in use in the current transaction (this is the same as MyProc->xmin). However, we don't update TransactionXmin when we update MyProc->xmin in SnapshotResetXmin(). So TransactionX

Re: fixing tsearch locale support

2024-12-12 Thread Jeff Davis
On Mon, 2024-12-02 at 11:57 +0100, Peter Eisentraut wrote: > t_isdigit() and t_isspace() are just used to parse various > configuration > and data files, and surely we don't need support for encoding- > dependent > multibyte support for parsing ASCII digits and ASCII spaces.   > ... So these can

Re: UUID v7

2024-12-12 Thread Masahiko Sawada
On Mon, Dec 9, 2024 at 7:42 PM Andrey M. Borodin wrote: > > > > > On 10 Dec 2024, at 03:34, Masahiko Sawada wrote: > > > > I've attached the updated patches. > > Both patches look good to me. > I'm not sure, but, perhaps, commit message of unleakproofing a function > should mention that the prob

Re: pg_createsubscriber TAP test wrapping makes command options hard to read.

2024-12-12 Thread Dagfinn Ilmari Mannsåker
On Thu, 12 Dec 2024, at 17:52, Andrew Dunstan wrote: > On 2024-12-12 Th 12:08 PM, Dagfinn Ilmari Mannsåker wrote: >> >> command_ok( >> [ >> 'pg_dump', >> ('--schema', 'pg_catalog'), >> ('-f', $outputdir . '/catalogs_primary.dump'), >> '--no-s

Re: pg_createsubscriber TAP test wrapping makes command options hard to read.

2024-12-12 Thread Andrew Dunstan
On 2024-12-12 Th 12:08 PM, Dagfinn Ilmari Mannsåker wrote: Tom Lane writes: Andrew Dunstan writes: On 2024-12-12 Th 8:17 AM, Dagfinn Ilmari Mannsåker wrote: Here's a more thorough patch, that also applies the fat comma treatment to other pg_createsubscriber invocations in the same file th

Re: pg_createsubscriber TAP test wrapping makes command options hard to read.

2024-12-12 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > Andrew Dunstan writes: >> On 2024-12-12 Th 8:17 AM, Dagfinn Ilmari Mannsåker wrote: >>> Here's a more thorough patch, that also applies the fat comma treatment >>> to other pg_createsubscriber invocations in the same file that don't >>> currently happen to be mangled by perlti

Re: Add Postgres module info

2024-12-12 Thread Tom Lane
Andres Freund writes: > On 2024-12-12 11:35:56 +0700, Andrei Lepikhov wrote: >> I want to say that 'cannot unload libraries' is a negative outcome of the >> architecture. It would be better to invent something like PG_unregister, >> allowing libraries to at least return a hook routine call back to

Re: Document NULL

2024-12-12 Thread David G. Johnston
On Wed, Dec 11, 2024 at 8:09 AM Marcos Pegoraro wrote: > Em ter., 10 de dez. de 2024 às 20:00, David G. Johnston < > david.g.johns...@gmail.com> escreveu: > > >> When I finalize the examples I'm probably going to \pset null . >> > Yes, much better than an empty space in the examples, but you need

Re: Controlling the usage of a user-defined cast

2024-12-12 Thread Tom Lane
Sami Imseih writes: > When a user-defined CAST is created, it has the ability to break behavior of > built-in > casts that could be performed implicitly, i.e. without a cast defined in > pg_cast. The requirement for ownership of at least one type means that the example you give could only be do

Re: Allow subfield references without parentheses

2024-12-12 Thread Tom Lane
Peter Eisentraut writes: > This patch allows subfield references in column references without > parentheses, subject to certain condition. This implements (hopes to, > anyway) the rules from the SQL standard (since SQL99). > This has been requested a number of times over the years. [0] is a >

Re: SCRAM pass-through authentication for postgres_fdw

2024-12-12 Thread Jacob Champion
On Wed, Dec 11, 2024 at 11:04 AM Matheus Alcantara wrote: > Em qua., 4 de dez. de 2024 às 20:39, Jacob Champion > escreveu: > > Sure, I'm not saying it's worse than plaintext. But a third > > alternative might be actual pass-through SCRAM [1], where either you > > expect the two servers to share

Re: Add Postgres module info

2024-12-12 Thread Andres Freund
Hi, On 2024-12-12 11:35:56 +0700, Andrei Lepikhov wrote: > On 12/12/24 10:44, Michael Paquier wrote: > > On Wed, Dec 11, 2024 at 10:39:38PM -0500, Tom Lane wrote: > > > Michael Paquier writes: > > > > Presumably, > > > > the extra tracking can be done in dfmgr.c with more fields added to > > > >

Re: Document NULL

2024-12-12 Thread David G. Johnston
On Wed, Dec 11, 2024 at 11:46 AM Marcos Pegoraro wrote: > Em ter., 10 de dez. de 2024 às 20:00, David G. Johnston < >> david.g.johns...@gmail.com> escreveu: >> > > Section nullvalues-filtering you are showing filtering with equal and not > equal. Wouldn't it be better if you show just one of them

Re: Track the amount of time waiting due to cost_delay

2024-12-12 Thread Nathan Bossart
On Thu, Dec 12, 2024 at 04:36:21AM +, Bertrand Drouvot wrote: > --- a/src/backend/catalog/system_views.sql > +++ b/src/backend/catalog/system_views.sql > @@ -1222,7 +1222,8 @@ CREATE VIEW pg_stat_progress_vacuum AS > S.param4 AS heap_blks_vacuumed, S.param5 AS index_vacuum_count, >

Re: Fix early elog(FATAL)

2024-12-12 Thread Nathan Bossart
On Wed, Dec 11, 2024 at 07:34:14PM -0800, Noah Misch wrote: > On Tue, Dec 10, 2024 at 04:18:19PM -0600, Nathan Bossart wrote: >> FWIW I'd probably vote for option 1. That keeps the initialization of the >> globals together, reduces the call sites, and fixes the bug. I'd worry a >> little about mo

Controlling the usage of a user-defined cast

2024-12-12 Thread Sami Imseih
Hi, When a user-defined CAST is created, it has the ability to break behavior of built-in casts that could  be performed implicitly, i.e. without a cast defined in pg_cast. Below is a simple example of a user-defined text to numeric cast that changes the behavior of such a type convers

Re: .ready and .done files considered harmful

2024-12-12 Thread Nathan Bossart
On Thu, Dec 12, 2024 at 04:29:47PM +0100, Alvaro Herrera wrote: > On 2024-Nov-14, Michael Paquier wrote: > >> On Wed, Nov 13, 2024 at 02:52:31PM -0500, Robert Haas wrote: >> > On Wed, Nov 13, 2024 at 11:05 AM Alvaro Herrera >> > wrote: >> >> So, my question now is, would there be much opposition

Re: Proposal for Updating CRC32C with AVX-512 Algorithm.

2024-12-12 Thread Andres Freund
Hi, On 2024-12-12 18:32:20 +0700, John Naylor wrote: > I went and looked at the Chromium source, and found the following > snippet that uses the same technique, but only requires 128-bit CLMUL > and has a minimum input size of 64 bytes, rather than 256. This seems > like it might be better suited

Re: pg_createsubscriber TAP test wrapping makes command options hard to read.

2024-12-12 Thread Tom Lane
Andrew Dunstan writes: > On 2024-12-12 Th 8:17 AM, Dagfinn Ilmari Mannsåker wrote: >> Here's a more thorough patch, that also applies the fat comma treatment >> to other pg_createsubscriber invocations in the same file that don't >> currently happen to be mangled by perltidy. It also adds trailin

Re: .ready and .done files considered harmful

2024-12-12 Thread Alvaro Herrera
On 2024-Nov-14, Michael Paquier wrote: > On Wed, Nov 13, 2024 at 02:52:31PM -0500, Robert Haas wrote: > > On Wed, Nov 13, 2024 at 11:05 AM Alvaro Herrera > > wrote: > >> So, my question now is, would there be much opposition to backpatching > >> beb4e9ba1652 + 1fb17b190341 to REL_14_STABLE? > >

Re: pg_createsubscriber TAP test wrapping makes command options hard to read.

2024-12-12 Thread Andrew Dunstan
On 2024-12-12 Th 8:17 AM, Dagfinn Ilmari Mannsåker wrote: Dagfinn Ilmari Mannsåker writes: Peter Smith writes: On Thu, Dec 12, 2024 at 2:53 PM Michael Paquier wrote: ... So, AFAICT I can workaround the perltidy wrapping just by putting all the noarg options at the bottom of the command,

Re: [PATCHES] Post-special page storage TDE support

2024-12-12 Thread David Christensen
On Tue, Dec 10, 2024 at 12:54 AM Michael Paquier wrote: > > On Wed, Mar 13, 2024 at 11:26:48AM -0500, David Christensen wrote: > > Enclosing v4 for this patch series, rebased atop the > > constant-splitting series[1]. For the purposes of having cfbot happy, > > I am including the prerequisites as

Re: Memory leak in pg_logical_slot_{get,peek}_changes

2024-12-12 Thread vignesh C
On Wed, 11 Dec 2024 at 11:39, Zhijie Hou (Fujitsu) wrote: > > On Wednesday, December 11, 2024 12:28 PM vignesh C > wrote: > > Hi, > > > > I'm starting a new thread for one of the issues reported by Sawada-san at > > [1]. > > > > This is a memory leak on CacheMemoryContext when using pgoutput vi

Re: Memory leak in pg_logical_slot_{get,peek}_changes

2024-12-12 Thread vignesh C
On Wed, 11 Dec 2024 at 15:15, Zhijie Hou (Fujitsu) wrote: > > On Wednesday, December 11, 2024 5:11 PM vignesh C wrote: > > > > On Wed, 11 Dec 2024 at 11:39, Zhijie Hou (Fujitsu) > > wrote: > > > > > > On Wednesday, December 11, 2024 12:28 PM vignesh C > > wrote: > > > > The attached patch resol

Re: Allow FDW extensions to support MERGE command via CustomScan

2024-12-12 Thread Matheus Alcantara
Hi, Just some thoughts on documentation part. + + + Postgres doesn't support MERGE on foreign tables, + see ExecMerge. Still, extensions may provide + custom scan nodes to support MERGE on foreign + tables. If your extension provides such custom scan node, this + function sh

Re: Add Postgres module info

2024-12-12 Thread Yurii Rashkovskii
On Thu, Dec 12, 2024 at 3:41 PM Andrei Lepikhov wrote: > On 12/12/24 08:36, Tom Lane wrote: > > Andrei Lepikhov writes: > >> It makes sense. But I want to clarify that I avoided changing > >> PG_MODULE_MAGIC because the newly introduced structure has a totally > >> different purpose and usage lo

Re: per backend I/O statistics

2024-12-12 Thread Bertrand Drouvot
Hi, On Thu, Dec 12, 2024 at 01:52:03PM +0900, Michael Paquier wrote: > On Mon, Nov 25, 2024 at 03:47:59PM +, Bertrand Drouvot wrote: > +view. The function does not return I/O statistics for the > checkpointer, > +the background writer, the startup process and the autovacuum

Re: Logical replication timeout

2024-12-12 Thread RECHTÉ Marc
Hi, Thanks for sharing the test case. Unfortunately I donot have a powerful machine which would generate such large number of spill files. But I created a patch as per your suggestion in point(2) in thread [1]. Can you test with this patch on your machine? With this patch instead of calling unlin

Re: connection establishment versus parallel workers

2024-12-12 Thread Thomas Munro
On Thu, Dec 12, 2024 at 11:36 AM Thomas Munro wrote: > On Thu, Dec 12, 2024 at 9:43 AM Nathan Bossart > wrote: > > Our theory is that commit 7389aad (and follow-ups like commit 239b175) made > > parallel worker processing much more responsive to the point of contending > > with incoming connecti

Re: pg_createsubscriber TAP test wrapping makes command options hard to read.

2024-12-12 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > Peter Smith writes: > >> On Thu, Dec 12, 2024 at 2:53 PM Michael Paquier wrote: >> ... >> >>> > So, AFAICT I can workaround the perltidy wrapping just by putting all >>> > the noarg options at the bottom of the command, then all the >>> > option/optarg pairs (

Re: Add CASEFOLD() function.

2024-12-12 Thread Ian Lawrence Barwick
Hi 2024年12月12日(木) 18:00 Jeff Davis : > > Unicode case folding is a way to convert a string to a canonical case > for the purpose of case-insensitive matching. > > Users have long used LOWER() for that purpose, but there are a few edge > case problems: > > * Some characters have more than two cased

Re: Wrong results with right-semi-joins

2024-12-12 Thread Melanie Plageman
On Wed, Dec 11, 2024 at 9:44 PM Richard Guo wrote: > > On Wed, Dec 11, 2024 at 11:27 AM Richard Guo wrote: > > > Maybe I should update the test case introduced in 5668a857d to this > > one. > > Done. Great, thanks. I think the new example is more clear. - Melanie

Allow subfield references without parentheses

2024-12-12 Thread Peter Eisentraut
This patch allows subfield references in column references without parentheses, subject to certain condition. This implements (hopes to, anyway) the rules from the SQL standard (since SQL99). This has been requested a number of times over the years. [0] is a recent discussion that has mentio

Re: [PoC] Reducing planning time when tables have many partitions

2024-12-12 Thread Alvaro Herrera
Hello Yuya, On 2024-Dec-11, Yuya Watari wrote: > On Tue, Dec 3, 2024 at 7:38 PM Alvaro Herrera wrote: > > > > I don't think planning time in assert-enabled builds is something we > > should worry about, at all. Planning time in production builds is the > > important one. > > Thank you for your

Re: pg_createsubscriber TAP test wrapping makes command options hard to read.

2024-12-12 Thread Dagfinn Ilmari Mannsåker
Peter Smith writes: > On Thu, Dec 12, 2024 at 2:53 PM Michael Paquier wrote: > ... > >> > So, AFAICT I can workaround the perltidy wrapping just by putting all >> > the noarg options at the bottom of the command, then all the >> > option/optarg pairs (ie 2s) will stay together. I can post anothe

Re: Replace current implementations in crypt() and gen_salt() to OpenSSL

2024-12-12 Thread Daniel Gustafsson
> On 12 Dec 2024, at 12:07, Peter Eisentraut wrote: > > On 09.12.24 22:37, Daniel Gustafsson wrote: >>> On 9 Dec 2024, at 15:11, Joe Conway wrote: >>> >>> On 12/9/24 07:23, Daniel Gustafsson wrote: > On 4 Dec 2024, at 16:57, Joe Conway wrote: > I can send you the source RPM for opens

Re: explain analyze rows=%.0f

2024-12-12 Thread Ilia Evdokimov
On 01.08.2023 23:29, Daniel Gustafsson wrote: On 3 Jul 2023, at 18:34, Daniel Gustafsson wrote: On 8 Jun 2023, at 19:49, Ibrar Ahmed wrote: On Mon, Mar 20, 2023 at 7:56 PM Gregory Stark (as CFM) mailto:stark@gmail.com>> wrote: This patch was marked Returned with Feedback and then later W

Re: Proposal for Updating CRC32C with AVX-512 Algorithm.

2024-12-12 Thread John Naylor
+ * For This Function: + * Copyright 2015 The Chromium Authors I went and looked at the Chromium source, and found the following snippet that uses the same technique, but only requires 128-bit CLMUL and has a minimum input size of 64 bytes, rather than 256. This seems like it might be better suite

Re: Replace current implementations in crypt() and gen_salt() to OpenSSL

2024-12-12 Thread Peter Eisentraut
On 09.12.24 22:37, Daniel Gustafsson wrote: On 9 Dec 2024, at 15:11, Joe Conway wrote: On 12/9/24 07:23, Daniel Gustafsson wrote: On 4 Dec 2024, at 16:57, Joe Conway wrote: I can send you the source RPM for openssl 1.1.1c which was an earlier FIPS validated version, but the main FIPS patch c

Re: Add Pipelining support in psql

2024-12-12 Thread Anthonin Bonnefoy
Thanks for the review! On Thu, Dec 12, 2024 at 12:53 AM Jelte Fennema-Nio wrote: > I think that new prompt is super useful, so useful in fact that I'd > suggest linking to it from the \startpipeline docs. Good point, I've added a paragraph with the link to the %P prompt. > I do think that > the

SIGSEGV, FPE fix in pg_controldata

2024-12-12 Thread Ilyasov Ian
Hello, hackers! Recently I've faced an issue when playing with pg_controldata. I made some rubbish pg_control files and caught a SIGSEGV. Then I tried fuzzing REL_17_STABLE pg_controldata with AFL++ and got 7 crash cases. Also, it is not necessary to use fuzzing. You can simply generate any pg_co

Re: pg_createsubscriber TAP test wrapping makes command options hard to read.

2024-12-12 Thread Alvaro Herrera
On 2024-Dec-12, Michael Paquier wrote: > On Thu, Dec 12, 2024 at 03:24:42PM +1100, Peter Smith wrote: > > PSA v2-0001. This time it can survive pgperltidy unchanged. > > Confirmed. It looks to apply cleanly to v17 as well. Better to > backpatch to avoid conflict frictions, even if it's cosmetic

single_copy not needed in GatherPath

2024-12-12 Thread Antonin Houska
I was curious when create_gather_path() sets single_copy, but could not find any place in the tree where a path with num_workers==0 is added to partial_pathlist. This patch removes the field. -- Antonin Houska Web: https://www.cybertec-postgresql.com >From 3f434cfb8b7eb70049650d1f324fe8cbaf1267c

Allow FDW extensions to support MERGE command via CustomScan

2024-12-12 Thread Önder Kalacı
Hi hackers, Currently, it is not possible for any fdw extension to support Merge command, as that's prohibited in the parser. In this proposal, we allow extensions to support Merge command via `CustomScan` node by moving the Merge support check from parser to planner. For existing fdw, they don'

Re: Add Postgres module info

2024-12-12 Thread Andrei Lepikhov
On 12/12/24 08:36, Tom Lane wrote: Andrei Lepikhov writes: It makes sense. But I want to clarify that I avoided changing PG_MODULE_MAGIC because the newly introduced structure has a totally different purpose and usage logic: the struct is designed to check compatibility, but module info isn't c

Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.

2024-12-12 Thread Shubham Khanna
On Thu, Dec 12, 2024 at 9:34 AM vignesh C wrote: > > On Thu, 12 Dec 2024 at 08:14, Hayato Kuroda (Fujitsu) > wrote: > > > > Dear Shubham, > > > > > Thank you for pointing this out and for suggesting the changes. I > > > agree with your approach. > > > Also, I found a mistake in getopt_long and fi

Re: Fix comments related to pending statistics

2024-12-12 Thread Michael Paquier
On Thu, Dec 12, 2024 at 05:07:23AM +, Bertrand Drouvot wrote: > Yeap. I also just realized that the same kind of comments are missing for > PgStat_BgWriterStats and PgStat_CheckpointerStats (for which we make use > of pg_memory_is_all_zeros() to detect whether there are any stats updates to > a