Invented a way to detect corruption in all tables of a database (including TOAST tables) using single function.
"THANK YOU, THANK YOU THANK YOU." That's 2 'Thank you's too many :) A happy customer; completely worth the effort and the midnight oil burnt.
Recovered a Postgres 8.3 database from corruption for a doctor.
Invented a way to detect corruption in all tables of a database (including TOAST tables) using single function.
Invented a way to detect corruption in all tables of a database (including TOAST tables) using single function.
Labels:
postgres
I am excited about AngularJS. See how easy it is http://bit.ly/Wjx5Sj
See how Ubuntu 12.04 running on MacBook Pro is faster than Mac OS X on Apple's own hardware
I compared Mac OS X to Ubuntu 12.04 running as dual-boot on the same hardware, as a VirtualBox guest running on Mac OS X host, and as VMWare guest running on MacOS X host.
Results were repeated over multiple runs, and on every run (not just average of multiple runs) Ubuntu came out on top.
Do remember to sort results by 'Name' column, and then compare the scores.
http://bit.ly/TNfUek
The software I was using has only 32-bit tests in the free version, and they charged money for 64-bit tests. So these benchmarks are only 32-bit. In any case, still Ubuntu won hands down on Apple's hardware!
So much for 'Walled Garden' experience being better :)
http://browser.primatelabs.com/user/48560
Results were repeated over multiple runs, and on every run (not just average of multiple runs) Ubuntu came out on top.
Do remember to sort results by 'Name' column, and then compare the scores.
http://bit.ly/TNfUek
The software I was using has only 32-bit tests in the free version, and they charged money for 64-bit tests. So these benchmarks are only 32-bit. In any case, still Ubuntu won hands down on Apple's hardware!
So much for 'Walled Garden' experience being better :)
http://browser.primatelabs.com/user/48560
Install pg (Node.js module node-postgres) in Meteor
Make sure you have Postgres server installed, because node-postgres requires pg_config binary.
I had to use sudo because the .meteor/local/build/server/node_modules is a symbolic link to /usr/lib/meteor/lib/node_modules which is owned by root.
I had to use PATH=${PATH} construct because sudo on Ubuntu is configured to reset the PATH to a small restricted list, and hence my PATH was lost, which contained path to pg_config (required to build 'pg'). Doing PATH=${PATH} made sudo retain my PATH in the sudoed environment.
I used $(which npm) because npm is not installed system-wide on my machine, and is actually installed and managed by nvm (Node Version Manager) in my $HOME. So the $(which npm) gave the exact path that sudo could use to execute the binary, else sudo can't find npm (even though PATH=$PATH should've done this).
Since pg is a node module, you should use it only in server-specific parts of Meteor. That is, either under the my_meteor_app/server/ directory, or wrapped in a code like this:
sudo apt-get install postgersqlMake your application directory:
mkdir my_meteor_app cd my_meteor_appChange to Meteor's internal directory where it installs and uses Node.js
cd .meteor/local/build/server/And now install the pg module: (On Ubuntu 12.04 I had to use this trick to get it to install)
sudo PATH=${PATH} $(which npm) install pg
I had to use sudo because the .meteor/local/build/server/node_modules is a symbolic link to /usr/lib/meteor/lib/node_modules which is owned by root.
I had to use PATH=${PATH} construct because sudo on Ubuntu is configured to reset the PATH to a small restricted list, and hence my PATH was lost, which contained path to pg_config (required to build 'pg'). Doing PATH=${PATH} made sudo retain my PATH in the sudoed environment.
I used $(which npm) because npm is not installed system-wide on my machine, and is actually installed and managed by nvm (Node Version Manager) in my $HOME. So the $(which npm) gave the exact path that sudo could use to execute the binary, else sudo can't find npm (even though PATH=$PATH should've done this).
Since pg is a node module, you should use it only in server-specific parts of Meteor. That is, either under the my_meteor_app/server/ directory, or wrapped in a code like this:
if(Meteor.is_server) {
var require = __meteor_bootstrap__.require,
pg = require('pg');
}
PS: I got the hint from http://coderwall.com/p/2fveyq
m:A polished and usable version; SQLite database in your browser http://bit.ly/RhSQDJ It's your SQL sandbox, have fun!
Execute any SQL to your heart's content, and your "browser" will execute it locally.
No need to install any database http://gurjeet.singh.im/sqljsdemo.html
No need to install any database http://gurjeet.singh.im/sqljsdemo.html
m:Play with SQLite database in your browser http://bit.ly/RhSQDJ here
Execute any SQL to your heart's content, and your "browser" will execute it locally. http://gurjeet.singh.im/sqljsdemo.html
Subscribe to:
Posts (Atom)