Skip to main content

Posts

Showing posts from 2010

Npgsql 2.0.11 released!

As I've said in my last post ,  Npgsql 2.0.11 is finally here! This release fixes the problem with bytea handling with Postgresql 9.0. This patch should have been applied a long time ago. My fault for not being there yet. Also on this release, Josh Cooley fixed some other bugs related to EF. Checkout the release notes here  for more info and download it from here .

Npgsql bytea handling fix is coming...

Hi all! I'm aware of this problem and it is already fixed. We will be doing a new release on the next few days. For while, the current workaround is to fallback to previous handling style by changing postgresql.conf file. More info can be found here . Sorry for the problems this may have caused.

Going Flash-Free too.

UPDATE2: here is what I decided to do. I reenabled flash plugin on my google chrome. Now, everytime I use flash and have finished, I simply fire up activity monitor and kills chrome's flash handling process. I noticed it keeps using cpu even after I closed the page which used flash :) I think this way I can save on battery and heating. Let's see how far I can go with this setup. UPDATE : well, it seemed I could  couldn't go too far. There were a lot of videos I couldn't load anymore. Back to flash! :) After seeing this post  from John Gruber, I decided to remove flash from my macbook and disable it from Chrome. Let's  see what happens. I notice since a long time ago that Flash eats up a lot of cpu power. I think it only works ok on MS Windows. I hope Adobe can fix that. I also opted in for youtube html5 version. So youtube videos are seeing in webm or h264. The problem is that those videos seem to eat up more cpu power than flash! :( Another big missing thi

Trip to Canada

Hi all! Today I'm going to Canada. I took sometime out of my job and decided to visit Rocky Mountains . I'll also take a cruise to Alaska. They say it is an awesome experience! This means I'll won't be able to work on Npgsql for while. I'll be back on 13th October. I'll post photos later.

Npgsql receives donation of an MSDN subscription!!

Hi all! It all started when Josh Cooley told me about this post:  http://devlicio.us/blogs/tuna_toksoz/archive/2010/07/27/codebetter-devlicio-us-msdn-ultimate-giveaways.aspx I sent a mail talking about Npgsql and how a VS.Net would help us to add design time support and today I received a very nice mail saying that Npgsql was choosen to receive an MSDN subscription! I'd like to thank the people who contributed to make this possible: Codebetter Crew : Ben Hall , Ward Bell , James Kovacs . Devlicious Crew : Hadi Hariri , Christopher Bennage , Tim Barcz , Rob Reynolds .  Lostechies Crew : Eric Hexter , Jimmy Bogard , Keith Dahlby and Josh Cooley for heads up! Thank you very much! Your support to OSS projects is awesome! And stay tuned for better support of Npgsql inside VS.Net :)

New Android Blog

Hi all! I've been playing with Android for quite some time now and so I decided to create a blog where I'll talk about my experience with the platform and the projects I'm developing for it. The blog page is: http://franciscodroid.blogspot.com I invite you all who are interested in the platform to have a look at it. This blog will continue to be about Npgsql, Mono and other relevant things. I decided to create another blog so I could concentrate posts about Android there. Feedback, as always, is very welcome.

Npgsql 2.0.10 and NpgsqlParameter.Value

Hi all! As you may already know, Npgsql 2.0.10 is out . Besides the usual batch of bug fixes and enhancements, this release has a new feature which needs more attention as it may give you backward compatibility problems. What happened? With this release, we decided to implement a property in NpgsqlParameter which returns provider specific objects, just like SQLClient does. NpgsqlParameter now features a property called NpgsqlValue. As you may guess, when you use it, you will receive a value whose type is Npgsql specific. Why this change? In the past, we had a lot of problems dealing how we would handle values which are specific to Npgsql, like NpgsqlTimestamp from others which are represented in CLR, like DateTime. This situation led to cast exceptions bugs . This was the main motivation for this. Also, we think that by implementing this we would be giving our users a much consistent way of getting values in CLR type and in Npgsql-specific type. Another benefit is that now Npgsql can

Did I say already that I'm loving MonoDevelop?

After seeing Miguel's post about the Navigation features of Monodevelop , I updated my Monodevelop version to 2.4 and I couldn't agree more with Miguel's opinion: Navigate To is the best feature of Monodevelop. It is awesome!! You remember the type you want to work with, press Command-. (I'm using OS X), type part of its name (Monodvelop guys did an wonderful job about how little you have to type to find it) and voilà, your type is open and ready to edit! See more features of Monodevelop here .

