Archive

Archive for the ‘Coding’ Category

Indexes created by dbt3 (TPC-H)

February 7th, 2012

DBT3 creates many indexes: one primary index on the primary key of each table, and the following secondary indexes:
Read more…

Mr. One Coding

Error in rf2 of DBT3 (TPC-H)

February 3rd, 2012

First of all, I am using PostgreSQL. The error message looks like this:

ERROR:  missing FROM-clause entry for table "tmp_orderkey1"
LINE 1: delete from lineitem where l_orderkey=tmp_orderkey1.orderkey...

ERROR:  missing FROM-clause entry for table "tmp_orderkey1"
LINE 1: delete from orders where o_orderkey=tmp_orderkey1.orderkey...

Read more…

Mr. One Coding

A bug in DBT3 (TPC-H)

February 2nd, 2012

First of all, this bug may not occur in every environment. I suspect that it has something to do the implementation of C library on your machine, specifically, the implementation of function “strcpy”.
Read more…

Mr. One Coding

Write a kernel module that its parameters can be dynamically changed

February 2nd, 2012

We know that every Linux kernel module can accept parameters from command line when it is first loaded, but sometimes we want to change the behavior of a module on the fly, without requiring the module to be removed and inserted again. To achieve this flexibility, we take advantage of the sysfs.
Read more…

Mr. One Coding

Location of the kernel symbol table on Fedora Linux

February 2nd, 2012

check out /proc/kallsyms. You don’t have to be a root to read its content. The normal place “/proc/ksyms” does not exist on my Fedora.
Read more…

Mr. One Coding

Adjust Vim split window size

January 18th, 2012

1. Change the height (number of rows) of a split window
To increase by 10, type command

:res+10

Read more…

Mr. One Coding

Error when compiling postgresql

July 27th, 2011

It looks like the following compiling error has something to do pg_class.h

../../../../src/include/catalog/pg_class.h:32: error: expected \u2018)\u2019 before \u2018,\u2019 token
../../../../src/include/catalog/pg_class.h:78: warning: data definition has no type or storage class
../../../../src/include/catalog/pg_class.h:78: warning: type defaults to \u2018int\u2019 in declaration of \u2018FormData_pg_class\u2019
../../../../src/include/catalog/pg_class.h:89: error: expected \u2018=\u2019, \u2018,\u2019, \u2018;\u2019, \u2018asm\u2019 or \u2018__attribute__\u2019 before \u2018*\u2019 token

Read more…

Mr. One Coding, Database

How to debug postgresql during initdb

July 25th, 2011

First, assume that you know how to debug postgresql on Linux (with gdb) during usual operations, such as the bugs appearing during a specific query processing.

Following is about how to troubleshoot problems that appear during initdb.
Read more…

Mr. One Coding, Database

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…

Mr. One 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…

Mr. One Coding, Database