Re: [GENERAL] is this a bug or I am blind?

2005-12-16 Thread Greg Stark
discovered this is effectively what Perl does, probably for similar motivations wrt to hashes. I think it's probably the least bad solution, even if it's not really the right thing. -- greg ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] is this a bug or I am blind?

2005-12-17 Thread Greg Stark
y strcoll and then strcmp will effectively give this set of semantics with one exception, the case of invalid UTF encodings that are not canonicalized where it will silently treat them as distinct strings from the correctly encoded string. One day when it's possible for the two strings to be in

Re: [GENERAL] is this a bug or I am blind?

2005-12-17 Thread Greg Stark
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Greg Stark wrote: > > Using iso-8859-1 to encode "é" as a single byte versus using UTF8 > > which would take two bytes to encode it is an issue of using two > > *different* encodings. > > But that's

Re: [GENERAL] Indices for select count(*)?

2005-12-21 Thread Greg Stark
MSSQL can scan just the index (which postgres can't do) I would only expect a factor of 2-4x. Hm. Unless perhaps this table is extremely wide? How large are these records? -- greg ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Indices for select count(*)?

2005-12-22 Thread Greg Stark
second (or even third or fourth) read in the rollback segment. And you pay these costs on *all* scans. -- greg ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] generic way to retrieve array as rowset

2006-01-03 Thread Greg Stark
ostgresql-contrib package) and then: SELECT id, int_array_enum(val) FROM t7 -- greg ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] (Select *) vs. (Select id) from table.

2006-01-08 Thread Greg Stark
If you hard code the list of columns at each layer then you have to rewrite lots of code when you add a column or change a datatype. -- greg ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Finding orphan records

2006-01-12 Thread Greg Stark
tor of 3-4 then the merge join should be faster. If it's really two orders of magnitude (100x?) then the nested loop below would be faster. I think in 8.1 (and I think in 8.0 too) the planner is capable of coming up with both plans for the NOT IN query though. -- greg -

Re: hardware checks (was Re: [GENERAL] invalid memory alloc request size)

2006-01-23 Thread Greg Stark
useful still as a way of ensuring that every block is read and written to, but then you have to look at the SMART data to see what happened. -- greg ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Indexes

2006-01-30 Thread Greg Stark
only difference would be on queries like "WHERE author_id = ? and book_id BETWEEN ? AND ?". If you never do range scans then it will hardly matter which way you go. I tend to do it the way above just so it matches the column order in the table. -- greg -

Re: [GENERAL] B-tree performance improvements in 8.x

2006-02-08 Thread Greg Stark
anyways. If you access your table with "WHERE a = ?" then it will undoubtedly use the index effectively. You're accessing less than 5% (presumably much less), so the index is useful. -- greg ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Oracle purchases Sleepycat - is this the "other shoe"

2006-02-16 Thread Greg Stark
said for MySQL's which doesn't introduce an orthogonal syntax to GROUP BY with basically equivalent meaning, but there's a lot to be said for having a syntax that you can't write by accident as well. -- greg ---(end of broadcast)---

Re: [GENERAL] Mixing different LC_COLLATE and database encodings

2006-02-18 Thread Greg Stark
olve the whole problem since functions like substr() or LIKE are locale sensitive too. If you need an encoding like UTF-8 and you're stuck either pushing all your string manipulations into the client or going ahead with a non-C locale and UTF-8 even for the strings that are really just ascii

Re: [GENERAL] Mixing different LC_COLLATE and database encodings

2006-02-20 Thread Greg Stark
sion seems better than depending on a huge external library. Especially when the consequences of that non-standard extension being missing is only that performance will suffer in a case Postgres currently doesn't handle at all. -- greg ---(end of broadcast)

Re: [GENERAL] [OFFTOPIC] Typo3 + Postgresql anyone?

2006-03-01 Thread Greg Donald
r php + some > Typo3 extension. > > Does anyone know of a howto that explains what > software I'll need for that, and where to get it? > > Does anyone here have experience with Typo3+Postgresql that he might > want to share? Typo uses migrations, so it should be database a

