pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jesper Pedersen <jesper.pedersen@redhat.com>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: Rajkumar Raghuwanshi <rajkumar.raghuwanshi@enterprisedb.com>
Cc: Beena Emerson <memissemerson@gmail.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: amul sul <sulamul@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Subject: Re: [HACKERS] Runtime Partition Pruning
Date: Thu, 22 Feb 2018 10:11:52 -0500
Message-ID: <99d83db5-d283-5f8b-2970-460889108ede@redhat.com> (raw)
In-Reply-To: <CAKJS1f_bzRdbUutwc8iy5Bs5Krc9couEQK9NH1SUgMJvvnvWxg@mail.gmail.com>
References: <CAKJS1f-zohKp_ANHYMe49nNje4vb81nF9s9EicK8KsjqQNkQ1A@mail.gmail.com>
	<20180104163708.bzgheqsny6tsatzf@alvherre.pgsql>
	<CAKJS1f9Tavq5MuVVuzjp9EvPtj8GBnyunBUX61sERc9dwjWVMQ@mail.gmail.com>
	<CAOG9ApGqEOrdMefche6uOM4fkUCz0uE9LMP6JHiSJEQ8CySdaQ@mail.gmail.com>
	<CAKJS1f8gPmRkJkHQ6WbKYS+nDxXT2fKDjcT_xED2k37eWW0pYw@mail.gmail.com>
	<CAKJS1f96m-VMW-ViAXOdV-T8h_KRdrCUmADYNrhh2hySPz5Y=Q@mail.gmail.com>
	<CAOG9ApEuPL02ZCpAwxDBgkaqs1K-i4ZfVkTrpc_x8B_Eq5OtGA@mail.gmail.com>
	<CAOG9ApERiop7P=GRkqQKa82AuBKjxN3qVixie3WK4WqQpEjS6g@mail.gmail.com>
	<CAKJS1f8iop-r82tm6-1wrWwqiphpMzuSsCSFg-Ndns+Qg3ukPg@mail.gmail.com>
	<CAKJS1f_vSFZFSOW6Dspj87iU9BXvbAiVesviDZMCfYchVP+mhA@mail.gmail.com>
	<CAKcux6mf146esdNqa6Cv5RegiqGTNecN6mpoXMqnsCT7Pg5YxQ@mail.gmail.com>
	<CAKJS1f8rF+7WOu95WHH_pFu6NFh0iyF3oi+JZKGwaZbDXnJQ3A@mail.gmail.com>
	<CAKJS1f_bzRdbUutwc8iy5Bs5Krc9couEQK9NH1SUgMJvvnvWxg@mail.gmail.com>

Hi David,

On 02/21/2018 04:06 AM, David Rowley wrote:
> I've attached v11 of the patch.
> 

Are UPDATE and DELETE suppose to be supported ?

With

-- test.sql --
CREATE TABLE test (a integer NOT NULL, b integer) PARTITION BY HASH(a);
CREATE TABLE test_p00 PARTITION OF test FOR VALUES WITH (MODULUS 2, 
REMAINDER 0);
CREATE TABLE test_p01 PARTITION OF test FOR VALUES WITH (MODULUS 2, 
REMAINDER 1);
CREATE INDEX idx_test_a ON test (a);
CREATE INDEX idx_test_b ON test (b);

INSERT INTO test (SELECT i,i FROM generate_series(1, 1000000) AS i);

ANALYZE;
-- test.sql --

and

UPDATE test SET b = 1 WHERE a = ?
DELETE FROM test WHERE a = ?

both shows that all partitions are scanned;

  Update on test
    Update on test_p00
    Update on test_p01
    ->  Index Scan using test_p00_a_idx on test_p00
          Index Cond: (a = 1)
    ->  Index Scan using test_p01_a_idx on test_p01
          Index Cond: (a = 1)

Using prune_v32 and runtime_v11 with conflicts resolved.

Best regards,
  Jesper




view thread (186+ messages)  latest in thread

Message-ID: <99d83db5-d283-5f8b-2970-460889108ede@redhat.com>
Permalink:  ../99d83db5-d283-5f8b-2970-460889108ede@redhat.com/
Also on:    postgresql.org/message-id/99d83db5-d283-5f8b-2970-460889108ede@redhat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: jesper.pedersen@redhat.com, david.rowley@2ndquadrant.com, rajkumar.raghuwanshi@enterprisedb.com, memissemerson@gmail.com, alvherre@alvh.no-ip.org, Langote_Amit_f8@lab.ntt.co.jp, robertmhaas@gmail.com, sulamul@gmail.com, dilipbalaut@gmail.com
  Subject: Re: [HACKERS] Runtime Partition Pruning
  In-Reply-To: <99d83db5-d283-5f8b-2970-460889108ede@redhat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox