Re: [GENERAL] Different sort order

2007-05-28 Thread Gregory Stark
> test_1 > test2 > test_2 > test3 > test_3 > (6 rows) > And this one looks like C: > mydb=# select * from test order by felt1; > felt1 > test1 > test2 > test3 > test_1 > test_2 > test_3 > (6 rows) -- Gregory Stark Enterp

Re: [GENERAL] CUBE SYNTAX

2007-05-29 Thread Gregory Stark
like ROLLUP except that it does it on every possible axis. It's normally used in reporting tools. If that's what you're looking for then afaik there's no module to do this in Postgres. Sorry. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Geographic data sources, queries and questions

2007-05-30 Thread Gregory Stark
ple's desks -- a tall order for an SQL query. In short primary keys that aren't static just aren't very useful. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1: if posti

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Gregory Stark
ur C trigger function? How is it constructing the original varchar datum and doing the insert? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an a

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Gregory Stark
PI_ERROR_NOATTRIBUTE which is -9. That said if your function is a function which takes PG_FUNCTION_ARGS then the right way to return NULL is with PG_RETURN_NULL(). Merely returning a PointerGetDatum(NULL) isn't good enough. -- Gregory Stark EnterpriseDB http://www.enterprisedb.co

Re: [GENERAL] invalid memory alloc after insert with c trigger function

2007-06-01 Thread Gregory Stark
om a Postgres float8 datum to an actual double you can just call the macros DatumGetFloat8 and Float8GetDatum. This makes your code depend on the internal representation of float8 as a C double but it's better than the alternative. -- Gregory Stark EnterpriseDB

Re: [GENERAL] Slightly OT.

2007-06-01 Thread Gregory Stark
that if you're one of the people who use replication to move the data to a reporting database which has a modified schema appropriate for the different usage? This improvement would make it useless for that purpose. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com

Re: [GENERAL] debugging C functions

2007-06-04 Thread Gregory Stark
; > The result is displayed and the debugger doesn't stop at the breakpoints. Are you sure you're attaching to the right process? One way to do it is to run select pg_backend_pid() from psql and attach to that pid. -- Gregory Stark EnterpriseDB http://www.enterp

Re: [GENERAL] There can be only one! How to avoid the "highlander-problem".

2007-06-05 Thread Gregory Stark
lumn in that table which is a foreign key reference to man_id? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Foreign keys and indexes

2007-06-05 Thread Gregory Stark
b (i integer references a(i)); ERROR: there is no unique constraint matching given keys for referenced table "a" However if you ever update or delete the referenced records then it also helps performance to have an index on the referencing column which Postgres doesn't enforce. --

Re: [GENERAL] NULLS and User Input WAS Re: multimaster

2007-06-07 Thread Gregory Stark
HERE clauses treat NULL the same as they treat FALSE, ie, they exclude the row. But unless you can come up with a way for a SELECT clause to not tell you whether it's including a row or not (ie, whether it includes the row is "unknown") then it's got to pick one or the othe

Re: [GENERAL] transaction problem using cursors

2007-06-11 Thread Gregory Stark
you keep this data around for a long time you might actually be better off since you could use a real non-temporary table and not be forced to keep around transactions for long periods of time tying up other resources. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com

Re: [GENERAL] Materializing the relation

2007-06-11 Thread Gregory Stark
k_mem" This comment actually refers to a new optimization which isn't in the released 8.2 yet. It introduces a Materialize node above a sort to allow the sort to skip the final merge step. Instead it merges as the query runs and the Materialize throws away data which isn't n

Re: [GENERAL] DeadLocks..., DeadLocks...

2007-06-14 Thread Gregory Stark
o? Is that insert the *only* DML you're executing? No updates or deletes? What do you mean by saying it deadlocks? Do you get a transaction abort with an error about a deadlock detected? Or do you just mean it freezes? -- Gregory Stark EnterpriseDB http:

Re: [GENERAL] DeadLocks..., DeadLocks...