Re: [GENERAL] Sequencial scan instead of using index issue again

2006-03-06 Thread Greg Stark
;); > > PLAN ... > (29 rows) That plan doesn't correspond to the query you posted. Try sending the result of EXPLAIN ANALYZE from the actual query or else posting the actual query you're running. -- greg ---(end of broadcast)-

Re: [GENERAL] Wal -long transaction

2006-03-13 Thread Greg Stark
ry sequential scan and on every cache miss it causes whatever you call it. I'm not saying I like rollback segments better, just yes, TANSTAAFL. -- greg ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your des

Re: [GENERAL] ERROR: FULL JOIN is only supported with merge-joinable

2006-03-13 Thread Greg Stark
t; considered merge-joinable? > > I think you could do something involving a time interval datatype that > considers "overlap" as equality and does something reasonable for > sorting non-overlapping intervals. How could a non-transitive property ever be merge joinable

Re: [GENERAL] picking the correct locale when doing initdb

2006-03-16 Thread Greg Stark
h and > italian at the same time. Which locale would you use to perform comparisons for table joins? In any case having actually implemented multilingual sites I can't imagine one locale per table being useful at all. You always end up wanting per column, even per array element locales

Re: [GENERAL] Enforcing serial uniqueness?

2006-03-22 Thread Greg Stark
shouldn't want to allow unrestricted use of NEXTVAL either.) What if you don't mind someone being able to use up unused values but don't want someone to be able to rewind the sequence and generate duplicate key violations breaking the application? -- greg ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Debian package for freeradius_postgresql module

2006-04-08 Thread Greg Stark
d-line and file format interface. Note that (as I understand it) nobody is saying Postgres is infringing on anything. Only that combining postgres with OpenSSL and Freeradius results in a combination of license restrictions that can't all be met at the same time. So the resulting binary

Re: [GENERAL] Composite types and NULL within PL/pgSQL

2006-05-06 Thread Greg Stark
7;s the basic property any integer should have after all. -- greg ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Arguments Pro/Contra Software Raid

2006-05-09 Thread Greg Stark
rd of a 15kRPM SATA drive. Well, dollar for dollar you would get the best performance from slower drives anyways since it would give you more spindles. 15kRPM drives are *expensive*. -- greg ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Arguments Pro/Contra Software Raid

2006-05-09 Thread Greg Stark
dge because of IDE errors on the bad drive. So as far as runtime, instead of added reliability all you've really added is another point of failure. On the data integrity front you'll still be better off. -- Greg ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Why won't it index scan?

2006-05-17 Thread Greg Stark
. So sadly I think "at the mercy of randomness" is pretty accurate. You'll have to raise the statistics target as the table grows and I expect you'll eventually run into some downsides of large stats targets. Some better algorithms were posted, but they would require full

Re: [GENERAL] "make check" fails over NFS or tmpfs

2006-05-22 Thread Greg Stark
+ gcircle_tbl | t > + gpolygon_tbl| t >hash_f8_heap| t >hash_i4_heap| t >hash_name_heap | t This seems pretty mystifying. Perhaps it's leftover stuff from the tablespace that failed to get dropped? -- greg --

Re: [GENERAL] "make check" fails over NFS or tmpfs

2006-05-22 Thread Greg Stark
oing to break a LOT of things. Most Unix mail servers, for example, also depend on directory operations being synchronous. I would expect "async" to cause Postgres errors on any filesystem that supports it. "async" "intr" and "soft" seem like the real foot-guns here. -- greg ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] "make check" fails over NFS or tmpfs

2006-05-22 Thread Greg Stark
cesses. The description of the option gave me the impression that this would only be an issue if your processes were on two different clients. -- greg ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Restricting access to rows?

2006-05-25 Thread Greg Stark
. You might be able to find it searching back through the lists. There are also people interested in working on it as a built-in feature for Postgres, but I don't think there's any time-line on though or even any preliminary results yet, so I wouldn't depend on it any time soon.

Re: [GENERAL] importing data

