Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key

2018-04-03 Thread Amit Kapila
On Wed, Apr 4, 2018 at 4:31 AM, Andres Freund wrote: > On 2018-03-06 19:57:03 +0530, Amit Kapila wrote: >> On Tue, Mar 6, 2018 at 4:53 AM, Andres Freund wrote: >> > Hi, >> > >> >> diff --git a/src/backend/executor/nodeLockRows.c >> >> b/src/backend/executor/nodeLockRows.c >> >> index 7961b4be6a.

Re: WIP: Covering + unique indexes.

2018-04-03 Thread Peter Geoghegan
On Tue, Apr 3, 2018 at 7:02 AM, Alexander Korotkov wrote: > Great, I'm looking forward your feedback. I took a look at V11 (0001-Covering-core-v11.patch, 0002-Covering-btree-v11.patch, 0003-Covering-amcheck-v11.patch, 0004-Covering-natts-v11.patch) today. * What's a pivot tuple? This is the sam

Re: [HACKERS] path toward faster partition pruning

2018-04-03 Thread David Rowley
On 4 April 2018 at 13:13, David Rowley wrote: > There might be another issue with the patch too, but I'll send a > separate email about that. In the current version of the patch the following comment exists: /* * Fall-through for a NOT clause, which is handled in * match_clause_to_partition_key(

Re: Comment update in BuildTupleFromCStrings()

2018-04-03 Thread Ashutosh Bapat
Thanks Bruce. On Tue, Apr 3, 2018 at 11:31 PM, Bruce Momjian wrote: > On Fri, Mar 23, 2018 at 03:00:37PM +0530, Ashutosh Bapat wrote: >> Hi, >> BuildTupleFromCStrings() has comment "/* Call the "in" function for >> each non-dropped attribute */". It then calls the in function even >> when it's go

Re: [HACKERS] path toward faster partition pruning

2018-04-03 Thread Tom Lane
David Rowley writes: > It's true that the const simplification code will generally rewrite > most NOT(clause) to use the negator operator, but if the operator does > not have a negator it can't do this. > ... > At the moment pruning does not work for this case at all. Perhaps it should? It's hard

Re: [HACKERS] path toward faster partition pruning

2018-04-03 Thread David Rowley
On 4 April 2018 at 16:00, Tom Lane wrote: > David Rowley writes: >> It's true that the const simplification code will generally rewrite >> most NOT(clause) to use the negator operator, but if the operator does >> not have a negator it can't do this. >> ... >> At the moment pruning does not work f

Re: [HACKERS] Runtime Partition Pruning

2018-04-03 Thread Beena Emerson
Hi David, On Wed, Apr 4, 2018 at 7:57 AM, David Rowley wrote: > On 4 April 2018 at 05:50, Beena Emerson wrote: >> With Amit's v46 patch, the following query in partition_prune was >> crashing during make check. >> explain (analyze, costs off, summary off, timing off) execute ab_q1 (2, 2, >> 3)

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-04-03 Thread Thomas Munro
On Wed, Apr 4, 2018 at 2:44 PM, Thomas Munro wrote: > On Wed, Apr 4, 2018 at 2:14 PM, Bruce Momjian wrote: >> Uh, are you sure it fixes our use-case? From the email description it >> sounded like it only reported fsync errors for every open file >> descriptor at the time of the failure, but the

Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS

2018-04-03 Thread Craig Ringer
On 4 April 2018 at 13:29, Thomas Munro wrote: > On Wed, Apr 4, 2018 at 2:44 PM, Thomas Munro > wrote: > > On Wed, Apr 4, 2018 at 2:14 PM, Bruce Momjian wrote: > >> Uh, are you sure it fixes our use-case? From the email description it > >> sounded like it only reported fsync errors for every op

Re: [HACKERS] Runtime Partition Pruning

2018-04-03 Thread Amit Langote
Hi David. On 2018/04/04 11:10, David Rowley wrote: > On 4 April 2018 at 05:44, Jesper Pedersen wrote: >> Also, I'm seeing a regression for check-world in >> src/test/regress/results/inherit.out >> >> *** >> *** 642,648 >> -+---+---+- >>mlparted_tab_p

<    1   2