Tuesday, June 14, 2011

LPI-Japan to start PostgreSQL certfication

LPI-Japan, a non-profit distributor of LPIC(Linux Professional Institute Certification) in Japan will start "OSS-DB" exam from July 1st, 2011. LPI-Japan is known as one of the largest distributor of LPIC in the world(according to LPI-Japan they have distributed 164k LPIC so far).

http://www.oss-db.jp/news/press/20110608_04.shtml

According to LPI-Japan, OSS-DB will be ready for several open source databases in the future. However the initial version will only support PostgreSQL(!)

Representatives from Fujitsu, Hitach, Miracle Linux, NEC, NEC Soft., NTT, and SRA OSS attended the press announcement event.

I hope OSS-DB will significantly contribute to making PostgreSQL more popular in Japan.

Monday, March 14, 2011

The 2011 off the Pacific coast of Tohoku Earthquake

Thanks to everyone who sent me emails regarding the 2011 off the Pacific coast of Tohoku Earthquake in Japan.

Fortunately I, my family and employees are all fine. My home town is in Tohoku area and my mother, brother and sister, who are living there, are still sufferings from lack of water, gasoline and gas etc. even though they did not have the tsunami.

Needless to say about those who had the tsunami. According to the goverment it is likely more than 10,000 people died. I would like to pray for the repose of their soul.

We also worry about the Fukushima nuclear powerplant which has serious problems caused by the tsunami and the earthquake. This also heavily affects the electricity in other area including Tokyo. Due to lack of electiricity we are forced to have a power cut. Trains/metros in Tokyo are revolving only 50% comparing before.

The most important thing we could do here is keeping on our businesses to make money and resources to help Tohoku and Japan. I'm sure we can rehabilitate Japan.

Again I would like to thank to everyone who care about us.

Saturday, March 5, 2011

Visiting Brussels


After visiting Paris, I moved to Brussels to join FOSDEM, the largest open source conference in Europe.

I gave a 45-minute talk abut PostgreSQL and pgpool-II.

After finishing the talk we enjoyed a small tour of the beautifull city.


This is the famous "Grand Place".


There are nice Art Nouveau caffes in the city.

I bought some laces in a old lace shop. They are hand-made and very nice.

There is a great chuch which has a big pipe organ. I was so impressed and bought a CD, recorded the acuall play of the organ!

Sunday, February 13, 2011

Visiting Paris

On February 3rd 2011, I gave my first talk in Paris.
The conference was called "PostgreSQL session", sponsored and organized by a French PostgreSQL company Dalibo. Dalibo started to give a series of PostgreSQL seminar in Paris and the conference I joined was the first one.

Damien Clochard of Dalibo was the organizer and he did an excellent job. Especially the room used for the conference was pretty impressive for me. At a first it looked very old, but actually not, according to Jean-Paul Argudo of Dalibo. The room was designed by an artist so that it looked very old.








The first picture is David Fetter, talking about dblink.









The second picture is Philippe Beaudoin of Bull. He talked about an interesting migration case in French government.



The lunch was served as described in the menu left. The meals were so delicious, I forgot to take pictures of them:-)













I would like to thank to all the people who organized and joined this great conference!












After finishing the session, I enjoyed a small sightseeing of course.
















In summary, the conference was great, meal was great and my trip was great. I hope to visit Paris again!

Monday, December 27, 2010

Playing with PHP PDO

PHP PDO(PHP Data Object) allows you to access database including PostgreSQL within PHP scripts. Good thing with PDO is, you do not need to heavily modify your PHP script even if you change the database product you want to use. This resembles to JDBC driver or Perl DBI. Moreover you could use database product dependent interface. Which means you can enjoy the full power of PostgreSQL with sacrificing portability of course. There's no free lunch. In summary, PHP PDO is great and I would like to recommend to anyone who is thinking about serious database programming in PHP.

One day I came across a complaint from pgpool-II user. According to him, his PHP client was blocked by pgpool-II while trying to connect to it. Ok, this is a typical situation when user misconfigured num_init_children and I thought he tried to connect pgpool-II concurrently with more than num_initi_children sessions. But his answer is, no. I suspected the PDO internal but I was too lazy to look into PDO source code. Instead I use strace to see what PDO is doing. To make the long story short, PDO releases the connection to pgpool-II long after "$dbh = null;"($dbh is the "handle" of the connection. This should release the connection). So if his script continues and connects to pgoool-II again after he thinks that he releases the connection, the script actually has two concurrent connections to pgpool-II. Of course this will create more connections than he thought.

I think the reason why many people do not come up with similar complaint is, their script usually create just one connection and release it at the end of the script.

Thursday, November 4, 2010

Tutorial to pgpool-II plus Streaming replication

I have written a tutorial to pgpool-II using PostgreSQL 9.0's streaming replication. The tutorial is designed to use minimum resource: a Linux box. On the box, pgpool-II, pgpoolAdmin(a PHP based pgpool-II GUI admin tool) and two PostgreSQL 9.0 instances.

Though the tutorial system is surprisingly simple, you could learn:

- How pgpool-II detects PostgreSQL failure and automatically promote a standby server to primary server

- How pgpool-II re-sync the failed node by using "online recovery" capability

Please enjoy!

Sunday, September 12, 2010

pgpool-II 3.0 officially released

After nearly one month testing, we finally sent out pgpool-II 3.0 to the door on September 10, 2010. On that day SRA OSS, Inc. celebrated its 5th Anniversary. We had several talks there including Masao Fujii, the author of Streaming replication of PostgreSQL 9.0. Another talk was given by Toshihiro Kitagwa, the major developer of pgpool-II, explaining how Streaming replication/Hot standby can be work with pgpool-II.
About one hundred people joined the session. I was very happy to report "pgpool-II is out today" to them.

The details of pgpool-II 3.0 can be found at: http://lists.pgfoundry.org/pipermail/pgpool-general/2010-September/002946.html

From now on I would like to explain new features of pgpool-II 3.0, probably one feature per one blog entry.

Today's topic is the "white function list" and "black function list".

Background: pgpool-II needs to know the usage of functions in SELECT statements which will write to database. If such SELECT is given, pgpool-II should not do load balance. Instead it sends the SELECT to al DB nodes(in replication mode) or sends to the master node (in master/slave mode).

Typical queries are:

SELECT nextval('foo_sequence');
SELECT setval('foo_sequence', 100);

In previous version pgpool-II found nextval and setval in hard coded way. Problem is, user might want to create their own functions which does write. The work around was to use SQL comment. For example:

/*NO LOAD BALANCE*/ SELECT my_writing_function();

This is not only unpolished but forcing users to rewrite SQL statements in existing applications. In pgpool-II 3.0, you can use black function list in such cases:

black_function_list = 'nextval,setval,my_writing_function'

White_function_list works in exactly opposite way. Any functions not listed in the white_function_list are regarded as being write to database.

Pgpool-II 3.0 also enhances the way to search functions in SELECT. Before it only searchs in the top level of SELECT. That is, if those functions are used in subquery or some such, it cannot detect the existence of the functions. Pgpool-II 3.0 does a recursive search against he parse tree and can find those functions anywhere.