2006-05-31 Thread Greg Stark
Chris <[EMAIL PROTECTED]> writes: > Craig White wrote: > > I am getting an error when I import, invalid input syntax for type > > boolean - which is empty. Is there any way around this of must I > > necessarily have \N ? You could try with: COPY ...

Re: [GENERAL] COLLATE

2006-06-05 Thread Greg Stark
failed to reset locale: %s", localestr); /* restore normal error handling */ memcpy(&Warn_restart, &save_restart, sizeof(Warn_restart)); PG_RETURN_BYTEA_P(GET_BYTEA(trans)); } SET search_path = public; SET autocommit TO 'on'; CREATE OR REPLACE FUNCTION pg_strxfrm(text, text) RETURNS bytea AS 'pg_strxfrm.so', 'pg_strxfrm' LANGUAGE 'C' STRICT IMMUTABLE ; -- greg ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Backwards index scan

2006-06-06 Thread Greg Stark
is and those records will be dropped. This is true regardless of whether there's an index. -- greg ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Performance Question

2006-06-14 Thread Greg Stark
be sure not to be issuing 50 thousand separate transactions, that will be *much* slower. -- greg ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

[GENERAL] Question about openSSL

2006-06-17 Thread Greg Quinn
1.) I went to the OpenSSL ste, and tried to download opnSSL, but I only saw Linux files. Is OpenSSL supported ni Windows? 2.) I am using the Npgsql.NET data provider to connect, but it doesn’t support SSL yet, when will it support SSL?   Thanks  

[GENERAL] Bitwise OR in a group statement

2006-06-21 Thread Greg Gazanian
; Resulting in: Any thoughts? Thanks. - Greg Gazanian Network Systems Analyst Technology and Information Services Arcadia Unified School District ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Out of memory error in 8.1.0 Win32

2006-06-22 Thread Greg Stark
lass where relname = 'oom_tab') You may need to reanalyze and maybe increase the statistics target (possibly by a lot). It may be interesting to compare the results of the above query before and after analyzing too. -- greg ---(end of broadcast)-

Re: [GENERAL] Idea for vacuuming

2006-06-23 Thread Greg Stark
kes no sense. Vacuum starts by scanning the table itself, not the indexes. It only goes to the indexes after it has found tuples that need cleaning up. There's nothing to look at in the indexes that would tell it whether there are any tuples to clean up. -- greg -

Re: [GENERAL] Null and Void() - Or, Abandon All Hope Ye Who allow

2006-07-05 Thread Greg Stark
;special values" regardless of data type rather than allow a single special value and have so many hard coded magical behaviours. -- greg ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] VACUUM FULL versus CLUSTER ON

2006-07-07 Thread Greg Stark
is temporary storage place be any faster than scanning the original table? -- greg ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Getting Primary Key Value After Insert

2006-07-08 Thread Greg Stark
ld have to go out of your way to break it but if you're using some sort of connection pooling you wouldn't want to pull a fresh connection from the pool, for example. -- greg ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [GENERAL] Long term database archival

2006-07-12 Thread Greg Stark
to the guest OS. When I buy > a > new laptop, I just install VMware on the new thing, copy over the virtual > machines and fire them up. They don't even notice that they run on entirely > different hardware. How does that help? You still need to get VMWare's host OS working with t

[GENERAL] setting serial start value

2006-07-20 Thread Greg Philpott
I have a table with a field called "id" that is a serial field and pkey. I would like to set the the sequence to start at 1 and increase sequentially from there but I can't seem to get that to work. any suggestions are greatly appreciated. I am using ver

Re: [GENERAL] setting serial start value

2006-07-20 Thread Greg Philpott
Hi Michael, from terminal in psql I enter # ALTER SEQUENCE public.users MINVALUE ; But it doesn't work. I don't think I am specifying the field correctly. the schema is public, the table is users, the field is id. Thanks, Greg On 20-Jul-06, at 10:49 PM, Michael Fuhr wrote: O

Re: [GENERAL] setting serial start value

