make pg_ctl more friendly

2023-11-01 Thread Crisp Lee
Hi hackers: I got a basebackup using pg_basebackup -R. After that, I created a restore point named test on primary, and set recovery_target_name to test, recovery_target_action to shutdown in standby datadir. I got a failure startup message after 'pg_ctl start -D $standby_datadir'. I think it is

Re: Is this a problem in GenericXLogFinish()?

2023-11-01 Thread Amit Kapila
On Wed, Nov 1, 2023 at 12:54 PM Michael Paquier wrote: > > On Mon, Oct 30, 2023 at 03:54:39PM +0530, Amit Kapila wrote: > > On Sat, Oct 28, 2023 at 4:30 PM Michael Paquier wrote: > >> On Sat, Oct 28, 2023 at 03:45:13PM +0530, Amit Kapila wrote: > >> > Yes, we need it to exclude any concurrent in-

Re: Intermittent failure with t/003_logical_slots.pl test on windows

2023-11-01 Thread Kyotaro Horiguchi
At Tue, 31 Oct 2023 18:11:48 +0530, vignesh C wrote in > Few others are also facing this problem with similar code like in: > https://stackoverflow.com/questions/15882799/fgets-returning-error-for-file-returned-by-popen I'm inclined to believe that the pipe won't enter the EOF state until the ta

RE: CRC32C Parallel Computation Optimization on ARM

2023-11-01 Thread Xiang Gao
On Tue, 31 Oct 2023 15:48:21PM -0500, Nathan Bossart wrote: >> Thanks. I went ahead and split this prerequisite part out to a separate >> thread [0] since it's sort-of unrelated to your proposal here. It's not >> really a prerequisite, but I do think it will simplify things a bit. >Per the other

Re: speed up a logical replica setup

2023-11-01 Thread Ashutosh Bapat
On Wed, Nov 1, 2023 at 7:10 PM Ashutosh Bapat wrote: > > I noticed some differences between this and a similar utility > https://github.com/2ndQuadrant/pglogical/blob/REL2_x_STABLE/pglogical_create_subscriber.c. > I will be reviewing these differences next to see if we are missing > anything here.

Re: A recent message added to pg_upgade

2023-11-01 Thread Michael Paquier
On Thu, Nov 02, 2023 at 02:32:07PM +1100, Peter Smith wrote: > On Thu, Nov 2, 2023 at 2:25 PM Peter Smith wrote: >> Checking this patch yesterday prompted me to create a new thread >> questioning the inconsistencies of the "GUC names in messages". In >> that thread, Tom Lane replied and gave some

Re: pg_upgrade and logical replication

2023-11-01 Thread Michael Paquier
On Thu, Nov 02, 2023 at 04:35:26PM +1100, Peter Smith wrote: > The chance of being able to do so should be small as pg_upgrade uses its > own port and unix domain directory (customizable as well with > --socketdir), but just preventing the launcher to start is safer at the > end, because we are the

Re: Tab completion regression test failed on illumos

2023-11-01 Thread Japin Li
On Thu, 02 Nov 2023 at 13:01, Noah Misch wrote: > On Wed, Nov 01, 2023 at 03:19:39PM +0800, Japin Li wrote: >> I try to run regression test on illumos, the 010_tab_completion will >> failed because of timeout. > >> Any suggestions? Thanks in advance! > > This test failed for me, in a different

Re: Why is DEFAULT_FDW_TUPLE_COST so insanely low?

2023-11-01 Thread Michael Paquier
On Thu, Nov 02, 2023 at 02:32:44PM +1300, David Rowley wrote: > No takers on the additional testing so I've pushed the patch that > increases it to 0.2. The CI has been telling me that the plans of the tests introduced by this patch are not that stable when building with 32b. See: diff -U3 /tmp/c

Re: pg_upgrade and logical replication

2023-11-01 Thread Peter Smith
Here are some review comments for patch v10-0001 == Commit message 1. The chance of being able to do so should be small as pg_upgrade uses its own port and unix domain directory (customizable as well with --socketdir), but just preventing the launcher to start is safer at the end, because we

Re: Statistics Import and Export

2023-11-01 Thread Corey Huinker
> > > > Maybe I just don't understand, but I'm pretty sure ANALYZE does not > derive index stats from column stats. It actually builds them from the > row sample. > That is correct, my error. > > > * now support extended statistics except for MCV, which is currently > > serialized as an difficul

