Re: Move global variables of pgoutput to plugin private scope.

2023-09-18 Thread Michael Paquier
On Tue, Sep 19, 2023 at 04:10:39AM +, Zhijie Hou (Fujitsu) wrote: > Currently we have serval global variables in pgoutput, but each of them is > inherently local to an individual pgoutput instance. This could cause issues > if > we switch to different output plugin instance in one session and

Re: Synchronizing slots from primary to standby

2023-09-18 Thread shveta malik
On Fri, Sep 15, 2023 at 2:22 PM Peter Smith wrote: > > Hi. Here are some review comments for v17-0002. > Thanks Peter for the feedback. I have addressed most of these in v18 except 2. Please find my comments for the ones not addressed. > This is a WIP and a long way from complete, but I

Re: POC: GROUP BY optimization

2023-09-18 Thread Andrey Lepikhov
On 20/7/2023 18:46, Tomas Vondra wrote: On 7/20/23 08:37, Andrey Lepikhov wrote: On 3/10/2022 21:56, Tom Lane wrote: Revert "Optimize order of GROUP BY keys". This reverts commit db0d67db2401eb6238ccc04c6407a4fd4f985832 and several follow-on fixes. ... Since we're hard up against the release

Move global variables of pgoutput to plugin private scope.

2023-09-18 Thread Zhijie Hou (Fujitsu)
Hi, Per complain in another thread[1], I started to look into the global variables in pgoutput. Currently we have serval global variables in pgoutput, but each of them is inherently local to an individual pgoutput instance. This could cause issues if we switch to different output plugin instance

Re: Bug fix for psql's meta-command \ev

2023-09-18 Thread Michael Paquier
On Mon, Sep 18, 2023 at 06:54:50PM +0300, Aleksander Alekseev wrote: > I tested the patch and it LGTM too. I don't have a strong opinion on > whether we should bother with a comment or not. > > As a side note I wonder whether we shouldn't assume that query_buf is > always properly initialized

Re: Add 'worker_type' to pg_stat_subscription

2023-09-18 Thread Amit Kapila
On Mon, Sep 18, 2023 at 8:50 PM Nathan Bossart wrote: > > On Mon, Sep 18, 2023 at 04:56:46PM +1000, Peter Smith wrote: > > On Mon, Sep 18, 2023 at 1:43 PM Amit Kapila wrote: > >> One simple idea to reduce confusion could be to use (leader) in the > >> above two places. Do you see any other place

Re: Improving btree performance through specializing by key shape, take 2

2023-09-18 Thread Peter Geoghegan
On Mon, Sep 18, 2023 at 8:57 AM Matthias van de Meent wrote: > > Rebased again to v13 to account for API changes in 9f060253 "Remove > > some more "snapshot too old" vestiges." > > ... and now attached. I see that this revised version is approximately as invasive as earlier versions were - it

RE: pg_ctl start may return 0 even if the postmaster has been already started on Windows

2023-09-18 Thread Hayato Kuroda (Fujitsu)
Dear Horiguchi-san, I have tested your patch on my CI, but several test could not patch with error: "pg_ctl: launcher shell executed multiple processes". I added the thread to next CF entry, so let's see the how cfbot says. [1]: https://commitfest.postgresql.org/45/4573/ Best Regards, Hayato

Re: dikkop seems unhappy because of openssl stuff (FreeBSD 14-BETA1)

2023-09-18 Thread Thomas Munro
On Tue, Sep 19, 2023 at 2:04 PM Michael Paquier wrote: > On Mon, Sep 18, 2023 at 03:11:27PM +0200, Tomas Vondra wrote: > > Both 11 and 12 failed with a weird openssl segfaults in plpython tests, > > see [2] and [3]. And 13 is stuck in some openssl stuff in plpython > > tests, with 100% CPU usage

Re: Improving btree performance through specializing by key shape, take 2

2023-09-18 Thread Peter Geoghegan
On Mon, Sep 18, 2023 at 6:29 PM Peter Geoghegan wrote: > I also have significant doubts about your scheme for avoiding > invalidating the bounds of the page based on its high key matching the > parent's separator. The subtle dynamic prefix compression race > condition that I was worried about was

