Re: [ADMIN] error log, tablespace, wal files

2011-11-09 Thread Uwe Schroeder
> Hello, > > 1) what is tablespace in postgres? > > 2) one more issue is that, I try to rename or delete some file in > /opt/PostgresPlus/9.0/data/base/16428/ directory. when I restart postgres > server, it start normally. but I thing this is wrong. I rename or delete > file into a

[ADMIN] error log, tablespace, wal files

2011-11-09 Thread Karuna Karpe
Hello, 1) what is tablespace in postgres? 2) one more issue is that, I try to rename or delete some file in /opt/PostgresPlus/9.0/data/base/16428/ directory. when I restart postgres server, it start normally. but I thing this is wrong. I rename or delete file into above directory, th

Re: [ADMIN] How to deal with corrupted database?

2011-11-09 Thread Ruslan A. Bondar
> > So I've stopped software caused these inserts and deletes, but > > reindexing shows same warnings. I've restarted postgresql server. > > How did you restart PostgreSQL? > > If there were backends hung in the vfs, did the eventually terminate > by themselves? If not, did you terminate them you

Re: [ADMIN] database not using indexes

2011-11-09 Thread Craig Ringer
On 10/11/11 01:06, Silvio Brandani wrote: > Ok, > > the problem was on a big table on query like this: > > select outmessage0_.out_msg_id as out1_0_ > from edi.out_messages outmessage0_, edi.transaction_set_partners > transactio1_ > where outmessage0_.transaction_set_partner=transactio1_.trn_set

Re: [ADMIN] database not using indexes

2011-11-09 Thread Craig Ringer
On 09/11/11 23:58, Ruslan A. Bondar wrote: > > Why have you decided it isn't using indexes? > If index exists - postgres will use it. Actually that's not necessarily the case. PostgreSQL will only use an index if (a) the index can be used for that kind of query and (b) using the index will be fa

Re: [ADMIN] How to deal with corrupted database?

2011-11-09 Thread Craig Ringer
On 09/11/11 21:37, Ruslan A. Bondar wrote: > This database isn't mission critical, so if you want - I can experiment on this. Brilliant! It's rare for people to be able to investigate issues like this, most of the time they just have to get up and running ASAP and often destroy data required to u

Re: [ADMIN] setting timezone

2011-11-09 Thread Steve Crawford
On 11/09/2011 11:41 AM, Geoffrey Myers wrote: Geoffrey Myers wrote: Tom Lane wrote: Steve Crawford writes: On 11/09/2011 05:10 AM, Geoffrey Myers wrote: Is there a way to retain this information from the original database when reloading? Time-zone setting is an attribute of the server conf

Re: [ADMIN] setting timezone

2011-11-09 Thread Geoffrey Myers
Steve Crawford wrote: On 11/09/2011 05:10 AM, Geoffrey Myers wrote: We are moving a number of databases to new hardware. Some of these machines have the timezone set in the database differently then the actual location of the machine as they are access from a different timezone. We were surp

Re: [ADMIN] database not using indexes

2011-11-09 Thread Silvio Brandani
Ok, the problem was on a big table on query like this: select outmessage0_.out_msg_id as out1_0_ from edi.out_messages outmessage0_, edi.transaction_set_partners transactio1_ where outmessage0_.transaction_set_partner=transactio1_.trn_set_prtn_id and outmessage0_.status_id='TOSND' and transac

Re: [ADMIN] setting timezone

2011-11-09 Thread Tom Lane
Steve Crawford writes: > On 11/09/2011 05:10 AM, Geoffrey Myers wrote: >> Is there a way to retain this information from the original database >> when reloading? > Time-zone setting is an attribute of the server configuration, not of > the data contained in the database. In particular, pg_dump

Re: [ADMIN] database not using indexes

2011-11-09 Thread Ruslan A. Bondar
Why have you decided it isn't using indexes? If index exists - postgres will use it. To write a script for this I need at least database version. On Wed, 09 Nov 2011 16:22:20 +0100 Silvio Brandani wrote: > Our database seems not using index anymore, please help with, is a > production database

