Re: Postgres Windows build system doesn't work with python installed in Program Files

2020-05-03 Thread Michael Paquier
On Sun, May 03, 2020 at 04:23:24PM -0300, Ranier Vilela wrote: > I don't know if it applies to the same case, but from the moment I > installed python on the development machine, the Postgres build stopped > working correctly. > Although perl, flex and bison are available in the path, the build doe

Re: Rotten parts of src/backend/replication/README

2020-05-03 Thread Michael Paquier
On Sat, May 02, 2020 at 04:54:32PM +0530, Amit Kapila wrote: > I think in README we can have a general description of the module and > maybe at the broad level how different APIs can help to achieve the > required functionality and then for API description we can refer to > .h/.c. The detailed des

Re: WAL usage calculation patch

2020-05-03 Thread Amit Kapila
On Thu, Apr 30, 2020 at 2:19 PM Julien Rouhaud wrote: > > Here's the patch. I included the content of > v3-fix_explain_wal_output.patch you provided before, and tried to > consistently replace full page writes/fpw to full page images/fpi > everywhere on top of it (so documentation, command output

Re: Should program exit, When close() failed for O_RDONLY mode

2020-05-03 Thread Michael Paquier
On Sun, May 03, 2020 at 10:18:27AM -0700, Noah Misch wrote: > I would not say that. If close() does fail, something is badly wrong in the > program or the system running it. Though I opt not to check the return value, > if one does check it, exiting is a suitable response. FWIW, it seems to me t

Re: [REPORT] Static analys warnings

2020-05-03 Thread Andres Freund
On 2020-05-03 17:05:54 -0300, Ranier Vilela wrote: > 1. Warning: the right operand to | always evaluates to 0 > > src/include/storage/bufpage.h > #define PAI_OVERWRITE (1 << 0) > #define PAI_IS_HEAP (1 << 1) > > #define PageAddItem(page, item, size, offsetNumber, overwrite, is_heap) \ > PageAddI

[REPORT] Static analys warnings

2020-05-03 Thread Ranier Vilela
1. Warning: the right operand to | always evaluates to 0 src/include/storage/bufpage.h #define PAI_OVERWRITE (1 << 0) #define PAI_IS_HEAP (1 << 1) #define PageAddItem(page, item, size, offsetNumber, overwrite, is_heap) \ PageAddItemExtended(page, item, size, offsetNumber, \ ((overwrite) ? PAI_OV

Re: Postgres Windows build system doesn't work with python installed in Program Files

2020-05-03 Thread Ranier Vilela
Em qui., 30 de abr. de 2020 às 09:06, Victor Wagner escreveu: > > Collegues, > > Accidently I've come over minor bug in the Mkvcbuild.pm. > It happens, that it doesn't tolerate spaces in the $config->{python} > path, because it want to call python in order to find out version, > prefix and so on,

Re: design for parallel backup

2020-05-03 Thread Andres Freund
Hi, On 2020-05-03 09:12:59 -0400, Robert Haas wrote: > On Sat, May 2, 2020 at 10:36 PM Andres Freund wrote: > > I changed Robert's test program to optionall fallocate, > > sync_file_range(WRITE), posix_fadvise(DONTNEED), to avoid a large > > footprint in the page cache. The performance > > differ

Re: Should program exit, When close() failed for O_RDONLY mode

2020-05-03 Thread Noah Misch
On Tue, Apr 14, 2020 at 02:32:40AM +, Lin, Cuiping wrote: > I find that most of the code does not check the return value of close(), > When open a file for reading(O_RDONLY). > > But I find that it checks the return value of close() in code > "src/bin/pg_rewind/copy_fetch.c" When open a f

Re: design for parallel backup

2020-05-03 Thread Robert Haas
On Sat, May 2, 2020 at 10:36 PM Andres Freund wrote: > I changed Robert's test program to optionall fallocate, > sync_file_range(WRITE), posix_fadvise(DONTNEED), to avoid a large > footprint in the page cache. The performance > differences are quite substantial: > > gcc -Wall -ggdb ~/tmp/write_and