Re: [SQL] Storing an ordered list

2006-07-27 Thread Bruno Wolff III
On Wed, Jul 26, 2006 at 20:13:03 -0400, Michael Artz [EMAIL PROTECTED] wrote: On 7/26/06, Bruno Wolff III [EMAIL PROTECTED] wrote: If you use numeric instead of int, then it is easy to insert new values. Hmm, hadn't thought about that. How would you normally implement it? I'm thinking

[SQL] PostgreSQL server terminated by signal 11

2006-07-27 Thread Daniel Caune
Hi, My PostgreSQL server running on a Linux machine is terminated by signal 11 whenever I try to create some indexes on a table, which contains quite a lot of data. However I succeeded in creating some other indexes without having the PostgreSQL server terminated: agora= CREATE INDEX

[SQL] Disk is full, what's cool to get rid of?

2006-07-27 Thread Erik Jones
Hello, quick question. I've run into an issue with the disk that my development box is on filling up and preventing pretty much any writing (inserts, updates, deletes, etc...) from happening. Other than some piddly text logs the db is pretty much the only thing on the box. So, my question

Re: [SQL] Disk is full, what's cool to get rid of?

2006-07-27 Thread Jeff Frost
You can probably just tune2fs -m 0 device name to give yourself enough space to get out of the jam before you go deleting things. Then you might want to vacuum full afterwards. On Thu, 27 Jul 2006, Erik Jones wrote: Hello, quick question. I've run into an issue with the disk that my

Re: [SQL] Disk is full, what's cool to get rid of?

2006-07-27 Thread Andrew Sullivan
administration or maintenance on it that I know of...) How about the WAL files in pg_xlog? How critical are they when no data on the system is critical in and of itself? Any suggestions would be greatly appreciated... If the data isn't critical, you maybe could truncate a table to

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-27 Thread Jeff Frost
On Thu, 27 Jul 2006, Daniel Caune wrote: My PostgreSQL server running on a Linux machine is terminated by signal 11 whenever I try to create some indexes on a table, which contains quite a lot of data. However I succeeded in creating some other indexes without having the PostgreSQL server

Re: [SQL] Storage of Binary Data

