Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-11-09 Thread Andres Freund
On 2017-11-09 16:45:07 -0800, Peter Geoghegan wrote: > On Thu, Nov 9, 2017 at 4:17 PM, Andres Freund wrote: > >> Actually, on second thought, I take that back -- I don't think that > >> REINDEXing will even finish once a HOT chain is broken by the bug. > >>

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-11-09 Thread Andres Freund
- I don't think that > REINDEXing will even finish once a HOT chain is broken by the bug. > IndexBuildHeapScan() actually does quite a good job of making sure > that HOT chains are sane, which is how the enhanced amcheck notices > the bug here in practice. I think that&#x

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-11-09 Thread Andres Freund
On 2017-11-04 06:15:00 -0700, Andres Freund wrote: > The reason for that is that I hadn't yet quite figured out how the bug I > described in the commit message (and the previously committed testcase) > would cause that. I was planning to diagnose / experiment more with this > and

Re: [COMMITTERS] pgsql: Remove secondary checkpoint

2017-11-07 Thread Andres Freund
On 2017-11-07 14:12:19 -0500, Tom Lane wrote: > Andres Freund writes: > > On 2017-11-07 17:57:31 +, Simon Riggs wrote: > >> Remove secondary checkpoint > > > FWIW, I don't think this should be applied without a pg_resetxlog > > feature allowing to m

Re: [COMMITTERS] pgsql: Remove secondary checkpoint

2017-11-07 Thread Andres Freund
a pg_resetxlog feature allowing to manually use older checkpoints. Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-11-04 Thread Andres Freund
On 2017-11-04 06:15:00 -0700, Andres Freund wrote: > The current testcase, and I think the descriptions in the relevant > threads, all actually fail to point out the precise way the bug is > triggered. As e.g. evidenced that the freeze-the-dead case appears to > not cause any

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-11-04 Thread Andres Freund
On 2017-11-03 12:36:59 -0700, Peter Geoghegan wrote: > Andres Freund wrote: > > Here's that patch. I've stared at this some, and Robert did too. Robert > > mentioned that the commit message might need some polish and I'm not > > 100% sure about the erro

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-11-03 Thread Andres Freund
On November 4, 2017 1:22:04 AM GMT+05:30, Alvaro Herrera wrote: >Peter Geoghegan wrote: >> Andres Freund wrote: > >> > Staring at the vacuumlazy hunk I think I might have found a related >bug: >> > heap_update_tuple() just copies the old xmax to the new tupl

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-11-03 Thread Andres Freund
On 2017-11-02 06:05:51 -0700, Andres Freund wrote: > Hi, > > On 2017-11-02 13:49:47 +0100, Alvaro Herrera wrote: > > Andres Freund wrote: > > > I think the problem is on the pruning, rather than the freezing side. We > > > can't freeze a tuple if it

