Re: First draft of PG 17 release notes

2024-10-07 Thread Amit Kapila
On Tue, Oct 8, 2024 at 6:25 AM Bruce Momjian wrote: > > On Sun, Sep 29, 2024 at 06:33:29PM +0530, Amit Kapila wrote: > > > > It is better to write the above statement as: > > > > "pg_upgrade now preserves replication slots on > > > > publishers and full subscription's state on subscribers". This i

Re: Partition-wise join with whole row vars

2024-10-07 Thread Alexander Pyhalov
Michael Paquier писал(а) 2024-10-08 05:01: On Fri, Jul 12, 2024 at 02:39:13PM +0300, Alexander Pyhalov wrote: I was looking at enabling partition-wise join with whole row vars. My main motivation was to enable push down DML with partition-wise join in postgres_fdw. The work is based on the ea

Re: Pgoutput not capturing the generated columns

2024-10-07 Thread Shubham Khanna
don't get accidentally overlooked. Please re-confirm and at the > next posted version please respond individually to each of these to > say if they are addressed or not. > > == > > 1. General > From review v31 [1] comment #1. Patches 0001 and 0002 should be merged. > &g

Re: Expand applicability of aggregate's sortop optimization

2024-10-07 Thread David Rowley
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 a committer bumps the cat version. Dav

Re: Expand applicability of aggregate's sortop optimization

2024-10-07 Thread Andrei Lepikhov
On 10/8/24 08:19, Michael Paquier wrote: On Tue, Oct 01, 2024 at 04:25:59PM +0700, Andrei Lepikhov wrote: I have written a sketch patch to implement the idea with aggregate prosupport in code - see the attachment. My intention was to provide an example, not a ready-to-commit patch. As I see, the

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

2024-10-07 Thread Shlok Kyal
Hi Kuroda-san, > > I have also modified the tests in 0001 patch. These changes are only > > related to syntax of writing tests. > > LGTM. I found small improvements, please find the attached. I have applied the changes and updated the patch. Thanks & Regards, Shlok Kyal From 07f94de76be177d0e397

Re: Add contrib/pg_logicalsnapinspect

2024-10-07 Thread Peter Smith
Hi, here are some review comments for patch v11. == contrib/pg_logicalinspect/specs/logical_inspect.spec 1. nit - Add some missing spaces after commas (,) in the SQL. nit - Also update the expected results accordingly == doc/src/sgml/pglogicalinspect.sgml 2. + + + The pg_logicalins

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