Re: Tab completion regression test failed on illumos

2023-11-01 Thread Noah Misch
On Wed, Nov 01, 2023 at 03:19:39PM +0800, Japin Li wrote: > I try to run regression test on illumos, the 010_tab_completion will > failed because of timeout. > Any suggestions? Thanks in advance! This test failed for me, in a different way, when I briefly installed IO::Pty on a Solaris buildfarm

Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound

2023-11-01 Thread Alexander Lakhin
Hello Robert, 17.10.2023 17:39, Robert Haas wrote: On Tue, Oct 17, 2023 at 4:57 AM Aleksander Alekseev wrote: v11-0001 and v11-0002 LGTM too. Cool. Seems we are all in agreement, so committed these. Thanks! Please look at the following sentence added by the commit:    ...    to issu

Re: 003_check_guc.pl crashes if some extensions were loaded.

2023-11-01 Thread Anton A. Melnikov
On 02.11.2023 01:53, Michael Paquier wrote:> On Thu, Nov 02, 2023 at 12:28:05AM +0300, Anton A. Melnikov wrote: Found that src/test/modules/test_misc/t/003_check_guc.pl will crash if an extension that adds own GUCs was loaded into memory. So it is now impossible to run a check-world with loaded

Re: Don't pass NULL pointer to strcmp().

2023-11-01 Thread Nathan Bossart
On Wed, Nov 01, 2023 at 10:39:04PM -0400, Tom Lane wrote: > Nathan Bossart writes: >> What if we disallowed NULL string GUCs in v17? > > Well, we'd need to devise some other solution for hacks like the > one used by timezone_abbreviations (see comment in > check_timezone_abbreviations). I think

Re: Atomic ops for unlogged LSN

2023-11-01 Thread Nathan Bossart
On Wed, Nov 01, 2023 at 09:15:20PM +, John Morris wrote: > This is a rebased version . Even though I labelled it “v3”, there should be > no changes from “v2”. Thanks. I think this is almost ready, but I have to harp on the pg_atomic_read_u64() business once more. The relevant comment in ato

Re: A recent message added to pg_upgade

2023-11-01 Thread Peter Smith
On Thu, Nov 2, 2023 at 2:25 PM Peter Smith wrote: > > On Thu, Nov 2, 2023 at 1:58 PM Kyotaro Horiguchi > wrote: > > > > Thanks you for the comments! > > > > At Wed, 1 Nov 2023 18:08:19 +1100, Peter Smith > > wrote in > > > Hi, here are some minor review comments for the v3 patch. > > > > > > ==

Re: A recent message added to pg_upgade

2023-11-01 Thread Peter Smith
On Thu, Nov 2, 2023 at 1:58 PM Kyotaro Horiguchi wrote: > > Thanks you for the comments! > > At Wed, 1 Nov 2023 18:08:19 +1100, Peter Smith wrote > in > > Hi, here are some minor review comments for the v3 patch. > > > > == > > src/backend/access/transam/xlog.c > ... > > 2. > > > + GUC_check

Re: pg_rewind WAL segments deletion pitfall

2023-11-01 Thread torikoshia
On 2023-10-31 00:26, Alexander Kukushkin wrote: Hi, On Wed, 18 Oct 2023 at 08:50, torikoshia wrote: I have very minor questions on the regression tests mainly regarding the consistency with other tests for pg_rewind: Please find attached a new version of the patch. It addresses all your com

Re: race condition in pg_class

2023-11-01 Thread Noah Misch
I prototyped two ways, one with a special t_ctid and one with LockTuple(). On Fri, Oct 27, 2023 at 04:26:12PM -0700, Noah Misch wrote: > On Fri, Oct 27, 2023 at 06:40:55PM -0400, Tom Lane wrote: > > Noah Misch writes: > > > On Fri, Oct 27, 2023 at 03:32:26PM -0400, Tom Lane wrote: > > > I antici

Re: A recent message added to pg_upgade

2023-11-01 Thread Kyotaro Horiguchi
Thanks you for the comments! At Wed, 1 Nov 2023 18:08:19 +1100, Peter Smith wrote in > Hi, here are some minor review comments for the v3 patch. > > == > src/backend/access/transam/xlog.c > I asked ChatGPT to suggest alternative wording for that comment, and > it came up with something tha

Re: Don't pass NULL pointer to strcmp().