2006-07-27 Thread Andrew Sullivan
For my web projects, we have been storing binary data (like images, PDF's, etc) on the hard drive of the web server instead of the database. Within the database, we keep information, like whether an image is present, in a separate column. In most cases, this is probably the best approach.

Re: [SQL] Disk is full, what's cool to get rid of?

2006-07-27 Thread Scott Marlowe
I can't tell you the number of times that little trick has saved my life. On Thu, 2006-07-27 at 11:32, Jeff Frost wrote: You can probably just tune2fs -m 0 device name to give yourself enough space to get out of the jam before you go deleting things. Then you might want to vacuum full

Re: [SQL] Disk is full, what's cool to get rid of?

2006-07-27 Thread Erik Jones
Awesome. Do I need to reset that to any magic # after the vacuum? I'm not all that up on filesystem maintenance/tweaking... Scott Marlowe wrote: I can't tell you the number of times that little trick has saved my life. On Thu, 2006-07-27 at 11:32, Jeff Frost wrote: You can probably just

Re: [SQL] Disk is full, what's cool to get rid of?

2006-07-27 Thread Jeff Frost
Depends what the default is on your system. The default is 5% with the version of mke2fs that I have here, so you would just: tune2fs -m 5 devicename to put it back. On Thu, 27 Jul 2006, Erik Jones wrote: Awesome. Do I need to reset that to any magic # after the vacuum? I'm not all that

Re: [SQL] Disk is full, what's cool to get rid of?

2006-07-27 Thread Erik Jones
Awesome. Makes sense as 5% is exactly the amount of space that appeared after running it. Thanks! Jeff Frost wrote: Depends what the default is on your system. The default is 5% with the version of mke2fs that I have here, so you would just: tune2fs -m 5 devicename to put it back. On

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-27 Thread Tom Lane
Daniel Caune [EMAIL PROTECTED] writes: My PostgreSQL server running on a Linux machine is terminated by signal 11 whenever I try to create some indexes on a table, which contains quite a lot of data. Judging from your examples it's got something to do with the partial index WHERE clause. What

Re: [SQL] Disk is full, what's cool to get rid of?

2006-07-27 Thread Tom Lane
Andrew Sullivan [EMAIL PROTECTED] writes: If the data isn't critical, you maybe could truncate a table to clear enough space. Deleting anything under pg_xlog is more or less guaranteed to mean your database is garbage. If you're desperate you could shut down the postmaster, run pg_resetxlog,

Re: [SQL] Disk is full, what's cool to get rid of?

2006-07-27 Thread Wilkinson Charlie E
Won't help some of us, who set -m 0 on selected filesystems to begin with. But if we could get tune2fs -m -5 devicename to work, then we could unreserve space that didn't previously exist. Think of the possibilties! I'll look into that as soon as I'm done modding my C compiler to handle the

[SQL] return setof records

2006-07-27 Thread Chris Lukenbill
Alright, first I'll apologize for asking this question another time. I've looked throught the archives and have found different ways on both the archives and different ways in the the documentation to do this and depending on which way I do it, I get different errors, so pick your poison on that.

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-27 Thread Daniel Caune
De : Tom Lane [mailto:[EMAIL PROTECTED] Envoyé : jeudi, juillet 27, 2006 16:06 À : Daniel Caune Cc : pgsql-sql@postgresql.org Objet : Re: [SQL] PostgreSQL server terminated by signal 11 Daniel Caune [EMAIL PROTECTED] writes: My PostgreSQL server running on a Linux machine is terminated

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-27 Thread Daniel Caune
-Message d'origine- De : Tom Lane [mailto:[EMAIL PROTECTED] Envoyé : jeudi, juillet 27, 2006 16:06 À : Daniel Caune Cc : pgsql-sql@postgresql.org Objet : Re: [SQL] PostgreSQL server terminated by signal 11 Daniel Caune [EMAIL PROTECTED] writes: My PostgreSQL server running on

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-27 Thread Tom Lane
Daniel Caune [EMAIL PROTECTED] writes: I run the command responsible for creating the index and I entered continue in gdb for executing the command. After a while, the server crashes: Program received signal SIGSEGV, Segmentation fault. 0x08079e2a in slot_attisnull () (gdb)

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-27 Thread D'Arcy J.M. Cain
On Thu, 27 Jul 2006 19:00:27 -0400 Daniel Caune [EMAIL PROTECTED] wrote: I run the command responsible for creating the index and I entered continue in gdb for executing the command. After a while, the server crashes: Program received signal SIGSEGV, Segmentation fault. 0x08079e2a in

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-27 Thread Daniel CAUNE
-Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Tom Lane Envoyé : jeudi 27 juillet 2006 19:26 À : Daniel Caune Cc : pgsql-admin@postgresql.org; pgsql-sql@postgresql.org Objet : Re: [SQL] PostgreSQL server terminated by signal 11 Daniel Caune

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-27 Thread Daniel CAUNE
-Message d'origine- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de D'Arcy J.M. Cain Envoyé : jeudi 27 juillet 2006 19:49 À : Daniel Caune Cc : [EMAIL PROTECTED]; pgsql-admin@postgresql.org; pgsql- [EMAIL PROTECTED] Objet : Re: [SQL] PostgreSQL server terminated by

Re: [SQL] PostgreSQL server terminated by signal 11

2006-07-27 Thread Tom Lane
Daniel CAUNE [EMAIL PROTECTED] writes: Actually it seems, from the source code, that a null slot-tts_tuple won't lead to a segmentation fault in function slot_attisnull, while slot and slot-tts_tupleDescriptor will. I'll bet on D'Arcy's theory that slot is being passed in as NULL. Exactly why