2024-10-07 Thread jian he
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. */ orargs = list_make1(ri); indlist = build_paths_for_OR(root, rel,

Re: MergeJoin beats HashJoin in the case of multiple hash clauses

2024-10-07 Thread Andrei Lepikhov
On 7/8/24 19:45, Andrei Lepikhov wrote: On 3/11/2023 23:43, Tomas Vondra wrote: On 9/11/23 10:04, Lepikhov Andrei wrote:   * Determine bucketsize fraction and MCV frequency for the inner   * relation. We use the smallest bucketsize or MCV frequency estimated   * for any individual hashclause; th

Re: per backend I/O statistics

2024-10-07 Thread Michael Paquier
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, and this information is not provided in pg_stat_activity. >> Perhaps we should

Re: Incremental Sort Cost Estimation Instability

2024-10-07 Thread Andrei Lepikhov
On 9/23/24 20:02, Andrei Lepikhov wrote: On 12/9/2024 12:12, David Rowley wrote: On Thu, 12 Sept 2024 at 21:51, Andrei Lepikhov wrote: Initial problem causes wrong cost_sort estimation. Right now I think about providing cost_sort() the sort clauses instead of (or in addition to) the pathkeys.

Re: Consider the number of columns in the sort cost model

2024-10-07 Thread Andrei Lepikhov
On 8/23/24 01:46, Andrei Lepikhov wrote: Just a rebase onto current master to make cf-bot be happy. -- regards, Andrei Lepikhov From 73472897442516f0df4ed945cda28d125df08197 Mon Sep 17 00:00:00 2001 From: "Andrei V. Lepikhov" Date: Tue, 8 Oct 2024 11:20:46 +0700 Subject: [PATCH v2] Introduce th

Re: Function for listing pg_wal/summaries directory

2024-10-07 Thread Michael Paquier
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 they'll be removed based on wal_summary_keep_time. > > Of course, we c

Re: Function for listing pg_wal/summaries directory

2024-10-07 Thread Fujii Masao
On 2024/10/07 23:35, Nathan Bossart wrote: On Mon, Oct 07, 2024 at 10:07:10AM +0900, Michael Paquier wrote: On Fri, Oct 04, 2024 at 10:02:11AM -0500, Nathan Bossart wrote: Could you explain why you feel the existing support functions are insufficient? Because it is not possible to outsourc

Re: Commit fest 2024-09

2024-10-07 Thread Michael Paquier
On Mon, Oct 07, 2024 at 04:47:12PM +0900, Michael Paquier wrote: > The commit fest 2024-09 should have ended one week ago, so I have been > taking one step ahead and I have begun cleaning up things. As of now, > there is still a total of 113 patches marked as "Needs Review", and I > hope that my n

Re: Support specify tablespace for each merged/split partition

2024-10-07 Thread Michael Paquier
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 signature.asc Description: PGP signature

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

2024-10-07 Thread Hayato Kuroda (Fujitsu)
Dear Shlok, > I have tested this part. I observed that ,whenever we insert data in a > partition table, the function 'get_rel_sync_entry' is called and a > hash entry is created for the corresponding leaf node relid. So I feel > while invalidating here we can specify 'PUBLICATION_PART_LEAF' . I >

Re: Avoiding superfluous buffer locking during nbtree backwards scans

2024-10-07 Thread Michael Paquier
On Mon, Sep 02, 2024 at 01:31:55PM +0200, Matthias van de Meent wrote: > I noticed I attached an older version of the patch which still had 1 > assertion failure case remaining (thanks cfbot), so here's v3 which > solves that problem. Peter G., this is in your area of expertise. Could you look at

Re: WIP: parallel GiST index builds

2024-10-07 Thread Michael Paquier
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 very happy with the code :-( While scanning qui

Re: Parallel CREATE INDEX for GIN indexes

2024-10-07 Thread Michael Paquier
On Fri, Jul 12, 2024 at 05:34:25PM +0200, Tomas Vondra wrote: > I got to do the detailed benchmarking on the latest version of the patch > series, so here's the results. My goal was to better understand the > impact of each patch individually - especially the two parts introduced > by Matthias, but

Re: Partition-wise join with whole row vars

2024-10-07 Thread Michael Paquier
On Fri, Jul 12, 2024 at 02:39:13PM +0300, Alexander Pyhalov wrote: > I was looking at enabling partition-wise join with whole row vars. My main > motivation > was to enable push down DML with partition-wise join in postgres_fdw. The > work is > based on the earlier patches of Ashutosh Bapat [1]. T

Re: [PATCH] Add log_transaction setting

2024-10-07 Thread Michael Paquier
On Wed, Aug 14, 2024 at 09:08:00PM +0300, Сергей Соловьев wrote: > From b5e779771e8a7582951aff6f43a716e9e5975884 Mon Sep 17 00:00:00 2001 > From: "Sergey Solovev" > Date: Thu, 4 Jul 2024 17:02:13 +0300 > Subject: [PATCH] Add log_transaction configuration setting CF bot is red, please provide a re

Re: Assorted style changes with a tiny improvement

2024-10-07 Thread Michael Paquier
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 dereference iss_SortSupport if it has nulls. > 2. Avoid dereference plan_node_id if no dsm area. > 3

Re: Improve EXPLAIN output for multicolumn B-Tree Index

2024-10-07 Thread Michael Paquier
On Tue, Jul 02, 2024 at 03:44:01AM +, masahiro.ik...@nttdata.com wrote: > Although I plan to support "Rows Removed by Non Key Filtered"(or "Skip Scan > Filtered"), > I'd like to know whether the current direction is good. One of my concerns is > there might > be a better way to exact quals fo

Re: pgindent fails with perl 5.40

2024-10-07 Thread Erik Wienhold
I wrote: > I get this error when running pgindent with perl 5.40: > > Attempt to call undefined import method with arguments ("devnull") via > package "File::Spec" (Perhaps you forgot to load the package?) at > src/tools/pgindent/pgindent line 10. > BEGIN failed--compilation aborted at s

Re: [PATCH] pg_permissions

2024-10-07 Thread Michael Paquier
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 > > It's rebased to latest HEAD, so not sure why. > > Maybe it

Re: Expand applicability of aggregate's sortop optimization

2024-10-07 Thread Michael Paquier
On Tue, Oct 01, 2024 at 04:25:59PM +0700, Andrei Lepikhov wrote: > I have written a sketch patch to implement the idea with aggregate > prosupport in code - see the attachment. > My intention was to provide an example, not a ready-to-commit patch. > As I see, the only problem there lies in the test

Re: First draft of PG 17 release notes

2024-10-07 Thread Bruce Momjian
On Sun, Sep 29, 2024 at 06:33:29PM +0530, Amit Kapila wrote: > > > It is better to write the above statement as: > > > "pg_upgrade now preserves replication slots on > > > publishers and full subscription's state on subscribers". This is > > > because replication slots are preserved on publishers.

Re: Collation & ctype method table, and extension hooks

2024-10-07 Thread Jeff Davis
On Fri, 2024-10-04 at 15:24 +0200, Andreas Karlsson wrote: > Great! I had been planning to do this myself so great to see that you > already did it before me. Will take a look at this work later. Great! We'll need to test whether there are any regressions in the regex & pattern matching code due t

Re: First draft of PG 17 release notes

2024-10-07 Thread Bruce Momjian
On Tue, Oct 1, 2024 at 04:36:09PM +0200, Laurenz Albe wrote: > 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

Re: Doc: typo in config.sgml

2024-10-07 Thread Tatsuo Ishii
> On Tue, 1 Oct 2024 22:20:55 +0900 > Yugo Nagata wrote: > >> 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. nb

Re: First draft of PG 17 release notes

2024-10-07 Thread Bruce Momjian
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 description was added to the documentation. > > > > The change

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

2024-10-07 Thread Michael Paquier
On Tue, Oct 08, 2024 at 01:19:59AM +0900, Fujii Masao wrote: > Commit 430ce189fc45 unexpectedly caused psql to report the error > "error: trailing data found" when a connection URI contains > a whitespace, e.g., in a parameter value. For example, > the following command used to work but no longer d

Re: First draft of PG 17 release notes

2024-10-07 Thread Bruce Momjian
On Mon, Sep 30, 2024 at 02:20:21PM +0900, Yugo NAGATA wrote: > 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

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

2024-10-07 Thread Jacob Champion
On Wed, Oct 2, 2024 at 10:45 AM Andrew Dunstan wrote: > Generally looks good. Should we have a check in > setJsonLexContextOwnsTokens() that we haven't started parsing yet, for > the incremental case? Good catch. Added in v4. > > At the moment, we have a test matrix consisting of "standard front

Re: On disable_cost

2024-10-07 Thread Tom Lane
Robert Haas writes: > On Sat, Oct 5, 2024 at 3:35 PM Tom Lane wrote: >> BTW, getting off the question of EXPLAIN output for a moment, >> I don't understand why disable_cost is still a thing. The >> one remaining usage seems trivial to replace, as attached. > I believe I commented on that somewh

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

2024-10-07 Thread Masahiko Sawada
On Sat, Sep 28, 2024 at 8:56 AM Sutou Kouhei wrote: > > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Fri, 27 Sep 2024 16:33:13 -0700, > Masahiko Sawada wrote: > > >> * 0005 (that add "void *opa

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

2024-10-07 Thread Heikki Linnakangas
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): Socket::pack_sockaddr_un not implemented on this architecture at C:/strawberry/5.

Re: Add trim_trailing_whitespace to editorconfig file

2024-10-07 Thread Jelte Fennema-Nio
On Thu, 5 Sept 2024 at 23:28, Jelte Fennema-Nio wrote: > Okay, I've done this now. Is this blocked on anything? I feel it's ready to merge at this point. I'd really like to not have this problem with trailing whitespace in sgml files anymore.

Re: pg_upgrade check for invalid databases

2024-10-07 Thread Nathan Bossart
On Mon, Oct 07, 2024 at 03:37:35PM -0400, Bruce Momjian wrote: > On Tue, Oct 1, 2024 at 09:28:54AM +0200, Daniel Gustafsson wrote: >> Correct, sorry for being unclear. The consistency argument would be to >> expand >> pg_upgrade to report all invalid databases rather than just the first found; >

Re: Doc: typo in config.sgml

2024-10-07 Thread Bruce Momjian
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 sequences just looked an underscore > > on my editor but the byte seq

Re: pg_upgrade check for invalid databases

2024-10-07 Thread Bruce Momjian
On Tue, Oct 1, 2024 at 09:28:54AM +0200, Daniel Gustafsson wrote: > > 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

Re: pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.

2024-10-07 Thread Nathan Bossart
On Mon, Oct 07, 2024 at 02:00:05PM -0500, Nathan Bossart wrote: > I refrained from introducing INT64_HEX_FORMAT/UINT64_HEX_FORMAT in c.h > because I felt there was a nonzero chance of that causing problems with > third-party code on the back-branches. We could probably add them for v18, > though.

Re: pg_ctl/miscinit: print "MyStartTime" as a long long instead of long to avoid 2038 problem.

2024-10-07 Thread Nathan Bossart
On Fri, Sep 27, 2024 at 02:10:47PM -0500, Nathan Bossart wrote: > Alright. I was able to back-patch it to v12 without too much trouble, > fortunately. I'll commit that soon unless anyone else has feedback. Committed, thanks! I refrained from introducing INT64_HEX_FORMAT/UINT64_HEX_FORMAT in c.h

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

2024-10-07 Thread Dagfinn Ilmari Mannsåker
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 of plain foreach. - ilmari

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

2024-10-07 Thread Robert Haas
On Mon, Oct 7, 2024 at 12:02 PM Tom Lane wrote: > Peter Geoghegan writes: > > To be clear, I don't think that it's essential that we have equivalent > > behavior in those cases where the patch applies its transformations. I > > have no objections to committing the patch without any handling for >

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

2024-10-07 Thread Peter Geoghegan
On Mon, Oct 7, 2024 at 12:02 PM Tom Lane wrote: > Peter Geoghegan writes: > > To be clear, I don't think that it's essential that we have equivalent > > behavior in those cases where the patch applies its transformations. I > > have no objections to committing the patch without any handling for >

Re: Converting tab-complete.c's else-if chain to a switch

2024-10-07 Thread Tom Lane
Thomas Munro writes: > On Mon, Oct 7, 2024 at 12:11 PM Tom Lane wrote: >> Hmm, I should think that if you break anything in tab-complete.in.c, >> the breakage would propagate to tab-complete.c without difficulty. >> Do you have an example of something that the preprocessor would mask? > Fair poi

Re: Psql meta-command conninfo+

2024-10-07 Thread David G. Johnston
On Sun, Oct 6, 2024 at 11:17 PM Hunaid Sohail wrote: > > PQpass - no need > I would include this as presence/absence. I concur on all of the rest. > > For PQparameterStatus, some parameters are already used. > server_version and application_name were already discussed and removed in > v12 and

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

2024-10-07 Thread Fujii Masao
On 2024/10/06 18:35, Michael Paquier wrote: On Thu, Oct 03, 2024 at 08:12:28PM -0400, Tom Lane wrote: OK, if there's no objections let's push both remaining patches to HEAD only. Done as of f22e84df1dea and 430ce189fc45. Commit 430ce189fc45 unexpectedly caused psql to report the error "er

Re: Set query_id for query contained in utility statement

2024-10-07 Thread jian he
On Mon, Oct 7, 2024 at 1:39 PM Michael Paquier wrote: > > On Fri, Oct 04, 2024 at 08:16:00PM +0800, jian he wrote: > > about v5 0001 > > select_with_parens: > > '(' select_no_parens ')'{ $$ = $2; } > > | '(' select_with_parens ')'{ $$ = $2; } > >

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

2024-10-07 Thread Peter Geoghegan
On Mon, Oct 7, 2024 at 12:02 PM Tom Lane wrote: > Oy. I don't agree with that *at all*. An "optimization" that changes > query semantics is going to be widely seen as a bug. I don't believe that I said otherwise? It's just rather unclear what query semantics really mean here, in detail. At lea

Re: bt Scankey in another contradictory case

2024-10-07 Thread Peter Geoghegan
On Fri, Aug 30, 2024 at 10:32 AM Peter Geoghegan wrote: > It doesn't make a huge difference in practice, because we'll still end > the scan once the leaf level is reached. But it matters more when > array keys are involved, where there might be more than one descent to > the leaf level. Plus we mi

Re: On disable_cost

2024-10-07 Thread Laurenz Albe
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 t1.unique1 < 100 AND t1.un

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

2024-10-07 Thread Tom Lane
Peter Geoghegan writes: > To be clear, I don't think that it's essential that we have equivalent > behavior in those cases where the patch applies its transformations. I > have no objections to committing the patch without any handling for > that. Oy. I don't agree with that *at all*. An "optim

Re: Should rolpassword be toastable?

2024-10-07 Thread Nathan Bossart
Committed with the limit set to 512 bytes. We have plenty of time to adjust this limit as needed before it takes effect in v18. -- nathan

Re: On disable_cost

2024-10-07 Thread Laurenz Albe
On Mon, 2024-10-07 at 11:14 -0400, Robert Haas wrote: > I accept that my commit created this problem and I'm > certainly willing to be involved too if we need to sort out more > things. Thanks you. I think it is great that disabled nodes are now handled better, so I appreciate the change as such.

Re: Proposal to Enable/Disable Index using ALTER INDEX

2024-10-07 Thread Robert Haas
On Mon, Sep 23, 2024 at 11:14 AM Peter Eisentraut wrote: > I think a better approach would be to make the list of disabled indexes > a GUC setting, which would then internally have an effect similar to > enable_indexscan, meaning it would make the listed indexes unattractive > to the planner. > >

Re: Re: bt Scankey in another contradictory case

2024-10-07 Thread Peter Geoghegan
On Sun, Sep 1, 2024 at 11:44 AM bigbro...@hotmail.com wrote: > I have reanalysed the code of function _bt_first. I notice that using a > multi-attribute index > if we can't identify the starting boundaries and the following attributes > markded not required , > that means we need start at first

Re: On disable_cost

2024-10-07 Thread Robert Haas
currently omit, and make the > documentation more complete. A short blurb about Disabled Nodes such as > the one Laurenz proposed seems an excellent way to start; we can add > more later, as people propose them. We don't have to stop here, and we > don't have to stay at statu q

Re: On disable_cost

2024-10-07 Thread Alvaro Herrera
uch as the one Laurenz proposed seems an excellent way to start; we can add more later, as people propose them. We don't have to stop here, and we don't have to stay at statu quo re. other points. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ Offic

Re: On disable_cost

2024-10-07 Thread Robert Haas
On Sat, Oct 5, 2024 at 1:37 AM David Rowley wrote: > Thanks for explaining your point of view. I've not shifted my opinion > any, so I guess we just disagree. I feel a strong enough dislike for > the current EXPLAIN output to feel it's worth working harder to have a > better output. > > I won't pu

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

2024-10-07 Thread Peter Geoghegan
On Fri, Oct 4, 2024 at 2:40 PM Robert Haas wrote: > > On Fri, Oct 4, 2024 at 2:20 PM Peter Geoghegan wrote: > > On Fri, Oct 4, 2024 at 2:00 PM Alexander Korotkov > > wrote: > > > Yes, transformAExprIn() does the work to coerce all the expressions in > > > the right part to the same type. Simil

Re: On disable_cost

2024-10-07 Thread David G. Johnston
On Fri, Oct 4, 2024 at 10:37 PM David Rowley wrote: > I'd encourage anyone else on the sidelines who has an opinion on how > to display the disabled-ness of a plan node in EXPLAIN to speak up > now, even if it's just a +1 to something someone has already written. > It would be nice to see what mo

Re: On disable_cost

2024-10-07 Thread Robert Haas
On Sat, Oct 5, 2024 at 3:35 PM Tom Lane wrote: > BTW, getting off the question of EXPLAIN output for a moment, > I don't understand why disable_cost is still a thing. The > one remaining usage seems trivial to replace, as attached. I believe I commented on that somewhere upthread, but maybe I me

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

2024-10-07 Thread Tomas Vondra
Hi, I did a quick review today. First a couple minor comments: 1) monitoring.sgml typos: number of database -> number of databases calcuated -> calculated 2) unnecessary newline in heapam.c (no other changes) 3) unnecessary ListCell in DataChecksumsWorkerMain() on line 1345, shadowing e