2006-07-20 Thread Greg Philpott
Thanks Michael that did the trick! Greg On 21-Jul-06, at 12:05 AM, Michael Fuhr wrote: On Thu, Jul 20, 2006 at 11:35:51PM -0400, Greg Philpott wrote: Hi Michael, from terminal in psql I enter # ALTER SEQUENCE public.users MINVALUE ; But it doesn't work. I don't think I am spec

Re: [GENERAL] LISTEN considered dangerous

2006-08-02 Thread Greg Stark
make those changes take effect. If you roll back your changes their original state is restored. -- greg ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] Reordering results for a report

2003-12-13 Thread Greg Stark
; ---+ > 3 | Offer 3 > 1 | Offer 1 > 2 | Offer 2 You could do something like select id,offer from tab order by case when id = 3 then 1 when id = 1 then 2 when id = 2 then 3 end But a) if there are thousands of records you're going to have rather a huge query and b)

Re: [GENERAL] tablespaces in 7.5?

2003-12-13 Thread Greg Stark
ace". The original question was about "tablespaces" -- greg ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] Using indices with long unique IDs.

2004-01-09 Thread Greg Stark
ll it to quote even integer arguments. If it's any consolation 7.5 will use the index even if you put a plain integer in the query. If production is a long way off you could consider developing against a CVS build today and plan to use 7.5 for production when it comes out. -- greg --

Re: [GENERAL] Drawbacks of using BYTEA for PK?

2004-01-12 Thread Greg Stark
very least you have to include a secret. Even then I suspect there are further subtle cryptographic issues. There always are. -- greg ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Specifying many rows in a table

2004-01-29 Thread Greg Stark
avoiding round trip latency. But I don't think there's any such support in postgres currently. -- greg ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Repost: Syntax - or unavailability of same - for variable join??? Can anyone help?

2004-02-17 Thread Greg Patnude
You might have better success with the form of HAVING and appropriate use of OR IS NULL as opposed to strict JOIN and WHERE conditions... Similar to... SELECT A.a, B.b, C.c FROM A, B, C HAVING (A.b = B.b OR B.b IS NULL) GROUP BY A.b; -- Greg Patnude / The Digital Demention 2916 East Upper

Re: [GENERAL] PostgreSQL insert speed tests

2004-02-27 Thread Greg Stark
dex code at least through most 7.3 versions. -- greg ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] PLSQL Question regarding multiple inserts

2004-02-28 Thread Greg Patnude
TH OIDS; Using this type of table def will automatically create the sequence for you -- and always ge thte next value when you do an insert -- ensuring that you dont have duplicate... so you would: INSERT INTO test ('log', 'message'); then SELECT * FROM test; would gi

Re: [GENERAL] Moving from MySQL to PGSQL....some questions

2004-02-28 Thread Greg Patnude
client like MS Access postgreSQL is NOT just a high-powered version of MS Access or mySQL -- there are quite a few differences -- Not to be rude -- but the postgreSQL docs (the Preface, Tutorial, and SQL Language sections) would be good for you to read... -- Greg Patnude / The Digital Demention

Re: [GENERAL] count(1) return 0?

2004-02-29 Thread Greg Stark
omething like that. So for example something like: SELECT count(results.fixture) AS home_wins, home FROM fixtures LEFT OUTER JOIN results USING (fixture) WHERE winner=home GROUP BY fixture,home -- greg ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] PHP or JSP? That is the question.

2004-03-25 Thread Greg Stark
for countable objects like "hours") > I'm confused, where was the sarcasm? -- greg ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] PHP or JSP? That is the question.

2004-03-26 Thread Greg Stark
Mike Mascari <[EMAIL PROTECTED]> writes: > Bas Scheffers wrote: > > > Sarcasm: "A form of wit that is marked by the use of sarcastic language Gee, a helpful dictionary there. (I suppose that was sarcastic too) -- greg -

Re: [GENERAL] FUNCTION problem

2004-04-02 Thread Greg Stark
Sky <[EMAIL PROTECTED]> writes: > uid CHARACTER(20) NOT NULL, > pwd CHARACTER(20) NOT NULL, Incidentally, are you sure you want character(20) ? The input will be padded out to 20 characters with spaces. Usually people find varchar() more convenien