2007-06-14 Thread Gregory Stark
ossible for two inserts on the same table to deadlock against each other so there must be more going on than what you've described. It's hard to help much without a complete picture. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---

Re: [GENERAL] Hash Aggregate plan picked for very large table == out of memory

2007-06-14 Thread Gregory Stark
from a sample is actually a pretty hard problem. How many distinct values do you get when you run with enable_hashagg off? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1: if posting/reading th

Re: [GENERAL] pg_restore out of memory

2007-06-14 Thread Gregory Stark
-a in the same environment as the server? Either by starting the server in shell manually or by putting ulimit -a in the startup script which starts the server if you have one? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of

Re: [GENERAL] pg_restore out of memory

2007-06-15 Thread Gregory Stark
128M but the error just means it tried to allocated 128M and failed, it may already have allocated 400M and been trying to go over the 524M mark. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- T

Re: [GENERAL] DeadLocks..., DeadLocks...

2007-06-15 Thread Gregory Stark
,257,98968,98969,98970,98971) > 2007-06-14 19:50:35 EDT LOG: disconnection: session time: 0:00:13.810 > user=spam database=spam host=127.0.0.1 port=38126 -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] DeadLocks..., DeadLocks...

2007-06-15 Thread Gregory Stark
HERE id NOT IN (select id from history); DELETE from history WHERE seen < now()-'3 days'::interval; END; This could still deadlock so it may make sense for it to do it in a transaction and add LOCK TABLE statements to lock the tables which refer to the tokens table.

Re: [GENERAL] pg_restore out of memory

2007-06-15 Thread Gregory Stark
"Francisco Reyes" <[EMAIL PROTECTED]> writes: > Gregory Stark writes: > >> You're right that your limit is above 128M but the error just means it tried >> to allocated 128M and failed, it may already have allocated 400M and been >> trying to go ove

Re: [GENERAL] Using the GPU

2007-06-16 Thread Gregory Stark
could have drivers for GPUs, or perhaps also for various other kinds of coprocessors available in high end hardware. I wonder if it exists already though. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)

Re: [GENERAL] Using the power of the GPU

2007-06-16 Thread Gregory Stark
some kind of kernel driver which took care of managing the shared resource (like the kernel manages things like disk, network, memory, etc) and either that or a library layer would provide an abstract interface so that the Postgres code would be hardware independent. -- Gregory

Re: [GENERAL] unexpected shutdown

2007-06-18 Thread Gregory Stark
x would report it as a SIGKILL. What does dmesg say, it doesn't have any OOM messages does it? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an

Re: [GENERAL] Accent insensitive search

2007-06-21 Thread Gregory Stark
u can normalize "on-the-fly" using an expression index as long as your function always returns the same data given the same inputs (and is therefore marked "immutable"). -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] 8.2.3 PANIC with "corrupted item pointer"

2007-06-21 Thread Gregory Stark
so send that along and at least we'll know which table or index has the corrupted data. You probably don't want to do this during peak production time though... -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] 8.2.3 PANIC with "corrupted item pointer"

2007-06-21 Thread Gregory Stark
in the same transaction. You could probably fix this particular problem by reindexing the corrupted index. But you may never know if some of the data is incorrect. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)-

Re: [GENERAL] [PGSQL 8.2.x] INSERT+INSERT

2007-06-22 Thread Gregory Stark
nt accesses to it. huh? no, sequences don't require this. They would be pointless if they did. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, plea

Re: [GENERAL] 8.2 contrib. "Full Disjunction"

2007-06-23 Thread Gregory Stark
7;m still lost. I can see how it would be hard to join these together but I'm not sure what result I would be after. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] alter table type from double precision to real

2007-06-25 Thread Gregory Stark
curious exactly what's going on and how to optimize your table layout send your table definition and we can tell you exactly how it's being laid out and where the extra 4 bytes are going. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com

Re: [GENERAL] alter table type from double precision to real

