Re: Letter case of "admin option"

2022-08-24 Thread Kyotaro Horiguchi
Thanks for the comment. At Tue, 23 Aug 2022 09:58:47 -0400, Robert Haas wrote in > On Mon, Aug 22, 2022 at 9:29 PM Kyotaro Horiguchi > wrote: > In the case of GRANT, that's more ambiguous, because the word OPTION > actually appears in the syntax. But isn't that sort of accidental? Yeah I

Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

2022-08-24 Thread Bharath Rupireddy
On Tue, Aug 23, 2022 at 11:37 PM Nathan Bossart wrote: > > On Wed, Aug 17, 2022 at 12:39:26PM +0530, Bharath Rupireddy wrote: > > + /* > > + * We're only handling directories here, skip if it's not ours. Also, > > skip > > + * if the caller has already performed this check. > > +

Re: use ARM intrinsics in pg_lfind32() where available

2022-08-24 Thread Nathan Bossart
On Thu, Aug 25, 2022 at 10:38:34AM +0700, John Naylor wrote: > On Thu, Aug 25, 2022 at 1:01 AM Nathan Bossart > wrote: >> On Wed, Aug 24, 2022 at 11:07:03AM +0700, John Naylor wrote: >> > - Can a user on ARM64 ever get a runtime fault if the machine attempts >> > to execute NEON instructions? >>

Re: add checkpoint stats of snapshot and mapping files of pg_logical dir

2022-08-24 Thread Bharath Rupireddy
On Tue, Aug 23, 2022 at 11:19 PM Nathan Bossart wrote: > > On Wed, Aug 17, 2022 at 11:17:24AM +0530, Bharath Rupireddy wrote: > > + "logical decoding file(s) > > processing time=%ld.%03d s", > > I would suggest shortening this to something like

Re: static libpq (and other libraries) overwritten on aix

2022-08-24 Thread Noah Misch
On Wed, Aug 24, 2022 at 08:43:04PM -0700, Andres Freund wrote: > On 2022-08-20 10:42:13 -0700, Andres Freund wrote: > > 0004 aix: when building with gcc, tell gcc we're building a shared library > > > > That's the gcc -shared issue I explained in the email I'm replying to. > > > > We should

Re: static libpq (and other libraries) overwritten on aix

2022-08-24 Thread Andres Freund
Hi, On 2022-08-20 10:42:13 -0700, Andres Freund wrote: > On 2022-08-20 01:35:22 -0700, Andres Freund wrote: > > I'll send in a patch series tomorrow, too tired for today. > > Here it goes. > 0001 aix: Fix SHLIB_EXPORTS reference in VPATH builds > > That's mostly so I could even build. It's

Re: use ARM intrinsics in pg_lfind32() where available

2022-08-24 Thread John Naylor
On Thu, Aug 25, 2022 at 1:01 AM Nathan Bossart wrote: > > On Wed, Aug 24, 2022 at 11:07:03AM +0700, John Naylor wrote: > > The important thing is: if we compile with __aarch64__ as a target: > > - Will the compiler emit the intended instructions from the intrinsics > > without extra flags? > > My

Re: pg_stat_have_stats() returns true for dropped indexes (or for index creation transaction rolled back)

2022-08-24 Thread Kyotaro Horiguchi
Good catch, and thanks for the patch! (The file name would correctly be v2-0001-...:) At Tue, 23 Aug 2022 09:58:03 +0200, "Drouvot, Bertrand" wrote in > Agree it's better to move it to heap_create(): it's done in the new > version attached. +1 (not considering stats splitting) > We'll see

Re: pg_regress: lookup shellprog in $PATH

2022-08-24 Thread Tom Lane
I wrote: > Given the lack of complaints about how pg_ctl works, I'd be inclined > to follow its lead and just hard-wire "/bin/sh", removing the whole > SHELLPROG/shellprog dance. I have not heard of anyone using the > theoretical ability to compile pg_regress with some other value. git blame

Re: pg_regress: lookup shellprog in $PATH

2022-08-24 Thread Tom Lane
Gurjeet Singh writes: > Please see attached the one-letter patch that fixes this problem. I have > chosen to replace the execl() call with execlp(), which performs a lookup > in $PATH, and finds the 'sh' to use for running the postmaster. I can't say that I think this is a great fix. It creates

Re: shadow variables - pg15 edition

2022-08-24 Thread Justin Pryzby
On Wed, Aug 24, 2022 at 10:47:31PM +1200, David Rowley wrote: > On Wed, 24 Aug 2022 at 14:39, Justin Pryzby wrote: > > Attached are half of the remainder of what I've written, ready for review. > > Thanks for the patches. > 4. "Repurpose" (variables have the same purpose and may as well use >

Re: shadow variables - pg15 edition

2022-08-24 Thread David Rowley
On Wed, 24 Aug 2022 at 22:47, David Rowley wrote: > 5. "Refactor" (fix the code to make it better) > I have some ideas on how to fix the two #5s, so I'm going to go and do that > now. I've attached a patch which I think improves the code in gistRelocateBuildBuffersOnSplit() so that there's no

Re: Tracking last scan time

2022-08-24 Thread David Rowley
On Thu, 25 Aug 2022 at 03:03, Bruce Momjian wrote: > > On Wed, Aug 24, 2022 at 04:01:21PM +0100, Dave Page wrote: > > On Wed, 24 Aug 2022 at 15:18, Bruce Momjian wrote: > > Would it be simpler to allow the sequential and index scan columns to be > > cleared so you can look later to see

Re: pg_upgrade failing for 200+ million Large Objects

2022-08-24 Thread Nathan Bossart
On Wed, Mar 24, 2021 at 12:05:27PM -0400, Jan Wieck wrote: > On 3/24/21 12:04 PM, Jan Wieck wrote: >> In any case I changed the options so that they behave the same way, the >> existing -o and -O (for old/new postmaster options) work. I don't think >> it would be wise to have option forwarding

Re: SQL/JSON features for v15

2022-08-24 Thread Andrew Dunstan
On 2022-08-24 We 20:05, Nikita Glukhov wrote: > > > v8 - is a highly WIP patch, which I failed to finish today. > Even some test cases fail now, and they simply show unfinished > things like casts to bytea (they can be simply removed) and missing > safe input functions. > Thanks for your work,

Re: Strip -mmacosx-version-min options from plperl build

2022-08-24 Thread Andrew Dunstan
On 2022-08-24 We 18:56, Tom Lane wrote: > Andrew Dunstan writes: >> On 2022-08-24 We 09:30, Tom Lane wrote: >>> Presumably this is caused by not having -Wl,--export-all-symbols >>> which is something we ought to be injecting for ourselves if we >>> aren't doing anything to export the

Re: Strip -mmacosx-version-min options from plperl build

2022-08-24 Thread Tom Lane
Andrew Dunstan writes: > On 2022-08-24 We 09:30, Tom Lane wrote: >> Presumably this is caused by not having >> > -Wl,--export-all-symbols >> which is something we ought to be injecting for ourselves if we >> aren't doing anything to export the magic-block constant explicitly. >> But I too am

Re: shadow variables - pg15 edition

2022-08-24 Thread David Rowley
On Thu, 25 Aug 2022 at 02:00, Justin Pryzby wrote: > > On Wed, Aug 24, 2022 at 10:47:31PM +1200, David Rowley wrote: > > I was hoping we'd already caught all of the #1s in 421892a19, but I > > caught a few of those in some of your other patches. One you'd done > > another way and some you'd done

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2022-08-24 Thread Zhihong Yu
Hi, I was looking at 0004-COPY_IGNORE_ERRORS.patch + * Ignore constraints if IGNORE_ERRORS is enabled + */ +static void +safeExecConstraints(CopyFromState cstate, ResultRelInfo *resultRelInfo, TupleTableSlot *myslot, EState *estate) I think the existing ExecConstraints() can be expanded by