Re: [GENERAL] thread_test.c problems

2004-04-05 Thread Greg Stark
use context switches in a lot of cases where it did previously. You might need a usleep() there instead or in addition. -- greg ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail comm

Re: [GENERAL] Can we have time based triggers in Postgresql??

2004-04-07 Thread Greg Stark
we discussed doing exactly this at my last job. I expect others have thought of the same idea and wouldn't be surprised if it existed by now. -- greg ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] Storing jpgs

2004-04-08 Thread Greg Stark
chemas don't affect performance at all. If you're debating between storing in the same table versus new identical tables there could be pros or cons, but if it complicates your SQL it's probably not worth it in any case. -- greg ---(end of broadcast)--

Re: [GENERAL] Can we have time based triggers in Postgresql??

2004-04-08 Thread Greg Stark
web pages, Jobs could be created or deleted from web pages, failures could automatically create trouble tickets... -- greg ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] running postgresql database from loopback filesystem?

2004-04-10 Thread Greg Stark
database resides. It seems like the obvious solution would be quotas. You would have to set up each database as a separate postgres postmaster running under a different uid though. -- greg ---(end of broadcast)--- TIP 9: the planner will ignore yo

Re: [GENERAL] REINDEX slow?

2004-04-12 Thread Greg Stark
. I don't think it would be any faster but it might avoid downtime. Reindex seems to block any use of the index until the reindex completes, while doing this two-step would avoid blocking queries. I haven't tried it myself though so I'm not sure what gotchas might arise. -- greg -

Re: [GENERAL] Basix for Data General / Basix for Sco Unix

2004-04-15 Thread Greg Stark
n the rest of the input file as arguments and which never stops expanding. \endAbstract -- greg ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Insert Or update

2004-04-23 Thread Greg Stark
owever unless you lock the table while doing this, you have to be prepared > to handle errors. -- greg ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] Storing a file hash as primary key

2004-05-07 Thread Greg Stark
ve preferred bytea(16) but for some reason the php drivers seem to jut drop NULL there when I try to store raw binary md5 hashes. So for now I just declared it bytea with no length specification and store the hex encoded hash. If anyone knows how to get Pear::DB to store binary data in a bytea colum

Re: [GENERAL] Unable to use index?

2004-04-30 Thread Greg Stark
a higher expected cost but a lower worst-case cost than the sequential scan. For some applications the best bet may in fact be to go with the plan expected to be fastest. But for others it would be more important to go with the plan that is least likely to perform badly, even if it means paying

Re: [GENERAL] fsync = true beneficial on ext3?

2004-05-17 Thread Greg Stark
on logs wouldn't make it safe to run without fsync, but it would make the fsyncs basically free. -- greg ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] how many record versions

2004-05-23 Thread Greg Stark
worked out very well for reporting needs. If your system is using the data to handle serving the ads, though, it's a different kettle of fish. For that I think you'll want something that avoids having to do a database query for every single impression. -- greg --

Re: [GENERAL] Combining several rows

2004-05-24 Thread Greg Stark
returns varchar as 'select $1 || '', '' || $2' language sql strict immutable; create aggregate concat_agg ( basetype = varchar, stype = varchar, sfunc = concat_agg_accum ); select concat_agg(name) as name, ... -- greg --

Re: [GENERAL] [ADMIN] Clustering Postgres

2004-05-24 Thread Greg Spiegelberg
Robert, I am currently evaluating PolyServe Matrix Server which is a clustering solution including a clustered file system (mounted read-write everywhere). Anything special anyone wants to know? I'm using PostgreSQL 7.4.2 in a Linux cluster. Greg Robert Treat wrote: On Thu, 2004-05-20 at

Re: [GENERAL] how many record versions

2004-05-24 Thread Greg Stark
David Garamond <[EMAIL PROTECTED]> writes: > Greg Stark wrote: > >>Actually, each record will be incremented probably only thousands of times a > >>day. But there are many banners. Each record has a (bannerid, campaignid, > >>websiteid, date, countrycode)

