Re: [GENERAL] work_mem greater than 2GB issue

2009-05-14 Thread Gregory Stark
both cases? I suspect what's happening is that the planner is estimating it will need 2G to has all the values and in fact it would need >8G. So for values under 2G it uses a sort and not a hash at all, for values over 2G it's trying to use a hash and failing. -- Gregory Stark Ent

Re: [GENERAL] Nooby Q: Should this take five hours? And counting?

2009-04-20 Thread Gregory Stark
. If there's any sequential i/o mixed in then yeah, it's pretty poor. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chang

Re: [GENERAL] DISTINCT ON without ORDER BY

2009-04-20 Thread Gregory Stark
a) (sfunc = magic_transition, stype = a); Not sure it'll be faster though. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To m

Re: [GENERAL] What are the benefits of using a clustered index?

2009-03-22 Thread Gregory Stark
that's a secondary issue to getting it on the > TODO list, which is all I'm suggesting at present. Well I think we need to be clear enough at least on the "what" if not the "how". But there's a bit a of a fuzzy line between them I admit. -- Gregory Stark E

Re: [GENERAL] Breaking national language support in Solaris 8

2009-03-22 Thread Gregory Stark
just as good as the existing code. Just use regular gettext on the two strings separately and pick the right one based on the English rule. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! -- Sent via pgsql-gen

Re: [GENERAL] Query 4-5 times slower after ANALYZE

2009-03-18 Thread Gregory Stark
than it saves in the query -- the reason these limits exist at all.. geqo_threshold join_collapse_limit from_collapse_limit -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning - Sent via pgsql-general mailing

Re: [GENERAL] Query 4-5 times slower after ANALYZE

2009-03-18 Thread Gregory Stark
something like creation_date <= now() - Both because of the now() instead of 'now'::date and because the latter is a comparison that can be indexed instead of an expression which could use an index on creation_date. -- Gregory Stark EnterpriseDB http://www.enterp

Re: [GENERAL] PostgreSQL versus MySQL for GPS Data

2009-03-18 Thread Gregory Stark
ing about "very large" at about 4-10 TB. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! - Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] upgrade from 7.4 to 8.3

2009-03-11 Thread Gregory Stark
should be released sometime in the next 3-6 months and will allow you to have a different encoding and locale for each database. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! -- Sent via pgsql-general mailing

Re: [GENERAL] postgresql and LDAP

2009-03-10 Thread Gregory Stark
Emanuel Calvo Franco writes: > 2009/3/10 Gregory Stark : >> Tom Lane writes: >>> However, a tip that might help is that there should be more information >>> about the problem in the postmaster log.  We intentionally don't send >>> details abo

Re: [GENERAL] 8.3.6 build error on Debian Lenny

2009-03-10 Thread Gregory Stark
do it once and only because I had a filesystem corruption. > I'll try Debian lists / irc - hopefully don't get snarks. :) Yes well... -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] postgresql and LDAP

2009-03-10 Thread Gregory Stark
;-) > > However, a tip that might help is that there should be more information > about the problem in the postmaster log. We intentionally don't send > details about the conf file's contents to the client... Perhaps we should send a HINT to the client saying to cons

Re: [GENERAL] intermittant performance problem

2009-03-10 Thread Gregory Stark
disk sort of all the records picked from raw_data. It does seem much more likely that whatever index you have it using on timestmp or item_name or some_data_field is sometimes being used and sometimes not. Perhaps it's switching from an index on one of those columns to an index on some other c

Re: [GENERAL] Newbie questions relating to transactions

2009-03-08 Thread Gregory Stark
ting as a client. That lets you stop/start transactions freely. It also allows you to open multiple connections or run the client-side code on a separate machine which can have different resources available. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about

Re: [GENERAL] Problem with Mauritius summer time (MUST)

2009-03-04 Thread Gregory Stark
from the Default timezone_abbreviations file. SELECT '2009-01-01 00:56:00 Indian/Mauritius'::timestamp with time zone; timestamptz 2008-12-31 19:56:00+00 -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Strange behavior: row won't delete