Re: archive modules

2022-08-24 Thread Nathan Bossart
On Wed, Aug 24, 2022 at 10:05:55AM +0200, talk to ben wrote: > This view does not display linkend="runtime-config-custom">customized options > - until the extension module that defines them has been loaded. > + until the extension module that defines them has been loaded. Therefore, >

pg_regress: lookup shellprog in $PATH

2022-08-24 Thread Gurjeet Singh
I'm trying to build Postgres using the Nix language and the Nix package manager on macOS (see [1]). After some work I was able to build, and even run Postgres. But `make check` failed with the error pg_regress: could not exec "sh": No such file or directory The reason is that pg_regress uses

Re: Making Vars outer-join aware

2022-08-24 Thread Tom Lane
Richard Guo writes: > On Sun, Aug 21, 2022 at 6:52 AM Tom Lane wrote: >> What I'm thinking we should do about this, once we detect that >> this identity is applicable, is to generate *both* forms of Pbc, >> either adding or removing the varnullingrels bits depending on >> which form we got from

Re: making relfilenodes 56 bits

2022-08-24 Thread Robert Haas
On Mon, Aug 1, 2022 at 7:57 AM Dilip Kumar wrote: > I have fixed other comments, and also fixed comments from Alvaro to > use %lld instead of INT64_FORMAT inside the ereport and wherever he > suggested. Notwithstanding the ongoing discussion about the exact approach for the main patch, it seemed

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-24 Thread Ranier Vilela
Em qua., 24 de ago. de 2022 às 16:41, Robert Haas escreveu: > On Wed, Aug 24, 2022 at 3:20 PM Ranier Vilela wrote: > > But, these same arguments apply to Designated Initializers [1]. > > > > like: > > struct foo a = { > >.i = 0, > >.b = 0, > > }; > > > > That is slowly being introduced

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-24 Thread Robert Haas
On Wed, Aug 24, 2022 at 3:20 PM Ranier Vilela wrote: > But, these same arguments apply to Designated Initializers [1]. > > like: > struct foo a = { >.i = 0, >.b = 0, > }; > > That is slowly being introduced and IMHO brings the same problems with > padding bits. Yep. I don't find that an

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-24 Thread Ranier Vilela
Em qua., 24 de ago. de 2022 às 16:00, Tom Lane escreveu: > Peter Eisentraut writes: > > On 24.08.22 16:30, Alvaro Herrera wrote: > >> If you do this, you're creating a potential backpatching hazard. This > >> is OK if we get something in return, so a question to ask is whether > >> there is

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-24 Thread Robert Haas
On Wed, Aug 24, 2022 at 3:00 PM Tom Lane wrote: > Call me a trogdolyte, but I don't follow how it's an improvement. > It looks to me like an entirely random change that doesn't get rid > of assumptions about what the bits are, it just replaces one set of > assumptions with a different set.

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-24 Thread Tom Lane
Peter Eisentraut writes: > On 24.08.22 16:30, Alvaro Herrera wrote: >> If you do this, you're creating a potential backpatching hazard. This >> is OK if we get something in return, so a question to ask is whether >> there is any benefit in doing it. > I don't follow how this is a backpatching

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-24 Thread Peter Eisentraut
On 24.08.22 16:30, Alvaro Herrera wrote: On 2022-Aug-19, David Zhang wrote: Should these obviously possible replacement of the standard library function "memset" be considered as well? For example, something like the attached one which is focusing on the pageinspect extension only. If you do