Re: Inefficiency in parallel pg_restore with many tables

2023-09-18 Thread Nathan Bossart
On Mon, Sep 18, 2023 at 09:36:03PM -0400, Tom Lane wrote: > But in any case, how long are we keeping src/tools/msvc/ ? >From a skim of [0], it seems like it could be removed now. I see a couple of work-in-progress patches from Andres [1] that would probably serve as a good starting point. I

Re: Inefficiency in parallel pg_restore with many tables

2023-09-18 Thread Tom Lane
Nathan Bossart writes: > On Mon, Sep 18, 2023 at 09:23:20PM -0400, Tom Lane wrote: >> bowerbird is unhappy with this. I suppose you missed out updating >> the src/tools/msvc/ scripts. (Weren't we about ready to nuke those?) > I saw that and have attempted to fix it with 83223f5. Ah, right,

Re: Inefficiency in parallel pg_restore with many tables

2023-09-18 Thread Michael Paquier
On Mon, Sep 18, 2023 at 09:23:20PM -0400, Tom Lane wrote: > bowerbird is unhappy with this. I suppose you missed out updating > the src/tools/msvc/ scripts. > (Weren't we about ready to nuke those?) hamerkop seems to be the only buildfarm member that would complain if these were to be gone

Re: Inefficiency in parallel pg_restore with many tables

2023-09-18 Thread Nathan Bossart
On Mon, Sep 18, 2023 at 09:23:20PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> For now, I've committed 0001 and 0002. I intend to commit the others soon. > > bowerbird is unhappy with this. I suppose you missed out updating > the src/tools/msvc/ scripts. (Weren't we about ready to nuke

Re: Inefficiency in parallel pg_restore with many tables

2023-09-18 Thread Tom Lane
Nathan Bossart writes: > For now, I've committed 0001 and 0002. I intend to commit the others soon. bowerbird is unhappy with this. I suppose you missed out updating the src/tools/msvc/ scripts. (Weren't we about ready to nuke those?) regards, tom lane

Re: XLog size reductions: smaller XLRec block header for PG17

2023-09-18 Thread Michael Paquier
On Mon, Sep 18, 2023 at 04:03:38PM -0700, Andres Freund wrote: > I think it's a bad tradeoff to write lots of custom varint encodings, just to > eek out a bit more space savings. The increase in code complexity IMO makes it > a bad tradeoff. +1. -- Michael signature.asc Description: PGP

Re: Fix error handling in be_tls_open_server()

2023-09-18 Thread Michael Paquier
On Mon, Sep 18, 2023 at 02:35:28PM +0200, Daniel Gustafsson wrote: > Certificates can be regenerated with the buildsystem, which ideally would > apply > to this cert as well, but if that's not feasible we can perhaps accept a > static > one with build information detailed in the README. Having

Re: [ psql - review request ] review request for \d+ tablename, \d+ indexname indenting

2023-09-18 Thread 쿼리트릭스
The error was corrected and a new diff file was created. The diff file was created based on 16 RC1. We confirmed that 5 places where errors occurred when performing make check were changed to ok. Team Query Tricks --- querytricks2023.gmail.com Query

Re: Optimizing "boundary cases" during backward scan B-Tree index descents

2023-09-18 Thread Peter Geoghegan
On Tue, Jun 20, 2023 at 5:12 PM Peter Geoghegan wrote: > I'm happy with the way that v2 came out, since the new structure makes > a lot more sense to me. Attached is v3, which is a straightforward rebase of v2. v3 is needed to get the patch to apply cleanly against HEAD - so no real changes

Re: [PATCH] fastpacth-locks compile time options

2023-09-18 Thread Michael Paquier
On Mon, Sep 18, 2023 at 05:49:51PM +0300, Sergey Sergey wrote: > Hope this patch will be usefull/ -uint64 fpLockBits;/* lock modes held for each fast-path slot */ +uint8fpLockBits[FP_LOCK_SLOTS_PER_BACKEND];/* lock modes If my maths are right, this makes

Re: dikkop seems unhappy because of openssl stuff (FreeBSD 14-BETA1)

2023-09-18 Thread Michael Paquier
On Mon, Sep 18, 2023 at 03:11:27PM +0200, Tomas Vondra wrote: > Both 11 and 12 failed with a weird openssl segfaults in plpython tests, > see [2] and [3]. And 13 is stuck in some openssl stuff in plpython > tests, with 100% CPU usage (for ~30h now): > > #0 0x850e86c0 in OPENSSL_sk_insert

Re: Move bki file pre-processing from initdb to bootstrap

2023-09-18 Thread Andres Freund
Hi, On 2023-09-01 14:59:57 +0200, Peter Eisentraut wrote: > On 01.09.23 14:37, Tom Lane wrote: > > Krishnakumar R writes: > > > This patch moves the pre-processing for tokens in the bki file from > > > initdb to bootstrap. With these changes the bki file will only be > > > opened once in

Re: XLog size reductions: smaller XLRec block header for PG17

2023-09-18 Thread Andres Freund
Hi, On 2023-05-18 19:22:26 +0300, Heikki Linnakangas wrote: > On 18/05/2023 17:59, Matthias van de Meent wrote: > > Attached is a patch that reduces this overhead by up to 2 bytes by > > encoding how large the block data length field is into the block ID, > > and thus optionally reducing the

Re: Sync scan & regression tests

2023-09-18 Thread Andres Freund
Hi, On 2023-09-18 13:49:24 +0300, Heikki Linnakangas wrote: > On 05/09/2023 06:16, Tom Lane wrote: > > Heikki Linnakangas writes: > > > With shared_buffers='20MB', the tests passed. I'm going to change it > > > back to 10MB now, so that we continue to cover that case. > > > > So chipmunk is

Re: Index range search optimization

2023-09-18 Thread Peter Geoghegan
On Thu, Sep 14, 2023 at 3:23 AM Alexander Korotkov wrote: > The attached patch allows Postgres to skip scan keys required for directional > scans (even when other keys are present in the scan). I'll soon post the > testing results and a more polished version of this patch. This is very

Re: Improvements in pg_dump/pg_restore toc format and performances

2023-09-18 Thread Pierre Ducroquet
On Monday, September 18, 2023 11:52:47 PM CEST Nathan Bossart wrote: > On Thu, Jul 27, 2023 at 10:51:11AM +0200, Pierre Ducroquet wrote: > > I ended up writing several patches that shaved some time for pg_restore > > -l, > > and reduced the toc.dat size. > > I've only just started taking a look

Re: Use of additional index columns in rows filtering

2023-09-18 Thread Peter Geoghegan
On Mon, Aug 7, 2023 at 12:34 PM Tomas Vondra wrote: > On 8/7/23 02:38, Peter Geoghegan wrote: > > This plan switchover isn't surprising in itself -- it's one of the most > > important issues addressed by my SAOP patch. However, it *is* a little > > surprising that your patch doesn't even manage

Re: Improvements in pg_dump/pg_restore toc format and performances

2023-09-18 Thread Nathan Bossart
On Mon, Sep 18, 2023 at 02:52:47PM -0700, Nathan Bossart wrote: > On Thu, Jul 27, 2023 at 10:51:11AM +0200, Pierre Ducroquet wrote: >> I ended up writing several patches that shaved some time for pg_restore -l, >> and reduced the toc.dat size. > > I've only just started taking a look at these

Re: Improvements in pg_dump/pg_restore toc format and performances

2023-09-18 Thread Nathan Bossart
On Thu, Jul 27, 2023 at 10:51:11AM +0200, Pierre Ducroquet wrote: > I ended up writing several patches that shaved some time for pg_restore -l, > and reduced the toc.dat size. I've only just started taking a look at these patches, and I intend to do a more thorough review in the

Re: Inefficiency in parallel pg_restore with many tables

2023-09-18 Thread Nathan Bossart
For now, I've committed 0001 and 0002. I intend to commit the others soon. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Add 'worker_type' to pg_stat_subscription

2023-09-18 Thread Peter Smith
On Tue, Sep 19, 2023 at 1:20 AM Nathan Bossart wrote: > > On Mon, Sep 18, 2023 at 04:56:46PM +1000, Peter Smith wrote: > > On Mon, Sep 18, 2023 at 1:43 PM Amit Kapila wrote: > >> One simple idea to reduce confusion could be to use (leader) in the > >> above two places. Do you see any other place

Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }

2023-09-18 Thread Jeff Davis
On Mon, 2023-09-18 at 12:01 -0400, Robert Haas wrote: > But with the patch as you have proposed it that's not what happens. > We > just end up with two interconnected mechanisms for managing what, > right now, is managed by a single mechanism. That mechanism is (and I > think we probably mostly

Re: dikkop seems unhappy because of openssl stuff (FreeBSD 14-BETA1)

2023-09-18 Thread Thomas Munro
IDK, but I tried installing tcl87 as you showed in packages.txt, and REL_11_STABLE said: checking for tclsh... no checking for tcl... no checking for tclsh8.6... no checking for tclsh86... no checking for tclsh8.5... no checking for tclsh85... no checking for tclsh8.4... no checking for

Re: Disabling Heap-Only Tuples

2023-09-18 Thread Laurenz Albe
On Mon, 2023-09-18 at 12:22 -0400, Robert Haas wrote: > On Tue, Sep 5, 2023 at 11:15 PM Laurenz Albe wrote: > > I don't think that is a good comparison.  While most people probably > > never need to touch "local_update_limit", "work_mem" is something everybody > > has to consider. > > > > And it

Re: [PATCH] fastpacth-locks compile time options

2023-09-18 Thread Sergey Sergey
Hope this patch will be usefull/ On Mon, Sep 18, 2023 at 5:47 PM Sergey Sergey wrote: > While replaying our production workload we have found Postgres spending a > lot of time inside TimescaleDB planner. The planner itself need an > information about whether a table involved is a TimescaleDB

[PATCH] fastpacth-locks compile time options

2023-09-18 Thread Sergey Sergey
While replaying our production workload we have found Postgres spending a lot of time inside TimescaleDB planner. The planner itself need an information about whether a table involved is a TimescaleDB hypertable. So planner need an access to TimescaleDB internal metainformation tables. This

Re: New WAL record to detect the checkpoint redo location

2023-09-18 Thread Robert Haas
On Fri, Jul 14, 2023 at 11:16 AM Andres Freund wrote: > I suspect we might be able to get rid of the need for exclusive inserts > here. If we rid of that, we could determine the redoa location based on the > LSN determined by the XLogInsert(). I've been brainstorming about this today, trying to

Re: dikkop seems unhappy because of openssl stuff (FreeBSD 14-BETA1)

2023-09-18 Thread Tom Lane
Tomas Vondra writes: > it seems dikkop is unhappy again, this time because of some OpenSSL > stuff. I'm not sure it's our problem - it might be issues with the other > packages, or maybe something FreeBSD specific, not sure. > ... > Both 11 and 12 failed with a weird openssl segfaults in plpython

Re: XLog size reductions: smaller XLRec block header for PG17

2023-09-18 Thread Matthias van de Meent
On Tue, 5 Sept 2023 at 15:04, Aleksander Alekseev wrote: > > Hi, > > I noticed that the patch needs review and decided to take a look. Thanks for reviewing! > All in all the patch looks good to me, but I have a couple of nitpicks: > > * The comment for XLogSizeClass seems to be somewhat

Re: Add 'worker_type' to pg_stat_subscription

2023-09-18 Thread Nathan Bossart
On Mon, Sep 18, 2023 at 04:56:46PM +1000, Peter Smith wrote: > On Mon, Sep 18, 2023 at 1:43 PM Amit Kapila wrote: >> One simple idea to reduce confusion could be to use (leader) in the >> above two places. Do you see any other place which could be confusing >> and what do you suggest to fix it? >

Re: function "cursor_to_xmlschema" causes a crash

2023-09-18 Thread Tom Lane
"=?UTF-8?B?5p2o5Lyv5a6HKOmVv+Wggik=?=" writes: > I recently notice that function "cursor_to_xmlschema" can lead to a crash if > the > cursor parameter points to the query itself. Here is an example: > postgres=# SELECT cursor_to_xmlschema('' :: refcursor, TRUE , FALSE , 'xxx' ) > into temp; >

Questioning an errcode and message in jsonb.c

2023-09-18 Thread Chapman Flack
Hi, This came up in [0] and opinions besides my own would be welcome. There is a function cannotCastJsonbValue in jsonb.c, and it throws errors of this form: ERRCODE_INVALID_PARAMETER_VALUE "cannot cast jsonb %1$s to type %2$s" where %1 is one of the possible JsonbValue types (null, string,

Re: Disabling Heap-Only Tuples

2023-09-18 Thread Robert Haas
On Tue, Sep 5, 2023 at 11:15 PM Laurenz Albe wrote: > I don't think that is a good comparison. While most people probably > never need to touch "local_update_limit", "work_mem" is something everybody > has to consider. > > And it is not so hard to tune: the setting would be the desired table >

Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }

2023-09-18 Thread Robert Haas
On Mon, Aug 21, 2023 at 5:32 PM Jeff Davis wrote: > But I don't look at the search_path as "just another GUC" when it comes > to executing a function. The source of the initial value of search_path > is more like the IMMUTABLE marker. I mean I agree and I disagree. Philosophically, I agree.

Re: Improving btree performance through specializing by key shape, take 2

2023-09-18 Thread Matthias van de Meent
On Wed, 30 Aug 2023 at 21:50, Matthias van de Meent wrote: > > Updated in the attached version 12 of the patchset (which is also > rebased on HEAD @ 9c13b681). No changes apart from rebase fixes and > these added comments. Rebased again to v13 to account for API changes in 9f060253 "Remove some

Re: Bug fix for psql's meta-command \ev

2023-09-18 Thread Aleksander Alekseev
Hi, I came across the patch since it was marked as "Needs review" (and then I realized that I mistakenly opened the upcoming commit fest, not the current one...). > Good catch! I agree to this. > > > This problem can be resolved by resetting the query buffer on > > error. You can see the

Re: Make --help output fit within 80 columns per line

2023-09-18 Thread Greg Sabino Mullane
On Fri, Sep 15, 2023 at 11:11 AM torikoshia wrote: > I do not intend to adhere to this rule(my terminals are usually bigger > than 80 chars per line), but wouldn't it be a not bad direction to use > 80 characters for all commands? > Well, that's the question du jour, isn't it? The 80 character

Re: Extending SMgrRelation lifetimes

2023-09-18 Thread Robert Haas
I think that if you believe 0001 to be correct you should go ahead and commit it sooner rather than later. If you're wrong and something weird starts happening we'll then have a chance to notice that before too much other stuff gets changed on top of this and confuses the matter. On Wed, Aug 23,

Re: GenBKI emits useless open;close for catalogs without rows

2023-09-18 Thread Matthias van de Meent
On Tue, 12 Sept 2023 at 17:51, Matthias van de Meent wrote: > > On Fri, 1 Sept 2023 at 19:52, Tom Lane wrote: > > > > Alvaro Herrera writes: > > > On 2023-Sep-01, Matthias van de Meent wrote: > > >> A potential addition to the patch would to stop manually closing > > >> relations: initdb and

Re: psql help message contains excessive indentations

2023-09-18 Thread Alvaro Herrera
On 2023-Sep-07, Yugo NAGATA wrote: > Thank you for your explanation. I understood it. I thought of just > imitating other places, and I didn't know each is a single translatable > unit. Thanks for reviewing, and Kyotaro for reporting. Pushed now. -- Álvaro HerreraBreisgau, Deutschland

pg16: XX000: could not find pathkey item to sort

2023-09-18 Thread Justin Pryzby
This fails since 1349d2790b commit 1349d2790bf48a4de072931c722f39337e72055e Author: David Rowley Date: Tue Aug 2 23:11:45 2022 +1200 Improve performance of ORDER BY / DISTINCT aggregates ts=# CREATE TABLE t (a int, b text) PARTITION BY RANGE (a); ts=# CREATE TABLE td PARTITION OF t

Re: Sync scan & regression tests

2023-09-18 Thread Tom Lane
Heikki Linnakangas writes: > On 05/09/2023 06:16, Tom Lane wrote: >> So chipmunk is getting through the core tests now, but instead it >> is failing in contrib/pg_visibility [1]: > I bisected it to this: > commit 82a4edabd272f70d044faec8cf7fd1eab92d9991 (HEAD) > Author: Andres Freund > Date:

Re: Cirrus-ci is lowering free CI cycles - what to do with cfbot, etc?

2023-09-18 Thread Daniel Gustafsson
> On 13 Sep 2023, at 01:49, Andres Freund wrote: > On 2023-08-30 10:57:10 +0200, Daniel Gustafsson wrote: >>> On 28 Aug 2023, at 14:32, Daniel Gustafsson wrote: >> >>> Attached is a patch with a quick PoC for using PQPing instead of using psql >>> for >>> connection checks in pg_regress. >>

dikkop seems unhappy because of openssl stuff (FreeBSD 14-BETA1)

2023-09-18 Thread Tomas Vondra
Hi, it seems dikkop is unhappy again, this time because of some OpenSSL stuff. I'm not sure it's our problem - it might be issues with the other packages, or maybe something FreeBSD specific, not sure. We did some investigation of an unrelated issue on dikkop about a month ago [1], so it wasn't

Re: SQL:2011 application time

2023-09-18 Thread jian he
On Fri, Sep 15, 2023 at 12:11 AM Paul Jungwirth wrote: > > Thanks for the thorough review and testing! > > Here is a v14 patch with the segfault and incorrect handling of NO > ACTION and RESTRICT fixed (and reproductions added to the test suite). > another case: BEGIN; DROP TABLE IF EXISTS

Re: Fix error handling in be_tls_open_server()

2023-09-18 Thread Daniel Gustafsson
> On 28 Aug 2023, at 19:39, Sergey Shinderuk wrote: > I'll try to add a client certificate lacking a CN to the SSL test suite. Certificates can be regenerated with the buildsystem, which ideally would apply to this cert as well, but if that's not feasible we can perhaps accept a static one with

Re: Allow specifying a dbname in pg_basebackup connection string

2023-09-18 Thread Daniel Gustafsson
> On 31 Aug 2023, at 11:01, Jelte Fennema wrote: > Attached is a new version with some slightly updated wording in the docs I had a look at this Ready for Committer entry in the CF and it seems to strike a balance between useful in certain cases and non-intrusive in others. Unless something

Re: Fix GIST readme on LSN vs NSN

2023-09-18 Thread Daniel Gustafsson
> On 18 Sep 2023, at 13:09, Heikki Linnakangas wrote: > I propose the attached patch to reword the sentence a little more. LGTM, +1 -- Daniel Gustafsson

Re: remaining sql/json patches

2023-09-18 Thread Erik Rijkers
Op 9/18/23 om 13:14 schreef Erik Rijkers: Op 9/18/23 om 12:20 schreef Amit Langote: Hi Erik, I am sorry to be bothering you with these somewhat idiotic SQL statements but I suppose somehow it needs to be made more solid. For 60 datatypes, I ran this statement: select

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-18 Thread Amit Kapila
On Fri, Sep 15, 2023 at 6:32 PM Hayato Kuroda (Fujitsu) wrote: > > > Thank you for reviewing! PSA new version patch set. > > Sorry, wrong patch attached. PSA the correct ones. > There is a possibility that XLOG_PARAMETER_CHANGE may be generated, when GUC > parameters are changed just before doing

Re: Infinite Interval

2023-09-18 Thread Dean Rasheed
On Wed, 13 Sept 2023 at 11:13, Ashutosh Bapat wrote: > > On Tue, Sep 12, 2023 at 2:39 PM Dean Rasheed wrote: > > > > and it looks like the infinite interval > > input code is broken. > > The code required to handle 'infinity' as an input value was removed by >

Re: Support prepared statement invalidation when result types change

2023-09-18 Thread Jelte Fennema-Nio
@Euler thanks for the review. I addressed the feedback. On Fri, 15 Sept 2023 at 01:41, Andy Fan wrote: > What if a client has *cached* an old version of RowDescription > and the server changed it to something new and sent resultdata > with the new RowDescription. Will the client still be able

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-18 Thread Zhijie Hou (Fujitsu)
On Friday, September 15, 2023 9:02 PM Kuroda, Hayato/黒田 隼人 wrote: > > Sorry, wrong patch attached. PSA the correct ones. > There is a possibility that XLOG_PARAMETER_CHANGE may be generated, > when GUC parameters are changed just before doing the upgrade. Added to > list. I did some simple

Re: remaining sql/json patches

2023-09-18 Thread Erik Rijkers
Op 9/18/23 om 12:20 schreef Amit Langote: Hi Erik, I am sorry to be bothering you with these somewhat idiotic SQL statements but I suppose somehow it needs to be made more solid. For 60 datatypes, I ran this statement: select json_query(jsonb'{"a":[{"a":[2,3]},{"a":[4,5]}]}',

Fix GIST readme on LSN vs NSN

2023-09-18 Thread Heikki Linnakangas
The GiST README says: If the F_FOLLOW_RIGHT flag is not set, a scan compares the NSN on the child and the LSN it saw in the parent. If NSN < LSN, the scan looked at the parent page before the downlink was inserted, so it should follow the rightlink. Otherwise the scan saw the downlink in the

Re: make add_paths_to_append_rel aware of startup cost

2023-09-18 Thread Andy Fan
Hi, > What do you think about this in my last reply? "If my above > analysis is correct, I think the best way to handle this is if there > is no more tables to join, we use cheapest fraction cost for all > the kinds of relations, including plain relation, append rel, > subquery and so on,

Re: Sync scan & regression tests

2023-09-18 Thread Heikki Linnakangas
On 05/09/2023 06:16, Tom Lane wrote: Heikki Linnakangas writes: With shared_buffers='20MB', the tests passed. I'm going to change it back to 10MB now, so that we continue to cover that case. So chipmunk is getting through the core tests now, but instead it is failing in contrib/pg_visibility

Re: Synchronizing slots from primary to standby

2023-09-18 Thread shveta malik
On Wed, Sep 13, 2023 at 4:48 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Shveta, > > Sorry for the late response. > > > Thanks Kuroda-san for the feedback. > > > > > > 01. General > > > > > > I think the documentation can be added, not only GUCs. How about adding > > examples > > > for

Re: remaining sql/json patches

2023-09-18 Thread Amit Langote
Hi Erik, On Mon, Sep 18, 2023 at 19:09 Erik Rijkers wrote: > Op 9/18/23 om 05:15 schreef Amit Langote: > > On Sun, Sep 17, 2023 at 3:34 PM Erik Rijkers wrote: > >> Op 9/14/23 om 10:14 schreef Amit Langote: > >>> > >>> > >> > >> Hi Amit, > >> > >> Just now I built a v14-patched server and I

Re: remaining sql/json patches

2023-09-18 Thread Erik Rijkers
Op 9/18/23 om 05:15 schreef Amit Langote: On Sun, Sep 17, 2023 at 3:34 PM Erik Rijkers wrote: Op 9/14/23 om 10:14 schreef Amit Langote: Hi Amit, Just now I built a v14-patched server and I found this crash: select json_query(jsonb ' { "arr": [ {"arr": [2,3]} , {"arr":

Commitfest 2023-09 half-time

2023-09-18 Thread Peter Eisentraut
We started with Status summary: Needs review: 227. Waiting on Author: 37. Ready for Committer: 30. Committed: 40. Rejected: 1. Returned with Feedback: 1. Withdrawn: 1. Total: 337. Now we are at Status summary: Needs review: 199. Waiting on Author: 33. Ready for Committer: 32. Committed:

Re: Infinite Interval

2023-09-18 Thread Ashutosh Bapat
On Thu, Sep 14, 2023 at 11:58 AM jian he wrote: > > - decade, century, and > millennium). > + decade, century, and > millennium > + for all types and hour and > day just for interval). It seems you have changed a paragraph from

Re: ALTER COLUMN ... SET EXPRESSION to alter stored generated column's expression

2023-09-18 Thread Amul Sul
On Thu, Sep 14, 2023 at 7:23 PM Ashutosh Bapat wrote: > Hi Amul, > I share others opinion that this feature is useful. > > >> On Fri, 25 Aug 2023 at 03:06, Vik Fearing > wrote: > >>> > >>> > >>> I don't like this part of the patch at all. Not only is the > >>> documentation only half baked,

function "cursor_to_xmlschema" causes a crash

2023-09-18 Thread 杨伯宇(长堂)
Hello postgres hackers: I recently notice that function "cursor_to_xmlschema" can lead to a crash if the cursor parameter points to the query itself. Here is an example: postgres=# SELECT cursor_to_xmlschema('' :: refcursor, TRUE , FALSE , 'xxx' ) into temp; server closed the connection

Re: information_schema and not-null constraints

2023-09-18 Thread Alvaro Herrera
On 2023-Sep-18, Peter Eisentraut wrote: > On 14.09.23 10:20, Peter Eisentraut wrote: > > Small correction here: This should be > > > > pg_catalog.format('%s IS NOT NULL', > > at.attname)::information_schema.character_data AS check_clause > > > > That is, the word "CHECK" and the parentheses

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-18 Thread Zhijie Hou (Fujitsu)
On Friday, September 15, 2023 8:33 PM Kuroda, Hayato/黒田 隼人 wrote: > > > Also, I did a self-reviewing again and reworded comments. > > BTW, the 0002 ports some functions from pg_walinspect, it may be not > elegant. > Coupling degree between core/extensions should be also lower. So I made >

Re: Add 'worker_type' to pg_stat_subscription

2023-09-18 Thread Peter Smith
On Mon, Sep 18, 2023 at 1:43 PM Amit Kapila wrote: > > On Sun, Sep 17, 2023 at 2:10 AM Nathan Bossart > wrote: > > > > On Sat, Sep 16, 2023 at 06:09:48PM +0530, Amit Kapila wrote: > > > > This still leaves the possibility for confusion with the documentation's > > use of "leader apply worker",

Re: pg_stat_get_backend_subxact() and backend IDs?

2023-09-18 Thread Ian Lawrence Barwick
2023年8月31日(木) 6:56 Nathan Bossart : > > On Wed, Aug 30, 2023 at 10:56:22AM -0400, Robert Haas wrote: > > On Wed, Aug 30, 2023 at 10:27 AM Nathan Bossart > > wrote: > >> I'm about to spend way too much time writing the commit message for 0002, > >> but I plan to commit both patches sometime today.

Re: make add_paths_to_append_rel aware of startup cost

2023-09-18 Thread Andy Fan
On Mon, Sep 18, 2023 at 11:58 AM David Rowley wrote: > On Mon, 18 Sept 2023 at 01:42, Andy Fan wrote: > > On Fri, Sep 15, 2023 at 3:15 PM David Rowley > wrote: > >> Instead of doing that, why don't you just create a completely new > >> AppendPath containing all the cheapest_startup_paths and

Re: information_schema and not-null constraints

2023-09-18 Thread Peter Eisentraut
On 14.09.23 10:20, Peter Eisentraut wrote: On 06.09.23 19:52, Alvaro Herrera wrote: +    SELECT current_database()::information_schema.sql_identifier AS constraint_catalog, +   rs.nspname::information_schema.sql_identifier AS constraint_schema, +