Re: [GENERAL] settings for 8.2.5 on Mac OS X 10.4.11

2007-12-21 Thread Wolfgang Keller
The best thing is to fix the OS' ridiculously small shmem limits. I've got this in /etc/sysctl.conf: kern.sysv.shmmax=33554432 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=8192 Dependency on the available RAM? and on a production DB you'd probably want shmmax and

Re: [GENERAL] referential integrity and defaults, DB design or trick

2007-12-21 Thread Richard Huxton
Ivan Sergio Borgonovo wrote: The default property (that is actually made by several fields) in my case is not completely homogeneous with the others, because it has a double meaning. It is cleaner to split the meanings and the data. It usually is. A lot of the design decisions you can regret a

[GENERAL] Machine spec 64-bit/32 GB RAM

2007-12-21 Thread David Cotter
Hello, I am looking at a linux machine for a PG install with 32G of RAM. I have never installed on anyting with more than 2 or 3 Gigs before. In order to access that 32 Gigs do I have to use 64 bit OS and PG? Is there any reason not to use a 64 bit? With a 32-bit version of PG can the 32 G of RAM

[GENERAL] change owner to all object in a schema

2007-12-21 Thread Nicola Benaglia
Hi! I searched a lot on the net, but I haven't found a quick way to change owner to all objects in a schema. Could you please suggest me a tool or an existing script to do that ? Thank you, Nicola ---(end of broadcast)--- TIP 6: explain analyze is

Fwd: Re: [GENERAL] SuSE gcc segfault compiling pgsql

2007-12-21 Thread Marcin
> > Marcin wrote: > > > Did anybody face the same problem during the compilation of > > > postgresql 8.2.5 on suse 10.2? I'm using gmake 3.81 > > > > In the future, please include subjects in your posts. > > > > I'm very sorry for that. It seems that I pressed the send button to early. > > > >

Re: [GENERAL] change owner to all object in a schema

2007-12-21 Thread Andreas Kretschmer
Nicola Benaglia <[EMAIL PROTECTED]> schrieb: > Hi! > I searched a lot on the net, but I haven't found a quick way to change > owner to all objects in a schema. > Could you please suggest me a tool or an existing script to do that ? There are any scripts, for instance: 13:38 < akretschmer> ??gr

Re: [GENERAL] Conditional updateable view

2007-12-21 Thread Peter Childs
On 16/12/2007, snacktime <[EMAIL PROTECTED]> wrote: > > I can't seem to find an example of how to add restrictions to the > where clause of an updateable view created via the rule system. For > example I don't want the update to complete if a where clause is > missing entirely, and in some cases I

Re: [GENERAL] Conditional updateable view

2007-12-21 Thread Merlin Moncure
On Dec 15, 2007 8:57 PM, snacktime <[EMAIL PROTECTED]> wrote: > I can't seem to find an example of how to add restrictions to the > where clause of an updateable view created via the rule system. For > example I don't want the update to complete if a where clause is > missing entirely, and in some

Re: [GENERAL] change owner to all object in a schema

2007-12-21 Thread Greg Smith
On Fri, 21 Dec 2007, Andreas Kretschmer wrote: (answer from the nice doc-bot on our irc-channel) Which for those of us who hate IRC is also available at http://search.postgresql.org ; the docbot hits show up at the top before the main search results. -- * Greg Smith [EMAIL PROTECTED] http:

[GENERAL] Restoring 8.0 db to 8.1

2007-12-21 Thread [EMAIL PROTECTED]
Hi I am trying to upgrade my database from 8.0 to 8.1 and am looking for a little info/advice. This is a production database that we are migrating and it is in CONSTANT use, so the maintenance window must be small and hopefully mostly off-hours. We use a PITR/LVM snapshot solution for our backup

Re: [GENERAL] Machine spec 64-bit/32 GB RAM

2007-12-21 Thread Greg Smith
On Fri, 21 Dec 2007, David Cotter wrote: In order to access that 32 Gigs do I have to use 64 bit OS and PG? Yes. You'll be tormented by various things being limited at 2-4 GB on a 32 bit one. Is there any reason not to use a 64 bit? The only systems I have running 32 bit are because the

Re: [GENERAL] Restoring 8.0 db to 8.1

2007-12-21 Thread Martijn van Oosterhout
On Fri, Dec 21, 2007 at 10:53:49AM -0500, [EMAIL PROTECTED] wrote: > I am trying to upgrade my database from 8.0 to 8.1 and am looking for a > little info/advice. > > This is a production database that we are migrating and it is in CONSTANT > use, so the maintenance window must be small and hopefu

Re: [GENERAL] Restoring 8.0 db to 8.1

2007-12-21 Thread Tom Lane
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes: > The problem with pg_restore is that our database takes 3+ weeks to restore > from a dump file. This is not an acceptable window for us. ( Approximately > 3 days of this is data + lobs, and the rest indexes and constraints. If we > are doing someth

[GENERAL] Exactly what is DEFERRABLE

2007-12-21 Thread Richard Broersma Jr
I noticed from the 8.3 manual (CREATE TABLE section): NOT DEFERRABLE ... Only foreign key constraints currently accept this clause. All other constraint types are not deferrable. Does this imply that custom CONSTRAINT TRIGGERs are not DEFERRABLE? Or are they? Regards, Richard Broersma Jr.

[GENERAL] Hotel for FOSDEM 2008

2007-12-21 Thread Andreas 'ads' Scherbaum
Hello all, i got a reservation for a hotel in Brussels/Belgium for FOSDEM. The hotel is: Hotel Agenda Louise rue de Florence 6 B-1000 Brussels Tel: + 32.2.539.00.31 Fax: + 32.2.539.00.63 www.hotel-agenda.com It has free wireless and i reserved 20 rooms in advance, the price is 80 Euros per nig

Re: [GENERAL] Machine spec 64-bit/32 GB RAM

2007-12-21 Thread Joshua D. Drake
David Cotter wrote: Hello, I am looking at a linux machine for a PG install with 32G of RAM. I have never installed on anyting with more than 2 or 3 Gigs before. In order to access that 32 Gigs do I have to use 64 bit OS and PG? Is there any reason not to use a 64 bit? With a 32-bit version o

Re: [GENERAL] settings for 8.2.5 on Mac OS X 10.4.11

2007-12-21 Thread Erik Jones
On Dec 21, 2007, at 2:12 AM, Wolfgang Keller wrote: The best thing is to fix the OS' ridiculously small shmem limits. I've got this in /etc/sysctl.conf: kern.sysv.shmmax=33554432 kern.sysv.shmmin=1 kern.sysv.shmmni=32 kern.sysv.shmseg=8 kern.sysv.shmall=8192 Dependency on the available RAM?

[GENERAL] Requirements for Constraint Trigger's Function

2007-12-21 Thread Richard Broersma Jr
What is the proper way for the function of a constraint trigger to signal where or not referential integrity was compromised? Should it return some sort of value? Should it raise an exception? Regards, Richard Broersma Jr. ---(end of broadcast)--

Re: [GENERAL] Exactly what is DEFERRABLE

2007-12-21 Thread Richard Broersma Jr
--- On Fri, 12/21/07, Richard Broersma Jr <[EMAIL PROTECTED]> wrote: > Does this imply that custom CONSTRAINT TRIGGERs are not > DEFERRABLE? Or are they? Sorry dumb question. They must be deferrable since their create statement allows for differable. Regard,s Richard Broersma Jr.

Re: [GENERAL] Restoring 8.0 db to 8.1

2007-12-21 Thread Richard Huxton
[EMAIL PROTECTED] wrote: Hi I am trying to upgrade my database from 8.0 to 8.1 and am looking for a little info/advice. This is a production database that we are migrating and it is in CONSTANT use, so the maintenance window must be small and hopefully mostly off-hours. We use a PITR/LVM snaps

[GENERAL] FK creation -- "ON DELETE NO ACTION" seems to be a no-op

2007-12-21 Thread Webb Sprague
Hi list, First, my select version() gives: PostgreSQL 8.2.4 on x86_64-pc-linux-gnu, compiled by GCC x86_64-pc-linux-gnu-gcc (GCC) 4.1.2 (Gentoo 4.1.2 p1.0.2) The Problem: when I run ALTER TABLE currentsessions ADD CONSTRAINT currentsessions_username_fkey FOREIGN KEY (username) REFERENCES autho

[GENERAL] slow query

2007-12-21 Thread Marc
Hey Folks, This query is running really slowly. Sometimes much slower then others. I have a feeling that there may be contention on one of the indices it is using. Query and explain plan are below. Seems like it spend the most time doing Index Scan using i_tablea_atextfield on tablea ru (cost=

[GENERAL] self ordering list

2007-12-21 Thread Bryan Wilkerson
Hello to all. I'm new to the list and have only been engineering on postgresql for about a year. I have solved some neat problems in that time and will gladly give back to the community. I'll try to contribute as much as startup time permits. My first question concerns self ordering lists

Re: [GENERAL] self ordering list

2007-12-21 Thread brian
Bryan Wilkerson wrote: My first question concerns self ordering lists. Basically, a numeric column that automatically maintains an order but allows arbitrary reordering by the user. For example, a media playlist or the priority of workitems within a parent container ;) This seems like a co

Re: [GENERAL] FK creation -- "ON DELETE NO ACTION" seems to be a no-op

2007-12-21 Thread Alvaro Herrera
Webb Sprague escribió: > It is not updating the table correctly to reflect the "no action". > After \d currentsessions (and some editing) I get the following, > which, as I understand it, should say something about the "ON DELETE > NO ACTION": > > ... "currentsessions_username_fkey" FOREIGN KEY

Re: [GENERAL] FK creation -- "ON DELETE NO ACTION" seems to be a no-op

2007-12-21 Thread Webb Sprague
> > > > ... "currentsessions_username_fkey" FOREIGN KEY (username) > > REFERENCES authorizedusers(username) ON UPDATE CASCADE > > Hmm, NO ACTION is the default. Oh, how embarrassing. Never mind... > > -- > Alvaro Herrerahttp://www.CommandPrompt.com/ > The Postgr

Re: [GENERAL] Warm standby system - FATAL: the database system is starting up

2007-12-21 Thread Glyn Astill
Is there a way I can check what it is? I see no reason why anything would be trying to connect, any ideas? Could it be the autovacuum as I suggested? Also something I omitted to point out in my original post, the processes running on the machine (ps -ax) are as follows 3467 pts/0S 0:0

Re: [GENERAL] Warm standby system - FATAL: the database system is starting up

2007-12-21 Thread Tom Lane
Glyn Astill <[EMAIL PROTECTED]> writes: > Is there a way I can check what it is? log_connections would help... regards, tom lane ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to

Re: [GENERAL] Warm standby system - FATAL: the database system is starting up

2007-12-21 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Dec 2007 13:24:01 -0800 (PST) Glyn Astill <[EMAIL PROTECTED]> wrote: > Is there a way I can check what it is? Change your log line prefix to show connections and ip addresses. Joshua D. Drake - -- The PostgreSQL Company: Since 1997, ht

Re: [GENERAL] Warm standby system - FATAL: the database system is starting up

2007-12-21 Thread Tom Lane
Glyn Astill <[EMAIL PROTECTED]> writes: > I see in my log on the backup machine: > FATAL: the database system is starting up > Does this mean the backup is not working? No, it means something's trying to connect to the backup postmaster. regards, tom lane ---

Re: [GENERAL] Restoring 8.0 db to 8.1

2007-12-21 Thread Vivek Khera
On Dec 21, 2007, at 11:09 AM, Martijn van Oosterhout wrote: The usual answer is use slony. You can use it to replicate the 8.0 server onto an 8.1 server. This may take weeks/months/years/whatever to synchronise. When the slave is up to date, you pull the plug on the 8.0 server and get ever

[GENERAL] Warm standby system - FATAL: the database system is starting up

2007-12-21 Thread Glyn Astill
Hi people, I've set up a warm standby system using WAL shipping, partially following the guide here (My setup ios on two physically separate servers) http://archives.postgresql.org/sydpug/2006-10/msg1.php I'm using an NFS share on the main server that is then mounted in fstab on the backup.

Re: [GENERAL] Warm standby system - FATAL: the database system is starting up

2007-12-21 Thread Glyn Astill
Hi chaps, Indeed you were correct! I enabled the good stuff in the log and sure enough one of the old testbed machines which is running postgres and slony was trying to connect! However I'd never even referenced the new machine on the old testbed so how on earth could it have been trying to conn

Re: [GENERAL] Warm standby system - FATAL: the database system is starting up

2007-12-21 Thread Gurjeet Singh
I would recommend that whenever you are trying to recover a database (be it WAL shipping or any other method), first change the port it is listening on, to something that your apps wouldn't assume the DB to be running on, and then start the recovery. This way, even if there's a rogue application t

[GENERAL] Setting Sequence Values

2007-12-21 Thread Martin
After porting tables and data from FrontBase I now find that I need to update all the values for the sequences that were created to reflect the data in the tables. Is there an easy way to do this? ---(end of broadcast)--- TIP 5: don't forget to incr

Re: [GENERAL] Setting Sequence Values

2007-12-21 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Dec 2007 23:57:21 - Martin <[EMAIL PROTECTED]> wrote: > After porting tables and data from FrontBase I now find that I > need to update all the values for the sequences that were created > to reflect the data in the tables. Is there an

Re: [GENERAL] Setting Sequence Values

2007-12-21 Thread Gregory Williamson
Joshua Drake spake thusly: > > On Fri, 21 Dec 2007 23:57:21 - > Martin <[EMAIL PROTECTED]> wrote: > > > After porting tables and data from FrontBase I now find that I > > need to update all the values for the sequences that were created > > to reflect the data in the tables. Is there an easy

Re: [GENERAL] Setting Sequence Values

2007-12-21 Thread Martin
In article <[EMAIL PROTECTED]>, Joshua D. Drake <[EMAIL PROTECTED]> wrote: >> After porting tables and data from FrontBase I now find that I >> need to update all the values for the sequences that were created >> to reflect the data in the tables. Is there an easy way to do >> this? >Take a look

Re: [GENERAL] Setting Sequence Values

2007-12-21 Thread Greg Smith
On Sat, 22 Dec 2007, Martin wrote: The problem is getting all the sequences set without doing each one by hand. See if this helps you: http://archives.postgresql.org/pgsql-general/2007-10/msg00969.php -- * Greg Smith [EMAIL PROTECTED] http://www.gregsmith.com Baltimore, MD --

Re: [GENERAL] Killing a session in windows

2007-12-21 Thread Bruce Momjian
Howard Cole wrote: > > Wow, yea, I see that now, but it is alone a paragraph above. I updated > > the text to: > > > >The program provides a convenient > >interface for sending these signals to shut down the server. > >Alternatively, you can send the signal directly using > >kill

Re: [GENERAL] Setting Sequence Values

2007-12-21 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Dec 2007 18:14:43 -0700 D"Gregory Williamson" <[EMAIL PROTECTED]> wrote: > I think the OP needs a way to do _all_ of the sequences, which can be > a little dauning if you have lots of tables. I'm sure there's a way > but I haven't the time

Re: [GENERAL] Setting Sequence Values

2007-12-21 Thread Gregory Williamson
Joshua Drake shaped the aether to say: > > Shout out to AndrewSN for this one (although I was almost there when he > pasted it ;)): > > SELECT c1.relname AS sequencename, n.nspname AS schema, >c2.relname AS tablename, a.attname AS columnname >FROM pg_class c1 >JOIN pg_depend d ON