Re: ICU for global collation

2022-08-24 Thread Peter Eisentraut
On 24.08.22 10:59, Julien Rouhaud wrote: I have not tested the patch in details but this looks rather sane to me on a quick read. Peter? Patch looks good to me too. Committed, thanks. (This should conclude all the issues discussed in this thread recently.)

Re: [RFC] building postgres with meson - v11

2022-08-24 Thread samay sharma
Hi, On Wed, Aug 24, 2022 at 8:30 AM Andres Freund wrote: > Hi, > > On 2022-08-24 11:39:06 +0200, Peter Eisentraut wrote: > > I have looked at your branch at 0545eec895: > > > > 258f6dc0a7 Don't hardcode tmp_check/ as test directory for tap tests > > 8ecc33cf04 Split TESTDIR into TESTLOGDIR and

Re: use ARM intrinsics in pg_lfind32() where available

2022-08-24 Thread Nathan Bossart
On Wed, Aug 24, 2022 at 11:07:03AM +0700, John Naylor wrote: > The important thing is: if we compile with __aarch64__ as a target: > - Will the compiler emit the intended instructions from the intrinsics > without extra flags? My testing with GCC and Clang did not require any extra flags. GCC

Re: [RFC] building postgres with meson - v11

2022-08-24 Thread Andres Freund
Hi, On 2022-08-17 14:53:17 -0700, Andres Freund wrote: > > - In the top-level meson.build, the "renaming" of the Windows system > > name > > > > host_system = host_machine.system() == 'windows' ? 'win32' : > > host_machine.system() > > build_system = build_machine.system() ==

Re: Stack overflow issue

2022-08-24 Thread Tom Lane
I wrote: > I think most likely we should report this to Snowball upstream > and see what they think is an appropriate fix. Done at [1], and I pushed the other fixes. Thanks again for the report! regards, tom lane [1]

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2022-08-24 Thread Damir Belyalov
> From 09befdad45a6b1ae70d6c5abc90d1c2296e56ee1 Mon Sep 17 00:00:00 2001 From: Damir Belyalov Date: Fri, 15 Oct 2021 11:55:18 +0300 Subject: [PATCH] COPY_IGNORE_ERRORS with GUC for replay_buffer size --- doc/src/sgml/config.sgml | 17 ++ doc/src/sgml/ref/copy.sgml

