Re: Add parallel columns for pg_stat_statements

2024-10-08 Thread Guillaume Lelarge
Le mer. 9 oct. 2024 à 01:33, Michael Paquier a écrit : > On Tue, Oct 08, 2024 at 03:53:16PM +0200, Guillaume Lelarge wrote: > > I've done a bit of testing with the three patches, and didn't find any > > issue with them. > > Okay, applied 0001 and 0002 then after a second lookup. I'll spend > som

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

2024-10-08 Thread Yugo NAGATA
On Mon, 30 Sep 2024 15:14:54 +0800 px shi wrote: > Thanks for responding. > > > > It is odd that the standby server crashes when > > replication fails because the standby would keep retrying to get the > > next record even in such case. > > > As I mentioned earlier, when replication fails,

Re: Conflict Detection and Resolution

2024-10-08 Thread shveta malik
On Wed, Oct 9, 2024 at 8:58 AM shveta malik wrote: > > On Tue, Oct 8, 2024 at 3:12 PM Nisha Moond wrote: > > > Please find few comments on v14-patch004: patch004: 1) GetConflictResolver currently errors out when the resolver is last_update_wins and track_commit_timestamp is disabled. It means e

Re: Pgoutput not capturing the generated columns

2024-10-08 Thread vignesh C
On Tue, 8 Oct 2024 at 11:37, Shubham Khanna wrote: > > On Fri, Oct 4, 2024 at 9:36 AM Peter Smith wrote: > > > > Hi Shubham, here are my review comments for v36-0001. > > > > == > > 1. General - merge patches > > > > It is long past due when patches 0001 and 0002 should've been merged. > > A

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread Yugo Nagata
On Tue, 8 Oct 2024 21:37:38 -0700 "David G. Johnston" wrote: > On Tuesday, October 8, 2024, Tom Lane wrote: > > > "David G. Johnston" writes: > > > On Tuesday, October 8, 2024, Yugo Nagata wrote: > > >> On Wed, 09 Oct 2024 11:10:37 +0900 > > >> Shinya Kato wrote: > > >>> When SQL scripts cre

Re: Inconsistent RestrictInfo serial numbers

2024-10-08 Thread Richard Guo
On Wed, Oct 9, 2024 at 11:15 AM Andrei Lepikhov wrote: > On 10/8/24 18:20, Richard Guo wrote: > > To fix, I think we can reset the root->last_rinfo_serial counter after > > generating the additional constant-FALSE RestrictInfo. Please see > > attached. > The approach will work, no doubt. But why

Re: Pgoutput not capturing the generated columns

2024-10-08 Thread Peter Smith
Hi, here are my review comments for patch v37-0001. == Commit message 1. Example usage of subscription option: CREATE PUBLICATION FOR TABLE tab_gencol WITH (publish_generated_columns = true); ~ This is wrong -- it's not a "subscription option". Better to just say "Example usage:" ~~~ 2. W

Re: Pgoutput not capturing the generated columns

2024-10-08 Thread vignesh C
On Tue, 8 Oct 2024 at 11:37, Shubham Khanna wrote: > > On Fri, Oct 4, 2024 at 9:36 AM Peter Smith wrote: > > > > Hi Shubham, here are my review comments for v36-0001. > > > > == > > 1. General - merge patches > > > > It is long past due when patches 0001 and 0002 should've been merged. > > A

Re: Testing autovacuum wraparound (including failsafe)

2024-10-08 Thread Alexander Lakhin
Hello Masahiko-san, 01.12.2023 05:14, Masahiko Sawada wrote: FYI I've configured the buildfarm animal perentie to run regression tests including xid_wraparound: https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=perentie&br=HEAD Please look at a failure produced by perentie recently:

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread David G. Johnston
On Tuesday, October 8, 2024, Tom Lane wrote: > "David G. Johnston" writes: > > On Tuesday, October 8, 2024, Yugo Nagata wrote: > >> On Wed, 09 Oct 2024 11:10:37 +0900 > >> Shinya Kato wrote: > >>> When SQL scripts created with pg_dump/pg_dumpall/pg_restore are > executed > >>> in psql with AUT

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread Tom Lane
"David G. Johnston" writes: > On Tuesday, October 8, 2024, Yugo Nagata wrote: >> On Wed, 09 Oct 2024 11:10:37 +0900 >> Shinya Kato wrote: >>> When SQL scripts created with pg_dump/pg_dumpall/pg_restore are executed >>> in psql with AUTOCOMMIT turned off, they will not succeed in many cases. > A

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread Tatsuo Ishii
>> I am not sure if it is good to include psql's meta-command in >> pg_dump/pg_dumpall >> results. Can we assume users will always use psql to restore the pg_dump >> results? > > > Agreed. If we aren’t already outputting psql-only stuff I am a strong -1 > for making this the first such case. I

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