Re: [GENERAL] planer don't use index. bad plan for where id = x or id in (select ...)

2004-05-26 Thread Greg Stark
This avoids an extra sort/uniquify step. Again it wouldn't really save much time since the extra sort was only across 2 rows. But I like seeing simple clean plans even if they aren't really much faster. -- greg ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] insert/update

2004-05-26 Thread Greg Stark
of Postgres. I would expect to see it come along sometime, though probably not in 7.5. -- greg ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] [ADMIN] Clustering Postgres

2004-05-27 Thread Greg Spiegelberg
ough. Doing the same tests on the PolyServe file system (psfs) accomplished the tasks in 117 MB/s and 109 MB/s, just slightly faster. If you're familiar with Veritas Cluster Server it operates similiar to it though I didn't have a chance to fully test it. Given the budget I'd defin

Re: [GENERAL] Page access pattern in query plan using index scan

2004-06-03 Thread Greg Stark
eques_feb, cheques_mar,... And a union of all the months. Any query that only spanned one month would use the monthly table so it could do a sequential scan of just that month. I don't recommend this unless you have a _lot_ of data that you often deal with in particular c

Re: [GENERAL] VACUUM Question

2004-06-04 Thread Greg Stark
L sometime when you can deal with 15min of downtime or so. Actually it would probably be longer. Perhaps the table that's taking 15min has a ton of extra dead tuples left over from the fsm settings being too low and/or vacuum being too infrequent. -- greg ---(end

Re: [GENERAL] How to find out who is calling the function

2004-06-05 Thread Greg Stark
th the value of the column in OLD and blocked the update/delete if it doesn't match. -- greg ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that

Re: [GENERAL] Opteron scaling with PostgreSQL

2004-06-12 Thread Greg Stark
ood, because you'll eventually need it. All it will take will be a Linux crash for the database files on disk to become corrupted. No amount of UPS or RAID protection will protect from that. -- greg ---(end of broadcast)--- TIP 6: Have

Re: [GENERAL] Plperlu and sending emails, is it safe?

2004-06-28 Thread Greg Stark
econfigured MTAs without impacting the database or application at all. Incidentally, you can arrange things to fail in either direction. In our case if the cron job failed we would lose a batch of emails, not generate duplicates. I'm not sure if failing by generating duplicates is

Re: [GENERAL] Problems restarting after database crashed (signal 11).

2004-07-03 Thread Greg Stark
That would explain the unkillable part, though I'm curious how > > it ended up there. Is there an NFS server involved? If an NFS server disappears any process waiting on I/O for it enters disk-wait indefinitely until it reappears. -- greg ---(end of broadcast)-

Re: [GENERAL] Sql injection attacks

2004-07-25 Thread Greg Stark
s as of 7.4 is capable of it but even for Postgres not all the drivers have been updated. But that's mostly irrelevant, at least make it the responsibility of the driver to do the interpolating, it's more likely to get it right and whatever it does, it will at least be 100% consistent a

Re: [GENERAL] Table access method not behaving like Oracle (index vs sequential scan). Examples and stats provided.

2004-07-29 Thread Greg Stark
omparisons and integer constants are assumed to be integer not bigint type. If you leave it in quotes then postgres doesn't pick a type until it looks at what you're comparing it with. Or if you cast it then you force it to be a bigint=bigint comparison. 7.5 will avoid this probl

Re: [GENERAL] Sequence Question

2004-08-05 Thread Greg Stark
your accesses which would be bad if you had lots of clients doing small increments, but if you have few clients doing large increments it shouldn't be a problem. Do make sure to vacuum this table frequently though. -- greg ---(end of broadcast)--

Re: [GENERAL] trash talk

2004-08-05 Thread Greg Stark
"Scott Marlowe" <[EMAIL PROTECTED]> writes: > This is less than a year after the last major release, 7.3.0 by the way. Uhm. Wasn't 7.4 the last major release? -- greg ---(end of broadcast)--- TIP 6: Have you se