Re: [PATCH] Optimize json_lex_string by batching character copying

2022-08-24 Thread Nathan Bossart
On Wed, Aug 24, 2022 at 11:59:25AM +0700, John Naylor wrote: > It seems "scalar" would be a bad choice since it already means > (confusingly) operating on the least significant element of a vector. > I'm thinking of *_has and *_has_le, matching the already existing in > the earlier patch

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2022-08-24 Thread Damir Belyalov
> > > + /* Buffer was filled, commit subtransaction and prepare > to replay */ > > + ReleaseCurrentSubTransaction(); > What is actually being committed by this ReleaseCurrentSubTransaction()? > It seems to me that just safecstate->replay_buffer is fulfilled before >

Re: O(n) tasks cause lengthy startups and checkpoints

2022-08-24 Thread Nathan Bossart
On Thu, Aug 11, 2022 at 04:09:21PM -0700, Nathan Bossart wrote: > Here is a rebased patch set for cfbot. There are no other differences > between v7 and v8. Another rebase for cfbot. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 6810355cb3d1a03326b152aebe3c907f7544be4f

Re: Stack overflow issue

2022-08-24 Thread Tom Lane
=?UTF-8?B?0JXQs9C+0YAg0KfQuNC90LTRj9GB0LrQuNC9?= writes: > Firstly, we decided to test the regex catalog functions and found 6 of them  > that lack the check_stach_depth() call. > zaptreesubs > markst > next > nfatree > numst > repeat I took a closer look at these. I think the markst, numst,

Re: [RFC] building postgres with meson - v11

2022-08-24 Thread Andres Freund
Hi, On 2022-08-24 11:39:06 +0200, Peter Eisentraut wrote: > I have looked at your branch at 0545eec895: > > 258f6dc0a7 Don't hardcode tmp_check/ as test directory for tap tests > 8ecc33cf04 Split TESTDIR into TESTLOGDIR and TESTDATADIR > > I think these patches are split up a bit incorrectly.

Re: Extending outfuncs support to utility statements

2022-08-24 Thread Peter Eisentraut
On 13.07.22 00:38, Tom Lane wrote: Peter Eisentraut writes: This is also needed to be able to store utility statements in (unquoted) SQL function bodies. I have some in-progress code for that that I need to dust off. IIRC, there are still some nontrivial issues to work through on the reading

Re: ecpg assertion on windows

2022-08-24 Thread Andres Freund
Hi, On 2022-08-24 00:32:53 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-08-24 00:18:27 -0400, Tom Lane wrote: > >> But if the regression tests are triggering use of uninitialized values, how > >> could we have failed to detect that? Either valgrind or unstable behavior > >> should

Re: Tracking last scan time

2022-08-24 Thread Dave Page
On Wed, 24 Aug 2022 at 16:03, Bruce Momjian wrote: > On Wed, Aug 24, 2022 at 04:01:21PM +0100, Dave Page wrote: > > On Wed, 24 Aug 2022 at 15:18, Bruce Momjian wrote: > > > > On Tue, Aug 23, 2022 at 10:55:09AM +0100, Dave Page wrote: > > > Often it is beneficial to review one's schema

Re: Inconsistencies around defining FRONTEND

2022-08-24 Thread Andres Freund
Hi, On 2022-08-24 10:40:01 -0400, Robert Haas wrote: > pg_rewind and pg_waldump seem to need the xlogreader code moved to > src/common, as Andres proposes. I'm not volunteering to tackle that > right now but I think it might be a good thing to do sometime. The easier way would be to just keep

Re: Tracking last scan time

2022-08-24 Thread Bruce Momjian
On Wed, Aug 24, 2022 at 04:01:21PM +0100, Dave Page wrote: > On Wed, 24 Aug 2022 at 15:18, Bruce Momjian wrote: > > On Tue, Aug 23, 2022 at 10:55:09AM +0100, Dave Page wrote: > > Often it is beneficial to review one's schema with a view to removing > indexes > > (and sometimes

Re: Tracking last scan time

