Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on thefly

Поиск
Список
Период
Сортировка
Искать
От
Steve Singer
Тема
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on thefly
Дата
Msg-id
157395200750.29912.1178609357962324139.pgcf@coridan.postgresql.org
Ответ на
Список
Дерево обсуждения
Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on thefly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Robert Haas <robertmhaas@gmail.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Michael Paquier <michael@paquier.xyz>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Masahiko Sawada <sawada.mshk@gmail.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexander Korotkov <a.korotkov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly a.kondratov@postgrespro.ru
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Surafel Temesgen <surafel3000@gmail.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Michael Paquier <michael@paquier.xyz>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Robert Haas <robertmhaas@gmail.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on thefly Steve Singer <steve@ssinger.info>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Steve Singer <steve@ssinger.info>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Masahiko Sawada <masahiko.sawada@2ndquadrant.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Michael Paquier <michael@paquier.xyz>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Michael Paquier <michael@paquier.xyz>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Michael Paquier <michael@paquier.xyz>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Michael Paquier <michael@paquier.xyz>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Michael Paquier <michael@paquier.xyz>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Michael Paquier <michael@paquier.xyz>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Michael Paquier <michael@paquier.xyz>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Justin Pryzby <pryzby@telsasoft.com>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Alexey Kondratov <a.kondratov@postgrespro.ru>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Michael Paquier <michael@paquier.xyz>
Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace onthe fly Jose Luis Tallon <jltallon@adv-solutions.net>
The following review has been posted through the commitfest application:
make installcheck-world:  tested, passed
Implements feature:       tested, failed
Spec compliant:           not tested
Documentation:            tested, failed

* I had to replace heap_open/close with table_open/close to get the
patch to compile against master

In the documentation 

+     
+      This specifies a tablespace, where all rebuilt indexes will be created.
+      Can be used only with REINDEX INDEX and
+      REINDEX TABLE, since the system indexes are not
+      movable, but SCHEMA, DATABASE or
+      SYSTEM very likely will has one.
+     

I found the "SCHEMA,DATABASE or SYSTEM very likely will has one." portion confusing and would be inclined to remove it or somehow reword it.

Consider the following

-------------
 create index foo_bar_idx on foo(bar) tablespace pg_default;
CREATE INDEX
reindex=# \d foo
                Table "public.foo"
 Column |  Type   | Collation | Nullable | Default 
--------+---------+-----------+----------+---------
 id     | integer |           | not null | 
 bar    | text    |           |          | 
Indexes:
    "foo_pkey" PRIMARY KEY, btree (id)
    "foo_bar_idx" btree (bar)

reindex=# reindex index foo_bar_idx tablespace tst1;
REINDEX
reindex=# reindex index foo_bar_idx tablespace pg_default;
REINDEX
reindex=# \d foo
                Table "public.foo"
 Column |  Type   | Collation | Nullable | Default 
--------+---------+-----------+----------+---------
 id     | integer |           | not null | 
 bar    | text    |           |          | 
Indexes:
    "foo_pkey" PRIMARY KEY, btree (id)
    "foo_bar_idx" btree (bar), tablespace "pg_default"
--------

It is a bit strange that it says "pg_default" as the tablespace. If I do
this with a alter table to the table, moving the table back to pg_default
makes it look as it did before.

Otherwise the first patch seems fine.


With the second patch(for NOWAIT) I did the following

T1: begin;
T1: insert into foo select generate_series(1,1000);
T2: reindex index foo_bar_idx set tablespace tst1 nowait;

T2 is waiting for a lock. This isn't what I would expect.

The new status of this patch is: Waiting on Author
В списке pgsql-hackers по дате отправления
От: Daniel Gustafsson
Дата:
От: Alvaro Herrera
Дата:
FAQ