The easiest way I found to simulate a INSERT OR UPDATE using PostgreSQL (or pretty much any other RDB) is using the INSERT INTO … SELECT syntax:
INSERT INTO myTable (myKey) SELECT myKeyValue WHERE myKeyValue NOT IN (SELECT myKey FROM myTable);
UPDATE myTable SET myUpdateCol = myUpdateColValue WHERE myKey = myKeyValue;
This way you don’t need any complex trigger or transaction savepoint operations, using just plain SQL.
- install latest Ubuntu server
- install Xen 3.3
- get Xen kernel from Ubuntu Hardy Heron repos
- add hostonly network:
brctl addbr hostonly
- set dom0 IP for hostonly network:
ifconfig hostonly 10.0.0.1 netmask 255.255.255.0
- start Xen daemon:
/etc/init.d/xend start
- start domU:
xm create xxxx.xen [-c]
- access console on paravirtualized domU:
xm console domU-name
- close Xen console: “Ctrl”+”]” (on german macbook pro keyboard: ctrl+alt+6, on german windows keyboard: Ctrl+Alt Gr+9)
- forward Microsoft Windows Remote Desktop using iptables:
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp -i eth0 -d 78.46.104.242 --dport 3389 -j DNAT --to 10.0.0.10:3389
iptables -A FORWARD -p tcp -i eth0 -d 10.0.0.10 --dport 3389 -j ACCEPT
- to allow ping to Windows domU, check ICMP settings in Windows Firewall
To speed up a Windows domU, the GPLPV drivers do a great job in paravirtualising essential parts of the system. The latest Windows versions require drivers to be signed in order to be installed. When trying to run gplpv_Vista2008x64_0.11.0.188.msi on a Windows 2008 R2 domU, the installer shows a message about activating “test signing” mode.
This is done via:
bcdedit.exe /set TESTSIGNING ON
The registry key “HKEY_LOCAL_MACHINE\CurrentControlSet\Control\SystemStartOptions” will be changed to “TESTSIGNING etc.”. The domU has to be restarted after the change.
However, the GPLPV installer will still complain about activating “test signing”. This is a bug in the installer, which is looking for “/TESTSIGNING” in the according registry key. Just temporarily edit the registy key and add the slash, this way the install should work. Don’t forget to revert the change afterwards.
Apparently due to some usability tests, the newly available Ubuntu Lucid Lynx Beta has the window buttons on the left side. This is fine for many and if you are used to keyboard shortcuts you wouldn’t care about placement of buttons anyway, but in case you want to have the old style back, this is for you.
Open a Terminal and run the following:
gconf-editor
This opens a registry-like interface. Navigate to /apps/metacity/general and find the key named “button_layout”. The key documentation tells us
The value should be a string, such as "menu:minimize,maximize,spacer,close"; the colon separates the left corner of the window from the right corner, and the button names are comma-separated.
Just replace the value with the suggested string (spacer can be omitted), and the buttons are back at the right side. Keep in mind that in the new default Ubuntu theme the minimize and maximize buttons are switched too.
FAIL!