2022-08-24 Thread Dave Page
On Wed, 24 Aug 2022 at 15:18, Bruce Momjian wrote: > On Tue, Aug 23, 2022 at 10:55:09AM +0100, Dave Page wrote: > > Often it is beneficial to review one's schema with a view to removing > indexes > > (and sometimes tables) that are no longer required. It's very difficult > to > > understand when

Re: Inconsistencies around defining FRONTEND

2022-08-24 Thread Robert Haas
On Tue, Aug 23, 2022 at 9:55 PM Andres Freund wrote: > We could, if we make xlogreader.c and the rmgrdesc routines built as part of > src/common. I don't really see how otherwise. After a little bit of study, I agree. It looks to me like -DFRONTEND can be removed from src/fe_utils/Makefile and

Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

2022-08-24 Thread Alvaro Herrera
On 2022-Aug-19, David Zhang wrote: > Should these obviously possible replacement of the standard library function > "memset" be considered as well? For example, something like the attached one > which is focusing on the pageinspect extension only. If you do this, you're creating a potential

Re: Strip -mmacosx-version-min options from plperl build

2022-08-24 Thread Andrew Dunstan
On 2022-08-24 We 09:30, Tom Lane wrote: > Peter Eisentraut writes: >> This patch has failed on Cygwin lorikeet: >> CREATE EXTENSION plperl; >> +ERROR: incompatible library >> "/home/andrew/bf/root/HEAD/inst/lib/postgresql/plperl.dll": missing >> magic block > Presumably this is caused by not

Re: replacing role-level NOINHERIT with a grant-level option

2022-08-24 Thread tushar
On 8/24/22 12:28 AM, Robert Haas wrote: This patch needed to be rebased pretty extensively after commit ce6b672e4455820a0348214be0da1a024c3f619f. Here is a new version. Thanks, Robert, I have retested this patch with my previous scenarios and things look good to me. -- regards,tushar

RE: Perform streaming logical transactions by background workers and parallel apply

2022-08-24 Thread houzj.f...@fujitsu.com
On Thur, Aug 18, 2022 11:44 AM Peter Smith wrote: > Here are my review comments for patch v21-0001: > > Note - There are some "general" comments which will result in lots of > smaller changes. The subsequent "detailed" review comments have some > overlap with these general comments but I

Re: Tracking last scan time

2022-08-24 Thread Bruce Momjian
On Tue, Aug 23, 2022 at 10:55:09AM +0100, Dave Page wrote: > Often it is beneficial to review one's schema with a view to removing indexes > (and sometimes tables) that are no longer required. It's very difficult to > understand when that is the case by looking at the number of scans of a >

Re: Stack overflow issue

2022-08-24 Thread Tom Lane
Richard Guo writes: > Attached adds the checks in these places. But I'm not sure about the > snowball case. Can we edit src/backend/snowball/libstemmer/*.c directly? No, that file is generated code, as it says right at the top. I think most likely we should report this to Snowball upstream and

Re: shadow variables - pg15 edition

2022-08-24 Thread Justin Pryzby
On Wed, Aug 24, 2022 at 10:47:31PM +1200, David Rowley wrote: > I was hoping we'd already caught all of the #1s in 421892a19, but I > caught a few of those in some of your other patches. One you'd done > another way and some you'd done the rescope but just put it in the > wrong patch. The others

Re: Stack overflow issue

