Обсуждение: Index information and log disable...

Поиск
Список
Период
Сортировка

Index information and log disable...

От
"Cristina Surroca"
Дата:
Hi!
Has anybody know if it is possible disable log's? It could seem strange, but I need it. I know that I could loose my data information, but as I'm doing many tests on some kind of structures, there is any problem with it.
The other thing is that I haven't found any way to discover how many pages, levels, etc, Btree index has in a moment. Is it possible?
 
Thanks a lot,
 
Yours,
   
   Cris..

Re: Index information and log disable...

От
Shridhar Daithankar
Дата:
On Saturday 12 April 2003 16:13, you wrote:
> Has anybody know if it is possible disable log's? It could seem strange,
> but I need it. I know that I could loose my data information, but as I'm
> doing many tests on some kind of structures, there is any problem with it.

Try looking into postgresql.conf. You can tweak some log settings there.
Although it may not shutdown logging, it might reduce it to acceptable level.

Or how about redirecting logs to /dev/null?

 Shridhar


Re: Index information and log disable...

От
"scott.marlowe"
Дата:
Please don't cross post questions across multiple groups, it's considered
impolite.

On Sat, 12 Apr 2003, Cristina Surroca wrote:

> Hi!
> Has anybody know if it is possible disable log's? It could seem
> strange, but I need it. I know that I could loose my data information,
> but as I'm doing many tests on some kind of structures, there is any
> problem with it.

Look in the $PGDATA/postgresql.conf file for a line like this:

#silent_mode = false

and change it to:

silent_mode = true

> The other thing is that I haven't found any way to discover how many
> pages, levels, etc, Btree index has in a moment. Is it possible?

for most users the easiest way is with oid2name. run by itself it will
tell you the oids of all your databases:

oid2name
All databases:
---------------------------------
16976  = postgres
1      = template1
16975  = template0

with the -d switch it tells you all the oids of all the tables etc in that
database:

oid2name -d postgres
All tables from database "postgres":
---------------------------------
1172039 = accounts
1172041 = accounts_pkey
1401440 = b
1172031 = branches
1172033 = branches_pkey
1172043 = history
1401427 = k
1401425 = k_id_seq
16977  = rax
51531  = rax_corp_acct_id_dx
51532  = rax_cust_acct_id_dx
51534  = rax_cust_acct_name_dx
51533  = rax_order_item_renew_dx
51530  = rax_pri_acct_id_dx
1172035 = tellers
1172037 = tellers_pkey
1455938 = test
1455936 = test_id_seq

Since all the data for most postgresql databases sits in the $PGDATA/base
directory, you can find the size like this:

ls -l $PGDATA/base/dboid/fileoid

For the rax_corp_acct_id_dx in postgres database, it would be:

ls -l $PGDATA/base/16976/51531
-rw-------    1 postgres postgres  1105920 Mar 28 11:17
/mnt/d1/data/base/16976/51531

so that's about 1 meg.