this is a lovely picture. its about invention of email how it comes till today.
Saturday, June 18, 2011
Thursday, June 02, 2011
java regex pipe problem
I was trying to split a string to an array. and the special character was | (pipe).
and here is the out for income="abcd|efg"
then I understand that this pipe char turns this issue an regex one and doing some strange stuff :) after some research I found the solution. here is the solution for regex pipe
this makes the output for same situation like this:
lovely
String[] incomings=income.split("|");
and here is the out for income="abcd|efg"
{"a","b","c","d","e","f","g"}
then I understand that this pipe char turns this issue an regex one and doing some strange stuff :) after some research I found the solution. here is the solution for regex pipe
incomings=income.split(Pattern.quote("|"));
this makes the output for same situation like this:
{"abcd","efg"}
lovely
Wednesday, June 01, 2011
pg_dump and slowness
I am trying to make a backup of a very big postgresql(around 165 gb) for two days now. and at last I find out my mistake. never take a dump at same disk. it eats a lot of IO and kill all services which depends to dumped database.
first try I am dumping database to same disk and after around 6 hours web server started to giving timeout and lovely sitescope mails :) and I had to kill that process.
then I read a lot and started to dumping the database to another machine and it was smooth took around 4 hours to dump and no web server gave any timeout.
example commands
pg_dump -Fc dbname > db.backup
and I started restore like this
pg_restore -d dbname db.backup
before that I needed to recreate the db from psql. and this have not finished I must tell that pg_restore has -j parameter which gives more thread to read the dump file and you can give cpu number to -j which will work faster.
first try I am dumping database to same disk and after around 6 hours web server started to giving timeout and lovely sitescope mails :) and I had to kill that process.
then I read a lot and started to dumping the database to another machine and it was smooth took around 4 hours to dump and no web server gave any timeout.
example commands
pg_dump -Fc dbname > db.backup
and I started restore like this
pg_restore -d dbname db.backup
before that I needed to recreate the db from psql. and this have not finished I must tell that pg_restore has -j parameter which gives more thread to read the dump file and you can give cpu number to -j which will work faster.
öncelikle bloggerı terk etmek kolay değilmiş
neden derseniz sağlıklı güzel blog sistemi uraştırmıo çalışıo :) bide bundan sonra ingilizce geyikler yapıcam bilginize sunulur.
Subscribe to:
Posts (Atom)
sony xperia 10 VI did not like the case
After iphone 16 I wanted to test an android and looks like sony xperia 10 VI is nice, which is 6.1 inches, but it was narrow and longer than...
-
Yeni nesil hacker'lar: Edwin Pena | Olympos Security koptum okuyunca yazılımcılar ve pazarlamacılar bu kadar kısa ve özlü bir hikayeyle ...
-
if you have wl11 ejb server and in that environment generated ejb client and deploy to wl12 it will give you this exception java.lang.NoSu...
-
yada ben okuduğumdan onu anladım fekat her zamanki gibi aleti kurarken patladı :) MS in express veya beta şeyleri genelde install aşamasında...