2023-11-01 Thread Tom Lane
Nathan Bossart writes: > On Wed, Nov 01, 2023 at 09:57:18PM -0400, Tom Lane wrote: >> After digging around for a bit, I think part of the problem is a lack >> of a clearly defined spec for what should happen with NULL string GUCs. > What if we disallowed NULL string GUCs in v17? Well, we'd need

Re: Don't pass NULL pointer to strcmp().

2023-11-01 Thread Nathan Bossart
On Wed, Nov 01, 2023 at 09:57:18PM -0400, Tom Lane wrote: > I wrote: >> Hmm ... if we're doing it ourselves, I suppose we've got to consider >> it supported :-(. But I'm still wondering how many seldom-used >> code paths didn't get the message. An example here is that this >> could lead to GetCon

Re: Why is DEFAULT_FDW_TUPLE_COST so insanely low?

2023-11-01 Thread Bruce Momjian
On Thu, Nov 2, 2023 at 02:32:44PM +1300, David Rowley wrote: > On Tue, 31 Oct 2023 at 11:16, David Rowley wrote: > > I'd be happy if anyone else would like to try the same experiment to > > see if there's some other value of DEFAULT_FDW_TUPLE_COST that might > > suit better. > > No takers on the

Re: Don't pass NULL pointer to strcmp().

2023-11-01 Thread Xing Guo
Thank you Tom! Your comment "NULL doesn't have semantics that are visibly different from an empty string" is exactly what I want to confirm :-) On 11/2/23, Tom Lane wrote: > I wrote: >> Hmm ... if we're doing it ourselves, I suppose we've got to consider >> it supported :-(. But I'm still wonde

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-11-01 Thread Kyotaro Horiguchi
At Wed, 1 Nov 2023 08:39:17 +0900, Michael Paquier wrote in > See in StartupXLOG(), around the comment "complain if we did not roll > forward far enough to reach". This complains if archive recovery has > been requested *or* if we retrieved a backup end LSN from the > backup_label. Please note

Re: Don't pass NULL pointer to strcmp().

2023-11-01 Thread Tom Lane
I wrote: > Hmm ... if we're doing it ourselves, I suppose we've got to consider > it supported :-(. But I'm still wondering how many seldom-used > code paths didn't get the message. An example here is that this > could lead to GetConfigOptionResetString returning NULL, which > I think is outside

Re: GUC names in messages

2023-11-01 Thread Nathan Bossart
On Wed, Nov 01, 2023 at 09:46:52PM +0100, Laurenz Albe wrote: > I agree for names with underscores in them. But I think that quoting > is necessary for names like "timezone" or "datestyle" that might be > mistaken for normal words. My personal preference is to always quote > GUC names, but I thin

Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)

2023-11-01 Thread Peter Smith
On Wed, Nov 1, 2023 at 2:03 PM Amit Kapila wrote: > > On Mon, Mar 27, 2023 at 11:08 AM Bharath Rupireddy > wrote: > > > > The v9 patch was failing because I was using MyReplicationSlot after > > it got reset by slot release, attached v10 patch fixes it. > > > > + * > + * Note: use LogReplicationS

Re: Why is DEFAULT_FDW_TUPLE_COST so insanely low?

2023-11-01 Thread David Rowley
On Tue, 31 Oct 2023 at 11:16, David Rowley wrote: > I'd be happy if anyone else would like to try the same experiment to > see if there's some other value of DEFAULT_FDW_TUPLE_COST that might > suit better. No takers on the additional testing so I've pushed the patch that increases it to 0.2. Da

Re: Don't pass NULL pointer to strcmp().

2023-11-01 Thread Tom Lane
Xing Guo writes: > There're extensions that set their boot_val to NULL. E.g., postgres_fdw Hmm ... if we're doing it ourselves, I suppose we've got to consider it supported :-(. But I'm still wondering how many seldom-used code paths didn't get the message. An example here is that this could le

Re: document deviation from standard on REVOKE ROLE

2023-11-01 Thread Bruce Momjian
On Wed, Nov 1, 2023 at 07:49:25PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Fri, Oct 30, 2020 at 02:03:48PM -0400, John Naylor wrote: > >> +In the SQL standard, REVOKE only revokes the > >> privilege > >> +as granted by the invoking role. In > >> PostgreSQL, > >> +this w

Re: document deviation from standard on REVOKE ROLE

2023-11-01 Thread Tom Lane
Bruce Momjian writes: > On Fri, Oct 30, 2020 at 02:03:48PM -0400, John Naylor wrote: >> +In the SQL standard, REVOKE only revokes the >> privilege >> +as granted by the invoking role. In >> PostgreSQL, >> +this will also revoke privileges granted by other roles. > John, should this

Re: Don't pass NULL pointer to strcmp().

2023-11-01 Thread Xing Guo
Hi Tom, There're extensions that set their boot_val to NULL. E.g., postgres_fdw ( https://github.com/postgres/postgres/blob/4210b55f598534db9d52c4535b7dcc777dda75a6/contrib/postgres_fdw/option.c#L582), plperl ( https://github.com/postgres/postgres/blob/4210b55f598534db9d52c4535b7dcc777dda75a6/src/

Properly pathify the union planner

2023-11-01 Thread David Rowley
The upper planner was pathified many years ago now. That was a large chunk of work and because of that, the union planner was not properly pathified in that effort. A small note was left in recurse_set_operations() to mention about future work. You can see this lack of pathification in make_unio

Re: document deviation from standard on REVOKE ROLE

2023-11-01 Thread Bruce Momjian
On Fri, Oct 30, 2020 at 02:03:48PM -0400, John Naylor wrote: > This is the other doc fix as suggested in  > https://www.postgresql.org/message-id/20201027220555.GS4951%40momjian.us > > There is already a compatibility section, so put there. > --  > John Naylor > EnterpriseDB: http://www.enterprise

Re: 003_check_guc.pl crashes if some extensions were loaded.

2023-11-01 Thread Michael Paquier
On Wed, Nov 01, 2023 at 07:29:51PM -0400, Tom Lane wrote: > Actually we do force that, see valid_custom_variable_name(). > But I think your idea is better. Ah, indeed, thanks. I didn't recall this was the case. -- Michael signature.asc Description: PGP signature

Re: 003_check_guc.pl crashes if some extensions were loaded.

2023-11-01 Thread Tom Lane
Michael Paquier writes: > On Thu, Nov 02, 2023 at 12:28:05AM +0300, Anton A. Melnikov wrote: >> "SELECT name >> FROM pg_settings >> WHERE NOT 'NOT_IN_SAMPLE' = ANY (pg_settings_get_flags(name)) AND >> - name <> 'config_file' >> + name <> 'config_file' AND name NOT LIKE '%.%' >> ORDER B

Re: Commitfest manager November 2023

2023-11-01 Thread Michael Paquier
On Wed, Nov 01, 2023 at 01:33:26PM +0700, John Naylor wrote: > I didn't see any recent mentions in the archives, so I'll volunteer to > be CF manager for 2023-11. Thanks, John! -- Michael signature.asc Description: PGP signature

Re: 003_check_guc.pl crashes if some extensions were loaded.

2023-11-01 Thread Michael Paquier
On Thu, Nov 02, 2023 at 12:28:05AM +0300, Anton A. Melnikov wrote: > Found that src/test/modules/test_misc/t/003_check_guc.pl will crash if an > extension > that adds own GUCs was loaded into memory. > So it is now impossible to run a check-world with loaded extension libraries. Right. That's an

Re: Guiding principle for dropping LLVM versions?

2023-11-01 Thread Thomas Munro
So it sounds like we're in agreement that it is time to require LLVM 10+ in master. Could the owners (CC'd) of the following animals please turn off --with-llvm on master (and future 17+ branches), or consider upgrading to a modern OS release? Otherwise they'll turn red. animal|ar

