Re: [COMMITTERS] pgsql: Allow to trigger kernel writeback after a configurable number of

2016-03-12 Thread Tom Lane
Andres Freund writes: > This broke gaur: > http://pgbuildfarm.org/cgi-bin/show_log.pl?nm=gaur&dt=2016-03-12%2005%3A44%3A25 > I'm planning to add a #ifndef MAP_FAILED #define MAP_FAILED ((void*) > (-1)). We already have that in portability/mem.h. Did you add a use of the symbol someplace that doe

[COMMITTERS] pgsql: Re-export a few of createplan.c's make_xxx() functions.

2016-03-12 Thread Tom Lane
Re-export a few of createplan.c's make_xxx() functions. CitusDB is using these and don't wish to redesign their code right now. I am not on board with this being a good idea, or a good precedent, but I lack the energy to fight about it. Branch -- master Details --- http://git.postgresql.

[COMMITTERS] pgsql: Include portability/mem.h into fd.c for MAP_FAILED.

2016-03-12 Thread Andres Freund
Include portability/mem.h into fd.c for MAP_FAILED. Buildfarm members gaur and pademelon are old enough not to know about MAP_FAILED; which is used in 428b1d6. Include portability/mem.h to fix; as already done in a bunch of other places. Branch -- master Details --- http://git.postgresql

[COMMITTERS] pgsql: Widen query numbers-of-tuples-processed counters to uint64.

2016-03-12 Thread Tom Lane
Widen query numbers-of-tuples-processed counters to uint64. This patch widens SPI_processed, EState's es_processed field, PortalData's portalPos field, FuncCallContext's call_cntr and max_calls fields, ExecutorRun's count argument, PortalRunFetch's result, and the max number of rows in a SPITupleT

Re: [COMMITTERS] pgsql: Widen query numbers-of-tuples-processed counters to uint64.

2016-03-12 Thread Andres Freund
On March 12, 2016 1:05:46 PM PST, Tom Lane wrote: >Most values associated with FETCH/MOVE distances, such as PortalRun's >count >argument and the count argument of most SPI functions that have one, >remain >declared as "long". It's not clear whether it would be worth promoting >those to int64;

[COMMITTERS] pgsql: Get rid of scribbling on a const variable in psql's print.c.

2016-03-12 Thread Tom Lane
Get rid of scribbling on a const variable in psql's print.c. Commit a2dabf0e1dda93c8 had the bright idea that it could modify a "const" global variable if it merely casted away const from a pointer. This does not work on platforms where the compiler puts "const" variables into read-only storage.

[COMMITTERS] pgsql: Get rid of scribbling on a const variable in psql's print.c.

2016-03-12 Thread Tom Lane
Get rid of scribbling on a const variable in psql's print.c. Commit a2dabf0e1dda93c8 had the bright idea that it could modify a "const" global variable if it merely casted away const from a pointer. This does not work on platforms where the compiler puts "const" variables into read-only storage.

Re: [COMMITTERS] pgsql: Widen query numbers-of-tuples-processed counters to uint64.

2016-03-12 Thread Tom Lane
Andres Freund writes: > On March 12, 2016 1:05:46 PM PST, Tom Lane wrote: >> Most values associated with FETCH/MOVE distances, such as PortalRun's >> count argument and the count argument of most SPI functions that have >> one, remain declared as "long". It's not clear whether it would be >> wor

[COMMITTERS] pgsql: Fix Windows portability issue in 23a27b039d94ba35.

2016-03-12 Thread Tom Lane
Fix Windows portability issue in 23a27b039d94ba35. _strtoui64() is available in MSVC builds, but apparently not with other Windows toolchains. Thanks to Petr Jelinek for the diagnosis. Branch -- master Details --- http://git.postgresql.org/pg/commitdiff/ab737f6ba9fc0a26d32a95b115d5cd0e2

[COMMITTERS] pgsql: Report memory context stats upon out-of-memory in repalloc[_huge

2016-03-12 Thread Tom Lane
Report memory context stats upon out-of-memory in repalloc[_huge]. This longstanding functionality evidently got lost in commit 3d6d1b585524aab6. Noted while studying an OOM report from Jaime Casanova. Backpatch to 9.5 where the bug was introduced. Branch -- master Details --- http://g

[COMMITTERS] pgsql: Report memory context stats upon out-of-memory in repalloc[_huge

2016-03-12 Thread Tom Lane
Report memory context stats upon out-of-memory in repalloc[_huge]. This longstanding functionality evidently got lost in commit 3d6d1b585524aab6. Noted while studying an OOM report from Jaime Casanova. Backpatch to 9.5 where the bug was introduced. Branch -- REL9_5_STABLE Details --- h