Re: [GENERAL] Setting Sequence Values

2007-12-21 Thread Martin
In article <[EMAIL PROTECTED]>, Greg Smith <[EMAIL PROTECTED]> wrote: >See if this helps you: >http://archives.postgresql.org/pgsql-general/2007-10/msg00969.php Yes! That's exactly what I needed. I new there had to be an easy way ;) ---(end of broadcast)-

Re: [GENERAL] Setting Sequence Values

2007-12-21 Thread Tom Lane
"Gregory Williamson" <[EMAIL PROTECTED]> writes: > Joshua Drake shaped the aether to say: >> Shout out to AndrewSN for this one (although I was almost there when he >> pasted it ;)): >> >> SELECT c1.relname AS sequencename, n.nspname AS schema, >> c2.relname AS tablename, a.attname AS columnname

[GENERAL] installation on Mac OS X 10.5.1

2007-12-21 Thread Chuck
Hello, What is the best way to install PostgreSQL on Mac OS X 10.5.1? Or, perhaps I should ask is there a preferred way to PostgreSQL on Mac OS X? Is a disk image installer fine? Or, is it better to compile all the components? Is this installation perfectly fine? http://www.kyngchaos.com/wiki/s

Re: [GENERAL] Setting Sequence Values

2007-12-21 Thread Joshua D. Drake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Fri, 21 Dec 2007 23:56:55 -0500 Tom Lane <[EMAIL PROTECTED]> wrote: > [pokes at it for a bit...] Actually the deptype='a' bit is not so > robust; we used to use 'i' for serial dependencies. I'd leave that > test out entirely, I think --- it doesn

[GENERAL] Constraint Trigger's referenced_table

2007-12-21 Thread Richard Broersma Jr
How does a Constraint Trigger react to a referenced table when the constraint is created implementing the FROM clause? Regards, Richard Broersma Jr. ---(end of broadcast)--- TIP 6: explain analyze is your friend