2022-08-24 Thread Tom Lane
=?UTF-8?B?0JXQs9C+0YAg0KfQuNC90LTRj9GB0LrQuNC9?= writes: > Therefore, Alexander Lakhin and I decided to deal with this issue and > Alexander developed a methodology. We processed src/backend/*/*.c with "clang > -emit-llvm  ... | opt -analyze -print-calgraph" to find all the functions > that

Re: Handle infinite recursion in logical replication setup

2022-08-24 Thread vignesh C
On Mon, Aug 22, 2022 at 9:19 AM houzj.f...@fujitsu.com wrote: > > On Thursday, August 18, 2022 11:13 AM Amit Kapila > wrote: > > > > On Wed, Aug 17, 2022 at 12:34 PM Peter Smith > > wrote: > > > > > > On Wed, Aug 17, 2022 at 4:33 PM Amit Kapila > > wrote: > > > > > > > > On Wed, Aug 17, 2022

RE: Perform streaming logical transactions by background workers and parallel apply

2022-08-24 Thread houzj.f...@fujitsu.com
On Mon, Aug 22, 2022 20:50 PM Kuroda, Hayato/黒田 隼人 wrote: > Dear Wang, > > Thank you for updating the patch! Followings are comments about > v23-0001 and v23-0005. Thanks for your comments. > v23-0001 > > 01. logical-replication.sgml > > + > + When the streaming mode is parallel, the

Re: Strip -mmacosx-version-min options from plperl build

2022-08-24 Thread Tom Lane
Peter Eisentraut writes: > This patch has failed on Cygwin lorikeet: > CREATE EXTENSION plperl; > +ERROR: incompatible library > "/home/andrew/bf/root/HEAD/inst/lib/postgresql/plperl.dll": missing > magic block Presumably this is caused by not having > -Wl,--export-all-symbols which is

Re: Tracking last scan time

2022-08-24 Thread Dave Page
Hi On Tue, 23 Aug 2022 at 13:07, Greg Stark wrote: > On Tue, 23 Aug 2022 at 11:00, Dave Page wrote: > > > > Often it is beneficial to review one's schema with a view to removing > indexes (and sometimes tables) that are no longer required. It's very > difficult to understand when that is the

Re: Logical replication support for generic wal record

2022-08-24 Thread Natarajan R
Thanks, I'll check it out. On Wed, 24 Aug 2022 at 18:00, Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Wed, Aug 24, 2022 at 5:12 PM Natarajan R wrote: > > > > > > On Mon, 22 Aug 2022 at 12:16, Bharath Rupireddy < > bharath.rupireddyforpostg...@gmail.com> wrote: > >> >

Re: Stack overflow issue

2022-08-24 Thread mahendrakar s
Hi Richard, Patch is looking good to me. Would request others to take a look at it as well. Thanks, Mahendrakar. On Wed, 24 Aug 2022 at 17:24, Richard Guo wrote: > > On Wed, Aug 24, 2022 at 7:12 PM Richard Guo > wrote: > >> >> On Wed, Aug 24, 2022 at 6:49 PM Alvaro Herrera >> wrote: >> >>>

Re: Logical replication support for generic wal record

2022-08-24 Thread Bharath Rupireddy
On Wed, Aug 24, 2022 at 5:12 PM Natarajan R wrote: > > > On Mon, 22 Aug 2022 at 12:16, Bharath Rupireddy > wrote: >> >> On Mon, Aug 22, 2022 at 11:59 AM Natarajan R wrote: >> > >> > Hi All, >> > >> > I am writing a postgres extension which writes only generic wal record, >> > but this wal is

Re: Change pfree to accept NULL argument

2022-08-24 Thread David Rowley
On Wed, 24 Aug 2022 at 23:07, David Rowley wrote: > One counter argument to that is for cases like list_free_deep(). > Right now if I'm not mistaken there's a bug (which I just noticed) in > list_free_private() that would trigger if you have a List of Lists and > one of the inner Lists is NIL.

Re: standby promotion can create unreadable WAL

2022-08-24 Thread Robert Haas
On Wed, Aug 24, 2022 at 4:40 AM Kyotaro Horiguchi wrote: > Me, too. There are two ways to deal with this, I think. One is start > writing new records from abortedContRecPtr as if it were not > exist. Another is copying WAL file up to missingContRecPtr. Since the > first segment of the new

Re: Stack overflow issue

2022-08-24 Thread Richard Guo
On Wed, Aug 24, 2022 at 7:12 PM Richard Guo wrote: > > On Wed, Aug 24, 2022 at 6:49 PM Alvaro Herrera > wrote: > >> On 2022-Aug-24, mahendrakar s wrote: >> >> > Hi, >> > Can we have a parameter to control the recursion depth in these cases to >> > avoid crashes? >> >> We already have one

Re: Fix typo in func.sgml

2022-08-24 Thread Shinya Kato
On 2022-08-24 20:47, David Rowley wrote: On Wed, 24 Aug 2022 at 22:44, Shinya Kato wrote: I've found a duplicate "a a" in func.sgml and fixed it. Patch is attached. Thanks. Pushed. David Thanks for pushing! -- Regards, -- Shinya Kato Advanced Computing Technology Center Research and

Re: Fix typo in func.sgml

2022-08-24 Thread David Rowley
On Wed, 24 Aug 2022 at 22:44, Shinya Kato wrote: > I've found a duplicate "a a" in func.sgml and fixed it. > Patch is attached. Thanks. Pushed. David

Re: Logical replication support for generic wal record

2022-08-24 Thread Natarajan R
On Mon, 22 Aug 2022 at 12:16, Bharath Rupireddy < bharath.rupireddyforpostg...@gmail.com> wrote: > On Mon, Aug 22, 2022 at 11:59 AM Natarajan R > wrote: > > > > Hi All, > > > > I am writing a postgres extension which writes only generic wal record, > but this wal is not recognized by logical

Re: Stack overflow issue

2022-08-24 Thread Richard Guo
On Wed, Aug 24, 2022 at 6:49 PM Alvaro Herrera wrote: > On 2022-Aug-24, mahendrakar s wrote: > > > Hi, > > Can we have a parameter to control the recursion depth in these cases to > > avoid crashes? > > We already have one (max_stack_depth). The problem is lack of calling > the control function

Re: Change pfree to accept NULL argument

2022-08-24 Thread David Rowley
On Tue, 23 Aug 2022 at 13:17, David Rowley wrote: > I think making pfree() accept NULL is a bad idea. One counter argument to that is for cases like list_free_deep(). Right now if I'm not mistaken there's a bug (which I just noticed) in list_free_private() that would trigger if you have a List

Re: Stack overflow issue

2022-08-24 Thread mahendrakar s
Thanks. On Wed, 24 Aug, 2022, 4:19 pm Alvaro Herrera, wrote: > On 2022-Aug-24, mahendrakar s wrote: > > > Hi, > > Can we have a parameter to control the recursion depth in these cases to > > avoid crashes? > > We already have one (max_stack_depth). The problem is lack of calling > the control

Re: Stack overflow issue

2022-08-24 Thread Alvaro Herrera
On 2022-Aug-24, mahendrakar s wrote: > Hi, > Can we have a parameter to control the recursion depth in these cases to > avoid crashes? We already have one (max_stack_depth). The problem is lack of calling the control function in a few places. -- Álvaro Herrera 48°01'N 7°57'E —

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

2022-08-24 Thread Alvaro Herrera
On 2022-Aug-24, Jehan-Guillaume de Rorthais wrote: > I was naively wondering about such a patch, but was worrying about potential > side effects on ATExecAttachPartitionIdx(), DetachPartitionFinalize() and > DefineIndex() where I didn't had a single glance. Did you had a look? No. But AFAIR all

Re: shadow variables - pg15 edition

2022-08-24 Thread David Rowley
On Wed, 24 Aug 2022 at 14:39, Justin Pryzby wrote: > Attached are half of the remainder of what I've written, ready for review. Thanks for the patches. I started to do some analysis of the remaining warnings and put them in the attached spreadsheet. I put each of the remaining warnings into a

Fix typo in func.sgml

2022-08-24 Thread Shinya Kato
Hi hackers, I've found a duplicate "a a" in func.sgml and fixed it. Patch is attached. -- Regards, -- Shinya Kato Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATIONdiff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index

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

2022-08-24 Thread Jehan-Guillaume de Rorthais
On Tue, 23 Aug 2022 18:30:06 +0200 Alvaro Herrera wrote: > On 2022-Aug-23, Jehan-Guillaume de Rorthais wrote: > > Hi, > > [...] > > > However, it seems get_relation_idx_constraint_oid(), introduced in > > eb7ed3f3063, assume there could be only ONE constraint depending to an > > index. But in

Re: Making Vars outer-join aware

2022-08-24 Thread Richard Guo
On Sun, Aug 21, 2022 at 6:52 AM Tom Lane wrote: > What I'm thinking we should do about this, once we detect that > this identity is applicable, is to generate *both* forms of Pbc, > either adding or removing the varnullingrels bits depending on > which form we got from the parser. Then, when we

Re: Strip -mmacosx-version-min options from plperl build

2022-08-24 Thread Peter Eisentraut
On 19.08.22 09:12, Peter Eisentraut wrote: After analyzing the source code of ExtUtils::Embed's ldopts, I think we can also do this by subtracting $Config{ldflags}, since my $linkage = "$ccdlflags $ldflags @archives $ld_or_bs"; and we really just want the $ld_or_bs part. (@archives should be

Re: Stack overflow issue

2022-08-24 Thread mahendrakar s
Hi, Can we have a parameter to control the recursion depth in these cases to avoid crashes? Just a thought. Thanks, Mahendrakar. On Wed, 24 Aug, 2022, 3:21 pm Егор Чиндяскин, wrote: > Hello, I recently got a server crash (bug #17583 [1]) caused by a stack > overflow. > > Tom Lane and Richard

Re: making relfilenodes 56 bits

2022-08-24 Thread Amit Kapila
On Tue, Aug 23, 2022 at 3:28 PM Dilip Kumar wrote: > > On Tue, Aug 23, 2022 at 3:16 PM Amit Kapila wrote: > > > One more thing we may want to think about is what if there are tables > > created by extension? For example, I think BDR creates some tables > > like node_group, conflict_history, etc.

Re: making relfilenodes 56 bits

2022-08-24 Thread Amit Kapila
On Tue, Aug 23, 2022 at 8:00 PM Robert Haas wrote: > > On Tue, Aug 23, 2022 at 2:06 AM Dilip Kumar wrote: > > OTOH, if we keep the two separate ranges for the user and system table > > then we don't need all this complex logic of conflict checking. > > True. That's the downside. The question is

Re: Pluggable toaster

2022-08-24 Thread Nikita Malakhov
Hi hackers! I've rebased actual branch onto the latest master and re-created patches. Checked with git am, all applied correctly. Please check the attached patches. Rebased branch resides here: https://github.com/postgrespro/postgres/tree/toasterapi_clean Just to remind - I've decided to leave

Stack overflow issue

2022-08-24 Thread Егор Чиндяскин
Hello, I recently got a server crash (bug #17583 [1]) caused by a stack overflow.    Tom Lane and Richard Guo, in a discussion of this bug, suggested that there could be more such places.  Therefore, Alexander Lakhin and I decided to deal with this issue and Alexander developed a methodology.

Re: [RFC] building postgres with meson - v11

2022-08-24 Thread Peter Eisentraut
I have looked at your branch at 0545eec895: 258f6dc0a7 Don't hardcode tmp_check/ as test directory for tap tests 8ecc33cf04 Split TESTDIR into TESTLOGDIR and TESTDATADIR I think these patches are split up a bit incorrectly. If you apply the first patch by itself, then the output appears in

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

2022-08-24 Thread Peter Smith
Here are some review comments for the patch v8-0001: == 1. Commit message 1a. Majority of the logic on the subscriber side has already existed in the code. SUGGESTION The majority of the logic on the subscriber side already exists in the code. ~ 1b. Second, when REPLICA IDENTITY IS FULL

Re: ICU for global collation

2022-08-24 Thread Julien Rouhaud
On Wed, Aug 24, 2022 at 01:38:44PM +0900, Michael Paquier wrote: > On Tue, Aug 23, 2022 at 08:59:02PM +0300, Marina Polyakova wrote: > > My colleague Andrew Bille found another bug in master > > (b4e936859dc441102eb0b6fb7a104f3948c90490) and REL_15_STABLE > >

Re: standby promotion can create unreadable WAL

2022-08-24 Thread Kyotaro Horiguchi
Nice find! At Wed, 24 Aug 2022 11:09:44 +0530, Dilip Kumar wrote in > On Tue, Aug 23, 2022 at 12:06 AM Robert Haas wrote: > > > Nothing that uses xlogreader is going to be able to bridge the gap > > between file #4 and file #5. In this case it doesn't matter very much, > > because we

Re: archive modules

2022-08-24 Thread talk to ben
Nathan Bossart writes: > On one hand, it seems like folks will commonly encounter this behavior with this > module, so this feels like a natural place for such a note. Yes, I looked there first. Would this addition to the pg_settings description be better ? From

Re: Schema variables - new implementation for Postgres 15

2022-08-24 Thread Erik Rijkers
Op 24-08-2022 om 08:37 schreef Pavel Stehule: I fixed these. > [v20220824-1-*.patch] Hi Pavel, I noticed just now that variable assignment (i.e., LET) unexpectedly (for me anyway) cast the type of the input value. Surely that's wrong? The documentation says clearly enough: 'The

Add semi-join pushdown to postgres_fdw

2022-08-24 Thread Alexander Pyhalov
Hi. It's possible to extend deparsing in postgres_fdw, so that we can push down semi-joins, which doesn't refer to inner reltarget. This allows us to push down joins in queries like SELECT * FROM ft1 t1 WHERE t1.c1 < 10 AND t1.c3 IN (SELECT c3 FROM ft2 t2 WHERE date(c5) =

Re: Schema variables - new implementation for Postgres 15

2022-08-24 Thread Pavel Stehule
út 23. 8. 2022 v 14:57 odesílatel Julien Rouhaud napsal: > On Tue, Aug 23, 2022 at 11:27:45AM +0200, Pavel Stehule wrote: > > út 23. 8. 2022 v 7:56 odesílatel Julien Rouhaud > napsal: > > > > > > > > I've been thinking a bit more about the shadowing, and one scenario we > > > didn't > > >