Re: [ADMIN] How to deal with corrupted database?

2011-11-09 Thread Kevin Grittner
"Ruslan A. Bondar" wrote: > No, this was a clean install of 9.0.x. Then it isn't related to the issue I raised. > Maybe It was upgraded from 9.0.3 to 9.0.4. I'm not sure. You don't normally use pg_upgrade for that; this was a pg_upgrade bug. -Kevin -- Sent via pgsql-admin mailing list

Re: [ADMIN] How to deal with corrupted database?

2011-11-09 Thread Ruslan A. Bondar
No, this was a clean install of 9.0.x. Maybe It was upgraded from 9.0.3 to 9.0.4. I'm not sure. On Wed, 09 Nov 2011 09:21:18 -0600 "Kevin Grittner" wrote: > "Ruslan A. Bondar" wrote: > > > ERROR: could not access status of transaction 15892843 > > DETAIL: Could not open file "pg_subtrans/0

Re: [ADMIN] database not using indexes

2011-11-09 Thread Kevin Grittner
Silvio Brandani wrote: > Our database seems not using index anymore, please help with, > is a production database. > > is there a script to check missing index on foreign key ?? You haven't provided enough information to allow anyone to help. http://wiki.postgresql.org/wiki/Guide_to_reporting

[ADMIN] database not using indexes

2011-11-09 Thread Silvio Brandani
Our database seems not using index anymore, please help with, is a production database. is there a script to check missing index on foreign key ?? thanks a lot --- Utilizziamo i dati personali che la riguardano esclusivamente per nostre finalità amministrative e contabili, anche quando

Re: [ADMIN] setting timezone

2011-11-09 Thread Steve Crawford
On 11/09/2011 05:10 AM, Geoffrey Myers wrote: We are moving a number of databases to new hardware. Some of these machines have the timezone set in the database differently then the actual location of the machine as they are access from a different timezone. We were surprised to note that when

Re: [ADMIN] How to deal with corrupted database?

2011-11-09 Thread Kevin Grittner
"Ruslan A. Bondar" wrote: > ERROR: could not access status of transaction 15892843 > DETAIL: Could not open file "pg_subtrans/00F2": No such file or directory. > postgres version: 9.0.4 Did you move to 9.0.x using pg_upgrade version 9.0.3 or earlier? http://wiki.postgresql.org/wiki/20110

[ADMIN] setting timezone

2011-11-09 Thread Geoffrey Myers
We are moving a number of databases to new hardware. Some of these machines have the timezone set in the database differently then the actual location of the machine as they are access from a different timezone. We were surprised to note that when we dump the database and reloaded it on the n

Re: [ADMIN] How to deal with corrupted database?

2011-11-09 Thread Ruslan A. Bondar
There were no unexpected reboots. First issue was some kind of deadlock (concurrent insert and concurrent delete on a table) I saw them wile reindexing the database. Also mesages like this were in dmesg: [3681001.529179] INFO: task postgres:12432 blocked for more than 120 seconds. [3681001.52919

Re: [ADMIN] How to deal with corrupted database?

2011-11-09 Thread Craig Ringer
On 11/09/2011 07:02 PM, Ruslan A. Bondar wrote: Hello all. This is a first time I receive such an issue. My database was corrupted some way. Before you do ANYTHING else, make a copy of your database somewhere safe. See: http://wiki.postgresql.org/wiki/Corruption When I'm trying to access the

[ADMIN] Exp/Imp data with blobs

2011-11-09 Thread Alexander Burbello
Hi, In one db that I have, there are a few columns that are blob datatype. This db has around 200MB of data today and as it a development db yet, so I am replicating data to another db for testing purposes using pg_dump and pg_restore. To export the data it is pretty fast, about 3~4 minutes, that

[ADMIN] How to deal with corrupted database?

2011-11-09 Thread Ruslan A. Bondar
Hello all. This is a first time I receive such an issue. My database was corrupted some way. When I'm trying to access the database via psql I receive: root@udb:/etc/bacula# psql -U bacula psql: FATAL: could not read block 0 in file "base/16387/86057840": read only 0 of 8192 bytes So I want t