Unix Technical Forum

Doc patch for create index

This is a discussion on Doc patch for create index within the Pgsql Patches forums, part of the PostgreSQL category; --> A doc patch to add an example of what an invalid index looks like in psql, as requested by ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql Patches

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-18-2008, 10:51 AM
stark
 
Posts: n/a
Default Doc patch for create index



A doc patch to add an example of what an invalid index looks like in psql, as
requested by a commenter and Bruce.



Index: doc/src/sgml/ref/create_index.sgml
================================================== =================
RCS file: /home/stark/src/REPOSITORY/pgsql/doc/src/sgml/ref/create_index.sgml,v
retrieving revision 1.60
diff -c -r1.60 create_index.sgml
*** doc/src/sgml/ref/create_index.sgml 31 Jan 2007 23:26:03 -0000 1.60
--- doc/src/sgml/ref/create_index.sgml 3 Apr 2007 17:19:25 -0000
***************
*** 332,338 ****
uniqueness violation in a unique index, the <command>CREATE INDEX</>
command will fail but leave behind an <quote>invalid</> index. This index
will be ignored for querying purposes because it might be incomplete;
! however it will still consume update overhead. The recommended recovery
method in such cases is to drop the index and try again to perform
<command>CREATE INDEX CONCURRENTLY</>. (Another possibility is to rebuild
the index with <command>REINDEX</>. However, since <command>REINDEX</>
--- 332,352 ----
uniqueness violation in a unique index, the <command>CREATE INDEX</>
command will fail but leave behind an <quote>invalid</> index. This index
will be ignored for querying purposes because it might be incomplete;
! however it will still consume update overhead. The <application>psql</>
! <command>\d</> command will mark such an <quote>invalid</> index as such:
!
! <programlisting>
! postgres=# \d tab
! Table "public.tab"
! Column | Type | Modifiers
! --------+---------+-----------
! col | integer |
! Indexes:
! "idx" btree (col) INVALID
! </programlisting>
!
! The recommended recovery
method in such cases is to drop the index and try again to perform
<command>CREATE INDEX CONCURRENTLY</>. (Another possibility is to rebuild
the index with <command>REINDEX</>. However, since <command>REINDEX</>


--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com


---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

http://www.postgresql.org/about/donate

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-18-2008, 10:51 AM
Bruce Momjian
 
Posts: n/a
Default Re: Doc patch for create index


Patch applied. Thanks. Your documentation changes can be viewed in
five minutes using links on the developer's page,
http://www.postgresql.org/developer/testing.


---------------------------------------------------------------------------


stark wrote:
>
>
> A doc patch to add an example of what an invalid index looks like in psql, as
> requested by a commenter and Bruce.
>
>
>
> Index: doc/src/sgml/ref/create_index.sgml
> ================================================== =================
> RCS file: /home/stark/src/REPOSITORY/pgsql/doc/src/sgml/ref/create_index.sgml,v
> retrieving revision 1.60
> diff -c -r1.60 create_index.sgml
> *** doc/src/sgml/ref/create_index.sgml 31 Jan 2007 23:26:03 -0000 1.60
> --- doc/src/sgml/ref/create_index.sgml 3 Apr 2007 17:19:25 -0000
> ***************
> *** 332,338 ****
> uniqueness violation in a unique index, the <command>CREATE INDEX</>
> command will fail but leave behind an <quote>invalid</> index. This index
> will be ignored for querying purposes because it might be incomplete;
> ! however it will still consume update overhead. The recommended recovery
> method in such cases is to drop the index and try again to perform
> <command>CREATE INDEX CONCURRENTLY</>. (Another possibility is to rebuild
> the index with <command>REINDEX</>. However, since <command>REINDEX</>
> --- 332,352 ----
> uniqueness violation in a unique index, the <command>CREATE INDEX</>
> command will fail but leave behind an <quote>invalid</> index. This index
> will be ignored for querying purposes because it might be incomplete;
> ! however it will still consume update overhead. The <application>psql</>
> ! <command>\d</> command will mark such an <quote>invalid</> index as such:
> !
> ! <programlisting>
> ! postgres=# \d tab
> ! Table "public.tab"
> ! Column | Type | Modifiers
> ! --------+---------+-----------
> ! col | integer |
> ! Indexes:
> ! "idx" btree (col) INVALID
> ! </programlisting>
> !
> ! The recommended recovery
> method in such cases is to drop the index and try again to perform
> <command>CREATE INDEX CONCURRENTLY</>. (Another possibility is to rebuild
> the index with <command>REINDEX</>. However, since <command>REINDEX</>
>
>
> --
> Gregory Stark
> EnterpriseDB http://www.enterprisedb.com
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
> http://www.postgresql.org/about/donate


--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://www.enterprisedb.com

+ If your life is a hard drive, Christ can be your backup. +

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:19 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com