Re: [COMMITTERS] pgsql: Revert the behavior of inet/cidr functions to not unpack the arg

2011-12-12 Thread Andres Freund
Hi, On Monday, December 12, 2011 09:29:23 AM Heikki Linnakangas wrote: > Revert the behavior of inet/cidr functions to not unpack the arguments. Whats the plan to handle this wrt a stable release? We had one more report of this on irc and I got two calls from clients already. And I don't have tha

Re: [COMMITTERS] pgsql: Revert the behavior of inet/cidr functions to not unpack the arg

2011-12-12 Thread Andres Freund
On Monday, December 12, 2011 07:48:01 PM Tom Lane wrote: > Andres Freund writes: > > On Monday, December 12, 2011 09:29:23 AM Heikki Linnakangas wrote: > >> Revert the behavior of inet/cidr functions to not unpack the arguments. > > > > Whats the plan to handle thi

Re: [COMMITTERS] pgsql: Dramatically reduce System V shared memory consumption.

2012-06-29 Thread Andres Freund
that you use size in the mmap... Andres -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscript

Re: [COMMITTERS] pgsql: Provide some static-assertion functionality on all compilers.

2012-10-16 Thread Andres Freund
wile to add the __LINE__ hackery to the existing fallback for StaticAssertStmt? Greetings, Andres -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-committers mailing list (pgsql-committ

Re: [COMMITTERS] pgsql: Provide some static-assertion functionality on all compilers.

2012-10-19 Thread Andres Freund
On Tuesday, October 16, 2012 11:50:48 PM Tom Lane wrote: > Andres Freund writes: > > On Monday, October 01, 2012 04:46:41 AM Tom Lane wrote: > >> Provide some static-assertion functionality on all compilers. > > > > The current method used here doesn't

Re: [COMMITTERS] pgsql: Must not reach consistency before XLOG_BACKUP_RECORD

2012-12-05 Thread Andres Freund
its certainly not relevant for the release process. Greetings, Andres -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- 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: Adjust many backend functions to return OID rather than void.

2012-12-24 Thread Andres Freund
you're around > please fix or revoke, if you're not, I'll do that. There were some more of the same thing youve fixed, see the attached patch that fixes the rest, at least as far as I can see when compiling HEAD here. Greetings, Andres Freund -- Andres Freund

Re: [COMMITTERS] pgsql: Make pg_dump exclude unlogged table data on hot standby slaves

2013-01-25 Thread Andres Freund
On 2013-01-25 08:49:10 +, Magnus Hagander wrote: > Make pg_dump exclude unlogged table data on hot standby slaves This missed the fact that there is no ExecuteSqlQueryForSingleRow and surroundign infrastructure. Fix attached. Greetings, Andres Freund -- Andres Fre

Re: [COMMITTERS] pgsql: Make pg_dump exclude unlogged table data on hot standby slaves

2013-01-25 Thread Andres Freund
On 2013-01-25 13:56:11 +0100, Magnus Hagander wrote: > On Fri, Jan 25, 2013 at 1:31 PM, Andres Freund wrote: > > On 2013-01-25 08:49:10 +, Magnus Hagander wrote: > >> Make pg_dump exclude unlogged table data on hot standby slaves > > > > This mi

Re: [COMMITTERS] pgsql: Fill tuple before HeapSatisfiesHOTAndKeyUpdate

2013-02-01 Thread Andres Freund
; > seldom (never?) indexed. > > > > Report and patch from Andres Freund. > > Was this a new bug in 9.3? Yes, it got introduced in the fklocks patch. The 'tableoid' part is present before that, but I can't see a usecase in indexing that column, so I think not backp

Re: [COMMITTERS] pgsql: Move Assert() definitions to c.h

2013-02-01 Thread Andres Freund
ifndef USE_ASSERT_CHECKING definition of #define Assert(condition) into #define Assert(condition) ((void)true) That makes for fewer warnings on some pedantic compiler modes and is in line with C's assert() IIRC. Greetings, Andres Freund -- Andres Freund http://www.2ndQ

Re: [COMMITTERS] pgsql: Add noreturn attributes to some error reporting functions

2013-02-12 Thread Andres Freund
gic incatation is transparently. And perhaps other compilers in the future. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-committers mailing list (pgsql-com

Re: [COMMITTERS] pgsql: Blind attempt at fixing the non-MSVC Windows builds

2013-02-22 Thread Andres Freund
On 2013-02-22 12:34:19 -0300, Alvaro Herrera wrote: > Andres Freund wrote: > > On 2013-02-22 14:55:06 +, Alvaro Herrera wrote: > > > Blind attempt at fixing the non-MSVC Windows builds > > > > > > Apparently, they need -DBUILDING_DLL for the Assert()

Re: [COMMITTERS] pgsql: Blind attempt at fixing the non-MSVC Windows builds

2013-02-28 Thread Andres Freund
PGDLLIMPORT bool assert_enabled; is one. So that seems like the appropriate fix. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-committers mailing list (pgsql-committer

Re: [COMMITTERS] pgsql: Avoid tricky race condition recording XLOG_HINT

2013-04-08 Thread Andres Freund
reviously didn't exist. XLOG_PAGE_MAGIC space looks so much more sparse than catversion's ;) Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-committers mailing

Re: [COMMITTERS] pgsql: Reorder 9.3 release note items

2013-04-21 Thread Andres Freund
gt; did you have new text. We do mention bug fixes. I changed "Correct" to > "Fix" in a later commit. But we usually don't if they have been fixed in a previous point release in the back branches, right? Greetings, Andres Freund -- Andres Freund

Re: [COMMITTERS] pgsql: Reorder 9.3 release note items

2013-04-21 Thread Andres Freund
rera) ... configurable via shared_preload_libraries * Split out WAL reading as an independent facility Should mention Heikki as primary author instead of me. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Traini

Re: [COMMITTERS] pgsql: Reorder 9.3 release note items

2013-04-22 Thread Andres Freund
; > Improve performance of streaming replication log shipping and > > > standby promotion (Andres Freund, Simon Riggs) > > > > Um, it's hard to see how that text relates to what I requested. > > > > It's an important thing for High Ava

Re: [COMMITTERS] pgsql: pg_test_fsync: update output to show usecs/op clearer

2013-05-02 Thread Andres Freund
number of people who would need it. > > That would be cool, but I don't think we can assume everyone running > these tools is on a UTF8-enabled terminal. I don't care about the symbol here, but I think psql has code to determine that for its line drawing stuff... Greetings, Andres

Re: [COMMITTERS] pgsql: Permit super-MaxAllocSize allocations with MemoryContextAllocHug

2013-07-02 Thread Andres Freund
As is, that code will probably be optimized away which isn't good... Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-committers mailing list (pgsql-committers@postg

Re: [COMMITTERS] pgsql: Allow background workers to be started dynamically.

2013-07-19 Thread Andres Freund
#x27;s just no point in releasing 9.3 when we already know which trivial but breaking change will be required for 9.4 Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-commi

Re: [COMMITTERS] pgsql: Stamp 9.3.0.

2013-09-09 Thread Andres Freund
Hi, On 2013-09-02 20:54:06 +, Tom Lane wrote: > Stamp 9.3.0. > > Branch > -- > REL9_3_STABLE 9.3.0 seems to be officially released now, but there's no 9.3.0 tag yet... Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ Po

Re: [COMMITTERS] pgsql: Use a new hstore extension version for added json functions.

2013-09-30 Thread Andres Freund
deletions(-) The join to pg_depend is underspecified because it doesn't restrict classid, just refclassid. That might lead to problems if extensions depend on each others and such. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Devel

Re: [COMMITTERS] pgsql: Add WaitForLockers in lmgr, refactoring index.c code

2013-10-01 Thread Andres Freund
Hi, On 2013-10-01 21:00:43 +, Alvaro Herrera wrote: > Add WaitForLockers in lmgr, refactoring index.c code > > This is in support of a future REINDEX CONCURRENTLY feature. I think this removes too many comments from index_drop that explains why it's done that way. Greetings,

Re: [COMMITTERS] pgsql: Speed up CREATE DATABASE by deferring the fsyncs until after

2010-02-21 Thread Andres Freund
id spamming the > cache. > > Tests show a big speedup on Linux at least on some filesystems. > > Idea and patch from Andres Freund. I just found a relatively big problem with one of your modifications on the patch - you removed the FreeDir(xldir); xldir = AllocateDir(fromdir); pa

Re: [COMMITTERS] pgsql: Fix another join removal bug: the check on PlaceHolderVars was w

2010-09-26 Thread Andres Freund
On Sunday 26 September 2010 02:29:16 David Fetter wrote: > On Sat, Sep 25, 2010 at 11:04:28PM +, Tom Lane wrote: > > Fix another join removal bug: the check on PlaceHolderVars was > > wrong. > > > > The previous coding would decide that join removal was unsafe upon > > finding a PlaceHolderVar

Re: [COMMITTERS] pgsql: Add new SQL function, format(text).

2010-11-21 Thread Andres Freund
On Sunday 21 November 2010 04:34:37 Robert Haas wrote: > Add new SQL function, format(text). > > Currently, three conversion format specifiers are supported: %s for a > string, %L for an SQL literal, and %I for an SQL identifier. The latter > two are deliberately designed not to overlap with what

[COMMITTERS] pgsql: Fix possibility of creating a "phantom" segment after promotion.

2017-06-21 Thread Andres Freund
ileSegment() from causing harm, but just after promotion there's no previous segment on the new timeline. Fix that by using XLByteToSeg() instead of XLByteToPrevSeg(). Author: Andres Freund Reported-By: Greg Burek Discussion: https://postgr.es/m/20170619073026.zcwpe6mydsaz5...@alap3.anarazel

[COMMITTERS] pgsql: Fix possibility of creating a "phantom" segment after promotion.

2017-06-21 Thread Andres Freund
ileSegment() from causing harm, but just after promotion there's no previous segment on the new timeline. Fix that by using XLByteToSeg() instead of XLByteToPrevSeg(). Author: Andres Freund Reported-By: Greg Burek Discussion: https://postgr.es/m/20170619073026.zcwpe6mydsaz5...@alap3.anarazel

[COMMITTERS] pgsql: Fix possibility of creating a "phantom" segment after promotion.

2017-06-21 Thread Andres Freund
ileSegment() from causing harm, but just after promotion there's no previous segment on the new timeline. Fix that by using XLByteToSeg() instead of XLByteToPrevSeg(). Author: Andres Freund Reported-By: Greg Burek Discussion: https://postgr.es/m/20170619073026.zcwpe6mydsaz5...@alap3.anarazel

[COMMITTERS] pgsql: Fix possibility of creating a "phantom" segment after promotion.

2017-06-21 Thread Andres Freund
ileSegment() from causing harm, but just after promotion there's no previous segment on the new timeline. Fix that by using XLByteToSeg() instead of XLByteToPrevSeg(). Author: Andres Freund Reported-By: Greg Burek Discussion: https://postgr.es/m/20170619073026.zcwpe6mydsaz5...@alap3.anarazel

[COMMITTERS] pgsql: Fix possibility of creating a "phantom" segment after promotion.

2017-06-21 Thread Andres Freund
ileSegment() from causing harm, but just after promotion there's no previous segment on the new timeline. Fix that by using XLByteToSeg() instead of XLByteToPrevSeg(). Author: Andres Freund Reported-By: Greg Burek Discussion: https://postgr.es/m/20170619073026.zcwpe6mydsaz5...@alap3.anarazel

[COMMITTERS] pgsql: Fix possibility of creating a "phantom" segment after promotion.

2017-06-21 Thread Andres Freund
ileSegment() from causing harm, but just after promotion there's no previous segment on the new timeline. Fix that by using XLByteToSeg() instead of XLByteToPrevSeg(). Author: Andres Freund Reported-By: Greg Burek Discussion: https://postgr.es/m/20170619073026.zcwpe6mydsaz5...@alap3.anarazel

Re: [COMMITTERS] pgsql: Add a Gather executor node.

2017-07-21 Thread Andres Freund
INTERFACE ROUTINES * ExecInitNode- initialize a plan node and its subplans * ExecProcNode- get a tuple by executing the plan node * ExecEndNode - shut down a plan node and its subplans * Greeti

[COMMITTERS] pgsql: Move interrupt checking from ExecProcNode() to executor nodes.

2017-07-30 Thread Andres Freund
. To avoid having to include miscadmin.h in headers - CHECK_FOR_INTERRUPTS() - move the interrupt checks into the individual executor routines. While looking through all executor nodes, I noticed a number of arguably missing interrupt checks, add these too. Author: Andres Freund, Tom Lane Reviewed

[COMMITTERS] pgsql: Move ExecProcNode from dispatch to function pointer based model.

2017-07-30 Thread Andres Freund
as this is required for v10, it seems better to only do the necessary (which already is quite large). Author: Andres Freund, Tom Lane Reported-By: Julien Rouhaud Discussion: https://postgr.es/m/22833.1490390...@sss.pgh.pa.us https://postgr.es/m/b0af9eaa-130c-60d0-9e4e-7a135b1e0...@dalibo.c

[COMMITTERS] pgsql: Add regression test for wide REPLICA IDENTITY FULL updates.

2017-08-05 Thread Andres Freund
Add regression test for wide REPLICA IDENTITY FULL updates. This just contains the regression tests added by a fix for a 9.4 specific bug regarding $subject. Author: Andres Freund Backpatch: 9.5- Branch -- REL9_6_STABLE Details --- https://git.postgresql.org/pg/commitdiff

[COMMITTERS] pgsql: Fix issues with wide tuples being updated and REPLICA IDENTITY F

2017-08-05 Thread Andres Freund
Fix issues with wide tuples being updated and REPLICA IDENTITY FULL. When replica identity full is being used with a wide tuple (above 2^16 bytes after compression) it lead to errors and/or crashes during decoding because the length field used to store such tuples doesn't fit into the variable use

[COMMITTERS] pgsql: Add regression test for wide REPLICA IDENTITY FULL updates.

2017-08-05 Thread Andres Freund
Add regression test for wide REPLICA IDENTITY FULL updates. This just contains the regression tests added by a fix for a 9.4 specific bug regarding $subject. Author: Andres Freund Backpatch: 9.5- Branch -- REL9_5_STABLE Details --- https://git.postgresql.org/pg/commitdiff

[COMMITTERS] pgsql: Add regression test for wide REPLICA IDENTITY FULL updates.

2017-08-05 Thread Andres Freund
Add regression test for wide REPLICA IDENTITY FULL updates. This just contains the regression tests added by a fix for a 9.4 specific bug regarding $subject. Author: Andres Freund Backpatch: 9.5- Branch -- master Details --- https://git.postgresql.org/pg/commitdiff

[COMMITTERS] pgsql: Fix thinko introduced in 2bef06d516460 et al.

2017-08-06 Thread Andres Freund
Fix thinko introduced in 2bef06d516460 et al. The callers for GetOldestSafeDecodingTransactionId() all inverted the argument for the argument introduced in 2bef06d516460. Luckily this appears to be inconsequential for the moment, as we wait for concurrent in-progress transaction when assembling a

[COMMITTERS] pgsql: Fix thinko introduced in 2bef06d516460 et al.

2017-08-06 Thread Andres Freund
Fix thinko introduced in 2bef06d516460 et al. The callers for GetOldestSafeDecodingTransactionId() all inverted the argument for the argument introduced in 2bef06d516460. Luckily this appears to be inconsequential for the moment, as we wait for concurrent in-progress transaction when assembling a

[COMMITTERS] pgsql: Fix thinko introduced in 2bef06d516460 et al.

2017-08-06 Thread Andres Freund
Fix thinko introduced in 2bef06d516460 et al. The callers for GetOldestSafeDecodingTransactionId() all inverted the argument for the argument introduced in 2bef06d516460. Luckily this appears to be inconsequential for the moment, as we wait for concurrent in-progress transaction when assembling a

[COMMITTERS] pgsql: Fix thinko introduced in 2bef06d516460 et al.

2017-08-06 Thread Andres Freund
Fix thinko introduced in 2bef06d516460 et al. The callers for GetOldestSafeDecodingTransactionId() all inverted the argument for the argument introduced in 2bef06d516460. Luckily this appears to be inconsequential for the moment, as we wait for concurrent in-progress transaction when assembling a

[COMMITTERS] pgsql: Expand coverage of parallel gather merge a bit.

2017-08-14 Thread Andres Freund
Expand coverage of parallel gather merge a bit. Previously paths reaching heap_compare_slots weren't covered. Author: Rushabh Lathia Reviewed-By: Andres Freund Discussion: https://postgr.es/m/CAGPqQf3C+3PBujb+7m=ceWeii4-vBY=xs99ljzrpkpefvzj...@mail.gmail.com https://postgr

[COMMITTERS] pgsql: Expand coverage of parallel gather merge a bit.

2017-08-14 Thread Andres Freund
Expand coverage of parallel gather merge a bit. Previously paths reaching heap_compare_slots weren't covered. Author: Rushabh Lathia Reviewed-By: Andres Freund Discussion: https://postgr.es/m/CAGPqQf3C+3PBujb+7m=ceWeii4-vBY=xs99ljzrpkpefvzj...@mail.gmail.com https://postgr

[COMMITTERS] pgsql: Change tupledesc->attrs[n] to TupleDescAttr(tupledesc, n).

2017-08-20 Thread Andres Freund
ise it in future. Author: Thomas Munro, editorialized by Andres Freund Reviewed-By: Andres Freund Discussion: https://postgr.es/m/CAEepm=0ZtQ-SpsgCyzzYpsXS6e=kzwqk3g5ygn3mdv7a8da...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitd

[COMMITTERS] pgsql: Partially flatten struct tupleDesc so that it can be used in DSM

2017-08-20 Thread Andres Freund
es in each backend. This won't work for TupleDescs with contraints and defaults, since those point to other objects, but for many purposes only attributes are needed. Author: Thomas Munro Reviewed-By: Andres Freund Discussion: https://postgr.es/m/CAEepm=0ZtQ-SpsgCyzzYpsXS6e=kzwqk3g5yg

[COMMITTERS] pgsql: Backpatch introduction of TupleDescAttr(tupdesc, i).

2017-08-22 Thread Andres Freund
TupleDescAttr() to all releases. Do not backpatch change in storage, as that'd be a breaking change for existing and working extensions. Author: Andres Freund Discussion: https://postgr.es/m/20170820181723.tdswdinzptbcw...@alap3.anarazel.de Backpatch: 9.2- Branch -- REL9_5_STABLE Details ---

[COMMITTERS] pgsql: Backpatch introduction of TupleDescAttr(tupdesc, i).

2017-08-22 Thread Andres Freund
TupleDescAttr() to all releases. Do not backpatch change in storage, as that'd be a breaking change for existing and working extensions. Author: Andres Freund Discussion: https://postgr.es/m/20170820181723.tdswdinzptbcw...@alap3.anarazel.de Backpatch: 9.2- Branch -- REL9_6_STABLE Details ---

[COMMITTERS] pgsql: Backpatch introduction of TupleDescAttr(tupdesc, i).

2017-08-22 Thread Andres Freund
TupleDescAttr() to all releases. Do not backpatch change in storage, as that'd be a breaking change for existing and working extensions. Author: Andres Freund Discussion: https://postgr.es/m/20170820181723.tdswdinzptbcw...@alap3.anarazel.de Backpatch: 9.2- Branch -- REL_10_STABLE Details ---

[COMMITTERS] pgsql: Backpatch introduction of TupleDescAttr(tupdesc, i).

2017-08-22 Thread Andres Freund
TupleDescAttr() to all releases. Do not backpatch change in storage, as that'd be a breaking change for existing and working extensions. Author: Andres Freund Discussion: https://postgr.es/m/20170820181723.tdswdinzptbcw...@alap3.anarazel.de Backpatch: 9.2- Branch -- REL9_2_STABLE Details ---

[COMMITTERS] pgsql: Backpatch introduction of TupleDescAttr(tupdesc, i).

2017-08-22 Thread Andres Freund
TupleDescAttr() to all releases. Do not backpatch change in storage, as that'd be a breaking change for existing and working extensions. Author: Andres Freund Discussion: https://postgr.es/m/20170820181723.tdswdinzptbcw...@alap3.anarazel.de Backpatch: 9.2- Branch -- REL9_4_STABLE Details ---

[COMMITTERS] pgsql: Backpatch introduction of TupleDescAttr(tupdesc, i).

2017-08-22 Thread Andres Freund
TupleDescAttr() to all releases. Do not backpatch change in storage, as that'd be a breaking change for existing and working extensions. Author: Andres Freund Discussion: https://postgr.es/m/20170820181723.tdswdinzptbcw...@alap3.anarazel.de Backpatch: 9.2- Branch -- REL9_3_STABLE Details ---

[COMMITTERS] pgsql: Refactor typcache.c's record typmod hash table.

2017-08-22 Thread Andres Freund
s for us by supplying a proper hash and equal function pair. This is a nice cleanup on its own, but also simplifies followup changes allowing blessed TupleDescs to be shared between backends participating in parallel query. Author: Thomas Munro Reviewed-By: Andres Freund Discussion: https://post

[COMMITTERS] pgsql: Add a hash_combine function for mixing hash values.

2017-08-22 Thread Andres Freund
Add a hash_combine function for mixing hash values. This hash function is derived from Boost's function of the same name. Author: Andres Freund, Thomas Munro Discussion: https://postgr.es/m/CAEepm%3D3rdgjfxW4cKvJ0OEmya2-34B0qHNG1xV0vK7TGPJGMUQ%40mail.gmail.com Discussion: https://postgr

[COMMITTERS] pgsql: Hash tables backed by DSA shared memory.

2017-08-22 Thread Andres Freund
uthor: Thomas Munro Reviewed-By: John Gorman, Andres Freund, Dilip Kumar, Robert Haas Discussion: https://postgr.es/m/CAEepm=3d8o8XdVwYT6O=bHKsKAM2pu2D6sV1S_=4d+jstvc...@mail.gmail.com https://postgr.es/m/CAEepm=0ZtQ-SpsgCyzzYpsXS6e=kzwqk3g5ygn3mdv7a8da...@mail.gmail.com B

Re: [COMMITTERS] pgsql: Push limit through subqueries to underlying sort, where possible

2017-08-23 Thread Andres Freund
On 2017-08-21 18:42:56 +, Robert Haas wrote: > Push limit through subqueries to underlying sort, where possible. > > Douglas Doole, reviewed by Ashutosh Bapat and by me. Minor formatting > change by me. > > Discussion: > http://postgr.es/m/cade5jyluugneeusyw6q_4mzfytxhxavcqmgasf0yiy8zdgg...

[COMMITTERS] pgsql: Fix bug that can cause walsender not to terminating at shutdown.

2017-08-24 Thread Andres Freund
Fix bug that can cause walsender not to terminating at shutdown. When backpatching c6c333436 I (Andres Freund) mis-resolved a conflict in the 9.4 branch. Unfortunately that leads to walsenders waiting forever when shutting down with connected standbys, unless immediate mode is used, or the

[COMMITTERS] pgsql: Fix harmless thinko in dsa.c.

2017-08-24 Thread Andres Freund
Fix harmless thinko in dsa.c. Commit 16be2fd100199bdf284becfcee02c5eb20d8a11d added DSA_ALLOC_HUGE, DSA_ALLOC_ZERO and DSA_ALLOC_NO_OOM which have the same numerical values and meanings as the similarly named MCXT_... macros. In one place we accidentally used MCXT_ALLOC_NO_OOM when DSA_ALLOC_NO_O

[COMMITTERS] pgsql: Fix harmless thinko in dsa.c.

2017-08-24 Thread Andres Freund
Fix harmless thinko in dsa.c. Commit 16be2fd100199bdf284becfcee02c5eb20d8a11d added DSA_ALLOC_HUGE, DSA_ALLOC_ZERO and DSA_ALLOC_NO_OOM which have the same numerical values and meanings as the similarly named MCXT_... macros. In one place we accidentally used MCXT_ALLOC_NO_OOM when DSA_ALLOC_NO_O

[COMMITTERS] pgsql: Consolidate the function pointer types used by dshash.c.

2017-08-24 Thread Andres Freund
pair of function pointer types that take both size and a user data pointer. Since it is anticipated that memcmp and tag_hash behavior will be a common requirement, provide wrapper functions dshash_memcmp and dshash_memhash that conform to the new function types. Author: Thomas Munro Reviewed-By: A

[COMMITTERS] pgsql: Add minimal regression test for blessed record type transfer.

2017-08-24 Thread Andres Freund
, editorialized by Andres Freund Reviewed-By: Andres Freund Discussion: https://postgr.es/m/20170823054644.efuzftxjpfi6wwqs%40alap3.anarazel.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/d36f7efb39e1b9613193b2e12717dbe2418ddae5 Modified Files -- src/test

[COMMITTERS] pgsql: Fix unlikely shared memory leak after failure in dshash_create()

2017-08-24 Thread Andres Freund
Fix unlikely shared memory leak after failure in dshash_create(). Tidy-up for commit 8c0d7bafad36434cb08ac2c78e69ae72c194ca20, based on a complaint from Andres Freund. Author: Thomas Munro Reviewed-By: Andres Freund Discussion: https://postgr.es/m/20170823054644.efuzftxjpfi6wwqs%40alap3

Re: [COMMITTERS] pgsql: Remove endof macro

2017-09-05 Thread Andres Freund
Hi, On 2017-09-05 19:08:06 +, Peter Eisentraut wrote: > Remove endof macro > > It has not been used in a long time, and it doesn't seem safe anyway, so > drop it. I've no problem removing this, but why isn't it safe? It's explicitly allowed to compute (not dereference) the address of end-of-

[COMMITTERS] pgsql: Constify numeric.c.

2017-09-11 Thread Andres Freund
Constify numeric.c. This allows the compiler/linker to move the static variables to a read-only segment. Not all the signature changes are necessary, but it seems better to apply const in a consistent manner. Reviewed-By: Tom Lane Discussion: https://postgr.es/m/20170910232154.asgml44ji2b7l...@

[COMMITTERS] pgsql: Introduce BYTES unit for GUCs.

2017-09-12 Thread Andres Freund
Introduce BYTES unit for GUCs. This is already useful for track_activity_query_size, and will further be used in a later commit making the WAL segment size configurable. Author: Beena Emerson Reviewed-By: Andres Freund Discussion: https://postgr.es/m

[COMMITTERS] pgsql: Properly check interrupts in execScan.c.

2017-09-14 Thread Andres Freund
anner. Reported-By: Jeff Janes Author: Andres Freund Discussion: https://postgr.es/m/CAMkU=1wedxp8ellpt9so1leusjyyk9cscaghlkpun+wbyo9...@mail.gmail.com Backpatch: 10, as d47cfef711 Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/1ab973ab600dc4295dbbd38d1643f9bd26f

[COMMITTERS] pgsql: Properly check interrupts in execScan.c.

2017-09-14 Thread Andres Freund
anner. Reported-By: Jeff Janes Author: Andres Freund Discussion: https://postgr.es/m/CAMkU=1wedxp8ellpt9so1leusjyyk9cscaghlkpun+wbyo9...@mail.gmail.com Backpatch: 10, as d47cfef711 Branch -- REL_10_STABLE Details --- https://git.postgresql.org/pg/commi

[COMMITTERS] pgsql: Perform only one ReadControlFile() during startup.

2017-09-14 Thread Andres Freund
it's read, refactor things so there's a single processing of the control file during startup (in EXEC_BACKEND that's every individual backend's startup). Author: Andres Freund Discussion: http://postgr.es/m/20170913092828.aozd3gvvmw67g...@alap3.anarazel.de Branch --

[COMMITTERS] pgsql: Add support for coordinating record typmods among parallel worke

2017-09-14 Thread Andres Freund
Reviewed-By: Andres Freund Discussion: https://postgr.es/m/CAEepm=0ZtQ-SpsgCyzzYpsXS6e=kzwqk3g5ygn3mdv7a8da...@mail.gmail.com Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/cc5f81366c36b3dd8f02bd9be1cf75b2cc8482bd Modified Files -- src/backend/access

[COMMITTERS] pgsql: Remove TupleDesc remapping logic from tqueue.c.

2017-09-14 Thread Andres Freund
Remove TupleDesc remapping logic from tqueue.c. With the introduction of a shared memory record typmod registry, it is no longer necessary to remap record typmods when sending tuples between backends so most of tqueue.c can be removed. Author: Thomas Munro Reviewed-By: Andres Freund Discussion

Re: [COMMITTERS] pgsql: Add support for coordinating record typmods among parallel worke

2017-09-14 Thread Andres Freund
On September 14, 2017 8:38:09 PM PDT, Thomas Munro wrote: >On Fri, Sep 15, 2017 at 3:18 PM, Tom Lane wrote: >> Andres Freund writes: >>> Add support for coordinating record typmods among parallel workers. >> >> Buildfarm not happy ... > >My compiler, C+

Re: [COMMITTERS] pgsql: Add support for coordinating record typmods among parallel worke

2017-09-15 Thread Andres Freund
celebrations. Didn't wait long enough... 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 support for coordinating record typmods among parallel worke

2017-09-15 Thread Andres Freund
shed change leaves around danging pointers into shared memory - unless I'm missing something (didn't yet have coffee, had to run to the store). 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 support for coordinating record typmods among parallel worke

2017-09-15 Thread Andres Freund
se neither before nor after the patch it's safe to continue executing arbitrary things in the worker. Just unsafe in different ways. Before you could reuse a typemod, now you can use a dangling pointer. Greetings, Andres Freund -- Sent via pgsql-committers mailing list (pgsql-committe

[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

[COMMITTERS] pgsql: Fix crash restart bug introduced in 8356753c212.

2017-09-18 Thread Andres Freund
Fix crash restart bug introduced in 8356753c212. The bug was caused by not re-reading the control file during crash recovery restarts, which lead to an attempt to pfree() shared memory contents. The fix is to re-read the control file, which seems good anyway. It's unclear as of this moment, wheth

[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: 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 ---

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

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-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

[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 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

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

[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 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&

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 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: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

[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: 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: 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 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: 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: [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

[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

[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

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

  1   2   3   4   5   6   7   8   9   10   >