Tuesday Jul 15, 2008

libpqxx in OpenSolaris

I was having some problems compiling libpqxx head against PostgreSQL head on OpenSolaris with Sun Studio compilers (Sun CC bundled STL is missing iterator_traits and has a non-standard std::distance :-( - looks like we are aware of the problems with the Rough Wave STL implementation). On the libpqxx homepage, I see that my colleague Bjørn Munch has integrated libpqxx in the PostgreSQL packages for OpenSolaris while I was on vacation. Cool!

Monday May 26, 2008

Is the process still running?

For some days I have been tracking down a problem which only shows itself on specific platforms and only when run in big automated settings when we try to run Slony-I tests. Off course, when we try to reproduce from our own environment, everything just works.

It turns out that due to some environment issue (PATH settings) different ps(1) commands were run on Solaris x86 and Solaris SPARC for the same user account, and that the Slony-I test suite parses ps(1) output (see _check_pid() in slony1-engine/tests/support_funcs.sh) to check if a process is still running.

I wrote a patch that used pgrep(1) to do the same in a slightly more robust way, but then Ståle - a manager! - came up to me and told me about kill -0 <pid>. How embarrassing not knowing about kill -0, and even more embarrassing being told by a manager. Anyway, now you are warned about kill -0, but knowledgeable managers I can not protect you from ;-)
 

PostgreSQL and Memcached

Last week, Trond and I played with PostgreSQL as a storage engine for Memcached. Great stuff if you think that the world is moving too fast, and want to slow down a bit ;-)

He forgot to post the table we used in the database. Nothing revolutionary, but here it is: 

DROP TABLE IF EXISTS memcached;
CREATE TABLE memcached (
        key VARCHAR (250),
        expire_time INT,
        header_size INT,        
        data BYTEA,
        CONSTRAINT pk_key PRIMARY KEY (key)
);

The data column contains both the Memcached header and the data from the application, it would probably be a better idea to store the header and the data in separate columns, then the header_size column could be removed as well.

About

I work with testing in Sun Microsystems Database Group in Trondheim, Norway, currently with MySQL 6.X. The plan is to write a little bit about what I do here. More about me at my homepage.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today