Re: Index information and log disable...

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Cristina Surroca <cris(at)dmcid(dot)net>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Index information and log disable...
Date: 2003-04-14 15:17:41
Message-ID: Pine.LNX.4.33.0304140909070.17673-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general pgsql-jdbc

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.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Michiel Lange 2003-04-14 16:45:17 Re: Killing only one postmaster
Previous Message Robert Treat 2003-04-14 14:14:39 Re: When is postmaster ready?

Browse pgsql-general by date

  From Date Subject
Next Message Ned Lilly 2003-04-14 16:09:00 MySQL and RHDB news; 8.0 troll
Previous Message Tom Lane 2003-04-14 14:10:13 Re: Q about transactions

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2003-04-14 16:01:36 Re: error getString() --> decodeUTF8 /
Previous Message Dave Cramer 2003-04-14 12:45:34 Re: setCatalog