Re: [HACKERS] [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-11-02 Thread Andres Freund
Hi, On 2017-11-02 13:49:47 +0100, Alvaro Herrera wrote: > Andres Freund wrote: > > I think the problem is on the pruning, rather than the freezing side. We > > can't freeze a tuple if it has an alive predecessor - rather than > > weakining this, we should be fixing t

Re: [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple

2017-11-02 Thread Andres Freund
Hi, On 2017-09-28 14:47:53 +, Alvaro Herrera wrote: > Fix freezing of a dead HOT-updated tuple > > Vacuum calls page-level HOT prune to remove dead HOT tuples before doing > liveness checks (HeapTupleSatisfiesVacuum) on the remaining tuples. But > concurrent transaction commit/abort may turn

Re: [COMMITTERS] pgsql: Add pg_noinline macro to c.h.

2017-10-13 Thread Andres Freund
On 2017-10-13 18:32:08 -0400, Tom Lane wrote: > Andres Freund writes: > > Add pg_noinline macro to c.h. > > I think you want this to be parenthesized so that pgindent doesn't > go nuts when you use it. At least, that was the reason why > pg_attribute_noreturn() has pa

[COMMITTERS] pgsql: Improve sys/catcache performance.

2017-10-13 Thread Andres Freund
cheCopyN etc., but right now they don't show up in profiles. The reason the macro wrapper for syscache.c/h have to be changed, rather than just catcache, is that doing otherwise would require exposing the SysCache array to the outside. That might be a good idea anyway, but it's for anothe

[COMMITTERS] pgsql: Add pg_noinline macro to c.h.

2017-10-13 Thread Andres Freund
Add pg_noinline macro to c.h. Forcing a function not to be inlined can be useful if it's the slow-path of a performance critical function, or should be visible in profiles to allow for proper cost attribution. Author: Andres Freund Discussion: https://postgr.es/m/20170914061207.zxotvyop

[COMMITTERS] pgsql: Force "restrict" not to be used when compiling with xlc.

2017-10-13 Thread Andres Freund
files, and do so for aix/xlc. Author: Andres Freund and Tom Lane Discussion: https://postgr.es/m/1820.1507918...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d133982d598c7e6208d16cb4fc0b552151796603 Modified Files -- configure| 6

Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Andres Freund
"x$FORCE_DISABLE_RESTRICT" = "xyes"; > then > pg_restrict="" > else > pg_restrict="$ac_cv_c_restrict" Yea, that works. Will make it so. Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers

Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Andres Freund
GCC" != yes ; then block in a/src/template/linux. But that'd probably result in "macro redefined" warnings or somesuch. So it'd probably better to introduce a FORCE_DISABLE_RESTRICT=yes, set at the same place, that's then tested before running the relevant configure check?

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Andres Freund
t; From backend (#4)> 5 > From backend> I > To backend> Msg X > To backend> Msg complete, length 5 That's certainly quite weird. I can't immediately pinpoint where the bug is. I initially thought that the StringInfo's lengths might be wrong, but that doesn'tqutie seem to make sense. Looks a bit like there's just garbless mess in there... Will have another look when I don't have to force my eyes to stay open. Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Andres Freund
On 2017-10-12 19:35:36 -0700, Noah Misch wrote: > On Thu, Oct 12, 2017 at 04:08:44PM -0700, Andres Freund wrote: > > So we've two animals (hornet, sungazer) that are: > > #define SIZEOF_SIZE_T 8 > > #define WORDS_BIGENDIAN 1 > > #define restrict __restrict > >

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-12 Thread Andres Freund
On 2017-10-12 20:06:32 -0400, Tom Lane wrote: > Andres Freund writes: > >> fe-connect.c:2382:6: warning: implicit declaration of function > >> 'getpeereid' [-Wimplicit-function-declaration] > >> Looks like we're missing > >> #

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-12 Thread Andres Freund
On 2017-10-12 16:08:44 -0700, Andres Freund wrote: > wrap-gcc -D_THREAD_SAFE=1 -D_LARGE_FILES=1 -maix64 -Wall -Wmissing-prototypes > -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels > -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv > -fexce

[COMMITTERS] pgsql: Use C99 restrict via pg_restrict, rather than restrict directly.

2017-10-12 Thread Andres Freund
27;s usage of __declspec(restrict) in headers. Therefore define pg_restrict to the appropriate keyword instead, and replace existing usages. This replaces the temporary workaround introduced in 36b4b91ba078. Author: Andres Freund Discussion: https://postgr.es/m/2656.1507830...@sss.pgh.pa.us

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-12 Thread Andres Freund
On 2017-10-12 10:44:58 -0400, Tom Lane wrote: > Andres Freund writes: > > Improve performance of SendRowDescriptionMessage. > > One or another of these patches has broken buildfarm member hornet. > Apparently, it's transmitting incorrectly-formatted RowDescription >

Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-12 Thread Andres Freund
Hi, On 2017-10-12 11:03:34 -0700, Andres Freund wrote: > On 2017-10-12 13:55:07 -0400, Tom Lane wrote: > > Or, if you insist on having it, we're going to have to go the pg_restrict > > route. I don't see why that means duplicating any configure logic: on > > non-

Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-12 Thread Andres Freund
Hi, On 2017-10-12 13:55:07 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-10-12 11:30:00 -0400, Tom Lane wrote: > >> I don't actually see why you need a #define at all --- "restrict" is the > >> standard spelling of the keyword no? &g

Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-12 Thread Andres Freund
On 2017-10-12 11:30:00 -0400, Tom Lane wrote: > Andres Freund writes: > > I've temporarily silenced that error by moving the stdlib.h include > > before the definition of restrict, but that seems fairly fragile. I > > primarily wanted to see whether there's other pr

Re: [HACKERS] Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-11 Thread Andres Freund
On 2017-10-11 21:59:53 -0700, Andres Freund wrote: > That fixed that problem I think. But unfortunately since then another > problem has been reported by some other animals, all with older msvc > versions afaict (thrips - vs 2012, bowerbird - vs 2012). Correction, thrips is vs 2010,

Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-11 Thread Andres Freund
On 2017-10-11 17:13:20 -0700, Andres Freund wrote: > Hi, > > On 2017-10-11 23:11:15 +0000, Andres Freund wrote: > > Add configure infrastructure to detect support for C99's restrict. > > > > Will be used in later commits improving performance for a few key >

[COMMITTERS] pgsql: Replace remaining uses of pq_sendint with pq_sendint{8, 16, 32}.

2017-10-11 Thread Andres Freund
Replace remaining uses of pq_sendint with pq_sendint{8,16,32}. pq_sendint() remains, so extension code doesn't unnecessarily break. Author: Andres Freund Discussion: https://postgr.es/m/20170914063418.sckdzgjfrsbek...@alap3.anarazel.de Branch -- master Details ---

[COMMITTERS] pgsql: Temporary attempt at a workaround for further MSVC restrict buil

2017-10-11 Thread Andres Freund
Temporary attempt at a workaround for further MSVC restrict build failures. It appears some versions of msvc use __declspec(restrict) in stdlib.h and subsidiary headers. Including those after defining 'restrict' to '__restrict' doesn't work. Try to get the buildfarm green to see whether there's f

[COMMITTERS] pgsql: Work around overly strict restrict checks by MSVC.

2017-10-11 Thread Andres Freund
Work around overly strict restrict checks by MSVC. Apparently MSVC requires a * before a restrict in a variable declaration, even if the adorned type already is a pointer, just via typedef. As reported by buildfarm animal woodlouse. Author: Andres Freund Discussion: https://postgr.es/m

[COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-11 Thread Andres Freund
er to be big enough for all attributes and then using pq_write* avoids unnecessary buffer size checks & resizing. - Reusing a persistently allocated StringInfo for all SendRowDescriptionMessage() invocations avoids repeated allocations & reallocations. Author: Andres Freund Discu

Re: [COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-11 Thread Andres Freund
Hi, On 2017-10-11 23:11:15 +, Andres Freund wrote: > Add configure infrastructure to detect support for C99's restrict. > > Will be used in later commits improving performance for a few key > routines where information about aliasing allows for significantly > be

[COMMITTERS] pgsql: Use one stringbuffer for all rows printed in printtup.c.

2017-10-11 Thread Andres Freund
especially wide row. Author: Andres Freund Discussion: https://postgr.es/m/20170914063418.sckdzgjfrsbek...@alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f2dec34e19d3969ddd616e671fe9a7b968bec812 Modified Files -- src/backend/access/common

[COMMITTERS] pgsql: Add more efficient functions to pqformat API.

2017-10-11 Thread Andres Freund
. To allow this to be used for strings, expose mbutil.c's MAX_CONVERSION_GROWTH. Followup commits will make use of these facilities. Author: Andres Freund Discussion: https://postgr.es/m/20170914063418.sckdzgjfrsbek...@alap3.anarazel.de Branch -- master Details --- https

[COMMITTERS] pgsql: Allow to avoid NUL-byte management for stringinfos and use in fo

2017-10-11 Thread Andres Freund
eedup, but more importantly will be more consistent when providing faster variants of pq_sendint etc. Author: Andres Freund Discussion: https://postgr.es/m/20170914063418.sckdzgjfrsbek...@alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commi

[COMMITTERS] pgsql: Add configure infrastructure to detect support for C99's restric

2017-10-11 Thread Andres Freund
reaking C89, or for that matter C++, compilers. If not supported it's defined to be empty. Author: Andres Freund Discussion: https://postgr.es/m/20170914063418.sckdzgjfrsbek...@alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0b974dba2d6b5581ce42

[COMMITTERS] pgsql: Prevent idle in transaction session timeout from sometimes being

2017-10-11 Thread Andres Freund
Prevent idle in transaction session timeout from sometimes being ignored. The previous coding in ProcessInterrupts() could lead to idle_in_transaction_session_timeout being ignored, when statement_timeout occurred earlier. The problem was that ProcessInterrupts() would return before processing th

[COMMITTERS] pgsql: Prevent idle in transaction session timeout from sometimes being

2017-10-11 Thread Andres Freund
Prevent idle in transaction session timeout from sometimes being ignored. The previous coding in ProcessInterrupts() could lead to idle_in_transaction_session_timeout being ignored, when statement_timeout occurred earlier. The problem was that ProcessInterrupts() would return before processing th

[COMMITTERS] pgsql: Prevent idle in transaction session timeout from sometimes being

2017-10-11 Thread Andres Freund
Prevent idle in transaction session timeout from sometimes being ignored. The previous coding in ProcessInterrupts() could lead to idle_in_transaction_session_timeout being ignored, when statement_timeout occurred earlier. The problem was that ProcessInterrupts() would return before processing th

Re: [COMMITTERS] pgsql: Add port/strnlen support to libpq and ecpg Makefiles.

2017-10-11 Thread Andres Freund
Hi, On 2017-10-11 11:58:58 -0400, Tom Lane wrote: > Andres Freund writes: > > Phew. This is a bit a sad state of affairs. The separate libpq logic for > > getting pgport is presumably because of possibly different threading > > flags and then because of the appropriate comp

Re: [COMMITTERS] pgsql: Add port/strnlen support to libpq and ecpg Makefiles.

2017-10-11 Thread Andres Freund
-mt} or such. Formally speaking it's not quite right that we don't use threading aware flags in pgbench for example. Some gcc platforms at least pretty much assume everything is built with -pthread e.g. Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-commit

Re: [COMMITTERS] pgsql: Rewrite strnlen replacement implementation from 8a241792f96.

2017-10-10 Thread Andres Freund
On 2017-10-10 19:15:13 -0400, Tom Lane wrote: > Andres Freund writes: > > Rewrite strnlen replacement implementation from 8a241792f96. > > Hm, did you hand-edit the configure script and then forget to undo it? > Cause what was committed was not right. Yea, that was me te

Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementation of strlen.

2017-10-10 Thread Andres Freund
On 2017-10-10 18:10:15 -0400, Tom Lane wrote: > Andres Freund writes: > > Here's a fix. Not quite sure whether we really need the > > HAVE_DECL_STRNLEN test, added it for symmetry. > > LGTM. Thanks for checking. > I think the DECL test is a good idea; the system

[COMMITTERS] pgsql: Rewrite strnlen replacement implementation from 8a241792f96.

2017-10-10 Thread Andres Freund
pg_strnlen(). Fix stupid configure bug, executing the test only when compiled with threading support. Author: Andres Freund Discussion: https://postgr.es/m/e1e1gr2-0005fb...@gemulon.postgresql.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementation of strlen.

2017-10-10 Thread Andres Freund
On 2017-10-10 17:34:17 -0400, Andrew Dunstan wrote: > This test is governed by the test at line 946 of configure.in. You need > to move it somewhere else. Yea, sorry for the noise :(. Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) T

Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementation of strlen.

2017-10-10 Thread Andres Freund
On 2017-10-10 13:53:15 -0700, Andres Freund wrote: > On 2017-10-10 16:51:39 -0400, Tom Lane wrote: > > Andres Freund writes: > > > As far as I can tell it's still somehow using a configure from before > > > the last commits: > > > > No, it'

Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementation of strlen.

2017-10-10 Thread Andres Freund
On 2017-10-10 16:51:39 -0400, Tom Lane wrote: > Andres Freund writes: > > As far as I can tell it's still somehow using a configure from before > > the last commits: > > No, it's pilot error. The AC_CHECK_FUNCS call you added strnlen to > is only executed if &g

Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementation of strlen.

2017-10-10 Thread Andres Freund
On 2017-10-10 16:37:04 -0400, Tom Lane wrote: > Andres Freund writes: > > (there's definitely fixes to be made to where strnlen's replacement is > > located, but regardless, this needs to be fixed too) > > Given that strnlen is standardized by POSIX, and has be

Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementation of strlen.

2017-10-10 Thread Andres Freund
On 2017-10-09 23:33:36 -0400, Andrew Dunstan wrote: > > > On 10/09/2017 07:15 PM, Andres Freund wrote: > > Hi Andrew, > > > > On 2017-10-09 22:22:04 +, Andres Freund wrote: > >> Add pg_strnlen() a portable implementation of strlen. > >> >

Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementation of strlen.

2017-10-09 Thread Andres Freund
nce in how/when symbols are resolved. I think the current split between common and port isn't particularly meaningful. But as long as we have it, this probably belongs more in port than in common. Greetings, Andres Freund [1] https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=gha

Re: [COMMITTERS] pgsql: Add pg_strnlen() a portable implementation of strlen.

2017-10-09 Thread Andres Freund
Hi Andrew, On 2017-10-09 22:22:04 +, Andres Freund wrote: > Add pg_strnlen() a portable implementation of strlen. > > As the OS version is likely going to be more optimized, fall back to > it if available, as detected by configure. I'm a bit confused

[COMMITTERS] pgsql: Fix pnstrdup() to not memcpy() the maximum allowed length.

2017-10-09 Thread Andres Freund
Fix pnstrdup() to not memcpy() the maximum allowed length. The previous behaviour was dangerous if the length passed wasn't the size of the underlying buffer, but the maximum size of the underlying buffer. Author: Andres Freund Discussion: https://postgr.es/m/20161003215524.mwz5p45p

[COMMITTERS] pgsql: Add pg_strnlen() a portable implementation of strlen.

2017-10-09 Thread Andres Freund
Add pg_strnlen() a portable implementation of strlen. As the OS version is likely going to be more optimized, fall back to it if available, as detected by configure. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/8a241792f968ed5be6cf4d41e32c0d264f6c0c65 Modified F

[COMMITTERS] pgsql: Reduce memory usage of targetlist SRFs.

2017-10-08 Thread Andres Freund
27;ve been fewc omplaints that doesn't seem worth the risk so far. Reported-By: Lucas Fairchild Author: Andres Freund, per discussion with Tom Lane Discussion: https://postgr.es/m/4514.1507318...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.or

[COMMITTERS] pgsql: Msvc doesn't know UINT16_MAX, replace with PG_UINT16_MAX.

2017-10-04 Thread Andres Freund
Msvc doesn't know UINT16_MAX, replace with PG_UINT16_MAX. UINT16_MAX usage is originating from commit 212e6f34d55c. Per buildfarm animal currawong. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/9eafa2b5b043b84fb9846bd7a57d15ed1ee220c1 Modified Files

[COMMITTERS] pgsql: Attempt to adapt windows build for 212e6f34d55c.

2017-10-04 Thread Andres Freund
Attempt to adapt windows build for 212e6f34d55c. Per buildfarm animal baiji. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/15334ad19a776f76cbb725e4e9162a7bce1bd4d0 Modified Files -- src/tools/msvc/Solution.pm | 2 +- 1 file changed, 1 insertion(+), 1 d

[COMMITTERS] pgsql: Move genbki.pl's find_defined_symbol to Catalog.pm.

2017-10-04 Thread Andres Freund
Move genbki.pl's find_defined_symbol to Catalog.pm. Will be used in Gen_fmgrtab.pl in a followup commit. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/18f791ab2b6a01a632653d394e046f3daf193ff6 Modified Files -- src/backend/catalog/Catalog.pm | 35 +

[COMMITTERS] pgsql: Replace binary search in fmgr_isbuiltin with a lookup array.

2017-10-04 Thread Andres Freund
s the additional memory usage at a reasonable amount. Author: Andres Freund, with input from Tom Lane Discussion: https://postgr.es/m/20170914065128.a5sk7z4xde5uy...@alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/212e6f34d55c910505f87438d878698223d

[COMMITTERS] pgsql: Yet another pg_bswap typo in a windows only file.

2017-10-01 Thread Andres Freund
Yet another pg_bswap typo in a windows only file. Per buildfarm animal frogmouth. Brown-Paper-Bagged-By: Andres Freund Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0c8b3ee94478ca07c86c09d2399a2ce73c2b922b Modified Files -- src/port/getaddrinfo.c

[COMMITTERS] pgsql: Correct include file name in inet_aton fallback.

2017-10-01 Thread Andres Freund
Correct include file name in inet_aton fallback. Per buildfarm animal frogmouth. Author: Andres Freund Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/859759b62f2d2f2f2805e2aa9ebdb167a1b9655c Modified Files -- src/port/inet_aton.c | 2 +- 1 file

[COMMITTERS] pgsql: Replace most usages of ntoh[ls] and hton[sl] with pg_bswap.h.

2017-10-01 Thread Andres Freund
including those, the buildfarm will tell. Author: Andres Freund Discussion: https://postgr.es/m/20170927172019.gheidqy6xvlxb...@alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/0ba99c84e8c7138143059b281063d4cca5a2bfea Modified Files -- contrib/

[COMMITTERS] pgsql: Allow pg_ctl kill to send SIGKILL.

2017-10-01 Thread Andres Freund
dumps core, was already allowed. Author: Andres Freund Discussion: https://postgr.es/m/45d42d41-6145-9be1-7261-84acf6d9e...@2ndquadrant.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/2e83db3ad2da9b073af9ae12916f0b71cf698e1e Modified Files -- sr

[COMMITTERS] pgsql: Remove redundant stdint.h include.

2017-10-01 Thread Andres Freund
Remove redundant stdint.h include. Discussion: https://postgr.es/m/31674.1506788...@sss.pgh.pa.us Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1f2830f9df9f0196ba541c1e253463afe657cb67 Modified Files -- src/include/port/pg_bswap.h | 8 1 file

[COMMITTERS] pgsql: Try to make crash restart test work on windows.

2017-10-01 Thread Andres Freund
Try to make crash restart test work on windows. Author: Andres Freund Tested-By: Andrew Dunstan Discussion: https://postgr.es/m/20170930224424.ud5ilchmclbl5...@alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

Re: [COMMITTERS] pgsql: Add test for postmaster crash restarts.

2017-09-30 Thread Andres Freund
an > officially sanctioned footgun :-) Heh. I'm inclined to take it out. We could add a --use-the-force-luke type parameter, but it doesn't seem worth it. > Haven't tested on MSVC but with this patch it passes on jacana (mingw). Yay! Thanks for testing. Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers

Re: [COMMITTERS] pgsql: Add test for postmaster crash restarts.

2017-09-30 Thread Andres Freund
On 2017-09-30 15:27:12 -0700, Andres Freund wrote: > On 2017-09-30 18:21:33 -0400, Andrew Dunstan wrote: > > > > [re-adding commiters which I inadvertently left off] > > > > > > On 09/30/2017 06:10 PM, Andres Freund wrote: > > > > > > >

Re: [COMMITTERS] pgsql: Add test for postmaster crash restarts.

2017-09-30 Thread Andres Freund
On 2017-09-30 18:21:33 -0400, Andrew Dunstan wrote: > > [re-adding commiters which I inadvertently left off] > > > On 09/30/2017 06:10 PM, Andres Freund wrote: > > > > > >> I was just looking at this. Why aren't we using "pg_ctl kill" t

Re: [COMMITTERS] pgsql: Extend & revamp pg_bswap.h infrastructure.

2017-09-30 Thread Andres Freund
On 2017-09-30 12:17:06 -0400, Tom Lane wrote: > Andres Freund writes: > > Extend & revamp pg_bswap.h infrastructure. > > Hm, what is the point of this in pg_bswap.h: > > +#ifdef _MSC_VER > +#include > +#endif > > c.h will already have included . Ther

[COMMITTERS] pgsql: Fix copy & pasto in 510b8cbff15f.

2017-09-29 Thread Andres Freund
Fix copy & pasto in 510b8cbff15f. Reported-By: Peter Geoghegan Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/248e33756b425335d94a32ffc8e9aace04f82c31 Modified Files -- src/include/port/pg_bswap.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-

Re: [COMMITTERS] pgsql: Extend & revamp pg_bswap.h infrastructure.

2017-09-29 Thread Andres Freund
On 2017-09-29 17:33:51 -0700, Peter Geoghegan wrote: > On Fri, Sep 29, 2017 at 5:29 PM, Andres Freund wrote: > > Extend & revamp pg_bswap.h infrastructure. > > This looks wrong: > > +static inline uint16 > +pg_bswap64(uint16 x) > +{ Yea, just noticed that :(. Run

[COMMITTERS] pgsql: Fix typo.

2017-09-29 Thread Andres Freund
Fix typo. Reported-By: Thomas Munro and Jesper Pedersen Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f14241236ea2e306dc665635665c7f88669b6ca4 Modified Files -- src/include/utils/hashutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- S

[COMMITTERS] pgsql: Extend & revamp pg_bswap.h infrastructure.

2017-09-29 Thread Andres Freund
e is changed to pg_bswap16/32/64. Author: Andres Freund Discussion: https://postgr.es/m/20170927172019.gheidqy6xvlxb...@alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/510b8cbff15fcece246f66f2273ccf830a6c7e98 Modified Files -- conf

Re: [COMMITTERS] pgsql: Remove pgbench "progress" test pending solution of its timing is

2017-09-23 Thread Andres Freund
t run even when postgres doesn't, it is a little bit hard as > a starting assumption for a benchmarking tool:-( I'm unsure what the point of this is. It's not like we discussing removing pgbench, we're talking about an unreliable test. Greetings, Andres Freund

[COMMITTERS] pgsql: Add inline murmurhash32(uint32) function.

2017-09-22 Thread Andres Freund
Add inline murmurhash32(uint32) function. The function already existed in tidbitmap.c but more users requiring fast hashing of 32bit ints are coming up. Author: Andres Freund Discussion: https://postgr.es/m/20170914061207.zxotvyopetm7l...@alap3.anarazel.de Branch -- master Details

[COMMITTERS] pgsql: Fix s/intidb/initdb/ typo.

2017-09-22 Thread Andres Freund
Fix s/intidb/initdb/ typo. Reported-By: Michael Paquier Discussion: https://postgr.es/m/CAB7nPqTfaKAYZ4wuUM-W8kc4VnXrxX1=5-a9i==vouptmfp...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f9583e86b4bfa8c4e4d83ab33e5dcdaeab5c45a1 Modified Files -

[COMMITTERS] pgsql: Expand expected output for recovery test even further.

2017-09-22 Thread Andres Freund
Expand expected output for recovery test even further. I'd assumed that the backend being killed should be able to get out an error message - but it turns out it's not guaranteed that it's not still sending a ready-for-query. Really need to do something about getting these error message to the cl

Re: [COMMITTERS] pgsql: Accept that server might not be able to send error in crash reco

2017-09-22 Thread Andres Freund
On 2017-09-22 13:30:14 -0400, Tom Lane wrote: > Andres Freund writes: > > Accept that server might not be able to send error in crash recovery test. > > piculet says you didn't cover all the bases: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=piculet&am

[COMMITTERS] pgsql: Make WAL segment size configurable at initdb time.

2017-09-19 Thread Andres Freund
, editorialized by Andres Freund Reviewed-By: Andres Freund, David Steele, Kuntal Ghosh, Michael Paquier, Peter Eisentraut, Robert Hass, Tushar Ahuja Discussion: https://postgr.es/m/caog9apeacq--1iekbhfzxsqpw_ylmepaa4hndny5+zulpt8...@mail.gmail.com Branch -- master Details --- https

[COMMITTERS] pgsql: Accept that server might not be able to send error in crash reco

2017-09-19 Thread Andres Freund
Accept that server might not be able to send error in crash recovery test. As it turns out we can't rely that the script's monitoring session is terminated with a proper error by the server, because the session might be terminated while already trying to send data. Also improve robustness and err

Re: [HACKERS] Re: [COMMITTERS] pgsql: Make new crash restart test a bit more robust.

2017-09-19 Thread Andres Freund
On 2017-09-19 19:00:38 -0700, Andres Freund wrote: > Given this fact pattern, I'll allow the case without a received error > message in the recovery test. Objections? Hearing none. Pushed. While debugging this, I've also introduced a pump wrapper so that we now get: ok 4 - exa

Re: [COMMITTERS] pgsql: Make new crash restart test a bit more robust.

2017-09-19 Thread Andres Freund
On 2017-09-19 18:06:29 -0700, Andres Freund wrote: > On 2017-09-19 16:46:58 -0400, Tom Lane wrote: > > Have we forgotten an fflush() or something? > > After hacking a fix for my previous theory, I started adding strace into > the mix, to verify this. Takes longer to reproduce, b

Re: [COMMITTERS] pgsql: Make new crash restart test a bit more robust.

2017-09-19 Thread Andres Freund
On 2017-09-19 16:46:58 -0400, Tom Lane wrote: > Andres Freund writes: > > So this is geniuinely interesting. When the machine is really loaded (as > > in 6 animals running on a vm at the same time, incuding valgrind), psql > > sometimes doesn't get the WARNING message f

[COMMITTERS] pgsql: s/NULL byte/NUL byte/ in comment refering to C string terminator

2017-09-19 Thread Andres Freund
s/NULL byte/NUL byte/ in comment refering to C string terminator. Reported-By: Robert Haas Discussion: https://postgr.es/m/CA+Tgmoa+YBvWgFST2NVoeXjVSohEpK=vqnvcsockhtvvxfl...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/896537f078ba4d709ce754ecaff

Re: [COMMITTERS] pgsql: Make new crash restart test a bit more robust.

2017-09-19 Thread Andres Freund
On 2017-09-19 13:53:18 -0700, Andres Freund wrote: > On 2017-09-19 16:46:58 -0400, Tom Lane wrote: > > Have we forgotten an fflush() or something? > > > > Also, maybe problem is on client side. I vaguely recall a libpq bug > > wherein it would complain about socket EO

[COMMITTERS] pgsql: Avoid use of non-portable strnlen() in pgstat_clip_activity().

2017-09-19 Thread Andres Freund
Avoid use of non-portable strnlen() in pgstat_clip_activity(). The use of strnlen rather than strlen was just paranoia. Instead of giving up on the paranoia, just implement the safeguard differently. And add a comment explaining why we're careful. Author: Andres Freund Discussion:

Re: [COMMITTERS] pgsql: Speedup pgstat_report_activity by moving mb-aware truncation to

2017-09-19 Thread Andres Freund
On 2017-09-19 16:53:09 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2017-09-19 16:25:31 -0400, Tom Lane wrote: > >> Looks like you're going to need to not depend on strnlen(). > > > Yup noticed - we have pg_strnlen as a static function in > > src/p

Re: [COMMITTERS] pgsql: Make new crash restart test a bit more robust.

2017-09-19 Thread Andres Freund
On 2017-09-19 16:46:58 -0400, Tom Lane wrote: > Andres Freund writes: > > So this is geniuinely interesting. When the machine is really loaded (as > > in 6 animals running on a vm at the same time, incuding valgrind), psql > > sometimes doesn't get the WARNING message f

Re: [COMMITTERS] pgsql: Speedup pgstat_report_activity by moving mb-aware truncation to

2017-09-19 Thread Andres Freund
On 2017-09-19 16:25:31 -0400, Tom Lane wrote: > Andres Freund writes: > > Speedup pgstat_report_activity by moving mb-aware truncation to read side. > > Looks like you're going to need to not depend on strnlen(). Yup noticed - we have pg_strnlen as a static function in sr

Re: [COMMITTERS] pgsql: Make new crash restart test a bit more robust.

2017-09-19 Thread Andres Freund
On 2017-09-19 15:24:49 -0400, Tom Lane wrote: > Andres Freund writes: > > Checkining on calliphoridae why that's not sufficient - the machine's > > busy, so the build & test will take a bit. > > FWIW, prairiedog got through the recovery tests this time --- run&

[COMMITTERS] pgsql: Speedup pgstat_report_activity by moving mb-aware truncation to

2017-09-19 Thread Andres Freund
to be adjusted to use pgstat_clip_activity(). Author: Andres Freund Tested-By: Khuntal Ghosh Reviewed-By: Robert Haas, Tom Lane Discussion: https://postgr.es/m/20170912071948.pa7igbpkkkvie...@alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commi

Re: [COMMITTERS] pgsql: Make new crash restart test a bit more robust.

2017-09-19 Thread Andres Freund
On 2017-09-19 17:40:20 +, Andres Freund wrote: > Make new crash restart test a bit more robust. > > Add timeouts in case psql doesn't deliver the expected output, and try > to cause the monitoring psql to be fully connected to a backend. This > isn't necessarily

Re: [COMMITTERS] pgsql: Add test for postmaster crash restarts.

2017-09-19 Thread Andres Freund
On 2017-09-19 09:58:26 -0700, Andres Freund wrote: > > > On September 19, 2017 9:53:28 AM PDT, Tom Lane wrote: > >Well, please fix it ASAP, if you don't want to take it out pending > >the fixes. > > Will as soon as I finished my morning coffee. Uncaffeina

[COMMITTERS] pgsql: Make new crash restart test a bit more robust.

2017-09-19 Thread Andres Freund
arm owners. Author: Andres Freund Reported-By: Tom Lane, BF animals prairiedog and calliphoridae Discussion: https://postgr.es/m/e1du6zt-00043i...@gemulon.postgresql.org Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1910353675bd149e1020b29c0fae02538fc358cd Modi

Re: [COMMITTERS] pgsql: Add test for postmaster crash restarts.

2017-09-19 Thread Andres Freund
On September 19, 2017 9:53:28 AM PDT, Tom Lane wrote: >Well, please fix it ASAP, if you don't want to take it out pending >the fixes. Will as soon as I finished my morning coffee. Uncaffeinated, which my phone fittingly autocorrects to unvaccinated, commits aren't a good idea. Andres -- Sent

Re: [COMMITTERS] pgsql: Add test for postmaster crash restarts.

2017-09-19 Thread Andres Freund
dfarm IMO --- > we hackers crash the system plenty often enough to notice problems > there. I for one don't exercise that kind of crash restarts, my development scripts all work with restart_after_crash = false. What I find more concerning however is coverage of EXEC_BACKEND, which

Re: [COMMITTERS] pgsql: Add test for postmaster crash restarts.

2017-09-18 Thread Andres Freund
On September 18, 2017 8:55:35 PM PDT, Tom Lane wrote: >Andres Freund writes: >> Add test for postmaster crash restarts. > >Hm, calliphoridae doesn't like this. Yea. Not clear to me why yet. The machine ran a number of instances with nearly the same config successfully

[COMMITTERS] pgsql: Rearm statement_timeout after each executed query.

2017-09-18 Thread Andres Freund
to both is fairly expensive for the common parse / bind / execute sequence. Author: Tatsuo Ishii, editorialized by Andres Freund Reviewed-By: Takayuki Tsunakawa, Andres Freund Discussion: https://postgr.es/m/20170222.115044.1665674502985097185.t-is...@sraoss.co.jp Branch -- master Details ---

[COMMITTERS] pgsql: Fix uninitialized variable in dshash.c.

2017-09-18 Thread Andres Freund
Fix uninitialized variable in dshash.c. A bugfix for commit 8c0d7bafad36434cb08ac2c78e69ae72c194ca20. The code would have crashed if hashtable->size_log2 ever had the same value as hashtable->control->size_log2 by coincidence. Per Valgrind. Author: Thomas Munro Reported-By: Tomas Vondra Discuss

[COMMITTERS] pgsql: Add test for postmaster crash restarts.

2017-09-18 Thread Andres Freund
Add test for postmaster crash restarts. Given that I managed to break this... We probably should extend the tests to also cover other sub-processes dying, but that's something for later. Author: Andres Freund Discussion: https://postgr.es/m/20170917080752.rcmihzfmgbeuq...@alap3.anaraz

  1   2   3   4   5   6   7   8   9   10   >