Re: GUC names in messages

2023-11-01 Thread Peter Smith
On Thu, Nov 2, 2023 at 1:25 AM Tom Lane wrote: > > Daniel Gustafsson writes: > > On 1 Nov 2023, at 10:22, Peter Smith wrote: > >> One idea to achieve consistency might be to always substitute GUC > >> names using a macro. > >> > >> #define GUC_NAME(s) ("\"" s "\"") > >> > >> ereport(ERROR, (errc

003_check_guc.pl crashes if some extensions were loaded.

2023-11-01 Thread Anton A. Melnikov
Hello! Found that src/test/modules/test_misc/t/003_check_guc.pl will crash if an extension that adds own GUCs was loaded into memory. So it is now impossible to run a check-world with loaded extension libraries. Reproduction: cd src/test/modules/test_misc export EXTRA_INSTALL="contrib/pg_stat_s

Re: Atomic ops for unlogged LSN

2023-11-01 Thread John Morris
Here is what I meant to do earlier. As it turns out, this patch has not been merged yet. This is a rebased version . Even though I labelled it “v3”, there should be no changes from “v2”. atomicLSN-v3-Use-atomic-ops-for-unloggedLSNs.patch Description: atomicLSN-v3-Use-atomic-ops-for-unloggedLSN

Re: generate syscache info automatically

