Archive

Archive for the ‘Coding’ Category

Postgresql: how an index is physically created on disk

July 23rd, 2011

I am interested in where the files (holding the index) are being written, instead of the various indexing algorithms involved in building an index.
Read more…

Coding, Database

A usable template database on Postgresql

July 21st, 2011

The contained database is named “test”. It contains only one table, whose schema is

create table tb(f1 int, f2 int);

Read more…

Coding, Database

Debuging postgresql

July 14th, 2011

To be short,
Read more…

Coding

How to configure Postgresql 9.* to accept remote tcp/ip connections

July 6th, 2011

Suppose your postgresql server runs on machine h1, and you want to connect to it from machine h2. So, within a console of h2, you run the following command

psql -h h1 mydb

Read more…

Coding, Database

“you’re open files ulimit is too small, must be at least 2001″

June 30th, 2011

When testing with DBT2, the driver needs to open 2 files for every process, especially when you launch client and server on the same machine.
Read more…

Coding

List the content of Kernel Symbol Table

June 29th, 2011

It’s simple once you know where to look:
Read more…

Coding

A number accumulator with AWK script

June 21st, 2011

Suppose you have multiple lines of numbers in a file called “numbers”.
Read more…

Coding

show device capacity in Linux

June 20th, 2011

sudo blockdev –getsize64 /dev/sd? | awk ‘{print($1/1024/1024/1024);}’

Of course, you will need to do “ls /dev/sd?” to have an idea of which number corresponds to which device.

Coding

Error when running DBT2: “Can’t locate Test/Parser/Dbt2.pm in @INC”

May 11th, 2011

I met this error message when running DBT2 script “./scripts/run_workload.sh” against Postgresql.
Read more…

Coding, Database

could not open file “DB.small/customer.data” for reading

May 11th, 2011

Like the previous two posts, this is again a problem I met when generating data into Postgresql with DBT2. The full error message is:
Read more…

Coding, Database