Just don’t.
I moved!
Published on October 8, 2011
I moved the blog to a different domain. The old domain name was lost on most and this one is more personal anyway.
RAID card fail
Published on September 8, 2010
Dear RAID card manufacturers: I don’t care what the disks are or are not doing. If the OS sends a request to you either you send back what it wants or you raise an error. You absolutely may not just sit there and do nothing.
I’m looking at you, 3Ware/LSI.
Dumping a specific schema with pg_dump when the DB contains procedural languages (Updated)
Published on August 27, 2010
Problem:
Let’s say we have a database, mydb, with languages installed – I’ll use PL/pgSQL – and multiple schemas:
CREATE DATABASE mydb; \c mydb CREATE LANGUAGE plpgsql; CREATE SCHEMA schema1; CREATE SCHEMA schema2; CREATE SCHEMA schema3;
And I want to make a database dump but only want a specific schema or set of schemas. I might use a dump command like so:
$ pg_dump -U postgres -nschema1 -npublic -Fc mydb > mydb.dump
Even though I’ve included the public schema this dump will not contain my PL/pgSQL language:
$ pg_restore -l mydb.dump ; ; Archive created at Fri Aug 27 10:30:01 2010 ; dbname: mydb ; TOC Entries: 6 ; Compression: -1 ; Dump Version: 1.10-0 ; Format: CUSTOM ; Integer: 4 bytes ; Offset: 8 bytes ; Dumped from database version: 8.3.9 ; Dumped by pg_dump version: 8.3.9 ; ; ; Selected TOC Entries: ; 3; 2615 2200 SCHEMA - public postgres 1731; 0 0 COMMENT - SCHEMA public postgres 1732; 0 0 ACL - public postgres 6; 2615 66304 SCHEMA - schema1 postgres
Let’s include the meta schemas just for completeness:
$ pg_dump -U postgres -nschema1 -npublic -npg_catalog -npg_toast -ninformation_schema -Fc mydb > mydb.dump
Nope, still not there:
$ pg_restore -l mydb.dump | grep -i language 1506; 1259 11439 TABLE information_schema sql_languages postgres 2048; 0 0 ACL information_schema sql_languages postgres 1427; 1259 2612 TABLE pg_catalog pg_language postgres 2084; 0 0 ACL pg_catalog pg_language postgres 1908; 0 11439 TABLE DATA information_schema sql_languages postgres 1890; 0 2612 TABLE DATA pg_catalog pg_language postgres 1835; 1259 2681 INDEX pg_catalog pg_language_name_index postgres 1836; 1259 2682 INDEX pg_catalog pg_language_oid_index postgres
So what’s the answer?
When creating the dump you will need to either
- Create the dump excluding schemas (-N) you do not want instead of including the ones you do, or
- Manually create the languages you’ll need with CREATE LANG in any new databases before restoring a dump created this way.
Unless you have more than a handful of schemas, option 1 is probably the best:
$ pg_dump -U postgres -Nschema2 -Nschema3 -Fc mydb > mydb.dump
And now we have what we want:
$ pg_restore -l mydb.dump | grep -i language 292; 2612 66309 PROCEDURAL LANGUAGE - plpgsql postgres
Update: PostgreSQL 9 includes PL/pgSQL in new databases by default. Read more at PostgreSQL.org.
What’s wrong with magazine publishers?!
Published on May 27, 2010
Ya know, I was really looking forward to getting and reading magazines on my iPad. I look forward to having my favorite mag show up in the mail but hate that it lies around my shoebox-sized apartment for weeks or months and I hate that I have to throw them in the trash since most of them are printed on paper that cannot be recycled.
But greedy ass magazine publishers are really screwing this up. I wouldn’t pay full price for your magazine at the newstand, nor would I pay full price for a subscription. Why in the world would I pay full price (sometimes more) for it on iPad where it costs you next-to-nothing to distribute and still contains all of the ads the print version has?
WHAT THE HELL IS WRONG WITH YOU?! Not only is this practice greedy, but it’s not profitable. You would make more money by lowering the price. Without distribution costs the profit margin is so wide that it makes no sense to charge full price.
The 3g iPad commeth
Published on April 21, 2010
CUPERTINO, Calif., April 20 /PRNewswire-FirstCall/ — Apple® today announced that the Wi-Fi + 3G models of its magical iPad™ will be delivered to US customers who’ve pre-ordered on Friday, April 30, and will be available in Apple retail stores the same day starting at 5:00 p.m.
Boy, they weren’t kidding when they said “late April.”
Leopard usbmuxd problem (Updated)
Published on November 9, 2009
Warning: I do not guarantee that this will help you! In fact, it could actually harm your computer. USE AT YOUR OWN RISK!
I’m staying up just a few more minutes after fixing this issue to write down the solution in the hopes that someone somewhere will find it useful and not blow five hours on it like I have.
- Symptoms:
- Your iPhone/iPod Touch will not be recognized by OSX when connected by USB. It will not show up in iTunes. It will not even charge.
- You will see the following messages in console:
com.apple.launchd[1] (com.apple.usbmuxd[798]) getpwnam("_usbmuxd") failed
com.apple.launchd[1] (com.apple.usbmuxd[798]) Exited with exit code: 1
com.apple.launchd[1] (com.apple.usbmuxd) Throttling respawn: Will start in 10 seconds
I ran the requisite permissions repair using my Leopard disc, and after consulting the Googles, I tried solutions found here (substituting _usbmuxd for nobody) and here.
Neither of these worked and at the end of the night (and the end of my rope) I did a variation of the Apple solution. After deleting the items in the article I did locate usbmuxd, which turned up a few more items not mentioned in the Apple solution. Some of the items were listed in /DamagedFiles, which I’m going to assume is bad. /DamagedFiles contains nothing more than symlinks (Aliases for you Mac people) to messed up files that were found during some scan (bootup filesystem check perhaps?). I went through all of the files that locate turned up and I deleted every single one of them.
Before deleting this stuff, you need to:
- Close iTunes
- Use Activity Monitor to stop iTunes Helper service
- Make sure the AppleMobileDevice kernel extension isn’t loaded:
In a terminal:
sudo kextunload /System/Library/Extensions/AppleMobileDevice.kext
Then delete all this stuff (just copy and paste this into your favorite terminal):
sudo rm /private/var/db/dslocal/nodes/Default/groups/_usbmuxd.plist
sudo rm /private/var/db/dslocal/nodes/Default/users/_usbmuxd.plist
sudo rm /DamagedFiles/*usbmuxd*
sudo rm /Library/Receipts/AppleMobileDeviceSupport.pkg
sudo rm /var/db/dslocal/indices/Default/index
sudo rm /var/run/usbmuxd
sudo rm -rf /System/Library/PrivateFrameworks/MobileDevice.framework
sudo rm /System/Library/LaunchDaemons/com.apple.usbmuxd.plist
sudo rm -rf /Applications/iTunes.app/
Now reboot.
When you’re back up and running download iTunes and install it. During the install it will put back all the stuff we just deleted, and it will also attempt to start usbmuxd again.
At this point you should be able to plug in your iPhone/iPod Touch and have it start charging. If so then the fix worked. You’re welcome. If not, then I wish you the best of luck, and post a comment letting me know what you found and I’ll update this post.
Update: If the solution above did not work for you, see Bob’s comment below regarding the usbmuxd user.
