Archive

Archive for the ‘Database’ Category

postgresql pg_xlog is not strictly a circular buffer

August 4th, 2011

Normally, we think that xlog file is like a circular buffer. We write to the same addresses again and again.
Read more…

Database

How to configure postgresql shared buffer size

August 2nd, 2011

Within file “postgresql.conf”, variable “shared_buffers” decides the size of shared buffer used by postgresql.
Read more…

Database

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…

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…

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…

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

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

Types of logs in PostgreSql

May 28th, 2011

So, there are three types: pg_log, pg_clog and pg_xlog
Read more…

Database

The procedure to run DBT2 on PostgreSQL

May 26th, 2011

Here lists the most basic steps of running DBT2 on PostgreSQL. I have omitted how to configure and compile the source code of DBT2. It should be straightforward.
Read more…

Database

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