pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Upgrade from 9.0.5 to 9.1.1 - Problems with citext indexes
2+ messages / 2 participants
[nested] [flat]

* Upgrade from 9.0.5 to 9.1.1 - Problems with citext indexes
@ 2011-11-30 11:55  Rudolf van der Leeden <rudolf.vanderleeden@scoreloop.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Rudolf van der Leeden @ 2011-11-30 11:55 UTC (permalink / raw)
  To: pgsql-admin; +Cc: Rudolf van der Leeden <rudolf.vanderleeden@scoreloop.com>

Hi,

upgrading Postgres 9.0.5 to 9.1.1 is done using:

- pg_upgrade
- CREATE EXTENSION citext FROM unpackaged  (using the latest patch)

This works fine even for indexes on citext columns.
The problem comes with an index on LOWER(citext), e.g.  the index
idx_lower_login
has been created on column 'login::citext'  using  'btree
(lower(login::text))'.
This index is NOT used after the upgrade to 9.1.1.
A REINDEX did not help, only after DROP/CREATE INDEX of idx_lower_login
the index was used by the query planner.

As in our case dropping/creating a new index takes a long time (30min =
downtime) we'd like to
discuss other options and ideas. E.g. would it be possible to concurrently
create already on 9.0.5
an index that can be upgraded to 9.1.1. and will directly be used?
Or is there anything that can be done to the PG internal tables so that the
old index will be used as is?

Thanks for your help.
Rudolf van der Leeden
Scoreloop, Germany
A subsidiary of Research in Motion (RIM)

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Upgrade from 9.0.5 to 9.1.1 - Problems with citext indexes
@ 2011-12-02 03:15  Bruce Momjian <bruce@momjian.us>
  parent: Rudolf van der Leeden <rudolf.vanderleeden@scoreloop.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 2011-12-02 03:15 UTC (permalink / raw)
  To: Rudolf van der Leeden <rudolf.vanderleeden@scoreloop.com>; +Cc: pgsql-admin

Rudolf van der Leeden wrote:
> Hi,
> 
> upgrading Postgres 9.0.5 to 9.1.1 is done using:
> 
> - pg_upgrade
> - CREATE EXTENSION citext FROM unpackaged  (using the latest patch)
> 
> This works fine even for indexes on citext columns.
> The problem comes with an index on LOWER(citext), e.g.  the index
> idx_lower_login
> has been created on column 'login::citext'  using  'btree
> (lower(login::text))'.
> This index is NOT used after the upgrade to 9.1.1.
> A REINDEX did not help, only after DROP/CREATE INDEX of idx_lower_login
> the index was used by the query planner.
> 
> As in our case dropping/creating a new index takes a long time (30min =
> downtime) we'd like to
> discuss other options and ideas. E.g. would it be possible to concurrently
> create already on 9.0.5
> an index that can be upgraded to 9.1.1. and will directly be used?
> Or is there anything that can be done to the PG internal tables so that the
> old index will be used as is?

That is quite odd.  I have no idea what would cause that.

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

  + It's impossible for everything to be true. +



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2011-12-02 03:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-11-30 11:55 Upgrade from 9.0.5 to 9.1.1 - Problems with citext indexes Rudolf van der Leeden <rudolf.vanderleeden@scoreloop.com>
2011-12-02 03:15 ` Bruce Momjian <bruce@momjian.us>

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