2023-11-01 Thread Peter Eisentraut
Here is a rebased patch set, along with a summary of the questions I have about these patches: v4-0001-Generate-syscache-info-from-catalog-files.patch What's a good syntax to declare a syscache? Currently, I have, for example -DECLARE_UNIQUE_INDEX_PKEY(pg_type_oid_index, 2703, TypeOidIndexId

Re: GUC names in messages

2023-11-01 Thread Laurenz Albe
On Wed, 2023-11-01 at 16:12 -0400, Peter Eisentraut wrote: > On 01.11.23 10:25, Tom Lane wrote: > > And there's never been any > > real clarity about whether to quote GUC names, though certainly we're > > more likely to quote anything injected with %s. So that's why we have > > a mishmash right no

Re: Remove distprep

2023-11-01 Thread Peter Eisentraut
On 09.10.23 17:14, Andres Freund wrote: It kinda works, but I'm not sure how well. Because the aliasing happens in Makefile.global, we won't know about the "original" maintainer-clean target once recursing into a subdir. That's perhaps OK, because extensions likely won't utilize subdirectories?

Re: GUC names in messages

2023-11-01 Thread Peter Eisentraut
On 01.11.23 10:25, Tom Lane wrote: And there's never been any real clarity about whether to quote GUC names, though certainly we're more likely to quote anything injected with %s. So that's why we have a mishmash right now. I'm leaning toward not quoting GUC names. The quoting is needed in p

Re: Not deleted mentions of the cleared path

2023-11-01 Thread a.rybakina
Hi! Thank you for the interest to this issue. On 31.10.2023 06:25, Richard Guo wrote: On Mon, Oct 30, 2023 at 7:31 PM Alena Rybakina wrote: I have already written about the problem of InvalidPath [0] appearing. I investigated this and found an error in the add_path()

Re: Statistics Import and Export

2023-11-01 Thread Tomas Vondra
On 10/31/23 08:25, Corey Huinker wrote: > > Attached is v2 of this patch. > > New features: > * imports index statistics. This is not strictly accurate: it > re-computes index statistics the same as ANALYZE does, which is to > say it derives those stats entirely from table column stats, which >

Re: pg_upgrade and logical replication

2023-11-01 Thread vignesh C
On Fri, 27 Oct 2023 at 17:05, Amit Kapila wrote: > > On Fri, Oct 27, 2023 at 12:09 PM vignesh C wrote: > > > > Apart from this I'm still checking that the old cluster's subscription > > relations states are READY state still, but there is a possibility > > that SYNCDONE or FINISHEDCOPY could work

Re: Confused about stream replication protocol documentation

2023-11-01 Thread Bruce Momjian
Patch applied to master, thanks. --- On Thu, Dec 24, 2020 at 02:28:53AM +, Li Japin wrote: > > On Dec 23, 2020, at 8:11 PM, Fujii Masao > wrote: > > > On 2020/12/23 11:08, Li Japin wrote: > >

Re: MERGE ... RETURNING

2023-11-01 Thread Jeff Davis
On Wed, 2023-11-01 at 10:12 +, Dean Rasheed wrote: > Something I'm wondering about is to what extent this discussion is > driven by concerns about aspects of the implementation (specifically, > references to function OIDs in code), versus a desire for a different > user-visible syntax. To a lar

Re: MERGE ... RETURNING

2023-11-01 Thread Merlin Moncure
On Wed, Nov 1, 2023 at 5:12 AM Dean Rasheed wrote: > On Tue, 31 Oct 2023 at 23:19, Vik Fearing wrote: > > > > On 10/31/23 19:28, Jeff Davis wrote: > > > > > Assuming we have one RETURNING clause at the end, then it creates the > > > problem of how to communicate which WHEN clause a tuple came fr

max_standby_streaming_delay setting not cancelling query on replica

2023-11-01 Thread Ben Snaidero
Hi, We are running a postgres streaming replica with max_standby_streaming_delay set to 900 seconds (15min). We encountered an issue in our environment where we had a long running query that was running against the replica for just over 4 hours causing 4 hours of replication lag. Looking at pg_s