2007-06-25 Thread Gregory Stark
<[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> wrote: >> This could also be due to alignment restrictions on the other columns or the >> row as a whole. If you're curious exactly what's going on and how to optimize >> your table layout

Re: [GENERAL] greatest/least semantics different between oracle and postgres

2007-06-30 Thread Gregory Stark
subselects I would worry a little about the optimizer rerunning them unnecessarily. Perhaps coalesce(greatest(a,b), coalesce(a,b)) is more legible? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1:

Re: [GENERAL] greatest/least semantics different between oracle and postgres

2007-06-30 Thread Gregory Stark
off a lot of people. I think it now prints the warning and the result set. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to

Re: [GENERAL] greatest/least semantics different between oracle and postgres

2007-06-30 Thread Gregory Stark
;s new behavior relate to the standard moving? Sorry I noticed that editing error only after I sent it. I should have changed that to say Oracle was moving in that direction. There's nothing of the sort in SQL2003 that I can find. -- Gregory Stark EnterpriseDB http://www.ent

Re: [GENERAL] greatest/least semantics different between oracle and postgres

2007-06-30 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> "Bruno Wolff III" <[EMAIL PROTECTED]> writes: >>> Also what value should I have used in a coalesce to guaranty still getting >>> the maximum? >

Re: [GENERAL] CASE in ORDER BY clause

2007-07-07 Thread Gregory Stark
54PM +0400, Viatcheslav Kalinin wrote: > > # select start_date from show_date > # order by > # case when start_date > CURRENT_DATE then start_date end desc, > # case when start_date <= CURRENT_DATE then start_date end asc; This is two sorting expressions, one of whi

Re: [GENERAL] Vacuum issue

2007-07-09 Thread Gregory Stark
you're not. Postgres 8.3 won't even be released for a few more months! Perhaps that's 8.2.4? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Performance Question - Table Row Size

2007-07-09 Thread Gregory Stark
ur rows are twice as big it will take twice as much i/o to read and it will take twice as long. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Force SSL / username combination

2007-07-13 Thread Gregory Stark
checking every row, not once per session. And it wouldn't stop selects. I think what you really want is a ON CONNECT trigger for this. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 9

Re: [GENERAL] One Large Table or Multiple DBs?

2007-07-13 Thread Gregory Stark
I would not consider it until it was actually a problem. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail com

Re: [GENERAL] How to Cluster an Index live?

2007-07-16 Thread Gregory Stark
Clustered tables of the type you're imagining aren't really supported in Postgres at all. What Postgres does is reorder the table in place but the index is still stored separately. The patch you refer to here would help keep the table in order as updates and inserts happen which

Re: [GENERAL] deferred check constraints

2007-07-16 Thread Gregory Stark
ly static. So perhaps it would be useful. There is something in the standard called Assertions which I think are supposed to address this issue. But they're "hard" and I don't know if any database supports them. I wonder if we did whether anyone would find them useful. -- G

Re: [GENERAL] deferred check constraints

2007-07-16 Thread Gregory Stark
things in the past but you should think hard about whether you can't normalize your data further to avoid this. It will make querying your data later much easier. (Think of what your joins are going to look like.) -- Gregory Stark EnterpriseDB http://www.enterprisedb.com

Re: [GENERAL] Capturing return value of a function

2007-07-16 Thread Gregory Stark
7; upon a successful insert and 'failure' if > insert fails. You need an EXCEPT WHEN clause, see: http://www.postgresql.org/docs/8.2/interactive/plpgsql-control-structures.html#PLPGSQL-ERROR-TRAPPING -- Gregory Stark EnterpriseDB http://www.enterprisedb.com

Re: [GENERAL] why postgresql over other RDBMS

2007-07-16 Thread Gregory Stark
our own. And the cool thing is some people already have rolled their own and they'll just magically see an improvement. They don't have to do anything they weren't doing already to turn it on. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com -

Re: [GENERAL] why postgresql over other RDBMS

2007-07-16 Thread Gregory Stark
"Bruce Momjian" <[EMAIL PROTECTED]> writes: > They could roll their own a lot easier if you had finished the psql > concurrent patch. I did. But you decided you didn't want it. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---

Re: [GENERAL] why postgresql over other RDBMS

2007-07-16 Thread Gregory Stark
uggest calling index organized tables since that's effectively what they are). -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Concurrency Question

2007-07-16 Thread Gregory Stark
re were no share locks on records.) -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED

Re: [GENERAL] interaction with postgres defined types in custom c functions

2007-07-17 Thread Gregory Stark
7;ve simplified away the mistake in your code. Have you actually tried the above code? Send an actual example and describe what actually happens. The only thing I wonder about is whether you're compiling with optimizations and without -fno-strict-aliasing which may be necessary for Postgres&#x

Re: [GENERAL] Update of table lags execution of statement by >1 minute?

2007-07-18 Thread Gregory Stark
show the right value in that > column. Once again, looking at the query logs, there are no conflicting > updates happening. You'll have to describe in much more detail what you're doing. Send the actual session from your terminal of this happening, for example. -- Gregory Star

Re: [GENERAL] Char vs SmallInt

2007-07-21 Thread Gregory Stark
t's an ascii character) and has 4-byte alignment. In 8.3 it's 2-5 bytes (2 bytes if it's an ascii character) and has 1-byte alignment. If you declare a column as "char" with the quotes then it's a 1-byte integer with 1-byte alignment. That'll be smaller than sm

Re: [GENERAL] varchar does not work too well with IS NOT NULL partial indexes.

2007-07-24 Thread Gregory Stark
nd argument type(s). You might need to add explicit type casts. In fact it's not clear what you would want to happen here. Should it cast the text to an integer and use integer comparison or cast the integer to text and use text comparison? They don't necessarily generate the same result

Re: [GENERAL] varchar does not work too well with IS NOT NULL partial indexes.

2007-07-24 Thread Gregory Stark
t all, there are no "actual" values. And b) there's no explanation for why the estimates should be different for this query than the previous, identical, query. Send along the actual psql session, not an edited version. -- Gregory Stark EnterpriseDB http://www.enterp

Re: [GENERAL] varchar does not work too well with IS NOT NULL partial indexes.

2007-07-24 Thread Gregory Stark
- Seq Scan on foo (cost=0.00..1681.00 rows=1 width=5) (actual time=0.147..281.349 rows=1 loops=1) Filter: ((i)::text = '17'::text) Total runtime: 281.448 ms (3 rows) -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of b

Re: [GENERAL] Delete/update with limit

2007-07-24 Thread Gregory Stark
grabbed" them. Commit that. then go back and process them. Then go back and update them again to delete them. But then you need some facility for dealing after a crash with finding grabbed records which were never processed. -- Gregory Stark EnterpriseDB http://www.enterprisedb.

Re: [GENERAL] Will partial index creation use existing index?

2007-07-24 Thread Gregory Stark
obably it would have to run an SPI query to use the planner to find the best way to get the rows it wants. Another problem is that presumably you're reindexing because the existing index *isn't* in such good shape. You may even be doing it because the existing index is

Re: [GENERAL] Will partial index creation use existing index?

2007-07-25 Thread Gregory Stark
ding it in a random access order which is slower and also means potentially reading parts of it many times over before you're done. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] a few questions (and doubts) about xid

