Re: Query Jumbling for CALL and SET utility statements

2022-10-05 Thread Michael Paquier
On Mon, Sep 19, 2022 at 08:29:22AM +0200, Drouvot, Bertrand wrote: > Please find attached v6 taking care of the remarks mentioned above. > +case T_VariableSetStmt: > +{ > +VariableSetStmt *stmt = (VariableSetStmt *) node; > + > +/* stmt->name is N

Re: Add last failed connection error message to pg_stat_wal_receiver

2022-10-05 Thread Bharath Rupireddy
On Thu, Aug 18, 2022 at 9:01 AM Michael Paquier wrote: > > PANIC is not something you'd care about as the system would go down as > and shared memory would be reset (right?) even if restart_on_crash is > enabled. Perhaps it would help here to use something like a macro to > catch and save the err

Re: document the need to analyze partitioned tables

2022-10-05 Thread Andrey Lepikhov
On 10/5/22 13:37, Laurenz Albe wrote: On Mon, 2022-03-28 at 15:05 +0200, Tomas Vondra wrote: I've pushed the last version, and backpatched it to 10 (not sure I'd call it a bugfix, but I certainly agree with Justin it's worth mentioning in the docs, even on older branches). I'd like to suggest

Re: pg_statsinfo - PG15 support?

2022-10-05 Thread Kyotaro Horiguchi
At Thu, 6 Oct 2022 09:34:02 +1100, Greg Nancarrow wrote in > To the developer(s) who work(s) on pg_statsinfo, are there plans to > support PG15 and when might pg_statsinfo v15 source be released? > I can see that for v14 of pg_statsinfo there is an incompatibility > with the PG15 autovacuum log

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-10-05 Thread Kyotaro Horiguchi
At Thu, 6 Oct 2022 13:44:43 +0900, Michael Paquier wrote in > On Wed, Oct 05, 2022 at 11:24:57PM -0400, Jonathan S. Katz wrote: > > On 10/5/22 8:44 PM, Andres Freund wrote: > >> I have two ideas how to fix it. As a design constraint, I'd be interested > >> in > >> the RMTs opinion on the follow

Re: Issue with pg_stat_subscription_stats

2022-10-05 Thread Michael Paquier
On Tue, Jul 12, 2022 at 09:31:16AM +0530, Amit Kapila wrote: > I am not against backpatching this but OTOH it doesn't appear critical > enough to block one's work, so not backpatching should be fine. We are just talking about the reset timestamp not being set at when the object is created, right?

Re: Reducing the chunk header sizes on all memory context types

2022-10-05 Thread David Rowley
On Wed, 5 Oct 2022 at 04:55, Tom Lane wrote: > After studying the existing usages of MemoryContextContains, I think > there is a better answer, which is to just nuke them. I was under the impression you wanted to keep that function around in cassert builds for some of the guc.c changes you were m

Re: installcheck-world concurrency issues

2022-10-05 Thread Michael Paquier
On Tue, Oct 04, 2022 at 11:35:53AM -0700, Andres Freund wrote: > On 2022-10-04 17:05:40 +0900, Michael Paquier wrote: >> I am still studying a lot of this area, but it seems like all the >> spots requiring a custom configuration (aka NO_INSTALLCHECK) are >> covered. --setup running is working here

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-10-05 Thread Michael Paquier
On Wed, Oct 05, 2022 at 11:24:57PM -0400, Jonathan S. Katz wrote: > On 10/5/22 8:44 PM, Andres Freund wrote: >> I have two ideas how to fix it. As a design constraint, I'd be interested in >> the RMTs opinion on the following: >> Is a cleaner fix that changes the stats format (i.e. existing stats w

Re: shadow variables - pg15 edition

2022-10-05 Thread David Rowley
On Thu, 6 Oct 2022 at 13:39, Andres Freund wrote: > I attached a patch to add -Wshadow=compatible-local to our set of warnings. Thanks for writing that and for looking at the patch. FWIW, I'm +1 for having this part of our default compilation flags. I don't want to have to revisit this on a yea

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-10-05 Thread Jonathan S. Katz
On 10/5/22 8:44 PM, Andres Freund wrote: Hi, On 2022-10-05 13:00:53 -0400, Jonathan S. Katz wrote: On 9/27/22 1:52 AM, Kyotaro Horiguchi wrote: Thanks! At Mon, 26 Sep 2022 19:53:02 -0700, Andres Freund wrote in I wonder if the correct fix here wouldn't be to move the slotname out of PgStat_

[PATCH v1] [meson] fix some typo to make it more readable

2022-10-05 Thread Junwang Zhao
Hi Andres, Seems there are some typo in file src/backend/meson.build comment, pls have a look. -- Regards Junwang Zhao 0001-meson-fix-some-typo-to-make-it-more-readable.patch Description: Binary data

RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2022-10-05 Thread kuroda.hay...@fujitsu.com
Dear Önder, Thank you for updating the patch! At first I replied to your comments. > My thinking on those functions is that they should probably stay > in src/backend/replication/logical/relation.c. My main motivation is that > those functions are so much tailored to the purposes of this file tha

Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf

2022-10-05 Thread Michael Paquier
On Wed, Oct 05, 2022 at 03:32:20PM +0200, Drouvot, Bertrand wrote: > On 10/5/22 9:24 AM, Michael Paquier wrote: >> - test_role() -> test_conn() to be able to pass down a database name. >> - reset_pg_hba() to control the host, db and user parts. The host >> part does not really apply after moving t

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-10-05 Thread Andres Freund
Hi, On 2022-10-05 13:00:53 -0400, Jonathan S. Katz wrote: > On 9/27/22 1:52 AM, Kyotaro Horiguchi wrote: > > Thanks! > > > > At Mon, 26 Sep 2022 19:53:02 -0700, Andres Freund > > wrote in > > > I wonder if the correct fix here wouldn't be to move the slotname out of > > > PgStat_StatReplSlotEnt

Re: shadow variables - pg15 edition

2022-10-05 Thread Andres Freund
Hi, On 2022-10-06 13:00:41 +1300, David Rowley wrote: > Here's a patch which (I think) fixes the ones I missed. Yep, does the trick for me. I attached a patch to add -Wshadow=compatible-local to our set of warnings. > diff --git a/contrib/hstore/hstore.h b/contrib/hstore/hstore.h > index 4713e

Re: Add meson.build to version_stamp.pl

2022-10-05 Thread Michael Paquier
On Wed, Oct 05, 2022 at 11:20:50AM -0700, Andres Freund wrote: > On 2022-10-05 11:36:36 +0100, Dagfinn Ilmari Mannsåker wrote: >> sed_file("meson.build", >> qq{-e "/^project(/,/^)/ s/ version: '[0-9a-z.]*',/ version: >> '$fullversion',/"} >> ); > > Yea, that looks nicer. Oh. That's nice..

Re: shadow variables - pg15 edition

2022-10-05 Thread David Rowley
On Thu, 6 Oct 2022 at 11:50, David Rowley wrote: > > On Thu, 6 Oct 2022 at 10:40, Andres Freund wrote: > > Your commit message said the last shadowed variable. But building with > > -Wshadow=compatible-local triggers a bunch of warnings for me (see trimmed > > at > > the end). Looks like it "on

Re: Move backup-related code to xlogbackup.c/.h

2022-10-05 Thread Andres Freund
Hi, On 2022-10-05 15:22:01 +0530, Bharath Rupireddy wrote: > +extern void WALInsertLockAcquire(void); > +extern void WALInsertLockAcquireExclusive(void); > +extern void WALInsertLockRelease(void); > +extern void WALInsertLockUpdateInsertingAt(XLogRecPtr insertingAt); > > Note that I had moved all

Re: Move backup-related code to xlogbackup.c/.h

2022-10-05 Thread Nathan Bossart
On Wed, Oct 05, 2022 at 03:22:01PM +0530, Bharath Rupireddy wrote: >> On Tue, Oct 04, 2022 at 03:54:20PM -0700, Nathan Bossart wrote: >> > I would suggest moving this to a separate prerequisite patch that can be >> > reviewed independently from the patches that simply move code to a >> > different

Re: shadow variables - pg15 edition

2022-10-05 Thread David Rowley
On Thu, 6 Oct 2022 at 10:40, Andres Freund wrote: > Your commit message said the last shadowed variable. But building with > -Wshadow=compatible-local triggers a bunch of warnings for me (see trimmed at > the end). Looks like it "only" fixed it for src/, without optional > dependencies like gssap

Re: shadow variables - pg15 edition

2022-10-05 Thread David Rowley
On Thu, 6 Oct 2022 at 02:34, Alvaro Herrera wrote: > A simpler idea might be to just remove the inner declaration, and have > that block set the outer var. There's no damage, since the block is > going to end and not access the previous value anymore. > > diff --git a/src/bin/pgbench/pgbench.c b/

pg_statsinfo - PG15 support?

2022-10-05 Thread Greg Nancarrow
Hi, To the developer(s) who work(s) on pg_statsinfo, are there plans to support PG15 and when might pg_statsinfo v15 source be released? I can see that for v14 of pg_statsinfo there is an incompatibility with the PG15 autovacuum log (i.e. in PG15 some existing autovacuum log fields have been remov

Re: [PATCH] Expand character set for ltree labels

2022-10-05 Thread Garen Torikian
After digging into it, you are completely correct. I had to do a bit more reading to understand the relationships between UTF-8 and wchar, but ultimately the existing locale support works for my use case. Therefore I have updated the patch with three much smaller changes: * Support for `-` in add

Re: shadow variables - pg15 edition

2022-10-05 Thread Andres Freund
Hi, On 2022-10-06 10:21:41 +1300, David Rowley wrote: > Also pushed. (Thanks for saving me on that one.) Your commit message said the last shadowed variable. But building with -Wshadow=compatible-local triggers a bunch of warnings for me (see trimmed at the end). Looks like it "only" fixed it f

Re: future of serial and identity columns

2022-10-05 Thread Bruce Momjian
On Tue, Oct 4, 2022 at 09:41:19AM +0200, Peter Eisentraut wrote: > In PostgreSQL 10, we added identity columns, as an alternative to serial > columns (since 6.something). They mostly work the same. Identity columns > are SQL-conforming, have some more features (e.g., overriding clause), and > ar

Re: shadow variables - pg15 edition

2022-10-05 Thread David Rowley
On Thu, 6 Oct 2022 at 03:19, Tom Lane wrote: > > David Rowley writes: > > I've attached a draft patch for a method I was considering to fix the > > warnings we're getting from the nested PG_TRY() statement in > > utility.c. > > +1 Pushed. > > The only warning remaining after applying the attach

Re: meson PGXS compatibility

2022-10-05 Thread Andres Freund
Hi, On 2022-10-05 16:58:46 -0400, Tom Lane wrote: > Andres Freund writes: > > My understanding, from that commit message, was that the issue originates in > > apple's ranlib setting the timestamp to its components but only queries / > > sets > > it using second granularity. I verified that apple

Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication

2022-10-05 Thread Bruce Momjian
On Sat, Oct 1, 2022 at 06:59:26AM +0530, Bharath Rupireddy wrote: > > I have always felt this has to be done at the server level, meaning when > > a synchronous_standby_names replica is not responding after a certain > > timeout, the administrator must be notified by calling a shell command > > de

Re: meson PGXS compatibility

2022-10-05 Thread Tom Lane
Andres Freund writes: > My understanding, from that commit message, was that the issue originates in > apple's ranlib setting the timestamp to its components but only queries / sets > it using second granularity. I verified that apple's ranlib and ar these days > just set the current time, at a hi

Re: meson PGXS compatibility

2022-10-05 Thread Andres Freund
Hi, On 2022-10-05 16:20:22 -0400, Tom Lane wrote: > Andres Freund writes: > > On macOS we ran ranlib after installing a static library. This was added a > > long time ago, in 58ad65ec2def. I cannot reproduce an issue in more recent > > macOS versions. > > I agree that shouldn't be necessar

Re: meson: Add support for building with precompiled headers

2022-10-05 Thread Andres Freund
Hi, On 2022-10-05 16:21:55 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-10-05 16:09:14 -0400, Tom Lane wrote: > >> Color me confused, but how does it work to #define that from the command > >> line if it can't be overridden from within the program? > > > If specified on the command

Re: meson: Add support for building with precompiled headers

2022-10-05 Thread Tom Lane
Andres Freund writes: > On 2022-10-05 16:09:14 -0400, Tom Lane wrote: >> Color me confused, but how does it work to #define that from the command >> line if it can't be overridden from within the program? > If specified on the commandline it's also used when generating the precompiled > header -

Re: meson PGXS compatibility

2022-10-05 Thread Tom Lane
Andres Freund writes: > On macOS we ran ranlib after installing a static library. This was added a > long time ago, in 58ad65ec2def. I cannot reproduce an issue in more recent > macOS versions. I agree that shouldn't be necessary anymore (and if it is, we'll find out soon enough). > I'm

Re: meson: Add support for building with precompiled headers

2022-10-05 Thread Andres Freund
Hi, On 2022-10-05 16:09:14 -0400, Tom Lane wrote: > Andres Freund writes: > > When using precompiled headers we cannot override macros in system headers > > from within .c files, as headers are already processed before the #define in > > the C file is reached. > > > A few files #define FD_SETSIZ

Re: meson: Add support for building with precompiled headers

2022-10-05 Thread Tom Lane
Andres Freund writes: > When using precompiled headers we cannot override macros in system headers > from within .c files, as headers are already processed before the #define in > the C file is reached. > A few files #define FD_SETSIZE 1024 on windows, as the default is only 64. I > am hesitant t

meson PGXS compatibility

2022-10-05 Thread Andres Freund
Hi, As the meson support stands right now, one cannot easily build an extension against a postgres built with meson. As discussed at the 2022 unconference [1], one way to make that easier for extensions is for meson to generate a complete enough Makefile.global for pgxs.mk to work. This is a seri

Re: [PATCH] Expand character set for ltree labels

2022-10-05 Thread Tom Lane
Garen Torikian writes: >> Perhaps the docs are a bit unclear about that, but it's not >> restricted to ASCII alphanumerics. AFAICS the code will accept >> whatever iswalpha() and iswdigit() will accept in the database's >> default locale. > Sorry but I don't think that is correct. Here is the si

ts_locale.c: why no t_isalnum() test?

2022-10-05 Thread Tom Lane
I happened to wonder why various places are testing things like #define ISWORDCHR(c)(t_isalpha(c) || t_isdigit(c)) rather than using an isalnum-equivalent test. The direct answer is that ts_locale.c/.h provides no such test function, which apparently is because there's not a lot of potential

Re: [PATCH] Expand character set for ltree labels

2022-10-05 Thread Garen Torikian
Hi Tom, > Perhaps the docs are a bit unclear about that, but it's not > restricted to ASCII alphanumerics. AFAICS the code will accept > whatever iswalpha() and iswdigit() will accept in the database's > default locale. Sorry but I don't think that is correct. Here is the single definition check

meson: Add support for building with precompiled headers

2022-10-05 Thread Andres Freund
Hi, This is a patch split off from the initial meson thread [1] as it's functionally largely independent (as suggested in [2]). Using precompiled headers substantially speeds up building for windows, due to the vast amount of headers included via windows.h. A cross build from linux targetting min

Re: Startup process on a hot standby crashes with an error "invalid memory alloc request size 1073741824" while replaying "Standby/LOCK" records

2022-10-05 Thread Nathan Bossart
On Wed, Oct 05, 2022 at 11:30:22AM -0400, Tom Lane wrote: > One other point to discuss: should we consider back-patching? I've > got mixed feelings about that myself. I don't think that cases where > this helps significantly are at all mainstream, so I'm kind of leaning > to "patch HEAD only". +

Re: [PATCH] Expand character set for ltree labels

2022-10-05 Thread Tom Lane
Garen Torikian writes: > I am submitting a patch to expand the label requirements for ltree. > The current format is restricted to alphanumeric characters, plus _. > Unfortunately, for non-English labels, this set is insufficient. Hm? Perhaps the docs are a bit unclear about that, but it's not

Re: archive modules

2022-10-05 Thread Nathan Bossart
On Wed, Oct 05, 2022 at 07:55:58PM +0200, Peter Eisentraut wrote: > Leaving archive_command empty is an intentional configuration choice. > > What we are talking about here is, arguably, a misconfiguration, so it > should result in an error. Okay. What do you think about something like the attac

Re: Add meson.build to version_stamp.pl

2022-10-05 Thread Andres Freund
Hi, On 2022-10-05 11:36:36 +0100, Dagfinn Ilmari Mannsåker wrote: > Peter Eisentraut writes: > > > Thinking ahead a bit, we need to add meson.build to version_stamp.pl. Good idea. I was wondering for a moment whether we should put the version into some file instead, and reference that from mes

Re: Suppressing useless wakeups in walreceiver

2022-10-05 Thread Nathan Bossart
Thanks for taking a look. On Wed, Oct 05, 2022 at 09:57:00AM +0200, Alvaro Herrera wrote: > On 2022-Oct-04, Nathan Bossart wrote: >> * The creation of the struct for non-shared WAL receiver state is moved to >> a prerequisite 0001 patch. This should help ease review of 0002 a bit. > > I think th

Re: Move backup-related code to xlogbackup.c/.h

2022-10-05 Thread Alvaro Herrera
On 2022-Oct-05, Michael Paquier wrote: > And FWIW, the SQL interfaces for pg_backup_start() and > pg_backup_stop() could stay in xlogfuncs.c. This has the advantage to > centralize in the same file all the SQL-function-specific checks. As I recall, that has the disadvantage that the API exposure

Re: archive modules

2022-10-05 Thread Peter Eisentraut
On 23.09.22 18:14, Nathan Bossart wrote: On Fri, Sep 23, 2022 at 05:58:42AM -0400, Peter Eisentraut wrote: On 15.09.22 00:27, Nathan Bossart wrote: Both archive_command and archive_library are PGC_SIGHUP, so IIUC that wouldn't be sufficient. I attached a quick sketch that seems to provide the

Re: installcheck-world concurrency issues

2022-10-05 Thread Andres Freund
Hi, On 2022-10-05 08:16:37 +0200, Peter Eisentraut wrote: > On 04.10.22 01:41, Andres Freund wrote: > > BTW, shouldn't src/test/modules/unsafe_tests use the PG_TEST_EXTRA mechanism > > somehow? Seems not great to run it as part of installcheck-world, if we > > don't > > want to run it as part of

Re: [RFC] building postgres with meson - v13

2022-10-05 Thread Andres Freund
Hi, On 2022-10-05 10:16:06 +0200, Peter Eisentraut wrote: > On 04.10.22 05:25, Andres Freund wrote: > > I've attached a revised version of the xml-tools dependency wrapper (0001): > > Cleanups, minor error handling improvements, and bit of comment polishing. > > I'd > > welcome review. But as it

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-10-05 Thread Jonathan S. Katz
On 9/27/22 1:52 AM, Kyotaro Horiguchi wrote: Thanks! At Mon, 26 Sep 2022 19:53:02 -0700, Andres Freund wrote in I wonder if the correct fix here wouldn't be to move the slotname out of PgStat_StatReplSlotEntry? Ugh. Right. I thought its outer struct as purely the part for the common header.

Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition)

2022-10-05 Thread Alvaro Herrera
Backpatching this to 12 shows yet another problem -- the topmost relation acquires additional FK constraints, not yet sure why. I think we must have fixed something in 13 that wasn't backpatched, but I can't remember what it is and whether it was intentionally not backpatched. Looking ... -- Ál

Re: Startup process on a hot standby crashes with an error "invalid memory alloc request size 1073741824" while replaying "Standby/LOCK" records

2022-10-05 Thread Tom Lane
Kyotaro Horiguchi writes: > At Tue, 4 Oct 2022 17:15:31 -0700, Nathan Bossart > wrote in >> On Tue, Oct 04, 2022 at 07:53:11PM -0400, Tom Lane wrote: >>> After further thought, maybe it'd be better to do it as attached, >>> with one long-lived hash table for all the locks. > First one is strai

RE: Data is copied twice when specifying both child and parent table in publication

2022-10-05 Thread osumi.takami...@fujitsu.com
On Wednesday, September 28, 2022 5:36 PM Wang, Wei/王 威 wrote: > Also rebased the patch because the change in the HEAD (20b6847). > > Attach the new patches. Hi, thank you for the updated patches! Here are my minor review comments for HEAD v12. (1) typo & suggestion to reword one comment +

Re: shadow variables - pg15 edition

2022-10-05 Thread Tom Lane
David Rowley writes: > I've attached a draft patch for a method I was considering to fix the > warnings we're getting from the nested PG_TRY() statement in > utility.c. +1 > The only warning remaining after applying the attached is the "now" > warning in pgbench.c:7509. I'd considered changing

Re: [POC] Allow flattening of subquery with a link to upper query

2022-10-05 Thread Zhihong Yu
On Wed, Oct 5, 2022 at 4:38 AM Andrey Lepikhov wrote: > On 5/10/2022 02:45, Zhihong Yu wrote: > > Hi, > > For contain_placeholders(): > > > > + if (IsA(node, Query)) > > + return query_tree_walker((Query *) node, contain_placeholders, > > context, 0); > > + else if (IsA(node, PlaceHolde

Re: Can we avoid chdir'ing in resolve_symlinks() ?

2022-10-05 Thread Tom Lane
Peter Eisentraut writes: > To clarify, this instance is not at all the fault of any code in > PostgreSQL. But it's another instance where resolving symlinks just > because we can causing problems. [ shrug... ] *Not* resolving symlinks when we can causes its own set of problems, which maybe we

Re: shadow variables - pg15 edition

2022-10-05 Thread Alvaro Herrera
On 2022-Oct-05, David Rowley wrote: > The only warning remaining after applying the attached is the "now" > warning in pgbench.c:7509. I'd considered changing this to "thenow" > which translates to "right now" in the part of Scotland that I'm from. > I also considered "nownow", which is used in S

Re: [PoC] Let libpq reject unexpected authentication requests

2022-10-05 Thread Peter Eisentraut
On 23.09.22 02:02, Jacob Champion wrote: On Thu, Sep 22, 2022 at 4:52 AM Peter Eisentraut wrote: On 22.09.22 01:37, Jacob Champion wrote: I think this is potentially dangerous, but it mirrors the current behavior of libpq and I'm not sure that we should change it as part of this patch. It mi

Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf

2022-10-05 Thread Drouvot, Bertrand
Hi, On 10/5/22 9:24 AM, Michael Paquier wrote: Something that stood out on a first review is the refactoring of 001_password.pl that can be done independently of the main patch: Good idea, thanks for the proposal. - test_role() -> test_conn() to be able to pass down a database name. - reset_

Re: installing static libraries (was building postgres with meson)

2022-10-05 Thread Peter Eisentraut
On 04.10.22 00:42, Andres Freund wrote: I realize that there are people for whom other considerations outweigh that, but I don't think that we should install static libraries by default. Long ago it was pretty common for configure scripts to offer --enable-shared and --enable-static options ...

Re: Add non-blocking version of PQcancel

2022-10-05 Thread Jelte Fennema
Thanks for all the feedback. I attached a new patch that I think addresses all of it. Below some additional info. > On the whole it feels like a mistake to have two separate kinds of > PGconn with fundamentally different behaviors and yet no distinction > in the API.  I think I'd recommend having

Re: [PATCH] Log details for client certificate failures

2022-10-05 Thread Ranier Vilela
Em qua., 5 de out. de 2022 às 09:19, Ranier Vilela escreveu: > Hi, > I think that 9d58bf > , > left a tiny oversight. > > guc_strdup uses strdup, so must be cleaned by free not pfree. > IMO, can be used once fre

Re: Removing unneeded self joins

2022-10-05 Thread Andrey Lepikhov
New version, rebased onto current master. Nothing special, just rebase. -- regards, Andrey Lepikhov Postgres Professional From 03aab7a2431032166c9ea5f52fbcccaf7168abec Mon Sep 17 00:00:00 2001 From: "Andrey V. Lepikhov" Date: Wed, 5 Oct 2022 16:58:34 +0500 Subject: [PATCH] Remove self-joins. A

Re: [PATCH] Log details for client certificate failures

2022-10-05 Thread Ranier Vilela
Hi, I think that 9d58bf , left a tiny oversight. guc_strdup uses strdup, so must be cleaned by free not pfree. IMO, can be used once free call too. regards, Ranier Vilela simplifies_and_use_free_variable.patch

Re: Miscellaneous tab completion issue fixes

2022-10-05 Thread vignesh C
On Wed, 5 Oct 2022 at 08:17, Michael Paquier wrote: > > On Tue, Oct 04, 2022 at 10:35:25AM +0100, Dagfinn Ilmari Mannsåker wrote: > > LGTM, +1 to commit. > > Fine by me, so done. Thanks for pushing this. Regards, Vignesh

Re: [POC] Allow flattening of subquery with a link to upper query

2022-10-05 Thread Andrey Lepikhov
On 5/10/2022 02:45, Zhihong Yu wrote: Hi, For contain_placeholders(): +   if (IsA(node, Query)) +       return query_tree_walker((Query *) node, contain_placeholders, context, 0); +   else if (IsA(node, PlaceHolderVar)) Fixed The `else` is not needed. For correlated_t struct, it would be b

Re: [BUG] parenting a PK constraint to a self-FK one (Was: Self FK oddity when attaching a partition)

2022-10-05 Thread Alvaro Herrera
On 2022-Oct-03, Jehan-Guillaume de Rorthais wrote: > Thank you! This is fixed and rebased on current master branch in patches > attached. Thanks. As far as I can see this fixes the bugs that were reported. I've been giving the patches a look and it caused me to notice two additional bugs in the

Re: Add meson.build to version_stamp.pl

2022-10-05 Thread Dagfinn Ilmari Mannsåker
Peter Eisentraut writes: > Thinking ahead a bit, we need to add meson.build to version_stamp.pl. > > Maybe someone can think of a better sed expression, but this one seems > good enough to me for now. […] > +sed_file("meson.build", > + qq{-e "1,20s/ version: '[0-9a-z.]*',/ version: '$fullvers

Re: shadow variables - pg15 edition

2022-10-05 Thread David Rowley
On Wed, 5 Oct 2022 at 21:05, David Rowley wrote: > 5 warnings remain. 4 of these are for PG_TRY() and co. I've attached a draft patch for a method I was considering to fix the warnings we're getting from the nested PG_TRY() statement in utility.c. The C preprocessor does not allow name overload

Re: [Commitfest 2022-09] Date is Over.

2022-10-05 Thread Julien Rouhaud
Hi, On Wed, Oct 05, 2022 at 02:50:58PM +0500, Ibrar Ahmed wrote: > On Wed, 5 Oct 2022 at 1:43 PM, Alvaro Herrera > wrote: > > > On 2022-Oct-03, Ibrar Ahmed wrote: > > > > > The date of the current commitfest is over, here is the current status of > > > the "September 2022 commitfest." > > > The

Re: Move backup-related code to xlogbackup.c/.h

2022-10-05 Thread Bharath Rupireddy
On Wed, Oct 5, 2022 at 1:20 PM Michael Paquier wrote: > > On Tue, Oct 04, 2022 at 03:54:20PM -0700, Nathan Bossart wrote: > > I would suggest moving this to a separate prerequisite patch that can be > > reviewed independently from the patches that simply move code to a > > different file. I added

Re: [Commitfest 2022-09] Date is Over.

2022-10-05 Thread Ibrar Ahmed
On Wed, 5 Oct 2022 at 1:43 PM, Alvaro Herrera wrote: > On 2022-Oct-03, Ibrar Ahmed wrote: > > > The date of the current commitfest is over, here is the current status of > > the "September 2022 commitfest." > > There were 296 patches in the commitfest and 58 were get committed. > > Are you movin

Re: logical replication restrictions

2022-10-05 Thread Peter Smith
Hi Euler, a long time ago you ask me a few questions about my previous review [1]. Here are my replies, plus a few other review comments for patch v7-0001. == 1. doc/src/sgml/catalogs.sgml + + Application delay of changes by a specified amount of time. The + unit is in mil

Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-10-05 Thread John Naylor
On Wed, Oct 5, 2022 at 1:46 PM Masahiko Sawada wrote: > > On Wed, Sep 28, 2022 at 12:49 PM Masahiko Sawada wrote: > > > > On Fri, Sep 23, 2022 at 12:11 AM John Naylor > > wrote: > > Yeah, node31 and node256 are bloated. We probably could use slab for > > node256 independently. It's worth trying

Re: [Commitfest 2022-09] Date is Over.

2022-10-05 Thread Alvaro Herrera
On 2022-Oct-03, Ibrar Ahmed wrote: > The date of the current commitfest is over, here is the current status of > the "September 2022 commitfest." > There were 296 patches in the commitfest and 58 were get committed. Are you moving the open patches to the next commitfest, closing some as RwF, etc

Re: document the need to analyze partitioned tables

2022-10-05 Thread Laurenz Albe
On Mon, 2022-03-28 at 15:05 +0200, Tomas Vondra wrote: > I've pushed the last version, and backpatched it to 10 (not sure I'd > call it a bugfix, but I certainly agree with Justin it's worth > mentioning in the docs, even on older branches). I'd like to suggest an improvement to this. The current

Add meson.build to version_stamp.pl

2022-10-05 Thread Peter Eisentraut
Thinking ahead a bit, we need to add meson.build to version_stamp.pl. Maybe someone can think of a better sed expression, but this one seems good enough to me for now.From aae1dc51287655af3f847c3b7d07050f6e8651ec Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Wed, 5 Oct 2022 10:32:34 +02

Re: [RFC] building postgres with meson - v13

2022-10-05 Thread Peter Eisentraut
On 04.10.22 05:25, Andres Freund wrote: I've attached a revised version of the xml-tools dependency wrapper (0001): Cleanups, minor error handling improvements, and bit of comment polishing. I'd welcome review. But as it fixes a build-dependency bug / FIXME, I'm planning to push it relatively soo

Re: shadow variables - pg15 edition

2022-10-05 Thread David Rowley
On Tue, 4 Oct 2022 at 15:30, Justin Pryzby wrote: > Here, you forgot to change "val < 0". Thanks. I made another review pass of each change to ensure I didn't miss any others. There were no other issues, so I pushed the adjusted patch. 5 warnings remain. 4 of these are for PG_TRY() and co. Da

Re: Suppressing useless wakeups in walreceiver

2022-10-05 Thread Alvaro Herrera
On 2022-Oct-04, Nathan Bossart wrote: > Here is an updated patch set with the following changes: > > * The creation of the struct for non-shared WAL receiver state is moved to > a prerequisite 0001 patch. This should help ease review of 0002 a bit. I think that would be even better if you moved

Re: Move backup-related code to xlogbackup.c/.h

2022-10-05 Thread Michael Paquier
On Tue, Oct 04, 2022 at 03:54:20PM -0700, Nathan Bossart wrote: > I would suggest moving this to a separate prerequisite patch that can be > reviewed independently from the patches that simply move code to a > different file. And FWIW, the SQL interfaces for pg_backup_start() and pg_backup_stop()

Re: Non-replayable WAL records through overflows and >MaxAllocSize lengths

2022-10-05 Thread Michael Paquier
Hi Matthias, On Wed, Jul 27, 2022 at 02:07:05PM +0200, Matthias van de Meent wrote: My apologies for the time it took me to come back to this thread. > > + * To accommodate some overhead, hhis MaxXLogRecordSize value allows for > > s/hhis/this/. > > Will be included in the next update.. v8 fail

Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf

2022-10-05 Thread Michael Paquier
On Tue, Sep 20, 2022 at 01:33:09PM +0200, Drouvot, Bertrand wrote: > I assume (maybe i should not) that if objects starting with / already exist > there is very good reason(s) behind. Then I don't think that preventing > their creation in the DDL would help (quite the contrary for the ones that > r