Re: "box" type description

2023-11-01 Thread Bruce Momjian
On Wed, Mar 31, 2021 at 01:43:47PM +0200, Christoph Berg wrote: > Re: Kyotaro Horiguchi > > Returing to the description of pg_types, it should be changed like > > this following the discussion here. > > > > - pg_catalog | box | geometric box '(lower left,upper right)' > > + pg_catalog | box | ge

Re: Don't pass NULL pointer to strcmp().

2023-11-01 Thread Tom Lane
Xing Guo writes: > Thanks for your comments. I have updated the patch accordingly. I'm leery of accepting this patch, as I see no reason that we should consider it valid for an extension to have a string GUC with a boot_val of NULL. I realize that we have a few core GUCs that are like that, but

Re: Commitfest manager November 2023

2023-11-01 Thread shihao zhong
On Wed, Nov 1, 2023 at 7:59 AM Aleksander Alekseev wrote: > Hi, > > > I didn't see any recent mentions in the archives, so I'll volunteer to > > be CF manager for 2023-11. > > I would love to help with that if you need. > > -- > Thanks, > Shihao

Re: Tab completion regression test failed on illumos

2023-11-01 Thread Tom Lane
Japin Li writes: > I try to run regression test on illumos, the 010_tab_completion will > failed because of timeout. Why are you getting this? > Begin standard error > psql::6: WARNING: wal_level is insufficient to publish logical > changes > HINT: Set wal_level to "logical"

Re: GUC names in messages

2023-11-01 Thread Tom Lane
Daniel Gustafsson writes: > On 1 Nov 2023, at 10:22, Peter Smith wrote: >> One idea to achieve consistency might be to always substitute GUC >> names using a macro. >> >> #define GUC_NAME(s) ("\"" s "\"") >> >> ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), >> errmsg("%s must be at l

Re: speed up a logical replica setup

2023-11-01 Thread Euler Taveira
On Tue, Oct 31, 2023, at 11:46 PM, shihao zhong wrote: > I think this is duplicate with https://commitfest.postgresql.org/45/4637/ > > The new status of this patch is: Waiting on Author > I withdrew the other entry. -- Euler Taveira EDB https://www.enterprisedb.com/

Re: speed up a logical replica setup

2023-11-01 Thread Ashutosh Bapat
On Thu, Oct 26, 2023 at 5:17 PM Ashutosh Bapat wrote: > > On Mon, Oct 23, 2023 at 9:34 AM Euler Taveira wrote: > > > > > It is still a WIP but I would like to share it and get some feedback. > > > > > > I have started reviewing the patch. I have just read through all the > code. It's well documen

Re: Don't pass NULL pointer to strcmp().

2023-11-01 Thread Xing Guo
Hi Aleksander and Junwang, Thanks for your comments. I have updated the patch accordingly. Best Regards, Xing On Wed, Nov 1, 2023 at 7:44 PM Aleksander Alekseev wrote: > Hi, > > > > I found that there's a nullable pointer being passed to strcmp() and > > > can make the server crash. It

Re: trying again to get incremental backup

2023-11-01 Thread Jakub Wartak
On Mon, Oct 30, 2023 at 6:46 PM Robert Haas wrote: > > On Thu, Sep 28, 2023 at 6:22 AM Jakub Wartak > wrote: > > If that is still an area open for discussion: wouldn't it be better to > > just specify LSN as it would allow resyncing standby across major lag > > where the WAL to replay would be en

Re: Question about non-blocking mode in libpq

2023-11-01 Thread Bruce Momjian
On Tue, Oct 31, 2023 at 10:16:07PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Tue, Oct 31, 2023 at 09:11:06PM -0400, Tom Lane wrote: > >> What I'm objecting to is removal of the bit about "if they need to be > >> called again". That provides a hint that retry is the appropriate > >> re

Re: Tab completion regression test failed on illumos

2023-11-01 Thread Aleksander Alekseev
Hi, > I try to run regression test on illumos, the 010_tab_completion will > failed because of timeout. > > Here is my build commands and logs: > > [...] > > Any suggestions? Thanks in advance! It's hard to say what went wrong with this output due to lack of backtrace. I would suggest adding deb

Re: btree: implement dynamic prefix truncation (was: Improving btree performance through specializing by key shape, take 2)