Re: Function for listing pg_wal/summaries directory

2024-10-07 Thread Nathan Bossart
On Mon, Oct 07, 2024 at 10:07:10AM +0900, Michael Paquier wrote: > On Fri, Oct 04, 2024 at 10:02:11AM -0500, Nathan Bossart wrote: >> Could you explain why you feel the existing support functions are >> insufficient? > > Because it is not possible to outsource the scan of pg_wal/summaries/ > to a

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

2024-10-07 Thread Andres Freund
Hi, On 2024-10-05 20:51:50 +0100, Dagfinn Ilmari Mannsåker wrote: > Socket version 2.028 (included in Perl 5.32) provides pack_sockaddr_un() > on Windows, so that can be fixed by bumping the Perl version in > https://github.com/anarazel/pg-vm-images/blob/main/packer/windows.pkr.hcl > to something

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

2024-10-07 Thread jian he
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)) { matches[i].indexnum = indexnum;

Re: Doc: typo in config.sgml

2024-10-07 Thread Yugo NAGATA
On Tue, 1 Oct 2024 22:20:55 +0900 Yugo Nagata wrote: > 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

Re: Enhance create subscription reference manual

2024-10-07 Thread Yugo NAGATA
On Thu, 03 Oct 2024 12:23:34 +0900 (JST) Tatsuo Ishii wrote: > > parameter in this case (it is an "optional" parameter, though). However, > > when we refer to the stored catalog value, we should call it an option or > > a property and calling it parameter is not suitable. > > Not sure. The store

Re: Add new COPY option REJECT_LIMIT

2024-10-07 Thread torikoshia
Thanks for your review! On Thu, Oct 3, 2024 at 4:27 PM jian he wrote: mentioning maxerror is a bigint type or explicitly mentioning the maximum allowed value of "maxerror" would be great. Added a description that it allows positive bigint. On Thu, Oct 3, 2024 at 11:43 PM Fujii Masao w

Re: Add minimal C example and SQL registration example for custom table access methods.

2024-10-07 Thread Phil Eaton
Glad to hear it. Thank you! On Mon, Oct 7, 2024 at 2:50 AM Michael Paquier wrote: > > On Fri, May 24, 2024 at 03:59:08PM -0300, Fabrízio de Royes Mello wrote: > > Nice... LGTM! > > I have noticed that this was still in the CF. After fixing a couple > of inconsistencies in the markups and the na

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

2024-10-07 Thread Shlok Kyal
On Fri, 4 Oct 2024 at 12:52, Shlok Kyal wrote: > > Hi Kuroda-san, > > Thanks for reviewing the patch. > > > > 1. > > I feel the name of SnapBuildDistributeNewCatalogSnapshot() should be > > updated because it > > distributes two objects: catalog snapshot and invalidation messages. Do you > > hav

Re: Make default subscription streaming option as Parallel

2024-10-07 Thread vignesh C
On Mon, 7 Oct 2024 at 12:26, Hayato Kuroda (Fujitsu) wrote: > > Dear Vignesh, > > > One key point to consider is that the lock on transaction objects will > > be held for a longer duration when using streaming in parallel. This > > occurs because the parallel apply worker initiates the transaction

Re: Commit fest 2024-09

2024-10-07 Thread Daniel Gustafsson
> On 7 Oct 2024, at 09:47, Michael Paquier wrote: > The commit fest 2024-09 should have ended one week ago, so I have been > taking one step ahead and I have begun cleaning up things. Thanks for doing this, much appreciated! -- Daniel Gustafsson

Re: per backend I/O statistics

2024-10-07 Thread Bertrand Drouvot
Hi, On Fri, Sep 20, 2024 at 01:26:49PM +0900, Michael Paquier wrote: > On Tue, Sep 17, 2024 at 01:56:34PM +, Bertrand Drouvot wrote: > > No problem at all! (I re-explained because I'm not always 100% sure that my > > explanations are crystal clear ;-) ) > > We

Re: per backend I/O statistics

2024-10-07 Thread Bertrand Drouvot
Hi, On Fri, Sep 20, 2024 at 12:53:43PM +0900, Michael Paquier wrote: > On Wed, Sep 04, 2024 at 04:45:24AM +, Bertrand Drouvot wrote: > > On Tue, Sep 03, 2024 at 04:07:58PM +0900, Kyotaro Horiguchi wrote: > >> As an additional benefit of this approach, the client can set a > >> connection varia

Re: ECPG cleanup and fix for clang compile-time problem

2024-10-07 Thread John Naylor
On Saturday, October 5, 2024, Tom Lane wrote: > > > Rebase needed after f22e84df1, so here's an update that rebases > up to HEAD and adds the missing "static". No other changes. > > (Anybody want to review this? I'm getting tired of rebasing it, > and we're missing out on the clang build time sa

Re: Enable data checksums by default

2024-10-07 Thread Daniel Gustafsson
> On 3 Oct 2024, at 23:13, Nathan Bossart wrote: > > On Tue, Oct 01, 2024 at 11:15:02AM -0400, Peter Eisentraut wrote: >> I have committed 0001 (the new option) and 0004 (the docs tweak). I think >> there is consensus for the rest, too, but I'll leave it for a few more days >> to think about. I

Re: System views for versions reporting

2024-10-07 Thread Dmitry Dolgov
> On Sun, Oct 06, 2024 at 12:01:29PM GMT, Joe Conway wrote: > On 10/6/24 11:36, Dmitry Dolgov wrote: > > Hi, > > > > Based on the feedback in [1], here is my attempt at implementing system > > views for versions reporting. It adds pg_system_versions for showing > > things like core version, compile

Re: Add contrib/pg_logicalsnapinspect

2024-10-07 Thread Bertrand Drouvot
Hi, On Wed, Sep 25, 2024 at 05:04:18PM -0700, Masahiko Sawada wrote: > I've reviewed v10 patch and here are some comments: Thanks for looking at it! > > +static void > +ValidateAndRestoreSnapshotFile(XLogRecPtr lsn, SnapBuildOnDisk *ondisk, > + const char *path)

Re: Use heap scan routines directly in vac_update_datfrozenxid()

2024-10-07 Thread Alvaro Herrera
On 2024-Oct-06, Tom Lane wrote: > Soumyadeep Chakraborty writes: > > Attached is a simple patch to directly use heap scan routines in > > vac_update_datfrozenxid(), avoiding the multilayer overhead from the > > sysscan infrastructure. Though if there's anybody with a Postgres fork using catalog

Re: Report checkpoint progress with pg_stat_progress_checkpoint (was: Report checkpoint progress in server logs)

2024-10-07 Thread Nitin Jadhav
Hi, It’s been a long gap in the activity of this thread, and I apologize for the delay. However, I have now returned and reviewed the other threads [1],[2] that have made changes in this area. I would like to share a summary of the discussion that took place among Robert, Andres, Bharath, and Tom

Re: Parallel workers stats in pg_stat_database

2024-10-07 Thread Guillaume Lelarge
Hey, Le mer. 2 oct. 2024 à 11:12, Benoit Lobréau a écrit : > Hi, > > Thanks for your imput ! I will fix the doc as proposed and do the split > as soon as I have time. > > I've done the split, but I didn't go any further than that. Two patches attached: * v5-0001 adds the metrics (same patch tha

Re: Add parallel columns for pg_stat_statements

2024-10-07 Thread Guillaume Lelarge
Le lun. 7 oct. 2024 à 02:18, Michael Paquier a écrit : > On Sun, Oct 06, 2024 at 03:32:02PM +0200, Guillaume Lelarge wrote: > > I'm not sure I follow. That would mean that every time a query is > executed, > > it always gets the same amount of workers. Which is not guaranteed to be > > true. > >

Re: On disable_cost

2024-10-07 Thread Alena Rybakina
On 03.10.2024 23:10, Laurenz Albe wrote: On Thu, 2024-10-03 at 14:24 -0400, Robert Haas wrote: On Thu, Oct 3, 2024 at 1:35 PM Alena Rybakina wrote: I prepared a patch that includes the information we can add. One general thing to think about is that we really document very little about EXPLAI

Re: Unlinking Parallel Hash Join inner batch files sooner

2024-10-07 Thread Michael Paquier
On Tue, May 14, 2024 at 02:56:37PM -0400, Robert Haas wrote: > It doesn't appear to me that this got committed. On the procedural > question, I would personally treat it as a non-back-patchable bug fix > i.e. master-only but without regard to feature freeze. However, I can > see arguments for eithe

RE: Make default subscription streaming option as Parallel

2024-10-06 Thread Hayato Kuroda (Fujitsu)
Dear Vignesh, > One key point to consider is that the lock on transaction objects will > be held for a longer duration when using streaming in parallel. This > occurs because the parallel apply worker initiates the transaction as > soon as streaming begins, maintaining the lock until the transacti

Re: Add minimal C example and SQL registration example for custom table access methods.

2024-10-06 Thread Michael Paquier
On Fri, May 24, 2024 at 03:59:08PM -0300, Fabrízio de Royes Mello wrote: > Nice... LGTM! I have noticed that this was still in the CF. After fixing a couple of inconsistencies in the markups and the names, trimming down the list of headers to avoid rot and adding a static in from of the const, th

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

2024-10-06 Thread Guillaume Lelarge
Le lun. 7 oct. 2024 à 02:41, Michael Paquier a écrit : > 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

Re: Psql meta-command conninfo+

2024-10-06 Thread Hunaid Sohail
Hi David, Thank you for your feedback. On Fri, Oct 4, 2024 at 11:56 AM David G. Johnston < david.g.johns...@gmail.com> wrote: > It seems to me a more useful definition for what this command should print > out is basically the entire contents of: > > https://www.postgresql.org/docs/current/libpq-

Re: bgwrite process is too lazy

2024-10-06 Thread wenhui qiu
Hi Andres Freund Thank you for explanation > I doubt that slowdown is caused by bgwriter not being active enough. I suspect > what you're seeing is one or more of: > a) The overhead of doing full page writes (due to increasing the WAL > volume). You could verify whether that's the case by tur

Re: Set query_id for query contained in utility statement

2024-10-06 Thread Michael Paquier
On Fri, Oct 04, 2024 at 08:16:00PM +0800, jian he wrote: > about v5 0001 > select_with_parens: > '(' select_no_parens ')'{ $$ = $2; } > | '(' select_with_parens ')'{ $$ = $2; } > ; > > > toplevel | calls | query

Re: [PROPOSAL] : Disallow use of empty column name in (column_name '') in ALTER or CREATE of foreign table.

2024-10-06 Thread Michael Paquier
On Thu, Aug 22, 2024 at 04:00:13PM +0530, Nishant Sharma wrote: > I may be wrong, but just wanted to share my thoughts on the differences. > So, it > can be considered a different issue/mistake and can be handled separately in > another email thread. +else if (strcmp(def->defname, "column_

Re: GUC names in messages

2024-10-06 Thread Michael Paquier
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, like: - The GUC name coming from the table's record is only used for

Re: System username in pg_stat_activity

2024-10-06 Thread Michael Paquier
On Tue, Feb 20, 2024 at 10:32:53PM +0100, Magnus Hagander wrote: > In a way, that's yet another different type of values though -- it > contains accumulated stats. So we really have 3 types -- "info" that's > not really stats (username, etc), "current state" (query, wait events, > state) and "accum

Re: Function for listing pg_wal/summaries directory

2024-10-06 Thread Michael Paquier
On Fri, Oct 04, 2024 at 10:02:11AM -0500, Nathan Bossart wrote: > Could you explain why you feel the existing support functions are > insufficient? Because it is not possible to outsource the scan of pg_wal/summaries/ to a different role, no? On HEAD, one would require a full access to the data f

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

2024-10-06 Thread Michael Paquier
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 > number of parallel workers. > We may h

Re: Add parallel columns for pg_stat_statements

2024-10-06 Thread Michael Paquier
On Sun, Oct 06, 2024 at 03:32:02PM +0200, Guillaume Lelarge wrote: > I'm not sure I follow. That would mean that every time a query is executed, > it always gets the same amount of workers. Which is not guaranteed to be > true. > > I would agree, though, that parallelized_queries_launched is probab

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