2007-07-25 Thread Gregory Stark
read (slowly -- it's pretty dense stuff) through src/backend/utils/time/tqual.c:HeapTupleSatisfiesMVCC() -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore y

Re: [GENERAL] a few questions (and doubts) about xid

2007-07-25 Thread Gregory Stark
But once you run vacuum that value will be changed. It represents the oldest transaction id which can occur in the table. Every time vacuum runs if that transaction is too old it will try to move it forward. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com -

Re: [GENERAL] a few questions (and doubts) about xid

2007-07-26 Thread Gregory Stark
"Alvaro Herrera" <[EMAIL PROTECTED]> writes: > Gregory Stark wrote: > >> > Just for confirmation: the relfrozenxid of a fresh table is the xid of the >> > transaction that created it, isn't it? >> >> Yes, easily enough checked: >&g

Re: [GENERAL] Manual Vaccum very slow with Autovaccum enabled

2007-07-31 Thread Gregory Stark
uum if you want to run vacuum manually faster than the normal autovacuum times. http://www.postgresql.org/docs/8.2/interactive/runtime-config-resource.html#RUNTIME-CONFIG-RESOURCE-VACUUM-COST -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end

Re: [GENERAL] a few questions (and doubts) about xid

2007-08-01 Thread Gregory Stark
PDATE chain following, catalog checks (generally you can use an index or table which has been committed even if it was committed after you started your transaction), relational integrity checks, and other special cases like those. -- Gregory Stark EnterpriseDB http://www.enterpris

Re: [GENERAL] Linux distro

2007-08-02 Thread Gregory Stark
wn where they come from. I'm unclear why you would be running the enterprise management tools on individual machines though. Isn't the point of enterprise management tools that you can manage the whole enterprise? Ie, that they work remotely? -- Gregory Stark

Re: [GENERAL] GiST index implementation

2007-08-02 Thread Gregory Stark
set of operators which can be optimized by an index organized the same way and usually correspond to a particular interpretation of the data type. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1:

Re: [GENERAL] GiST index implementation

2007-08-03 Thread Gregory Stark
perator classes. There are a bunch more in the contrib modules. But I don't see any related to temporal data. You might want to look at the seg module and see if it can be altered to work with temporal data instead. You might also look on Pgfoundry, there might be something there. -- Gre

Re: [GENERAL] PG for DataWarehouse type Queries

2007-08-03 Thread Gregory Stark
with hundreds of columns, but that's just guessing in the dark without actual facts to look at. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] [PERFORM] Planner making wrong decisions 8.2.4. Insane cost calculations.

2007-08-06 Thread Gregory Stark
-> Seq Scan on tbl_filetype_suffix (cost=1.00..10001.34 rows=14 width=8) (actual time=0.133..0.176 rows=14 loops=1)" " Filter: (filetype_suffix_index IS TRUE)" -- Gregory Stark EnterpriseDB

Re: [GENERAL] [PERFORM] Planner making wrong decisions 8.2.4. Insane cost calculations.

2007-08-06 Thread Gregory Stark
fully the line breaks are gone. I couldn't find any > in my sent mail. No, the double-quotes are gone but the lines are still wrapped. It's become quite a hassle recently to get mailers to do anything reasonable with code. -- Gregory Stark EnterpriseDB

Re: [GENERAL] finding out vacuum completion %, and vacuum VS vacuum full

2007-08-07 Thread Gregory Stark
h this one? What does the output of "vacuum verbose" say? > If you have adequate disk space free (enough to hold another > copy of the new table) and the table has an index on it, then > CLUSTER the table. Or you can use ALTER TABLE to change the type of a column which forces the w

Re: [GENERAL] Reordering columns, will this ever be simple?

2007-08-07 Thread Gregory Stark
"novnov" <[EMAIL PROTECTED]> writes: > Is there any plan to add such a capability to postgres? It's been talked about. I wouldn't be surprised to see it in 8.4 but nobody's said they'll be doing it yet and there are a lot of other more exciting ideas t

Re: [GENERAL] why it doesn't work? referential integrity

2007-08-11 Thread Gregory Stark
=) "worker"" This says you mistyped the constraint above to refer to tasks(worker) instead of users(id). Did you? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] why it doesn't work? referential integrity

2007-08-11 Thread Gregory Stark
Sorry, I reread your original post. My initial reading was wrong. To make this work I think you'll need to set these constraints to be deferred. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--

Re: [GENERAL] why it doesn't work? referential integrity