2023-11-01 Thread Pavel Stehule
st 1. 11. 2023 v 11:32 odesílatel Matthias van de Meent < boekewurm+postg...@gmail.com> napsal: > On Wed, 1 Nov 2023 at 07:47, Pavel Stehule > wrote: > > > > Hi > > > > út 31. 10. 2023 v 22:12 odesílatel Matthias van de Meent < > boekewurm+postg...@gmail.com> napsal: > >> This patch was originall

Re: remaining sql/json patches

2023-11-01 Thread Nikita Malakhov
Hi! According to the discussion above, I've added the 'proerrsafe' attribute to the PG_PROC relation. The same was done some time ago by Nikita Glukhov but this part was reverted. This is a WIP patch, I am new to this part of Postgres, so please correct me if I'm going the wrong way. -- Nikita Ma

Re: Commitfest manager November 2023

2023-11-01 Thread Aleksander Alekseev
Hi, > I didn't see any recent mentions in the archives, so I'll volunteer to > be CF manager for 2023-11. Many thanks for volunteering! If you need any help please let me know. -- Best regards, Aleksander Alekseev

Re: Don't pass NULL pointer to strcmp().

2023-11-01 Thread Aleksander Alekseev
Hi, > > I found that there's a nullable pointer being passed to strcmp() and > > can make the server crash. It can be reproduced on the latest master > > branch by crafting an extension[1]. Patch for fixing it is attatched. > > > > [1] https://github.com/higuoxing/guc_crash/tree/pg Thanks for rep

Re: MERGE ... RETURNING

2023-11-01 Thread Vik Fearing
On 11/1/23 11:12, Dean Rasheed wrote: On Tue, 31 Oct 2023 at 23:19, Vik Fearing wrote: On 10/31/23 19:28, Jeff Davis wrote: Assuming we have one RETURNING clause at the end, then it creates the problem of how to communicate which WHEN clause a tuple came from, whether it's the old or the new

Re: pg_resetwal tests, logging, and docs update

2023-11-01 Thread Aleksander Alekseev
Hi, > Hmm. I think maybe we should fix the behavior of > GetDataDirectoryCreatePerm() to be more consistent between Windows and > non-Windows. This is usually the first function a program uses on the > proposed data directory, so it's also responsible for reporting if the > data directory does n

Re: btree: implement dynamic prefix truncation (was: Improving btree performance through specializing by key shape, take 2)

2023-11-01 Thread Matthias van de Meent
On Wed, 1 Nov 2023 at 07:47, Pavel Stehule wrote: > > Hi > > út 31. 10. 2023 v 22:12 odesílatel Matthias van de Meent > napsal: >> This patch was originally suggested at [0], but it was mentioned that >> they could be pulled out into it's own thread. Earlier, the >> performance gains were not cl

Re: Don't pass NULL pointer to strcmp().

2023-11-01 Thread Junwang Zhao
On Wed, Nov 1, 2023 at 5:25 PM Xing Guo wrote: > > Hi hackers, > > I found that there's a nullable pointer being passed to strcmp() and > can make the server crash. It can be reproduced on the latest master > branch by crafting an extension[1]. Patch for fixing it is attatched. > > [1] https://git

Re: More new SQL/JSON item methods

2023-11-01 Thread Andrew Dunstan
On 2023-11-01 We 03:00, Jeevan Chalke wrote: Hello, On Tue, Oct 24, 2023 at 6:41 PM Andrew Dunstan wrote: On 2023-10-19 Th 02:06, Jeevan Chalke wrote: Thanks, Peter for the comments. On Fri, Oct 6, 2023 at 5:13 PM Peter Eisentraut wrote: On 29.08.23 09:05, Jeeva

Re: MERGE ... RETURNING

2023-11-01 Thread Dean Rasheed
On Tue, 31 Oct 2023 at 23:19, Vik Fearing wrote: > > On 10/31/23 19:28, Jeff Davis wrote: > > > Assuming we have one RETURNING clause at the end, then it creates the > > problem of how to communicate which WHEN clause a tuple came from, > > whether it's the old or the new version, and/or which act

Re: "38.10.10. Shared Memory and LWLocks" may require a clarification

2023-11-01 Thread Aleksander Alekseev
> The result has been applied as fe705ef6fc1d. Many thanks! -- Best regards, Aleksander Alekseev

Re: GUC names in messages

