Re: [DOCS] Fast major-version upgrade (was: [GENERAL] postgresql 8.0 advantages)
On Mon, Feb 28, 2005 at 09:27:46PM +0100, Martijn van Oosterhout wrote: > On Mon, Feb 28, 2005 at 01:36:59PM -0600, Jim C. Nasby wrote: > > > I used a straight copy of the filesystem with running database > > > (over the net in my case) and immediately after that, > > > stop the db and rsync for the last changes. This took only > > > 10 minutes (compared to 1.5h for the full filesystem copy) > > > and I could start up the db in new location. > > > > > > this could work for you too. > > > > I hadn't thought about using rsync; that's a great idea! > > > > Is there somewhere this could be documented? In an FAQ maybe? > > It works only in the special case where the PostgreSQL version number > is the same and you're running on the same platform. How often are you > transferring databases like that. Even transferring from i386 to amd64 > wouldn't work like this AFAIUI. Absolutely true, although in the case of database version PostgreSQL will check that itself. But in the context this was originally brought up in (using Sloney to upgrade a machine from 7.4.x to 8.x), it would work great, and rsync would make a huge difference in downtime. -- Jim C. Nasby, Database Consultant [EMAIL PROTECTED] Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?" ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [DOCS] question about markup
Robert Treat wrote: someone suggested that the insert command at the end of http://wwwmaster.postgresql.org/docs/8.0/interactive/dml.html would be better if it were a link like the copy command is. Is there some reason not to make it a link? No particular reason. I've applied the following patch to head; it makes the first reference to "INSERT" in that page an xref, as well as making a few other minor improvements. I notice most commands are not done this way. Yeah, there's not much point linking each and every reference to a SQL command. -Neil Index: doc/src/sgml/dml.sgml === RCS file: /var/lib/cvs/pgsql/doc/src/sgml/dml.sgml,v retrieving revision 1.10 diff -c -r1.10 dml.sgml *** doc/src/sgml/dml.sgml 22 Jan 2005 22:56:35 - 1.10 --- doc/src/sgml/dml.sgml 1 Mar 2005 23:39:45 - *** *** 38,47 !To create a new row, use the INSERT command. !The command requires the table name and a value for each of the !columns of the table. For example, consider the products table !from : CREATE TABLE products ( product_no integer, --- 38,47 !To create a new row, use the command. The command requires the !table name and a value for each of the columns of the table. For !example, consider the products table from : CREATE TABLE products ( product_no integer, *** *** 98,104 To do bulk loads, that is, inserting a lot of data, take a look at the command. It is not as flexible as the ! INSERT command, but is more efficient. --- 98,106 To do bulk loads, that is, inserting a lot of data, take a look at the command. It is not as flexible as the ! INSERT command, but is more efficient. Refer to ! for more information on improving bulk ! loading performance. *** *** 188,194 You can update more than one column in an !UPDATE command by listing more than one assignment in the SET clause. For example: UPDATE mytable SET a = 5, b = 3, c = 1 WHERE a > 0; --- 190,196 You can update more than one column in an !UPDATE command by listing more than one assignment in the SET clause. For example: UPDATE mytable SET a = 5, b = 3, c = 1 WHERE a > 0; *** *** 222,230 !You use the DELETE command to remove rows; the !syntax is very similar to the UPDATE command. !For instance, to remove all rows from the products table that have a price of 10, use DELETE FROM products WHERE price = 10; --- 224,234 !You use the command to remove rows; the syntax is !very similar to the UPDATE command. For !instance, to remove all rows from the products table that have a !price of 10, use DELETE FROM products WHERE price = 10; ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [DOCS] Fast major-version upgrade (was: [GENERAL] postgresql 8.0 advantages)
On Mon, Feb 28, 2005 at 01:36:59PM -0600, Jim C. Nasby wrote: > > I used a straight copy of the filesystem with running database > > (over the net in my case) and immediately after that, > > stop the db and rsync for the last changes. This took only > > 10 minutes (compared to 1.5h for the full filesystem copy) > > and I could start up the db in new location. > > > > this could work for you too. > > I hadn't thought about using rsync; that's a great idea! > > Is there somewhere this could be documented? In an FAQ maybe? It works only in the special case where the PostgreSQL version number is the same and you're running on the same platform. How often are you transferring databases like that. Even transferring from i386 to amd64 wouldn't work like this AFAIUI. -- Martijn van Oosterhout http://svana.org/kleptog/ > Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a > tool for doing 5% of the work and then sitting around waiting for someone > else to do the other 95% so you can sue them. pgpMJZAq9PEFD.pgp Description: PGP signature