2009-03-03 Thread Gregory Stark
length of time while holding locks which block other transactions that's bad. Alternately if you see a query in pg_stat_transaction which is taking a long time to run you might check whether you have a bad plan or a bad query running while holding locks effectively doing the same thing. -- Greg

Re: [GENERAL] funny view/temp table problem with query

2009-02-27 Thread Gregory Stark
e. Needing two cracks at describing the problem is pretty much par for the course here. I haven't tested the query to see what's going on but if the problem is due to random() then in 8.4 you could use WITH to guarantee that the subquery is executed precisely once and the results reuse

Re: [GENERAL] Using xmin to identify last modified rows

2009-02-25 Thread Gregory Stark
Richard Broersma writes: > On Wed, Feb 25, 2009 at 5:21 AM, Gregory Stark wrote: > >> I'm not sure using xmin is such a great idea really. It's handy for ad-hoc >> queries but there are all kinds of cases where it might not give you the >> results you expect

Re: [GENERAL] Using xmin to identify last modified rows

2009-02-25 Thread Gregory Stark
put a timestamp column on your tables and manage the date you put in their according to a policy you control. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! -- Sent via pgsql-general mailing list (pgsql-general@postgr

Re: [GENERAL] Indexing a Bit String column

2009-02-24 Thread Gregory Stark
able scan would be more efficient than any index. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] \l of psql 8.4 looks ... unreadable on 80char default

2009-02-19 Thread Gregory Stark
d about reopening it, but while I don't think the current logic is right I don't think wrapping to 80 columns when your terminal is wider is one of the current broken cases. It tends to fail in the opposite direction of randomly not wrapping at all so it's kind of surprising

Re: [GENERAL] Bringing other columns along with a GROUP BY clause

2009-02-05 Thread Gregory Stark
ank() over (partition by charge order by coldspot_time desc) as r) where r = 1 ? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make chang

Re: [GENERAL] C function question

2009-02-04 Thread Gregory Stark
ould stop holding our noses and do something about > this old gotcha. That type's not going away anytime soon, but could we > rename it to char1 or something like that? int1? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's S