2023-11-01 Thread Daniel Gustafsson
> On 1 Nov 2023, at 10:22, Peter Smith wrote: > > On Wed, Nov 1, 2023 at 8:02 PM Peter Smith wrote: > ... >> >> I had intended to make a patch to address the inconsistency, but >> couldn't decide which of those styles was the preferred one. >> >> Then I worried this could be the tip of the ice

Don't pass NULL pointer to strcmp().

2023-11-01 Thread Xing Guo
Hi hackers, I found that there's a nullable pointer being passed to strcmp() and can make the server crash. It can be reproduced on the latest master branch by crafting an extension[1]. Patch for fixing it is attatched. [1] https://github.com/higuoxing/guc_crash/tree/pg -- Best Regards, Xing Fr

Re: GUC names in messages

2023-11-01 Thread Daniel Gustafsson
> On 1 Nov 2023, at 10:02, Peter Smith wrote: > GUC_check_errdetail("effective_io_concurrency must be set to 0 on > platforms that lack posix_fadvise()."); > src/backend/commands/variable.c: > GUC_check_errdetail("maintenance_io_concurrency must be set to 0 on > platforms that lack posix_fadvise(

Re: GUC names in messages

2023-11-01 Thread Peter Smith
On Wed, Nov 1, 2023 at 8:02 PM Peter Smith wrote: ... > > I had intended to make a patch to address the inconsistency, but > couldn't decide which of those styles was the preferred one. > > Then I worried this could be the tip of the iceberg -- GUC names occur > in many other error messages where

GUC names in messages

2023-11-01 Thread Peter Smith
Hi hackers, While reviewing another patch I noticed how the GUCs are inconsistently named within the GUC_check_errdetail messages: == below, the GUC name is embedded but not quoted: src/backend/access/transam/xlogprefetcher.c: GUC_check_errdetail("recovery_prefetch is not supported on platf

Re: Wrong function name in pgstatfuncs.c

2023-11-01 Thread Daniel Gustafsson
> On 1 Nov 2023, at 09:23, Kyotaro Horiguchi wrote: > > Since pgstatfuncs.c was refactored, the comments for synthesized > function names are significant to find the function body. > > I happened to find a misspelling among the function name > comments. "pg_stat_get_mods_since_analyze" should be

Wrong function name in pgstatfuncs.c

2023-11-01 Thread Kyotaro Horiguchi
Since pgstatfuncs.c was refactored, the comments for synthesized function names are significant to find the function body. I happened to find a misspelling among the function name comments. "pg_stat_get_mods_since_analyze" should be "pg_stat_get_mod_since_analyze". Upon checking the file using a

Re: Is this a problem in GenericXLogFinish()?

2023-11-01 Thread Michael Paquier
On Mon, Oct 30, 2023 at 03:54:39PM +0530, Amit Kapila wrote: > On Sat, Oct 28, 2023 at 4:30 PM Michael Paquier wrote: >> On Sat, Oct 28, 2023 at 03:45:13PM +0530, Amit Kapila wrote: >> > Yes, we need it to exclude any concurrent in-progress scans that could >> > return incorrect tuples during buck

Tab completion regression test failed on illumos

2023-11-01 Thread Japin Li
Hi hackers, I try to run regression test on illumos, the 010_tab_completion will failed because of timeout. Here is my build commands and logs: $ ../configure --enable-cassert --enable-debug --enable-nls --with-perl \ --with-python --with-tcl --with-openssl --with-libxml --with-libxs

Re: A recent message added to pg_upgade

2023-11-01 Thread Peter Smith
Hi, here are some minor review comments for the v3 patch. == src/backend/access/transam/xlog.c 1. check_max_slot_wal_keep_size +/* + * GUC check_hook for max_slot_wal_keep_size + * + * If WALs required by logical replication slots are removed, the slots are + * unusable. While pg_upgrade se

Re: More new SQL/JSON item methods

2023-11-01 Thread Jeevan Chalke
Hello, On Tue, Oct 24, 2023 at 6:41 PM Andrew Dunstan wrote: > > On 2023-10-19 Th 02:06, Jeevan Chalke wrote: > > Thanks, Peter for the comments. > > On Fri, Oct 6, 2023 at 5:13 PM Peter Eisentraut > wrote: > >> On 29.08.23 09:05, Jeevan Chalke wrote: >> > v1-0001-Implement-jsonpath-.bigint-.in