Hi all, Attached WIP patch adds new syntax REINEX SCHEMA which does reindexing all table of specified schema. There are syntax dose reindexing specified index, per table and per database, but we can not do reindexing per schema for now. So we must use reindexdb command if we want to do. This new syntax supports it as SQL command. This use similar logic as REINDEX DATABASE, but we can use it in transaction block. Here is some example,
-- Table information [postgres][5432](1)=# \d n1.hoge Table "n1.hoge" Column | Type | Modifiers --------+---------+----------- col | integer | not null Indexes: "hoge_pkey" PRIMARY KEY, btree (col) [postgres][5432](1)=# \d n2.hoge Table "n2.hoge" Column | Type | Modifiers --------+---------+----------- col | integer | [postgres][5432](1)=# \d n3.hoge Did not find any relation named "n3.hoge". -- Do reindexing [postgres][5432](1)=# reindex schema n1; NOTICE: table "n1.hoge" was reindexed REINDEX [postgres][5432](1)=# reindex schema n2; REINDEX [postgres][5432](1)=# reindex schema n3; NOTICE: schema"n3" does not hava any table REINDEX Please review and comment. Regards, ------- Sawada Masahiko
reindex_schema_v1.patch
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers