pgsql: Local partitioned indexes
pgsql: Local partitioned indexes
От:
Alvaro Herrera <alvherre@alvh.no-ip.org>
Дата:
Local partitioned indexes
When CREATE INDEX is run on a partitioned table, create catalog entries
for an index on the partitioned table (which is just a placeholder since
the table proper has no data of its own), and recurse to create actual
indexes on the existing partitions; create them in future partitions
also.
As a convenience gadget, if the new index definition matches some
existing index in partitions, these are picked up and used instead of
creating new ones. Whichever way these indexes come about, they become
attached to the index on the parent table and are dropped alongside it,
and cannot be dropped on isolation unless they are detached first.
To support pg_dump'ing these indexes, add commands
CREATE INDEX ON ONLY Re: pgsql: Local partitioned indexes
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Alvaro Herrera writes: > Local partitioned indexes Evidently you're not there yet. I'm suspicious that the continuing failures on dromedary may trace to its use of -DCOPY_PARSE_PLAN_TREES ... try looking for a missed field addition in copyfuncs.c. regards, tom lane
Re: pgsql: Local partitioned indexes
On 2018/01/19 23:55, Alvaro Herrera wrote: > Local partitioned indexes > > Modified Files > -------------- > doc/src/sgml/catalogs.sgml | 23 + > doc/src/sgml/ref/alter_index.sgml | 14 + > doc/src/sgml/ref/alter_table.sgml | 8 +- > doc/src/sgml/ref/create_index.sgml | 33 +- > doc/src/sgml/ref/reindex.sgml | 5 + I noticed that the declarative partitioning section in ddl.sgml hasn't been updated to reflect the features added by this commit. Attached patch is an attempt to fix that. Thanks, Amit
Re: pgsql: Local partitioned indexes
On 2018/01/19 23:55, Alvaro Herrera wrote: > Local partitioned indexes > > Modified Files > -------------- > doc/src/sgml/catalogs.sgml | 23 + > doc/src/sgml/ref/alter_index.sgml | 14 + > doc/src/sgml/ref/alter_table.sgml | 8 +- > doc/src/sgml/ref/create_index.sgml | 33 +- > doc/src/sgml/ref/reindex.sgml | 5 + I noticed that the declarative partitioning section in ddl.sgml hasn't been updated to reflect the features added by this commit. Attached patch is an attempt to fix that. Thanks, Amit
Re: pgsql: Local partitioned indexes
От:
Alvaro Herrera <alvherre@alvh.no-ip.org>
Дата:
Amit Langote wrote: > On 2018/01/19 23:55, Alvaro Herrera wrote: > > Local partitioned indexes > I noticed that the declarative partitioning section in ddl.sgml hasn't > been updated to reflect the features added by this commit. Attached patch > is an attempt to fix that. Thanks! I considered that keeping the old-style instructions creating per partition indexes individually was not necessary, so I removed them and pushed. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: pgsql: Local partitioned indexes
От:
Alvaro Herrera <alvherre@alvh.no-ip.org>
Дата:
Amit Langote wrote: > On 2018/01/19 23:55, Alvaro Herrera wrote: > > Local partitioned indexes > I noticed that the declarative partitioning section in ddl.sgml hasn't > been updated to reflect the features added by this commit. Attached patch > is an attempt to fix that. Thanks! I considered that keeping the old-style instructions creating per partition indexes individually was not necessary, so I removed them and pushed. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: pgsql: Local partitioned indexes
От:
Amit Langote <amitlangote09@gmail.com>
Дата:
On Sat, Feb 10, 2018 at 10:09 PM, Alvaro Herrera wrote: > Amit Langote wrote: >> On 2018/01/19 23:55, Alvaro Herrera wrote: >> > Local partitioned indexes > >> I noticed that the declarative partitioning section in ddl.sgml hasn't >> been updated to reflect the features added by this commit. Attached patch >> is an attempt to fix that. > > Thanks! I considered that keeping the old-style instructions creating > per partition indexes individually was not necessary, so I removed them > and pushed. Ah, thanks. What you've committed looks perfect. Regards, Amit
Re: pgsql: Local partitioned indexes
От:
Amit Langote <amitlangote09@gmail.com>
Дата:
On Sat, Feb 10, 2018 at 10:09 PM, Alvaro Herrera wrote: > Amit Langote wrote: >> On 2018/01/19 23:55, Alvaro Herrera wrote: >> > Local partitioned indexes > >> I noticed that the declarative partitioning section in ddl.sgml hasn't >> been updated to reflect the features added by this commit. Attached patch >> is an attempt to fix that. > > Thanks! I considered that keeping the old-style instructions creating > per partition indexes individually was not necessary, so I removed them > and pushed. Ah, thanks. What you've committed looks perfect. Regards, Amit
Re: pgsql: Local partitioned indexes
On 2018/02/10 23:32, Amit Langote wrote: > On Sat, Feb 10, 2018 at 10:09 PM, Alvaro Herrera > wrote: >> Amit Langote wrote: >>> On 2018/01/19 23:55, Alvaro Herrera wrote: >>>> Local partitioned indexes >> >>> I noticed that the declarative partitioning section in ddl.sgml hasn't >>> been updated to reflect the features added by this commit. Attached patch >>> is an attempt to fix that. >> >> Thanks! I considered that keeping the old-style instructions creating >> per partition indexes individually was not necessary, so I removed them >> and pushed. > > Ah, thanks. What you've committed looks perfect. Sorry, I'd missed reporting one more sentence that doesn't apply anymore. Attached gets rid of that. Thanks, Amit
Re: pgsql: Local partitioned indexes
On 2018/02/10 23:32, Amit Langote wrote: > On Sat, Feb 10, 2018 at 10:09 PM, Alvaro Herrera > wrote: >> Amit Langote wrote: >>> On 2018/01/19 23:55, Alvaro Herrera wrote: >>>> Local partitioned indexes >> >>> I noticed that the declarative partitioning section in ddl.sgml hasn't >>> been updated to reflect the features added by this commit. Attached patch >>> is an attempt to fix that. >> >> Thanks! I considered that keeping the old-style instructions creating >> per partition indexes individually was not necessary, so I removed them >> and pushed. > > Ah, thanks. What you've committed looks perfect. Sorry, I'd missed reporting one more sentence that doesn't apply anymore. Attached gets rid of that. Thanks, Amit
Re: pgsql: Local partitioned indexes
От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
Amit Langote wrote: > Sorry, I'd missed reporting one more sentence that doesn't apply anymore. > Attached gets rid of that. Thanks, applied. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: pgsql: Local partitioned indexes
От:
Alvaro Herrera <alvherre@2ndquadrant.com>
Дата:
Amit Langote wrote: > Sorry, I'd missed reporting one more sentence that doesn't apply anymore. > Attached gets rid of that. Thanks, applied. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services