Re: remove more archiving overhead

2022-09-18 Thread Noah Misch
On Sat, Sep 17, 2022 at 02:54:27PM -0700, Nathan Bossart wrote: > On Sat, Sep 17, 2022 at 11:46:39AM +0200, Peter Eisentraut wrote: > >> > --- a/doc/src/sgml/backup.sgml > >> > +++ b/doc/src/sgml/backup.sgml > >> > @@ -691,11 +691,9 @@ test ! -f > >> > /mnt/server/archivedir/000100A900

Re: is_superuser is not documented

2022-09-18 Thread Fujii Masao
On 2022/09/14 14:27, bt22kawamotok wrote: I update patch to reflect master update. Thanks for updating the patch! + +Shows whether the current user is a superuser or not. + How about adding the note about when this parameter can change, like we do for in_hot_standby do

Re: Refactor backup related code (was: Is it correct to say, "invalid data in file \"%s\"", BACKUP_LABEL_FILE in do_pg_backup_stop?)

2022-09-18 Thread Bharath Rupireddy
On Sun, Sep 18, 2022 at 7:38 AM Fujii Masao wrote: > > On 2022/09/17 16:18, Bharath Rupireddy wrote: > > Good idea. It makes a lot more sense to me, because xlog.c is already > > a file of 9000 LOC. I've created xlogbackup.c/.h files and added the > > new code there. Once this patch gets in, I can

Re: Refactor backup related code (was: Is it correct to say, "invalid data in file \"%s\"", BACKUP_LABEL_FILE in do_pg_backup_stop?)

2022-09-18 Thread Bharath Rupireddy
On Sun, Sep 18, 2022 at 1:23 PM Bharath Rupireddy wrote: cfbot fails [1] with v6 patch. I made a silly mistake by not checking the output of "make check-world -j 16" fully, I just saw the end message "All tests successful." before posting the v6 patch. The failure is due to perform_base_backup(

Re: missing indexes in indexlist with partitioned tables

2022-09-18 Thread David Rowley
On Sun, 18 Sept 2022 at 07:00, Tom Lane wrote: > > Alvaro Herrera writes: > > After a bit of trawling through the archives, I found it here: > > https://www.postgresql.org/message-id/20180124162006.pmapfiznhgngwtjf%40alvherre.pgsql > > I think there was insufficient discussion and you're probably

Re: Tree-walker callbacks vs -Wdeprecated-non-prototype

2022-09-18 Thread Tom Lane
I wrote: > Attached is an incomplete POC patch that suppresses these warnings > in nodeFuncs.c itself and in costsize.c, which I selected at random > as a typical caller. I'll push forward with converting the other > call sites if this way seems good to people. Here's a fleshed-out patch that get

Re: Tree-walker callbacks vs -Wdeprecated-non-prototype

2022-09-18 Thread Thomas Munro
On Mon, Sep 19, 2022 at 8:57 AM Tom Lane wrote: > I think we ought to seriously consider the alternative of changing > nodeFuncs.c about like I have here, but not touching the walkers/mutators, > and silencing the resulting complaints about function type casting by > doing the equivalent of > > -

Re: May be BUG. Periodic burst growth of the checkpoint_req counter on replica.

2022-09-18 Thread Anton A. Melnikov
Hello! Thank you very much for your feedback and essential remarks. On 07.09.2022 10:39, Kyotaro Horiguchi wrote: It lets XLogPageRead run the same check with what CreateRestartPoint does, so it basically works (it is forgetting a lock, though. The reason for omitting the lock in CreateRestart

Re: Pruning never visible changes

2022-09-18 Thread Greg Stark
On Fri, 16 Sept 2022 at 10:27, Tom Lane wrote: > > Simon Riggs writes: > > A user asked me whether we prune never visible changes, such as > > BEGIN; > > INSERT... > > UPDATE.. (same row) > > COMMIT; > > Didn't we just have this discussion in another thread? Well. not "just" :) commit 44e4

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-18 Thread David Rowley
On Sun, 18 Sept 2022 at 07:59, Peter Geoghegan wrote: > Attached revision adds a new, third patch. This fixes all the warnings > from clang-tidy's "readability-named-parameter" check. The extent of > the code churn seems acceptable to me. +1 to the idea of aligning the parameter names between fun

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-18 Thread Peter Geoghegan
On Sun, Sep 18, 2022 at 4:38 PM David Rowley wrote: > 1. In getJsonPathVariable you seem to have mistakenly removed a > parameter from the declaration. That was left behind following a recent rebase. Will fix. Every other issue you've raised is some variant of: "I see that you've made a subject

Re: [RFC] building postgres with meson - v13

2022-09-18 Thread Peter Eisentraut
On 15.09.22 04:26, Andres Freund wrote: Attached is v13 of the meson patchset. The biggest changes are: Did something about warning flags change from the previous patch set? I see it's building with -Wextra now, which combined with -Werror causes the build to fail for me. I have never encou

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-18 Thread Peter Geoghegan
On Sun, Sep 18, 2022 at 5:08 PM Peter Geoghegan wrote: > Again, I was looking at this at the level of the .h file (in this case > nodeIncrementalSort.h). It never occurred to me to consider other > *InitializeWorker() functions. > > Offhand I think that we should change all of the other > *Initial

Re: [RFC] building postgres with meson - v13

2022-09-18 Thread Andres Freund
Hi, On September 18, 2022 5:24:06 PM PDT, Peter Eisentraut wrote: >On 15.09.22 04:26, Andres Freund wrote: >> Attached is v13 of the meson patchset. The biggest changes are: > >Did something about warning flags change from the previous patch set? I see >it's building with -Wextra now, which c

Add common function ReplicationOriginName.

2022-09-18 Thread Peter Smith
Hi. There are already multiple places that are building the subscription origin name, and there are more coming with some new patches [1] doing the same: e.g. snprintf(originname, sizeof(originname), "pg_%u", subid); ~~ IMO it is better to encapsulate this name formatting in common code instead

Fix typos in code comments

2022-09-18 Thread houzj.f...@fujitsu.com
Hi, While working on some other patches, I found serval typos(duplicate words and incorrect function name reference) in the code comments. Here is a small patch to fix them. Best regards, Hou zhijie 0001-fix-typos.patch Description: 0001-fix-typos.patch

Re: Fix typos in code comments

2022-09-18 Thread Amit Kapila
On Mon, Sep 19, 2022 at 8:14 AM houzj.f...@fujitsu.com wrote: > > While working on some other patches, I found serval typos(duplicate words and > incorrect function name reference) in the code comments. Here is a small patch > to fix them. > Thanks, the patch looks good to me. I'll push this. --

Re: Fix typos in code comments

2022-09-18 Thread Zhang Mingli
Hi On Sep 19, 2022, 10:57 +0800, Amit Kapila , wrote: > On Mon, Sep 19, 2022 at 8:14 AM houzj.f...@fujitsu.com > wrote: > > > > While working on some other patches, I found serval typos(duplicate words > > and > > incorrect function name reference) in the code comments. Here is a small > > patch

Re: Tree-walker callbacks vs -Wdeprecated-non-prototype

2022-09-18 Thread Tom Lane
Thomas Munro writes: > On Mon, Sep 19, 2022 at 8:57 AM Tom Lane wrote: >> ... This is fairly annoying, in that it gives up the function >> type safety the C committee wants to impose on us; but I really think >> the data type safety that we're giving up in this version of the patch >> is a worse

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-18 Thread David Rowley
On Mon, 19 Sept 2022 at 15:04, Peter Geoghegan wrote: > The general structure of the patchset is now a little more worked out. > Although it's still not close to being commitable, it should give you > a better idea of the kind of structure that I'm aiming for. I think > that this should be broken

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-18 Thread Peter Geoghegan
On Sun, Sep 18, 2022 at 9:07 PM David Rowley wrote: > I'm slightly confused about "still not close to being commitable" > along with "this is now the sixth and final patch.". That seems to > imply that you're not planning to send any more patches but you don't > think this is commitable. I'm assu

Re: Tree-walker callbacks vs -Wdeprecated-non-prototype

2022-09-18 Thread Thomas Munro
On Mon, Sep 19, 2022 at 3:39 PM Tom Lane wrote: > Thomas Munro writes: > > On Mon, Sep 19, 2022 at 8:57 AM Tom Lane wrote: > >> ... This is fairly annoying, in that it gives up the function > >> type safety the C committee wants to impose on us; but I really think > >> the data type safety that

Re: Typo in xact.c

2022-09-18 Thread John Naylor
On Fri, Sep 16, 2022 at 10:51 AM John Naylor wrote: > > On Fri, Sep 16, 2022 at 10:11 AM Kyotaro Horiguchi > wrote: > > > > The patch seems to me covering all occurances of PG_PROC as PGPROC. > > +1 since this hinders grep-ability. Pushed this. > > I found several uses of PG_PROC as (pg_catalog

Re: Tree-walker callbacks vs -Wdeprecated-non-prototype

2022-09-18 Thread Tom Lane
Thomas Munro writes: > On Mon, Sep 19, 2022 at 3:39 PM Tom Lane wrote: >> I also note that our existing code in this area would break pretty >> thoroughly on such a machine, so this isn't making it worse. > Yeah, I don't expect it to be a practical problem on any real system > (that is, I don't

Re: Support for Rust

2022-09-18 Thread John Naylor
On Mon, Sep 12, 2022 at 10:29 PM Tom Lane wrote: > > Lev Kokotov writes: > > I took a small part of Postgres to get started, so just as a PoC; it > > compiles and runs though. Larger parts will take more work (deleting code, > > not just swapping object files), and more fancy things like PG_TRY()

Re: Query Jumbling for CALL and SET utility statements

2022-09-18 Thread Drouvot, Bertrand
Hi, On 9/16/22 5:47 PM, Drouvot, Bertrand wrote: Hi, On 9/16/22 2:53 PM, Fujii Masao wrote: Attached v5 to normalize 2PC commands too, so that we get things like: +    case T_VariableSetStmt: +    { +    VariableSetStmt *stmt = (VariableSetStmt *) node; + +

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

2022-09-18 Thread Peter Smith
FYI, I'm not sure why the cfbot hasn't reported this, but the apply v9 patch failed for me on HEAD as below: [postgres@CentOS7-x64 oss_postgres_misc]$ git apply ../patches_misc/HEAD_v9-0001-Fix-data-replicated-twice-when-specifying-publish.patch --verbose Checking patch src/backend/catalog/pg_publ