Re: [ADMIN] cast not IMMUTABLE?

2004-05-06 Thread Tom Lane
Gaetano Mendola <[EMAIL PROTECTED]> writes: > consider that login_time is a TIMESTAMPTZ with an index on it. > test# create index idx on user_logs ( (login_time::date) ); > ERROR: functions in index expression must be marked IMMUTABLE > why that cast is not considered IMMUTABLE ? Because it depe

Re: [ADMIN] cast not IMMUTABLE?

2004-05-06 Thread Sam Barnett-Cormack
On Fri, 7 May 2004, Gaetano Mendola wrote: > Hi all, > I have a table with ~ 3e+6 rows on it. > > I do select on this table in this way: > > > (1) select * from user_logs where login_time::date = now()::date; > > > consider that login_time is a TIMESTAMPTZ with an index on it. > > If I use the sel

[ADMIN] cast not IMMUTABLE?

2004-05-06 Thread Gaetano Mendola
Hi all, I have a table with ~ 3e+6 rows on it. I do select on this table in this way: (1) select * from user_logs where login_time::date = now()::date; consider that login_time is a TIMESTAMPTZ with an index on it. If I use the select in this way: select * from user_logs where login_time = now(); t

[ADMIN] Meta data corruption

2004-05-06 Thread Martin Brommer
Hi, One of our postgres servers seems to have been corrupted in a pretty bizar way. As far as I can tell the meta data has been corrupted but not the actual data. Is there any way to re-create our databases from the "oid" files in the $PGDATA/base dir? Thanks for any help in advance, Martin --

Re: [ADMIN] Postmaster hogs CPU

2004-05-06 Thread Chris Gamache
--- "scott.marlowe" <[EMAIL PROTECTED]> wrote: > On Wed, 5 May 2004, Chris Gamache wrote: > Have you read: > > http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html > > yet? It may just be that you don't have enough shared_buffers or whatnot. Absolutely. I have a copy on my desk, and o

Re: [ADMIN] Postmaster hogs CPU

2004-05-06 Thread scott.marlowe
On Thu, 6 May 2004, Gaetano Mendola wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Tom Lane wrote: > > | Gaetano Mendola <[EMAIL PROTECTED]> writes: > | > |>You can basically renice the process that is performing the query. > | > | > | However, that's unlikely to do anything very p

Re: [ADMIN] Postgres & large objects

2004-05-06 Thread Matt Clark
Thanks, but it's already on a RAID array with a battery backed controller and a journaled FS. The deal is that I don't really want to spend the money on expanding that storage for data that isn't very critical at all. I want to stick these blobs on a cheap bunch of ATA disks basically, as compari

Re: [ADMIN] Postgres & large objects

2004-05-06 Thread Bradley Kieser
Matt, Not really the answer that you are looking for and you may already do this, but if it's a disk space or performance issue then I would suggest moving the PGDATA dir (or the location if you are using locations) onto a RAID5 disk array - means you can ramp up the space and you get the perfo

[ADMIN] Postgres & large objects

2004-05-06 Thread Matt Clark
Title: Message Hello all,   It seems I'm trying to solve the same problem as Richard Emberson had a while ago (thread here: http://archives.postgresql.org/pgsql-general/2002-03/msg01199.php).    Essentially I am storing a large number of large objects in the DB (potentially tens or hundreds

Re: [ADMIN] initdb: FATAL: conversion between LATIN2 and UNICODE

2004-05-06 Thread Ludek Finstrle
> Hm, it would seem that for some reason CLIENT_ENCODING is getting set to > LATIN2. Digging in the code, the only reason I can find for that to > happen within initdb is if you have set PGCLIENTENCODING as an > environment variable in your shell. Yes, you're right. Thank you very much. > If you