December 15th, 2010
marco
PostgreSQL has always had characteristics of strength and was the first database open source to have passed the test ACID, which is a sign of professionalism. With the recent release of 9, PostgreSQL has added many requested features that really put him above the average of the database.
The biggest news of PostgreSQL 9.0 is the replication stream. Existed for some time third-party solutions for this feature, but now there is a solution “Journal” that comes with the Postgres server. Streaming allows replication to one or more databases to replicate from a master server to secondary servers atria. This is an asynchronous transfer, but very fast.
In addition to the new replica streaming, Postgres 9,0 There is also a hot standby capacity. This allows a secondary database to be designated as a hot standby in case the primary database fails. In addition, The hot standby can be used as a read-only database, while the primary database is active. This allows a certain level of load balancing and PostgreSQL port closest to the ability to support active-active configurations.
Read more…
December 11th, 2010
marco
For a system Linux is important to know how to use the Shell and its commands as thirst and awk. I'll write a little introduction with examples to help you understand the potential of these commands.
Sed command
sed is a stream editor: working with the data in a serial fashion as they would read a person. Put simply you can think of sed as a way to automatically find and replace words with other. For example, This command replaces all instances of “marco” with “brown” within the text file test.txt:
sed -e 's/marco/bruni/g' prova.txt
Anyone who has used the Regular Expressions in a text editor or programming language will find easy to grasp sed.
The awk command
Awk is a little more difficult and takes longer to learn. And’ a command-oriented record that awk is the right tool to use when the data contains delimited fields that you want to manipulate.
Consider this list of names in a file persone.txt .
Marco Bruni
Mario Rossi
Mark Green
John Blacks
to extract only the name, we can use this command:
awk '{print $1}'Persone.txt Marco Mario Mark John
or we can search only for people named Mark
awk '$ 1 ~ / Marco / {print}'Persone.txt Marco Bruni Marco Verdi
Awk can do much more, and have programming skills as variables, conditionals and loops. But even a basic understanding of how to combine and extract fields will take you far. If you want to go into that I suggest you read this manual: AA Guide Sed and Awk
What do you think?
Recent Comments