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

2017-12-14 Thread Andres Freund
On 2017-12-14 17:00:29 -0800, Andres Freund wrote: > Hi, > > On 2017-11-13 19:03:41 -0800, Andres Freund wrote: > > diff --git a/src/backend/access/heap/rewriteheap.c > > b/src/backend/access/heap/rewriteheap.c > > index f93c194e182..7d163c91379 100644 > > --- a/src/backend/access/heap/rewritehea

pgsql: Fix pruning of locked and updated tuples.

2017-12-14 Thread Andres Freund
Fix pruning of locked and updated tuples. Previously it was possible that a tuple was not pruned during vacuum, even though its update xmax (i.e. the updating xid in a multixact with both key share lockers and an updater) was below the cutoff horizon. As the freezing code assumed, rightly so, tha

pgsql: Fix pruning of locked and updated tuples.

2017-12-14 Thread Andres Freund
Fix pruning of locked and updated tuples. Previously it was possible that a tuple was not pruned during vacuum, even though its update xmax (i.e. the updating xid in a multixact with both key share lockers and an updater) was below the cutoff horizon. As the freezing code assumed, rightly so, tha

pgsql: Perform a lot more sanity checks when freezing tuples.

2017-12-14 Thread Andres Freund
Perform a lot more sanity checks when freezing tuples. The previous commit has shown that the sanity checks around freezing aren't strong enough. Strengthening them seems especially important because the existance of the bug has caused corruption that we don't want to make even worse during future

pgsql: Fix pruning of locked and updated tuples.

2017-12-14 Thread Andres Freund
Fix pruning of locked and updated tuples. Previously it was possible that a tuple was not pruned during vacuum, even though its update xmax (i.e. the updating xid in a multixact with both key share lockers and an updater) was below the cutoff horizon. As the freezing code assumed, rightly so, tha

pgsql: Perform a lot more sanity checks when freezing tuples.

2017-12-14 Thread Andres Freund
Perform a lot more sanity checks when freezing tuples. The previous commit has shown that the sanity checks around freezing aren't strong enough. Strengthening them seems especially important because the existance of the bug has caused corruption that we don't want to make even worse during future

pgsql: Perform a lot more sanity checks when freezing tuples.

2017-12-14 Thread Andres Freund
Perform a lot more sanity checks when freezing tuples. The previous commit has shown that the sanity checks around freezing aren't strong enough. Strengthening them seems especially important because the existance of the bug has caused corruption that we don't want to make even worse during future

pgsql: Fix pruning of locked and updated tuples.

2017-12-14 Thread Andres Freund
Fix pruning of locked and updated tuples. Previously it was possible that a tuple was not pruned during vacuum, even though its update xmax (i.e. the updating xid in a multixact with both key share lockers and an updater) was below the cutoff horizon. As the freezing code assumed, rightly so, tha

pgsql: Fix pruning of locked and updated tuples.

2017-12-14 Thread Andres Freund
Fix pruning of locked and updated tuples. Previously it was possible that a tuple was not pruned during vacuum, even though its update xmax (i.e. the updating xid in a multixact with both key share lockers and an updater) was below the cutoff horizon. As the freezing code assumed, rightly so, tha

pgsql: Perform a lot more sanity checks when freezing tuples.

2017-12-14 Thread Andres Freund
Perform a lot more sanity checks when freezing tuples. The previous commit has shown that the sanity checks around freezing aren't strong enough. Strengthening them seems especially important because the existance of the bug has caused corruption that we don't want to make even worse during future

pgsql: Perform a lot more sanity checks when freezing tuples.

2017-12-14 Thread Andres Freund
Perform a lot more sanity checks when freezing tuples. The previous commit has shown that the sanity checks around freezing aren't strong enough. Strengthening them seems especially important because the existance of the bug has caused corruption that we don't want to make even worse during future

pgsql: Backport addition of rs_old_rel to rewriteheap's state.

2017-12-14 Thread Andres Freund
Backport addition of rs_old_rel to rewriteheap's state. Originally part of b89e151054a05f0f6d356ca52e3b725dd0505e53, the introduction of logical decoding, this is required to backport a commit introducing error checks defending against recent bugs. It's possible that extensions calls begin_heap_r

pgsql: Fix pruning of locked and updated tuples.