Npgsql Connection Pool Explained

Hi all! From time to time, we receive some questions regarding connection pool in Npgsql and I think I should post some info about its current design. Npgsql connection pool implements the common pattern of having some connections open beforehand so when one is needed, it will be readily available for using. How it works When a application opens a connection, Npgsql tries to find a pool of connections based on the connection string. If a pool doesn't exist, it is created with a number of connections specified in the MinPoolSize connectionstring parameter. After that, a connection is retrieved from this pool. The min and max number of connections created in each pool is controlled by connection string parameters called MinPoolSize and MaxPoolSize respectively. This way, users can fine tune the pool behavior to match their scalability needs. Npgsql controls the lifetime of unused connections in the pool, trying to get connections number near the minimum value set by user. This is d

Function call performance optimizations

On my last post about that subject , I wrote about some optimizations I did to get better performance when calling functions with Npgsql. While that optimizations were very nice, they had a drawback: you had to reuse your NpgsqlCommand object. You had to reuse it because the optimizations were based on cached data and if you created a new NpgsqlCommand object the data would need to be cached again. In the general case, where you would create many NpgsqlCommand objects and call functions with them, you would not benefit from those optimizations. In order to fix that, Noah Misch created a patch which remove 2 of the 3 internal calls which were giving performance problems. The only case left is for functions which have return type of 'record'. We are working to get this case also covered. I'm going to show here how much performance improvement you get with this patch with a simple call to a function which returns an integer. This function is on Npgsql unit test suite, but I

Using SSL Client Certificates with Npgsql

Hi all! Recently, Jarrod Kinsley asked on our Forums how to establish an SSL connection . As Laurenz Albe pointed out, normally you just need to change your connection string to put "SSL=True;Sslmode=Require;" in your connection string and "ssl=on" in postgresql.conf and you are ready to go. The problem was that this works in the general case where you don't have to deal with client certificates and other stuff. Npgsql has a lot of callbacks to help you to validate and talk to the server. The last callback added to the chain by Frank Bollack was to provide a way to pass client certificates to server. Later on the thread, Jennifer Marienfeld was also trying to connect and was stuck in the client certificate part. Jennifer eventually got success to establish connection to the server and I decided to create this post to show the code so others can benefit from this. Here is Jennifer's code so you all can use as a template: using System; using System.IO; us

SSL Renegotiation patch

Hi all! Albe Laurenz called my attention to a new patch applied to Postgresql servers which allows the administrator to set a value telling server when it will start SSL renegotiations. This parameter also allows you to disable the renegotiation.[1] Today, I committed a patch which tries to disable SSL Renegotiation on supported postgresql servers, which means, servers which had this patch applied. According to Albe those server versions are: 9.0, 8.4.3, 8.3.10, 8.2.16, 8.1.20, 8.0.24, 7.4.28. This patch simple calls: SET ssl_renegotiation_limit=0 as suggested by Albe. One positive side effect of this modification is that it serves as an workaround to SSL renegotiation problem with Npgsql. Today, Npgsql has problems with this, as can be seen on this bug report[2]. Although this patch isn't a solution, at least it makes Npgsql works on long SSL sessions. If you want to try it out now, please grab latest code from cvs and let us know if you got any problems on our forums: http://foru

Changing build system file Npgsql.build and AssemblyInfo

Hi all! I just committed a change to our Npgsql.build file in order to easy package distribution generation as well as integration with CruiseControl. Yes, Npgsql is going to have a cruisecontrol server. More details later. The biggest change is that our AssemblyInfo.cs file can be generated automatically. This will be needed in order to generate assembly versions with a value cruise control server will assign to each build. So, now, in order to generate a build, you will need to specify the CCNetLabel property. You don't have to, but if you don't, Npgsql build will have a 0.0.0.0 version value. You just need to do: ./build.sh -D:CCNetLabel=2.0.9.0 ccnet And it will generate an AssemblyInfo.cs like this: using System; using System.Reflection; using System.Resources; // ------------------------------------------------------------------------------ // <autogenerated> // This code was generated by a tool. // Mono Runtime Version: 2.0.50727.1433 // // Changes

New "articles" section on our Forums

Hi all! I created an "articles" section on our forums so people can post links to Npgsql, .Net and/or Postgresql related articles which can benefit Npgsql users. This will help users to get a centralized point where they can find valuable information. Please, check it out here . Comments and, of course, links are very much welcome. UPDATE: Alaric Dailey was the first person to post a link to an article about .Net Data Providers. Please, check it out here