2024-10-08 Thread Andrei Lepikhov
On 10/4/24 22:00, Peter Geoghegan wrote: I don't think that removing duplicated constants is all that important, since we already do that during execution proper. The nbtree code does this in _bt_preprocess_array_keys. It even does things like merge together a pair of duplicate SAOPs against the

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread David G. Johnston
On Tuesday, October 8, 2024, Yugo Nagata wrote: > On Wed, 09 Oct 2024 11:10:37 +0900 > Shinya Kato wrote: > > > Hi hackers! > > > > When SQL scripts created with pg_dump/pg_dumpall/pg_restore are executed > > in psql with AUTOCOMMIT turned off, they will not succeed in many cases. > > This is be

Re: Pgoutput not capturing the generated columns

2024-10-08 Thread vignesh C
On Tue, 8 Oct 2024 at 11:37, Shubham Khanna wrote: > > On Fri, Oct 4, 2024 at 9:36 AM Peter Smith wrote: > > > > Hi Shubham, here are my review comments for v36-0001. > > > > == > > 1. General - merge patches > > > > It is long past due when patches 0001 and 0002 should've been merged. > > A

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

2024-10-08 Thread Michael Paquier
On Mon, Oct 07, 2024 at 03:23:08PM -0700, Masahiko Sawada wrote: > In the benchmark, I've applied the v20 patch set and 'master' in the > result refers to a19f83f87966. And I disabled CPU turbo boost where > possible. Overall, v20 patch got a similar or better performance in > both COPY FROM and CO

Re: Conflict Detection and Resolution

2024-10-08 Thread shveta malik
On Tue, Oct 8, 2024 at 3:12 PM Nisha Moond wrote: > I have not started reviewing v15 yet, but here are few comments for v14-patch003: 1) In apply_handle_update_internal(), I see that FindReplTupleInLocalRel() used to lock the row to be updated in exclusive mode, but now since we are avoiding thi

Re: Inconsistent RestrictInfo serial numbers

2024-10-08 Thread Andrei Lepikhov
On 10/8/24 18:20, Richard Guo wrote: To fix, I think we can reset the root->last_rinfo_serial counter after generating the additional constant-FALSE RestrictInfo. Please see attached. Thanks for the job! The approach will work, no doubt. But why are you using such a wordy approach with save_la

Re: Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread Yugo Nagata
On Wed, 09 Oct 2024 11:10:37 +0900 Shinya Kato wrote: > Hi hackers! > > When SQL scripts created with pg_dump/pg_dumpall/pg_restore are executed > in psql with AUTOCOMMIT turned off, they will not succeed in many cases. > This is because the script contains SQL statements that cannot be > exec

Re: Doc: typo in config.sgml

2024-10-08 Thread Tatsuo Ishii
> On Mon, 7 Oct 2024 15:45:54 -0400 > Bruce Momjian wrote: > >> On Mon, Sep 30, 2024 at 11:59:48AM +0200, Daniel Gustafsson wrote: >> > > On 30 Sep 2024, at 11:03, Tatsuo Ishii wrote: >> > > >> > I think there's an unnecessary underscore in config.sgml. >> > > >> > > I was wrong. The part

Re: Popcount optimization using AVX512

2024-10-08 Thread Nathan Bossart
On Wed, Jul 31, 2024 at 04:43:02PM -0500, Nathan Bossart wrote: > On Wed, Jul 31, 2024 at 01:52:54PM -0700, Andres Freund wrote: >> I think we'd be better off enabling architectural features on a per-function >> basis, roughly like this: >> >> [...] >> >> /* FIXME: Should be gated by configure che

Re: Inconsistent RestrictInfo serial numbers

2024-10-08 Thread Richard Guo
On Tue, Oct 8, 2024 at 9:02 PM Ashutosh Bapat wrote: > But I don't see any relation specific information being > considered while deciding whether the clause is constant false. Isn't rel->notnullattnums relation specific information? We need this information to decide if a Var cannot be NULL. >

Set AUTOCOMMIT to on in script output by pg_dump

2024-10-08 Thread Shinya Kato
Hi hackers! When SQL scripts created with pg_dump/pg_dumpall/pg_restore are executed in psql with AUTOCOMMIT turned off, they will not succeed in many cases. This is because the script contains SQL statements that cannot be executed within a transaction block. If you simply add set AUTOCOMMIT

Re: overflow bug for inhcounts