2007-08-11 Thread Gregory Stark
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > 2007/8/11, Gregory Stark <[EMAIL PROTECTED]>: >> >> "Pavel Stehule" <[EMAIL PROTECTED]> writes: >> >> > checked_by INT REFERENCES users (id) ON UPDATE CASCADE ON DELETE SET >

Re: [GENERAL] "Out of memory" errors..

2007-08-13 Thread Gregory Stark
AIL: Failed on request of size 67108860. > -- > > My postgresql.conf is below. I am on a Dual Core server with 4GB or > RAM, which runs MySQL as well (key_buffer for which is at around > 800M). What version of Postgres is this? -- Gregory Stark EnterpriseDB http:

Re: [GENERAL] "Out of memory" errors..

2007-08-13 Thread Gregory Stark
"Lim Berger" <[EMAIL PROTECTED]> writes: > On 8/13/07, Gregory Stark <[EMAIL PROTECTED]> wrote: >> "Lim Berger" <[EMAIL PROTECTED]> writes: >> >> > Hi >> > >> > I am getting the following error while running querie

Re: [GENERAL] Problem Designing Index

2007-08-13 Thread Gregory Stark
likes to do it whenever 10% of the table has been updated, but your mileage will vary considerably depending on how much your updates or other DML affects the distribution which the queries are depending on. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com

Re: [GENERAL] Postgresql INSERT speed (how to improve performance)?

2007-08-14 Thread Gregory Stark
27;N'::bpchar > > Indexes: > "cachedstats_pkey" PRIMARY KEY, btree (id) > "idx_cachedstats_unique_prof_name" UNIQUE, btree (alias) What's "alias"? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Moving to postgresql and some ignorant questions

2007-08-14 Thread Gregory Stark
n the fly. You could look at the CONVERT function which might help, but I'm not sure exactly what you would have to do to solve your immediate problem. If you really need multiple collations in a single database there's a function pg_strxfrm() which was posted to this list a long

Re: [GENERAL] Moving to postgresql and some ignorant questions

2007-08-14 Thread Gregory Stark
happen if an error occurs. Group together into a single transaction precisely the changes that you want to be committed together or rolled back together. Don't structure your program around the performance issues. For the remaining questions I would say you need to experiment. Perhaps others will

Re: [GENERAL] Moving to postgresql and some ignorant questions

2007-08-14 Thread Gregory Stark
ons like that is if you're processing a batch data load of some kind. In that case you have a large volume of updates and they're all single-threaded. But usually in that case you want to abort the whole load if you have a problem. -- Gregory Stark EnterpriseDB http://w

Re: [GENERAL] MVCC cons

2007-08-14 Thread Gregory Stark
architecture. There's no magic here, more bytes take more blocks of space which take more time to write or read. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Insert or Replace or \copy (bulkload)

2007-08-15 Thread Gregory Stark
lters that eat pets and small > children ... so if you want to be sure to get through to me, don't forget to > cc: the list. They eat all my emails, but I'm sure that's intentional :) -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Blobs in Postgresql

2007-08-15 Thread Gregory Stark
ou cannot manipulate the whole thing in memory all at once (Keep in mind that Postgres expects to be able to handle a few copies of the data at the same time. Conservatively expect 5 simultaneous copies to have to fit in memory.) then you'll have to look into the large object interface which is

Re: [GENERAL] Compound Indexes

2007-08-15 Thread Gregory Stark
o build some kind of index to help the ~* clause. If you do a lot of queries like that and the id,s_id restriction isn't very selective you might look into tsearch2 which can index that type of query. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Yet Another COUNT(*)...WHERE...question

2007-08-15 Thread Gregory Stark
conditions is > infinite... Depends on the "conditions" bit. You can't solve all of the infinite possibilities -- well you can, just run the query above -- but if you want to do better it's all about understanding your data. -- Gregory Stark EnterpriseDB h

Re: [GENERAL] Interpreting statistics collector output

