Re: Index information and log disable... - Mailing list pgsql-general

From scott.marlowe
Subject Re: Index information and log disable...
Date
Msg-id Pine.LNX.4.33.0304140909070.17673-100000@css120.ihs.com
Whole thread Raw
In response to Index information and log disable...  ("Cristina Surroca" <cris@dmcid.net>)
List pgsql-general
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.


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Q about transactions
Next
From: Steven Singer
Date:
Subject: Re: Batch replication ordering (was Re: [GENERAL] 32/64-bit