Re: [GENERAL] most idiomatic way to "update or insert"?

2004-08-05 Thread Greg Stark
of them in one shot than one at a time. -- greg ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

[GENERAL] Problem analyzing performance of query

2004-08-17 Thread Greg Stark
more info than normal. Is there any way to ask the server what plan it's using when it's actually executing the query in production, rather than trying to feed it the same query later in another context and hope it gets the same result? -- greg ---(e

Re: [GENERAL] Gentoo for production DB server?

2004-08-24 Thread Greg Donald
worth the headaches to me personally. For stability, db/web server usage and such, I'd go with Debian. For features, desktop systems, etc., I'd go with Suse. 9.1 is impressive. For security, firewall, or router usage, I'd go with *BSD. -- Greg Donald ---

Re: [GENERAL] Gentoo for production DB server?

2004-08-25 Thread Greg Donald
ovide a way for you to add unstable packages using ACCEPT_KEYWORDS="~x86". I never used the command because I never _wanted_ unstable packages. Seems I got them anyway. -- Greg Donald ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Alter field type?

2004-08-26 Thread Greg Stark
e table. In 8.0 there will be a command to do what you want, but it will still have to do all the same work as I described above. -- greg ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send

Re: [GENERAL] performance of IN (subquery)

2004-08-27 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > I'm not about to run analyze in the middle of the data generation > > (which wouldn't work anyways since it's in a transaction). > > Since 7.3 or 7.4, you *can* r

Re: R: R: [GENERAL] space taken by a row & compressed data

2004-08-27 Thread Greg Stark
Joe Conway <[EMAIL PROTECTED]> writes: > I don't know of a builtin way to do that from SQL, but the attached seems to > work for me. Cool. Thank you. -- greg ---(end of broadcast)--- TIP 2: you can get off all lists

Re: [GENERAL] malformed array literal in 8beta1

2004-08-29 Thread Greg Stark
ters and quote "s inside them. Or better yet (imho) is to use the new array[...] constructor. That you can do using the existing quoting functions without worrying about someone sneaking a double quote inside your values. They also play nicer with placeholders. -- greg ---

[GENERAL] <> syntax legal?

2004-09-01 Thread Greg Donald
Is it legal syntax to use <> instead of != in a Postgres query? I didn't see it listed on: http://www.postgresql.org/docs/7.4/static/sql-syntax.html but wanted to ask to make sure. -- Greg Donald ---(end of broadcast)--- TIP 3:

Re: [GENERAL] Postgresql and scripting

2004-09-08 Thread Greg Stark
Jerome Lyles <[EMAIL PROTECTED]> writes: > the/@@/ is what the whitespace is replaced with but I don't know what the @@ > stands for, It doesn't stand for anything, it just means replace with "@@". Now look again at the second and

Re: [GENERAL] import mysql database...

2004-09-08 Thread Greg Donald
t to migrate PHPBB running on a server with mySQL to > another server running with postgreSQL). Yes PHPBB has postgreSQL > support. I found this utility very helpful in a similar situation: http://freshmeat.net/projects/my2pg/ -- Greg Donald ---(end of broadc

Re: [GENERAL] Salt in encrypted password in pg_shadow

2004-09-10 Thread Greg Stark
> not far ahead of public research in this field ... It's presumably ahead. But not like the situation 30 years ago when they were the only group doing this kind of research. -- greg ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Speeding up LIKE with placeholders?

2004-09-10 Thread Greg Stark
ed and least dangerous. It's hard to picture someone intentionally doing ?||'%' without thinking it would use an index scan. If they didn't check for leading %s and _s or empty parameters then it was their oversight or they were expecting it to be slow. -- greg --

Re: [GENERAL] Autonomous transaction

2004-09-13 Thread Greg Stark
ntrib directory. It would probably be quite simple to implement, though the most complex in another sense. With twice as many connections it could be hard to determine where slowdowns are starting for example. And Better make sure your error logging connections don't trigger

<    9   10   11   12   13   14   15   16   17   18   >