2017-12-14 Thread Andres Freund
Fix pruning of locked and updated tuples. Previously it was possible that a tuple was not pruned during vacuum, even though its update xmax (i.e. the updating xid in a multixact with both key share lockers and an updater) was below the cutoff horizon. As the freezing code assumed, rightly so, tha

pgsql: Perform a lot more sanity checks when freezing tuples.

2017-12-14 Thread Andres Freund
Perform a lot more sanity checks when freezing tuples. The previous commit has shown that the sanity checks around freezing aren't strong enough. Strengthening them seems especially important because the existance of the bug has caused corruption that we don't want to make even worse during future

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

2017-12-14 Thread Andres Freund
Hi, On 2017-11-13 19:03:41 -0800, Andres Freund wrote: > diff --git a/src/backend/access/heap/rewriteheap.c > b/src/backend/access/heap/rewriteheap.c > index f93c194e182..7d163c91379 100644 > --- a/src/backend/access/heap/rewriteheap.c > +++ b/src/backend/access/heap/rewriteheap.c > @@ -407,7 +40

pgsql: Tighten configure's test for __builtin_constant_p().

2017-12-14 Thread Tom Lane
Tighten configure's test for __builtin_constant_p(). Commit 9fa6f00b1 assumed that __builtin_constant_p("string literal") is TRUE, if the compiler has that function at all. Buildfarm results show that Sun Studio 12, at least, breaks that assumption. Removing that usage would leave us with no mec

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

2017-12-14 Thread Andres Freund
On 2017-12-07 18:32:51 +0900, Michael Paquier wrote: > On Thu, Dec 7, 2017 at 5:23 AM, Alvaro Herrera > wrote: > > Looking at 0002: I agree with the stuff being done here. > > The level of details you are providing with a proper error code is an > improvement over the first version proposed in m

pgsql: Fix a number of copy & paste comment errors in common/int.h.

2017-12-14 Thread Andres Freund
Fix a number of copy & paste comment errors in common/int.h. Author: Christoph Berg Discussion: https://postgr.es/m/20171214082808.ga5...@msg.df7cb.de Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/11b8f076c02b4ff0230430fb8d82c80acc450c90 Modified Files --

pgsql: Fix walsender timeouts when decoding a large transaction

2017-12-14 Thread Andrew Dunstan
Fix walsender timeouts when decoding a large transaction The logical slots have a fast code path for sending data so as not to impose too high a per message overhead. The fast path skips checks for interrupts and timeouts. However, the existing coding failed to consider the fact that a transaction

pgsql: Fix walsender timeouts when decoding a large transaction

2017-12-14 Thread Andrew Dunstan
Fix walsender timeouts when decoding a large transaction The logical slots have a fast code path for sending data so as not to impose too high a per message overhead. The fast path skips checks for interrupts and timeouts. However, the existing coding failed to consider the fact that a transaction

pgsql: Fix walsender timeouts when decoding a large transaction

2017-12-14 Thread Andrew Dunstan
Fix walsender timeouts when decoding a large transaction The logical slots have a fast code path for sending data so as not to impose too high a per message overhead. The fast path skips checks for interrupts and timeouts. However, the existing coding failed to consider the fact that a transaction

pgsql: Fix walsender timeouts when decoding a large transaction

2017-12-14 Thread Andrew Dunstan
Fix walsender timeouts when decoding a large transaction The logical slots have a fast code path for sending data so as not to impose too high a per message overhead. The fast path skips checks for interrupts and timeouts. However, the existing coding failed to consider the fact that a transaction

pgsql: Fix walsender timeouts when decoding a large transaction

2017-12-14 Thread Andrew Dunstan
Fix walsender timeouts when decoding a large transaction The logical slots have a fast code path for sending data so as not to impose too high a per message overhead. The fast path skips checks for interrupts and timeouts. However, the existing coding failed to consider the fact that a transaction

pgsql: Add approximated Zipfian-distributed random generator to pgbench

2017-12-14 Thread Teodor Sigaev
Add approximated Zipfian-distributed random generator to pgbench. Generator helps to make close to real-world tests. Author: Alik Khilazhev Reviewed-By: Fabien COELHO Discussion: https://www.postgresql.org/message-id/flat/bf3b6f54-68c3-417a-bfab-fb4d66f2b...@postgrespro.ru Branch -- master