2024-10-08 Thread jian he
Oid CreateConstraintEntry(const char *constraintName, Oid constraintNamespace, char constraintType, int conInhCount, bool conNoInherit, bool conPeriod,

Re: pgbench: Improve result outputs related to failed transactinos

2024-10-08 Thread Tatsuo Ishii
>> > I overlooked the "NaN% of total" in per-script results. >> > I think this NaN also should be avoided. >> > >> > I fixed the number of transactions in per-script results to include >> > skipped and failed transactions. It prevents to print "total of NaN%" >> > when any transactions are not s

Re: Support specify tablespace for each merged/split partition

2024-10-08 Thread Junwang Zhao
Hi Michael, On Tue, Oct 8, 2024 at 11:21 AM Michael Paquier wrote: > > On Thu, Aug 08, 2024 at 09:47:20AM +0800, Junwang Zhao wrote: > > Thanks for your review. > > The SPLIT/MERGE grammar has been reverted in 3890d90c1508, so this > patch concept does not apply anymore. > -- > Michael Yeah, I c

Re: Add contrib/pg_logicalsnapinspect

2024-10-08 Thread Peter Smith
On Wed, Oct 9, 2024 at 3:25 AM Bertrand Drouvot wrote: > > Hi, > > On Tue, Oct 08, 2024 at 04:25:29PM +1100, Peter Smith wrote: > > 3. > > +postgres=# SELECT meta.* FROM pg_ls_logicalsnapdir(), > > +pg_get_logical_snapshot_meta(name) AS meta; > > + > > +-[ RECORD 1 ] > > +magic| 136956

Re: [PATCH] Add native windows on arm64 support

2024-10-08 Thread Thomas Munro
On Wed, Oct 9, 2024 at 12:58 PM Dave Cramer wrote: > ..\src\include/port/atomics/arch-x86.h:39: warning: "pg_memory_barrier_impl" > redefined It shouldn't be including that. Does the patch here help? https://www.postgresql.org/message-id/CA%2BhUKG%2BOu%2BC%2BpXioo_W1gKcwRCEN1WNrLBBPSMJyxjgc%2B

Re: [PATCH] Add native windows on arm64 support

2024-10-08 Thread Dave Cramer
On Sun, 29 Sept 2024 at 06:31, Dave Cramer wrote: > > 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_tab

Re: Add parallel columns for pg_stat_statements

2024-10-08 Thread Michael Paquier
On Tue, Oct 08, 2024 at 03:53:16PM +0200, Guillaume Lelarge wrote: > I've done a bit of testing with the three patches, and didn't find any > issue with them. Okay, applied 0001 and 0002 then after a second lookup. I'll spend some more time thinking about 0003 and the other threads. -- Michael

Re: FOREIGN TABLE and IDENTITY columns

2024-10-08 Thread Julien Rouhaud
On Wed, Oct 9, 2024 at 12:40 AM Ashutosh Bapat wrote: > > On Tue, Oct 8, 2024 at 7:57 PM Julien Rouhaud wrote: > > > > Hi, > > > > I was looking at the CREATE FOREIGN TABLE documentation to see if IDENTITY > > columns were supported, and according to the doc they're not: only GENERATED > > ALWAYS

Re: Avoid possible overflow (src/port/bsearch_arg.c)

2024-10-08 Thread Nathan Bossart
On Tue, Oct 08, 2024 at 04:09:00PM -0300, Ranier Vilela wrote: > The port function *bsearch_arg* mimics the C function > *bsearch*. > > The API signature is: > void * > bsearch_arg(const void *key, const void *base0, > size_t nmemb, size_t size, > int (*compar) (const void *, const void *, void *)

Re: pgindent fails with perl 5.40

2024-10-08 Thread Daniel Gustafsson
> On 8 Oct 2024, at 22:24, Andrew Dunstan wrote: > > On 2024-10-08 Tu 5:26 AM, Daniel Gustafsson wrote: >>> On 8 Oct 2024, at 03:50, Erik Wienhold wrote: Calling the import method of an unknown package produces a warning [...] It will also detect cases where a user passes an argum

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-10-08 Thread Thomas Munro
On Sat, Sep 28, 2024 at 8:13 AM Melanie Plageman wrote: > For the top-level TableScanDescData, I suggest we use a union with the > members of each scan type in it in anonymous structs (see 0001). Just by the way, you can't use anonymous structs or unions in C99 (that was added to C11), but most c

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

2024-10-08 Thread Daniel Gustafsson
> On 7 Oct 2024, at 20:42, Dagfinn Ilmari Mannsåker wrote: > > Tomas Vondra writes: > >> 3) unnecessary ListCell in DataChecksumsWorkerMain() on line 1345, >> shadowing earlier variable > > All the ListCell variables can be eliminated by using the foreach_ptr > and foreach_oid macros instead

Re: pgindent fails with perl 5.40

2024-10-08 Thread Andrew Dunstan
On 2024-10-08 Tu 5:26 AM, Daniel Gustafsson wrote: On 8 Oct 2024, at 03:50, Erik Wienhold wrote: Calling the import method of an unknown package produces a warning [...] It will also detect cases where a user passes an argument when using a package that does not provide its own import [...]

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

2024-10-08 Thread Devulapalli, Raghuveer
Thank you for the introduction, Paul. Hi all, I'm currently in the process of reviewing and analyzing Paul's patch. In the meantime, I'm open to addressing any questions or feedback you may have. > Hi all, > > I will be retiring from Intel at the end of this week. I wanted to introduce > the

Re: Better error reporting from extension scripts (Was: Extend ALTER OPERATOR)

2024-10-08 Thread Tom Lane
I wrote: > ... There's still a question > of whether reporting the whole script as the query is OK when > we have a syntax error, but I have no good ideas as to how to > make that terser. I had an idea about this: we can use a pretty simple heuristic such as "break at semicolon-newline sequences".

Avoid possible overflow (src/port/bsearch_arg.c)

2024-10-08 Thread Ranier Vilela
Hi. The port function *bsearch_arg* mimics the C function *bsearch*. The API signature is: void * bsearch_arg(const void *key, const void *base0, size_t nmemb, size_t size, int (*compar) (const void *, const void *, void *), void *arg) So, the parameter *nmemb* is size_t. Therefore, a call with

Re: Large expressions in indexes can't be stored (non-TOASTable)

2024-10-08 Thread Nathan Bossart
On Wed, Sep 25, 2024 at 01:05:26PM +0900, Michael Paquier wrote: > On Tue, Sep 24, 2024 at 02:26:08PM -0500, Nathan Bossart wrote: >> So... maybe we >> should just remove pg_replication_origin's TOAST table instead... > > I'd rather keep it, FWIW. Contrary to pg_authid it does not imply > problem

Re: On disable_cost

2024-10-08 Thread Alena Rybakina
On 08.10.2024 18:49, Laurenz Albe wrote: On Tue, 2024-10-08 at 18:12 +0300, Alena Rybakina wrote: However you are right that this display will not appear for all nodes that only contain a data collection procedure, such as Append, MergeAppend, Gather, etc. And I agree with you that we should in

Re: [PATCH] Add min/max aggregate functions to BYTEA

2024-10-08 Thread Marat Bukharov
Thank you for the corrections. I was busy recently and did not follow conversations in the mailing list. Sorry about that. -- With best regards, Marat Bukharov вт, 8 окт. 2024 г. в 17:24, Aleksander Alekseev : > > Hi, > > > I just glanced over this patch. Are you still planning on working on > >

Re: Add contrib/pg_logicalsnapinspect

2024-10-08 Thread Masahiko Sawada
On Tue, Oct 8, 2024 at 9:25 AM Bertrand Drouvot wrote: > > Hi, > > On Tue, Oct 08, 2024 at 04:25:29PM +1100, Peter Smith wrote: > > Hi, here are some review comments for patch v11. > > Thanks for looking at it! > > > == > > contrib/pg_logicalinspect/specs/logical_inspect.spec > > > > 1. > > ni

Re: [PATCH] Add min/max aggregate functions to BYTEA

2024-10-08 Thread Tom Lane
"Andrey M. Borodin" writes: > IMO the patch looks RfC. LGTM too. Pushed. regards, tom lane

Re: [PATCH] Add min/max aggregate functions to BYTEA

2024-10-08 Thread Andrey M. Borodin
> On 8 Oct 2024, at 19:23, Aleksander Alekseev wrote: > > PFA patch v6. IMO the patch looks RfC. Best regards, Andrey Borodin.

Re: Refactoring postmaster's code to cleanup after child exit

2024-10-08 Thread Nazir Bilal Yavuz
Hi, On Tue, 8 Oct 2024 at 00:55, Heikki Linnakangas wrote: > > On 05/10/2024 22:51, Dagfinn Ilmari Mannsåker wrote: > > Heikki Linnakangas writes: > >> Sadly Windows' IO::Socket::UNIX hasn't been implemented on Windows (or > >> at least on this perl distribution we're using in Cirrus CI): > >> >

Re: On disable_cost

2024-10-08 Thread Robert Haas
On Mon, Oct 7, 2024 at 6:41 PM Tom Lane wrote: > I don't buy your argument that this case is so special that it > warrants preserving disable_cost. I certainly didn't think it > was special when I added it. That's fair. I'm telling you what I think, not what you have to think. :-) > There may b

Re: overflow bug for inhcounts

2024-10-08 Thread Andres Freund
Hi, On 2024-10-08 18:11:39 +0200, Alvaro Herrera wrote: > Oh and actually, we could change all these variables to be unsigned, > since there's no use for negative inhcounts. The patch doesn't do that; > it'd require changing the subtraction paths to use overflow-protected > ops as well. Unfortun

Re: [PATCH] pg_permissions

2024-10-08 Thread Joel Jacobson
On Tue, Oct 8, 2024, at 03:48, Michael Paquier wrote: > On Thu, Jun 13, 2024 at 07:34:30AM +0200, Joel Jacobson wrote: >> Hmm, strange, the commitfest system didn't pick up the email with patch 0006 >> for some reason, >> with message id 0c5a6b79-408c-4910-9b2e-4aa9a7b30...@app.fastmail.com >> >>

Re: Avoiding superfluous buffer locking during nbtree backwards scans

2024-10-08 Thread Peter Geoghegan
On Fri, Jul 5, 2024 at 12:47 PM Peter Geoghegan wrote: > On HEAD, the following query requires 24 buffer hits (I'm getting a > standard/forward index scan for this): > > select > abalance > from > pgbench_accounts > where > aid in (1, 500, 1000, 1500, 2000, 3000) order by aid asc; > > Howeve

Re: overflow bug for inhcounts

2024-10-08 Thread Tom Lane
Alvaro Herrera writes: > ... This is because ColumnDef->inhcount is a 32-bit int, but > Form_pg_attribute->attinhcount is int16, so we didn't break the overflow > test for ColumnDef inhcount, but attinhcount has overflowed during > assignment. Ugh ... somebody's ancient oversight there. Or maybe

Re: FOREIGN TABLE and IDENTITY columns

2024-10-08 Thread Ashutosh Bapat
On Tue, Oct 8, 2024 at 7:57 PM Julien Rouhaud wrote: > > Hi, > > I was looking at the CREATE FOREIGN TABLE documentation to see if IDENTITY > columns were supported, and according to the doc they're not: only GENERATED > ALWAYS AS ( expr ) STORED is supported. > > However, a quick test shows that

Re: per backend I/O statistics

2024-10-08 Thread Bertrand Drouvot
Hi, On Tue, Oct 08, 2024 at 01:46:23PM +0900, Michael Paquier wrote: > On Mon, Oct 07, 2024 at 09:54:21AM +, Bertrand Drouvot wrote: > > On Fri, Sep 20, 2024 at 01:26:49PM +0900, Michael Paquier wrote: > >> This would rely on the fact that we would use the ProcNumber for the > >> dshash key, a

Re: Add contrib/pg_logicalsnapinspect

2024-10-08 Thread Bertrand Drouvot
Hi, On Tue, Oct 08, 2024 at 04:25:29PM +1100, Peter Smith wrote: > Hi, here are some review comments for patch v11. Thanks for looking at it! > == > contrib/pg_logicalinspect/specs/logical_inspect.spec > > 1. > nit - Add some missing spaces after commas (,) in the SQL. Fine by me, done in

overflow bug for inhcounts

2024-10-08 Thread Alvaro Herrera
Per a review comment on the not-null constraint patch from Jian He, I played a bit with the various inhcount variables in the tree, with this simple test which creates a child table and 2^16+1 parents: for i in `seq 1 $((2 ** 16+1))`; do echo "create table parent_$i (a int);"; done | psql (echo

Re: On disable_cost

2024-10-08 Thread Laurenz Albe
On Tue, 2024-10-08 at 18:12 +0300, Alena Rybakina wrote: > > > However you are right that this display will not appear for all > > > nodes that only contain a data collection procedure, such as Append, > > > MergeAppend, Gather, etc. And I agree with you that we should > > > information about it. I

Re: Add parallel columns for seq scan and index scan on pg_stat_all_tables and _indexes

2024-10-08 Thread Alena Rybakina
On 07.10.2024 09:34, Guillaume Lelarge wrote: We need granularity because we have granularity in the config. There is pg_stat_database because it gives the whole picture and it is easier to monitor. And then, there is pg_stat_statements to analyze problematic statements. And finally there is pg

Re: Add parallel columns for seq scan and index scan on pg_stat_all_tables and _indexes

2024-10-08 Thread Alena Rybakina
On 07.10.2024 03:41, Michael Paquier wrote: On Mon, Oct 07, 2024 at 12:43:18AM +0300, Alena Rybakina wrote: Maybe I'm not aware of the whole context of the thread and maybe my questions will seem a bit stupid, but honestly it's not entirely clear to me how this statistics will help to adjust the

Re: [PoC] Federated Authn/z with OAUTHBEARER

2024-10-08 Thread Jacob Champion
On Tue, Oct 8, 2024 at 3:46 AM Antonin Houska wrote: > Perhaps I understand now. I use getmail [2] to retrieve email messages from my > Google account. What made me confused is that the getmail application, > although installed on my workstation (and thus the bearer token it eventually > gets cont

Re: On disable_cost

2024-10-08 Thread Alena Rybakina
On 07.10.2024 19:02, Laurenz Albe wrote: On Mon, 2024-10-07 at 10:17 +0300, Alena Rybakina wrote: diff --git a/doc/src/sgml/perform.sgml b/doc/src/sgml/perform.sgml index ff689b65245..db906841472 100644 --- a/doc/src/sgml/perform.sgml +++ b/doc/src/sgml/perform.sgml @@ -578,6 +578,28 @@ WHERE t

Re: Statistics Import and Export

2024-10-08 Thread Nathan Bossart
I took a look at v29-0006. On Tue, Sep 17, 2024 at 05:02:49AM -0400, Corey Huinker wrote: > From: Corey Huinker > Date: Sat, 4 May 2024 04:52:38 -0400 > Subject: [PATCH v29 6/7] Add derivative flags dumpSchema, dumpData. > > User-set flags --schema-only and --data-only are often consulted by > v

Re: Function for listing pg_wal/summaries directory

2024-10-08 Thread Nathan Bossart
On Tue, Oct 08, 2024 at 01:19:52PM +0900, Michael Paquier wrote: > On Tue, Oct 08, 2024 at 12:41:16PM +0900, Fujii Masao wrote: >> One benefit of supporting something like pg_ls_summariesdir() is that >> it allows us to view the last modification time of each WAL summary file >> and estimate when t

FOREIGN TABLE and IDENTITY columns

2024-10-08 Thread Julien Rouhaud
Hi, I was looking at the CREATE FOREIGN TABLE documentation to see if IDENTITY columns were supported, and according to the doc they're not: only GENERATED ALWAYS AS ( expr ) STORED is supported. However, a quick test shows that this is supported (same as serial datatype), and apparently behaves

Re: [PATCH] Add min/max aggregate functions to BYTEA

2024-10-08 Thread Aleksander Alekseev
Hi, > I just glanced over this patch. Are you still planning on working on > it? There's been no adjustments made since the last feedback you got > in early August. > > Can you address Andrey's feedback on point #1? > > Also, for bytea_larger() and bytea_smaller(), I suggest copying what's > been

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

2024-10-08 Thread Anton A. Melnikov
On 08.10.2024 15:42, Fujii Masao wrote: On 2024/09/30 12:26, Fujii Masao wrote: In 0002.patch, I also modified the description of num_requested from "Number of backend requested checkpoints" to remove "backend," as it can be confusing since num_requested includes requests from sources other th

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

2024-10-08 Thread Alexander Korotkov
On Mon, Oct 7, 2024 at 5:06 PM jian he wrote: > assume v40 is the latest version. > in group_similar_or_args > we can add a bool variable so > > boolmatched = false; > foreach(lc, orargs) > { > if (match_index_to_operand(nonConstExpr, colnum, index)) > { >

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

2024-10-08 Thread Alexander Korotkov
Hi, Jian! Thank you for your feedback. On Tue, Oct 8, 2024 at 8:12 AM jian he wrote: > > On Mon, Oct 7, 2024 at 10:06 PM jian he wrote: > > > > assume v40 is the latest version. > > make_bitmap_paths_for_or_group > { > /* > * First, try to match the whole group to the one index. >

Re: Add parallel columns for pg_stat_statements

2024-10-08 Thread Guillaume Lelarge
Hi, Le mar. 8 oct. 2024 à 09:29, Michael Paquier a écrit : > On Mon, Oct 07, 2024 at 10:00:13AM +0200, Guillaume Lelarge wrote: > > Le lun. 7 oct. 2024 à 02:18, Michael Paquier a > écrit : > >> I'd recommend to split that into more independent patches: > >> - Introduce the two counters in EStat

Re: [PATCH] Add get_bytes() and set_bytes() functions

2024-10-08 Thread Aleksander Alekseev
Hi, > I guess there are in fact two problems, not one. > > 1. Converting between bytea and integer types > 2. Multibyte versions of get_byte() / set_byte() > > As you rightly pointed out, for (1) we just need to add missing casts. > Here is the corresponding patch, v3-0001. Note that I couldn't re

Re: WIP: parallel GiST index builds

2024-10-08 Thread Tomas Vondra
On 10/8/24 04:05, Michael Paquier wrote: > On Tue, Jul 30, 2024 at 11:05:56AM +0200, Tomas Vondra wrote: >> I tried implementing this, see the attached 0002 patch that replaces the >> fake LSN with an atomic counter in shared memory. It seems to work (more >> testing needed), but I can't say I'm ve

Re: Inconsistent RestrictInfo serial numbers

2024-10-08 Thread Ashutosh Bapat
On Tue, Oct 8, 2024 at 4:50 PM Richard Guo wrote: > > I ran into an "ERROR: variable not found in subplan target lists" > error, which can be reproduced with the following query. > > create table t (a int primary key, b int); > insert into t select i, i from generate_series(1, 10)i; > analyze t;

Re: Add new COPY option REJECT_LIMIT

2024-10-08 Thread torikoshia
On 2024-10-08 18:39, Fujii Masao wrote: On 2024/10/07 21:51, torikoshia wrote: While reviewing, I also noticed that the check for "opts_out->binary && opts_out->on_error != COPY_ON_ERROR_STOP" is similarly placed before setting the defaults, which might not be correct. This check should probably

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

2024-10-08 Thread Fujii Masao
On 2024/09/30 12:26, Fujii Masao wrote: In 0002.patch, I also modified the description of num_requested from "Number of backend requested checkpoints" to remove "backend," as it can be confusing since num_requested includes requests from sources other than the backend. Thought? Agreed. E.g. f

Re: Doc: typo in config.sgml

2024-10-08 Thread Yugo Nagata
On Mon, 7 Oct 2024 15:45:54 -0400 Bruce Momjian wrote: > On Mon, Sep 30, 2024 at 11:59:48AM +0200, Daniel Gustafsson wrote: > > > On 30 Sep 2024, at 11:03, Tatsuo Ishii wrote: > > > > > I think there's an unnecessary underscore in config.sgml. > > > > > > I was wrong. The particular byte

Re: Assorted style changes with a tiny improvement

2024-10-08 Thread Ranier Vilela
Thanks Michael. Em seg., 7 de out. de 2024 às 22:53, Michael Paquier escreveu: > On Tue, Jul 02, 2024 at 02:39:20PM -0300, Ranier Vilela wrote: > > This is a series of patches to change styles, in assorted sources. > > IMO, this improves a tiny bit and is worth trying. > > > > 1. Avoid dereferen

Re: Parallel workers stats in pg_stat_database

2024-10-08 Thread Benoit Lobréau
On 10/7/24 10:19, Guillaume Lelarge wrote: I've done the split, but I didn't go any further than that. Thank you Guillaume. I have done the rest of the reformatting suggested by Michael but I decided to see If I have similar stuff in my logging patch and refactor accordingly if needed before po

Re: Doc: typo in config.sgml

2024-10-08 Thread Tatsuo Ishii
Hi Danile, Yugo, >> On 8 Oct 2024, at 02:03, Tatsuo Ishii wrote: >>> On Tue, 1 Oct 2024 22:20:55 +0900 >>> Yugo Nagata wrote: > >>> I've attached a updated patch. >>> I added the comment to explain why Perl is used instead of grep or sed. >> >> Looks good to me. If there's no objection, I wil

Inconsistent RestrictInfo serial numbers

2024-10-08 Thread Richard Guo
I ran into an "ERROR: variable not found in subplan target lists" error, which can be reproduced with the following query. create table t (a int primary key, b int); insert into t select i, i from generate_series(1, 10)i; analyze t; explain (costs off) select 1 from t t1 left join (t

Re: First draft of PG 17 release notes

2024-10-08 Thread Yugo NAGATA
On Mon, 7 Oct 2024 20:00:45 -0400 Bruce Momjian wrote: > On Mon, Oct 7, 2024 at 07:25:11PM -0400, Bruce Momjian wrote: > > > Yes. This change on CREATE INDEX was introduced by 2af07e2f7 together with > > > other commands, but it was missed to be mentioned in the commit message > > > although the

Re: Make default subscription streaming option as Parallel

2024-10-08 Thread shveta malik
On Tue, Oct 8, 2024 at 3:38 PM Amit Kapila wrote: > > On Tue, Oct 8, 2024 at 2:25 PM shveta malik wrote: > > > > On Mon, Oct 7, 2024 at 4:03 PM vignesh C wrote: > > > > > > > With parallel streaming as default, do you think there is a need to > > increase the default for 'max_logical_replication

Re: [PoC] Federated Authn/z with OAUTHBEARER

2024-10-08 Thread Antonin Houska
Jacob Champion wrote: > On Mon, Sep 30, 2024 at 6:38 AM Antonin Houska wrote: > > > > Are you sure you can legitimately acquire the bearer token containing my > > email > > address? > > Yes. In general that's how OpenID-based "Sign in with " > works. All those third-party services are running

Re: Make default subscription streaming option as Parallel

2024-10-08 Thread vignesh C
On Mon, 7 Oct 2024 at 11:05, vignesh C wrote: > > Hi, > > By default, currently streaming of in-progress transactions for > subscriptions is disabled. All transactions are fully decoded on the > publisher before being sent to the subscriber. This approach can lead > to increased latency and reduce

Re: Make default subscription streaming option as Parallel

2024-10-08 Thread Amit Kapila
On Tue, Oct 8, 2024 at 2:25 PM shveta malik wrote: > > On Mon, Oct 7, 2024 at 4:03 PM vignesh C wrote: > > > > With parallel streaming as default, do you think there is a need to > increase the default for 'max_logical_replication_workers' as IIUC > parallel workers are taken from the same pool.

Re: IPC::Run accepts bug reports

2024-10-08 Thread Alexander Lakhin
Hello Noah, 04.10.2024 21:57, Noah Misch wrote: That makes sense. Would you file this at https://github.com/cpan-authors/IPC-Run/issues? I suppose that code should become roughly: do { $r = POSIX::read(...) } while (!defined($r) && $!{EINTR}); croak ... unless defined($r); Just for r

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

2024-10-08 Thread Shlok Kyal
On Wed, 31 Jul 2024 at 03:27, Masahiko Sawada wrote: > > On Wed, Jul 24, 2024 at 9:53 PM Amit Kapila wrote: > > > > On Wed, Jul 17, 2024 at 5:25 PM vignesh C wrote: > > > > > > On Wed, 17 Jul 2024 at 11:54, Amit Kapila wrote: > > > > > > > > On Tue, Jul 16, 2024 at 6:54 PM vignesh C wrote: > >

Re: Conflict Detection and Resolution

2024-10-08 Thread Nisha Moond
On Tue, Oct 1, 2024 at 9:48 AM shveta malik wrote: > > On Mon, Sep 30, 2024 at 2:55 PM Peter Smith wrote: > > > > On Mon, Sep 30, 2024 at 4:29 PM shveta malik wrote: > > > > > > On Mon, Sep 30, 2024 at 11:04 AM Peter Smith > > > wrote: > > > > > > > > On Mon, Sep 30, 2024 at 2:27 PM shveta mal

Re: Conflict Detection and Resolution

2024-10-08 Thread Nisha Moond
On Mon, Sep 30, 2024 at 11:59 AM shveta malik wrote: > > 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

Re: Add new COPY option REJECT_LIMIT

2024-10-08 Thread Fujii Masao
On 2024/10/07 21:51, torikoshia wrote: While reviewing, I also noticed that the check for "opts_out->binary && opts_out->on_error != COPY_ON_ERROR_STOP" is similarly placed before setting the defaults, which might not be correct. This check should probably be moved as well. Additionally, the c

Re: Conflict Detection and Resolution

2024-10-08 Thread Nisha Moond
On Fri, Sep 27, 2024 at 1:00 PM Peter Smith wrote: > > Here are some review comments for v14-0001. > ~~~ > 7. > +ALTER SUBSCRIPTION name > RESET CONFLICT RESOLVER FOR ( class="parameter">conflict_type) > > I can see that this matches the implementation, but I was wondering > why don't you permit r

Re: pgindent fails with perl 5.40

2024-10-08 Thread Daniel Gustafsson
> On 8 Oct 2024, at 03:50, Erik Wienhold wrote: >> Calling the import method of an unknown package produces a warning >> [...] >> It will also detect cases where a user passes an argument when using a >> package that does not provide its own import >> [...] > > Because we use fatal warnings, pgi

Re: Expand applicability of aggregate's sortop optimization

2024-10-08 Thread Andrei Lepikhov
On 10/8/24 13:06, David Rowley wrote: On Tue, 8 Oct 2024 at 18:47, Andrei Lepikhov wrote: Thanks, I suppose CATALOG_VERSION_NO was the only reason for this fail. Please leave the cat version bump out of your patch. It's a waste of time and resource if you plan to post another patch every time

Re: Make default subscription streaming option as Parallel

2024-10-08 Thread shveta malik
On Mon, Oct 7, 2024 at 4:03 PM vignesh C wrote: > With parallel streaming as default, do you think there is a need to increase the default for 'max_logical_replication_workers' as IIUC parallel workers are taken from the same pool. thanks Shveta

Re: Set query_id for query contained in utility statement

2024-10-08 Thread Anthonin Bonnefoy
On Mon, Oct 7, 2024 at 7:39 AM Michael Paquier wrote: > GOod point, this is confusing. The point is that having only > stmt_location is not enough to detect where the element in the query > you want to track is because it only points at its start location in > the full query string. In an ideal

Re: GUC names in messages

2024-10-08 Thread Peter Smith
On Mon, Oct 7, 2024 at 3:22 PM Michael Paquier wrote: > > On Tue, Sep 10, 2024 at 05:11:13PM +1000, Peter Smith wrote: > > I have rebased the two remaining patches. See v12 attached. > > I've looked over the patch set again, and applied 0002. > > 0001 could be more ambitious and more consistent, l

Re: not null constraints, again

2024-10-08 Thread jian he
On Fri, Oct 4, 2024 at 9:11 PM Alvaro Herrera wrote: > > Here's v8 of this patch. in AdjustNotNullInheritance if (count > 0) { conform->coninhcount += count; changed = true; } if (is_local) { conform->conislocal = true;

Re: Doc: typo in config.sgml

2024-10-08 Thread Daniel Gustafsson
> On 8 Oct 2024, at 02:03, Tatsuo Ishii wrote: >> On Tue, 1 Oct 2024 22:20:55 +0900 >> Yugo Nagata wrote: >> I've attached a updated patch. >> I added the comment to explain why Perl is used instead of grep or sed. > > Looks good to me. If there's no objection, I will commit this to > master b

Re: Add parallel columns for pg_stat_statements

2024-10-08 Thread Michael Paquier
On Mon, Oct 07, 2024 at 10:00:13AM +0200, Guillaume Lelarge wrote: > Le lun. 7 oct. 2024 à 02:18, Michael Paquier a écrit : >> I'd recommend to split that into more independent patches: >> - Introduce the two counters in EState with the incrementations done >> in nodeGatherMerge.c and nodeGather.c

Re: Should CSV parsing be stricter about mid-field quotes?

2024-10-08 Thread Joel Jacobson
On Sun, Oct 6, 2024, at 15:12, Andrew Dunstan wrote: > On 2024-10-04 Fr 12:19 PM, Joel Jacobson wrote: >> 2. Avoid needing hacks like using E'\x01' as quoting char. >> >> Introduce QUOTE NONE and DELIMITER NONE, >> to allow raw lines to be imported "as is" into a single text column. > > As I think