2007-08-15 Thread Gregory Stark
in the table... that's what it's meant to do. LIMIT -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Yet Another COUNT(*)...WHERE...question

2007-08-16 Thread Gregory Stark
d it has to create and delete entries in pg_class for every use. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-n

Re: [GENERAL] [RESEND] Transaction auto-abort causes grief with Spring Framework

2007-08-16 Thread Gregory Stark
led "autonomous transactions" and there's no built-in support for them in Postgres but you can put together something equivalent using dblink or a second client connection. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of br

Re: [GENERAL] [RESEND] Transaction auto-abort causes grief with Spring Framework

2007-08-17 Thread Gregory Stark
"Tyson Lloyd Thwaites" <[EMAIL PROTECTED]> writes: > Gregory Stark wrote: > >>"Tyson Lloyd Thwaites" <[EMAIL PROTECTED]> writes: >> >>>Normally if we catch the exception, other dbs (Oracle, MSSQL) will let us >>>keep going. >

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Gregory Stark
I would suggest vacuuming between each update. I do have to wonder how you're getting the data *in* though. If it's large enough to have to stream out like this then how do you initially load the data? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---

Re: [GENERAL] SUBSTRING performance for large BYTEA

2007-08-18 Thread Gregory Stark
based on > bytea parameter size. Or even writing a trigger issuing ALTER TABLE > depending on size of insert ? I wouldn't suggest doing that. It will bloat the pg_attribute catalog table and require a lot of extra vacuums. I think it would also create some lock contention issues. --

Re: [GENERAL] POSTGRE CRASH AND CURRVAL PROBLEM HELP!

2007-08-19 Thread Gregory Stark
stem backup? Can you do \ds on the working and non-working database and compare the results? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your des

Re: [GENERAL] PostgreSQL vs Firebird feature comparison finished

2007-08-24 Thread Gregory Stark
o on. It's purely a question of which API we use to create the threads of execution. Not an architectural change in Postgres. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] FATAL: could not reattach to shared memory (Win32)

2007-08-24 Thread Gregory Stark
latively trivial as there are already some configurations where it's not the case (the EXEC_BACKEND case I believe). The rest of the system uses a shared memory base pointer and references everything relative to that. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com --

Re: [GENERAL] Geographic High-Availability/Replication

2007-08-24 Thread Gregory Stark
file handling records one by one and waiting for each commit before proceeding then it's single threaded. If you have a hundred independent clients on separate connections doing separate things then each one of them could get 6tps. Which you have will depend on your application and your n

Re: [GENERAL] FATAL: could not reattach to shared memory (Win32)

2007-08-24 Thread Gregory Stark
gt; use regular pointers, and have for years. Ah, I happened to be recently in that code so I was mislead. So even in EXEC_BACKEND we require that we can attach to the shared memory at a specified location. hm. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com --

Re: [GENERAL] FATAL: could not reattach to shared memory (Win32)

2007-08-24 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> "Tom Lane" <[EMAIL PROTECTED]> writes: >>> There are a few old bits of code that still use MAKE_PTR/MAKE_OFFSET, >>> but I think it's mo

Re: [GENERAL] Restore v. Running COPY/INDEX seperatly

2007-08-26 Thread Gregory Stark
ould set up a trigger to generate the tsvector when you first load the data instead of adding it later. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send

Re: [GENERAL] Undetected corruption of table files

2007-08-27 Thread Gregory Stark
and a CRC will happily checksum the corrupted memory just fine. A checksum is no guarantee. But I've also seen data corruption caused by bad memory in an i/o controller, for example. There are always going to be cases where it could help. -- Gregory Stark EnterpriseDB htt

Re: [GENERAL] Can this function be declared IMMUTABLE?

2007-08-28 Thread Gregory Stark
ing precomputed function values are discarded. The trigger you > suggest is fairly pointless because it will not cause regeneration of > plans. The trigger would alert him if there were any indexes built using the function... -- Gregory Stark EnterpriseDB http

  1   2   3   4   >