Re: [GENERAL] Vacuums taking forever :(

2009-02-04 Thread Gregory Stark
The more normal suggestion is to increase *vacuum_cost_delay* which tells it to sleep longer between bits of work. Don't increase it too much or vacuum will take forever. But if you increase it from 20 to 40 it should use half as much i/o as bandwidth as now. -- Gregory St

Re: [GENERAL] Vacuums taking forever :(

2009-02-03 Thread Gregory Stark
less i/o impact. The defaults process only a few kilobytes before sleeping which probably cause a lot of random seeks. If you multiple both by 10 then you'll process close to a megabyte of data and then sleep for a long while. Just a thought -- I haven't tried this on a test box.) --

Re: [GENERAL] Pet Peeves?

2009-02-02 Thread Gregory Stark
ce base which is flexible enough to extend to use a database backend. I'm under the impression most cron daemons are based on pretty old and ossified source bases and are burdened by a lot of legacy compatibility requirements. -- Gregory Stark EnterpriseDB http://www.enterpr

Re: [GENERAL] Indices types, what to use. Btree, Hash, Gin or Gist

2009-02-01 Thread Gregory Stark
ally have to store the extra column. Note that in this example if you were to search on just age it wouldn't be able to use either of these indexes however. In theory it could use the indexes if you search on just gender but it would be unlikely to for all the same reasons as previo

Re: [GENERAL] Full text index not being used, even though it is in the plan

2009-02-01 Thread Gregory Stark
ull_listing values contain "view"? How does it perform with much more selective searches? If your full_listing values are quite large then recalculating the tsvector might be a lot more expensive than doing a full table scan and LIKE match for cases when nearly the whole table is

Re: [GENERAL] Pet Peeves?

2009-01-31 Thread Gregory Stark
d the DBMS should not worry about providing the > information about the columns, maybe by simply not allowing the > dynamic-column ones in subqueries. What about a WHERE clause like WHERE P1 > P2 -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB&#

Re: [GENERAL] Indices types, what to use. Btree, Hash, Gin or Gist

2009-01-31 Thread Gregory Stark
lue though. > I understand the Hash is not recommended. When should I use the Gin index ? GIN and GIST are used for fairly specialized purposes. Full text searching, geometric data types, etc. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB

Re: [GENERAL] Pet Peeves?

2009-01-31 Thread Gregory Stark
other > checking if a perl module exists in debian I just do > perl -MCPAN -e 'install (DBD::Pg)' or whatever pkg Ah, well that's not a mistake, but you need to check what -dev packages the CPAN module you're building requires. -- Gregory Stark EnterpriseDB

Re: [GENERAL] Pet Peeves?

2009-01-30 Thread Gregory Stark
ovements and HOT previously and the free space map in 8.4 the situation will be much improved. However there are still some common usage patterns where people run into problems. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production

Re: [GENERAL] Pet Peeves?

2009-01-30 Thread Gregory Stark
former would indeed be a package bug. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Pet Peeves?

2009-01-30 Thread Gregory Stark
"Daniel Verite" writes: > Gregory Stark wrote: > >> Is it the hierarchical query ability you're looking for or pivot? >> The former we are actually getting in 8.4. >> >> AFAIK even in systems with pivot you still have to >> declare a

Re: [GENERAL] complex custom aggregate function

2009-01-30 Thread Gregory Stark
ave a subquery which executed for every record and retrieved the set of data to aggregate. 8.4 Will have OLAP Window functions which can implement things like moving averages. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about Enterp

Re: [GENERAL] Pet Peeves?

2009-01-30 Thread Gregory Stark
t the hierarchical query ability you're looking for or pivot? The former we are actually getting in 8.4. AFAIK even in systems with pivot you still have to declare a fixed list of columns in advance anyways. Do you see a system where it works differently? -- Gregory Stark EnterpriseDB

Re: [GENERAL] How relate pg_class to pg_constraint

2009-01-29 Thread Gregory Stark
users then there's a convenience type called regclass which you can use by doing "SELECT conrelid::regclass from pg_constraint". There are similar regtype and a few others like it too. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about Enterprise

Re: [GENERAL] Pet Peeves?

2009-01-29 Thread Gregory Stark
that Perl has to really make it a big success though. Making modules more, uh, modular, so they can be installed and uninstalled smoothly and preferably without special access privileges is a recognized issue though. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me

Re: [GENERAL] Pet Peeves?

2009-01-29 Thread Gregory Stark
best if we limited ourselves right now to discussing the problems themselves and not debating the pros and cons of possible solutions. I want to encourage people to post their peeves even if they know perfectly well the reasons why things are the way they are. -- Gregory Stark Enterpr

Re: [GENERAL] Pet Peeves?

2009-01-29 Thread Gregory Stark
this the other day. I'm kind of wondering what behaviour you two are looking for and what "different DBMS" you're referring to. I'm assuming it's not the ANSI fold-to-uppercase behaviour you're looking for. -- Gregory Stark EnterpriseDB http://www.

Re: [GENERAL] Pet Peeves?

2009-01-29 Thread Gregory Stark
ote! This may not be so timely any more, though I suppose there's always someone somewhere holding elections :) -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! -- Sent via pgsql-general mailing list (pgsql-genera

Re: [GENERAL] Text search segmentation fault

2009-01-29 Thread Gregory Stark
Tom Lane writes: > Gregory Stark writes: >> Maybe I'm missing something but I don't understand how this fixes the >> problem. >> s is a "char*" so type punning it to an unsigned char * before dereferencing >> it is really the same as casting it

Re: [GENERAL] Text search segmentation fault

2009-01-29 Thread Gregory Stark
Gregory Stark writes: > Teodor Sigaev writes: > >> I reproduced the bug with a help of Grzegorz's point for 64-bit box. So, >> patch >> is attached and I'm going to commit it > ... > >> !Conf->flagval[(unsigned int) *s] = (unsigned char) val

Re: [GENERAL] Text search segmentation fault

2009-01-29 Thread Gregory Stark
nsigned char like you had it originally. What really boggles me is why you don't just use unsigned chars everywhere and remove all of these casts. or would that just move the casts to strcmp and company? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about Ent

[GENERAL] Pet Peeves?

2009-01-29 Thread Gregory Stark
o respond on-list or if you prefer in personal emails. I do intend to use the ideas you give in my presentation so mark anything you wouldn't be happy to see in a slide at a conference some day. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about Enterpr

Re: [GENERAL] Slow first query despite LIMIT and OFFSET clause

2009-01-29 Thread Gregory Stark
'Y' THEN superman Which will make Postgres build stats for the result of that expression specifically. Then if you use that expression exactly as-is in the query the planner should those statistics. I think. I haven't tried this... Tell us how it goes :) I wonder if we should look at b

Re: [GENERAL] PG's suitability for high volume environment (many INSERTs and lots of aggregation reporting)

2009-01-28 Thread Gregory Stark
. I suspect others already suggested this, but you might look at partial indexes. If your queries are very dynamic against relatively static data you might look at building denormalized caches of the precalculated data. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me a

Re: [GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Gregory Stark
Alvaro Herrera writes: > Gregory Stark wrote: >> Alvaro Herrera writes: >> >> Well cross-posting is especially annoying on subscriber-only moderated lists >> such as ours. Anyone who follows up to an email who isn't subscribed to all >> the lists will get

Re: [GENERAL] PgUS 2008 end of year summary

2009-01-12 Thread Gregory Stark
e warnings for each list they're not on. > (If you want it to be even more pain-free, add a Reply-To: > pgsql-advocacy header or some such.) Yeah, actually that doesn't work. If you want to do that the only way to do it properly is to Bcc the various lists with the To set to the

Re: [GENERAL] What determines the cost of an index scan?

2009-01-04 Thread Gregory Stark
it is how much dead space is in the table due to previous updates and deletes, as well as how fragmented the indexes have become over time. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! -- Sent via pgsql-general maili

Re: [GENERAL] Error: Operator does not exist: "char"=integer

2008-12-18 Thread Gregory Stark
d > will behave quite differently. That's why the casts disappeared -- you probably weren't running the queries you thought you were running in 8.2 and previously. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me abou

Re: [GENERAL] Maximum reasonable free space map

2008-12-16 Thread Gregory Stark
poorly because of the time spent sifting through all that dead space. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes

Re: [GENERAL] tup_returned/ tup_fetched

2008-12-14 Thread Gregory Stark
x From: http://www.postgresql.org/docs/8.3/interactive/monitoring-stats.html -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org)

Re: [GENERAL] Postgres mail list traffic over time

2008-11-23 Thread Gregory Stark
Craig Ringer <[EMAIL PROTECTED]> writes: > Gregory Stark wrote: >> Another idea, I wonder if the project has gone more international and >> therefore has more traffic at odd hours of the day for everyone. It would >> also >> mean more long-lived threads with lar

Re: [GENERAL] Postgres mail list traffic over time

2008-11-22 Thread Gregory Stark
's hard to follow because we've been picking up more simultaneous threads instead of all being on one thread together before moving on to the next one. Another idea, I wonder if the project has gone more international and therefore has more traffic at odd hours of the day for everyone. I

Re: [GENERAL] Postgres mail list traffic over time

2008-11-22 Thread Gregory Stark
to post those via > http://explain-analyze.info/ What would be really neat would be having the mailing list do something automatically. Either fix the message inline or generate a link to something like this. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me abou

Re: [GENERAL] Storage location of temporary files

2008-11-05 Thread Gregory Stark
beat any combination of RAID-0 and RAID-1 with the same number of drives at read performance. It's advantage is that you get more capacity. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! -- Sent via pgsql-general

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-11-01 Thread Gregory Stark
data=journal might also be ok. These both have to make performance sacrifices to get there though. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Gregory Stark
Ivan Sergio Borgonovo <[EMAIL PROTECTED]> writes: > On Fri, 31 Oct 2008 08:49:56 + > Gregory Stark <[EMAIL PROTECTED]> wrote: > >> Invisible under normal operation sure, but when something fails the >> consequences will surely be different and I can't

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-31 Thread Gregory Stark
e set of database blocks within the filesystem block is written. The only way I could see this working is if you use a filesystem which logs data changes like ZFS or ext3 with data=journal. Even then you have to be very careful to make the filesystem block size that the journal treats as atomic m

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-30 Thread Gregory Stark
"Scott Marlowe" <[EMAIL PROTECTED]> writes: > On Thu, Oct 30, 2008 at 4:41 PM, Tom Lane <[EMAIL PROTECTED]> wrote: >> "Scott Marlowe" <[EMAIL PROTECTED]> writes: >>> On Thu, Oct 30, 2008 at 4:01 PM, Gregory Stark <[EMAIL PROTECTED]> wr

Re: [GENERAL] psql screen size

2008-10-30 Thread Gregory Stark
and SIGQUIT I wonder if it's (erroneously?) ignoring SIGWINCH as well. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to y

Re: [GENERAL] Are there plans to add data compression feature to postgresql?

2008-10-30 Thread Gregory Stark
#x27;t really see trusting Postgres on a filesystem that felt free to compress portions of it. Would the filesystem still be able to guarantee that torn pages won't "tear" across adjacent blocks? What about torn pages that included hint bits being set? -- Gregory Stark Enterpris

Re: [GENERAL] Decreasing WAL size effects

2008-10-30 Thread Gregory Stark
the archive command the amount of real data in the wal file and have it only bother copying up to that point? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! -- Sent via pgsql-general mailing list (pgsql-general

Re: [GENERAL] psql screen size

2008-10-29 Thread Gregory Stark
Gregory Stark <[EMAIL PROTECTED]> writes: > Could you define "messed up"? > > What I see is that the query output is formatted correctly but readline still > thinks the screen is the old size. (This is in CVS HEAD -- this code was > definitely different in 8.3 and

Re: [GENERAL] psql screen size

2008-10-29 Thread Gregory Stark
r may be different). Perhaps we need to tell readline whenever we run a subprocess and it may have missed screen resize signals. It's easy enough to work around, just resize the window again a little bit once you're at the prompt. Readline notices that and adjusts. -- Gregory Stark

Re: [GENERAL] PostgreSQL 8.3.3 chooses wrong query plan when LIMIT 1 added?

2008-10-28 Thread Gregory Stark
ps increasing the statistics target. One thing that comes to mind though, I would have defined one of those two indexes to include both columns. Probably the file_id index, so you would have an index on and an index on . That would be a huge win for this query. -- Gregory Stark EnterpriseDB

Re: [GENERAL] Drupal and PostgreSQL - performance issues?

2008-10-14 Thread Gregory Stark
y. ISTM the right way to make it go away is to allocate temporary files and mmap them instead of using sysv shared memory. Then we can mmap as much as we want. Before we lose root privileges we can even mlock as much as we want. -- Gregory Stark EnterpriseDB http://www.enterprised

Re: [GENERAL] Drupal and PostgreSQL - performance issues?

2008-10-14 Thread Gregory Stark
om earlier messages. Many mailers hide such comments or de-emphasize them to help the user concentrate on the new material. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! -- Sent via pgsql-general mailing list (pgsql

Re: [GENERAL] Out of memory in create index

2008-10-13 Thread Gregory Stark
other services or queries running at the same time the first time which reduced the available memory. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! -- Sent via pgsql-general mailing l

Re: [GENERAL] Chart of Accounts

2008-10-13 Thread Gregory Stark
at $1.999/gallon and buy 4 gallons you get charged $8.00 not $7.996. If you fail to round at that point you'll find that your totals don't agree with the amount of money in your actual bank account. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about Enterpri

Re: [GENERAL] PQexecParams question

2008-10-13 Thread Gregory Stark
"Grzegorz Jaśkiewicz" <[EMAIL PROTECTED]> writes: > that would be a type mismatch, heh. prepare "select * from foo where a = any($1::int[])" then pass "{1,2,3}" -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruc

Re: [GENERAL] Static functions

2008-10-04 Thread Gregory Stark
esult is >> > already known? >> >> Not if said effort would cost more than is saved, which would be by far >> the most likely result if we tried to cache all function results. >> > > Sorry Tom, I confused STABLE with IMMUTABLE; my bad. No, this is equally

Re: [GENERAL] Index order

2008-09-16 Thread Gregory Stark
th any accented characters or in latin1 since they'll be sorted by their binary value which comes after all the unaccented characters. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! -- Sent via pgsql-general m

Re: [GENERAL] "Healing" a table after massive updates

2008-09-13 Thread Gregory Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> Incidentally the visibility bugs are indeed entirely fixed in 8.3. In 8.2 and >> before cluster and alter table rewrites can both cause tuples to not appear >> for transacti

Re: [GENERAL] "Healing" a table after massive updates

2008-09-13 Thread Gregory Stark
do ALTER TABLE tab ALTER col TYPE USING col; which will rewrite the table without using an index. This is much faster but has the same other disadvantages. Incidentally the visibility bugs are indeed entirely fixed in 8.3. In 8.2 and before cluster and alter table rewrites can both cause tupl

Re: [GENERAL] A challenge for the SQL gurus out there...

2008-09-07 Thread Gregory Stark
n every thread (and possibly a recent_post_id) then you could have a query on forums which pulls the most recently updated thread directly without having to join on form_post at all. That would slow down inserts but speed up views -- possibly a good trade-off for a forum system. --

Re: [GENERAL] recover in single-user backend fails

2008-09-07 Thread Gregory Stark
eturn;" as the first line of gist_redo() in gistxlog.c and when recovery (hopefully) completes immediately drop any gist indexes? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning -- Sent via pgsql-gener

Re: [GENERAL] MERGE: performance advices

2008-09-02 Thread Gregory Stark
keep only the first value for each pk. Then you'll have to build indexes, swap the tables, and fix any views or rules which refer to the old table (they'll still refer to the old table, not the new table even after renaming it to the old name). -- Gregory Stark EnterpriseDB

Re: [GENERAL] indexes on functions and create or replace function

2008-08-28 Thread Gregory Stark
t using the index during the unavoidable window when the index is invalid. I'm not sure how to solve that. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! -- Sent via pgs

Re: [GENERAL] Postgres 8.3 is not using indexes

2008-08-14 Thread Gregory Stark
"Clemens Schwaighofer" <[EMAIL PROTECTED]> writes: > Any tips why this is so? They don't appear to contain the same data. If they do have you run analyze recently? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB'

Re: [GENERAL] foreign key restrictions

2008-08-10 Thread Gregory Stark
ate values of OFONE but they'll all have different values of ID anyways. I'm not sure if there's a fundamental reason why there has to be an index that exactly matches the foreign key or not -- offhand I can't think of one. -- Gregory Stark EnterpriseDB

Re: [GENERAL] Initdb problem on debian mips cobalt: Bus error

2008-08-05 Thread Gregory Stark
"Tom Lane" <[EMAIL PROTECTED]> writes: > Gregory Stark <[EMAIL PROTECTED]> writes: >> "Tom Lane" <[EMAIL PROTECTED]> writes: >>> (Rather than trying to browbeat configure into doing this, I'd suggest >>> manually adjusting CFLA

Re: [GENERAL] Initdb problem on debian mips cobalt: Bus error

2008-08-04 Thread Gregory Stark
re --enable-debug CFLAGS=-O0 CFLAGS=-O0 ./configure --enable-debug And yes, you have to do make clean. I often forget that step :( -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! -- Sent

Re: [GENERAL] AT TIME ZONE and DST in UTC<->CET conversion

2008-07-05 Thread Gregory Stark
GMT+1. If you want a timezone which switches between CET and CST automatically you should use something like Europe/Paris. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! -- Sent via pg

Re: [GENERAL] Switching between terminals

2008-07-03 Thread Gregory Stark
be need to put a SELECT pg_sleep(10) between the two queries in the first file you run so that it hasn't updated both tables and exited before the second one even starts. But I'm just guessing since you haven't sent the actual files you're running. -- Gregor

Re: [GENERAL] Functional index adding one

2008-07-03 Thread Gregory Stark
"Gregory Stark" <[EMAIL PROTECTED]> writes: > CREATE INDEX token_position_func on (token(position+1)) Ooops, I misread that as if "token" were a function and not the table. Sam Mason had the right syntax. Sorry. -- Gregory Stark EnterpriseDB http://

Re: [GENERAL] Functional index adding one

2008-07-03 Thread Gregory Stark
d version of Postgres, I think 7.3 which had functional indexes but not expression indexes. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning -- Sent via pgsql-general mailing list (pgsql-general@postgresql.o

Re: [GENERAL] Memory use in 8.3 plpgsql with heavy use of xpath()

2008-07-03 Thread Gregory Stark
en. That's just a special case of what would be expected to happen with memory allocation anyways though. Few allocators return memory to the OS anyways. It might just be exaggerated in this case since probably a significant part of Postgres's footprint here was the per-transaction

Re: [GENERAL] when to reindex?

2008-06-06 Thread Gregory Stark
t different records. The cases where it would win would be where you have a lot of dead space in the table (but not in the index), partial indexes which don't cover much of the table, or a table which is already very well clustered (possibly, depending on other factors). --

Re: [GENERAL] Heavily fragmented table and index data in 8.0.3

2008-06-06 Thread Gregory Stark
time as a very long-running transaction such as pg_dump it shouldn't be a problem. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] turning fsync off for WAL

2008-06-03 Thread Gregory Stark
as well turn fsync off on the server since you're resigned to having to restore from backup on a server crash anyways... -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] turning fsync off for WAL

2008-06-02 Thread Gregory Stark
and checkpoint_segments parameters. And probably the bgwriter variables as well (lest it start trying to flush buffers whose changes haven't been logged yet too). -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseD

Re: [GENERAL] small table, huge table, and a join = slow and tough query. cake inside!

2008-05-28 Thread Gregory Stark
you're talking about they probably won't help unless you have a *lot* of different pollutants and not all that many records for each pollutant. To get anything more you would have to post an EXPLAIN output and preferably an EXPLAIN ANALYZE output if you can find a query which completes. -

Re: [GENERAL] Bottom Posting

2008-05-28 Thread Gregory Stark
"Bob Pawley" <[EMAIL PROTECTED]> writes: > The concept of most lists should be "the free exchange of ideas in the most > efficient manner possible". What is this in response to? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask m

Re: [GENERAL] Psql crashes with Segmentation fault on copy from

2008-05-28 Thread Gregory Stark
gt; P&C PREMIUM\t6300\t0\t183718"..., > scan_state=0x549c20, query_buf=0x54a480) at command.c:546 I'm a bit puzzled by this. The command being executed here seems to have been overwritten by data from the later command -- before it was overwritten it was apparently "\i b

Re: [GENERAL] active queries

2008-05-28 Thread Gregory Stark
n or all of libpq. You can actually have more than one query simultaneously active in the same connection using named portals. But if you called PQgetResult() on one you have to ensure all threads wait until it returns before issuing PQgetResult() (or any other libpq function) on the other por

Re: [GENERAL] Open Source CRM - Options?

2008-05-28 Thread Gregory Stark
referring to is some subset of CMS, I don't know of any specific name for this kind of system. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning -- Sent via pgsql-general mailing list (pgsql-general@post

Re: [GENERAL] Bottom Posting

2008-05-28 Thread Gregory Stark
hat there's really no reason to quote the original message. My response was only to this one point and not the longer previous point. I actually think this is a more important point to get across than simply "don't top post" which just seems to generate lots of "botto

Re: [GENERAL] Error: Could not open relation...

2008-05-23 Thread Gregory Stark
led back. I would be more concerned about integrity issues if you started having the same error with something like an xlog WAL file though. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! -- Sent via pgsql-gener

  1   2   3   4   >