Re: [HACKERS] Improving N-Distinct estimation by ANALYZE

2006-01-04 Thread Jim C. Nasby
ing out the obwious, but I would do this for any unique index, not just a PK. (It should still hold for any unique index, right?) Also, was an approach of sampling random rows within random blocks considered? Something like: until row sample size reached read random block sample x% o

Re: [HACKERS] [Bizgres-general] WAL bypass for INSERT, UPDATE and

2006-01-03 Thread Jim C. Nasby
On Tue, Jan 03, 2006 at 04:20:47PM -0500, Bruce Momjian wrote: > Jim C. Nasby wrote: > > > > I don't think it should (which implies that EXCLUSIVE is a bad name). > > > > > > Agreed, EXCLUSIVE was used to mean an _exclusive_ writer. The new words &g

Re: [HACKERS] [Bizgres-general] WAL bypass for INSERT, UPDATE and

2006-01-03 Thread Jim C. Nasby
On Tue, Jan 03, 2006 at 12:08:05PM -0500, Bruce Momjian wrote: > Tom Lane wrote: > > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > > On Tue, Jan 03, 2006 at 11:26:51AM -0500, Tom Lane wrote: > > >> Such an ALTER would certainly require exclusive lo

Re: [HACKERS] [Bizgres-general] WAL bypass for INSERT, UPDATE and

2006-01-03 Thread Jim C. Nasby
On Tue, Jan 03, 2006 at 11:26:51AM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > Dumb question: if the ALTER is done inside a transaction, and then > > reverted at the end of the transaction, does that mean that no other > > transac

Re: [HACKERS] [Bizgres-general] WAL bypass for INSERT, UPDATE and

2006-01-03 Thread Jim C. Nasby
e owner" > to trusted people, so the use-case for special privilege types has > dropped off dramatically IMHO. Yeah, I hadn't thought about that. I agree; if you trust some process enough to have MVCC-affecting rights then you should be able to trust it with full ownership right

Re: [HACKERS] Stats collector performance improvement

2006-01-03 Thread Jim C. Nasby
ting a lot of statements and you won't be doing that if those statements are taking more than a second or two to execute. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/p

Re: [HACKERS] Add a "Known Issues" section

2006-01-03 Thread Jim C. Nasby
might not have > expected to behave like that. I don't think this should have anything > directly to do with TODO though. That is an interesting idea, though since the author of that list is already doing the work to maintain it, maybe we just point people there (which has the bonus of l

Re: [HACKERS] Why don't we allow DNS names in pg_hba.conf?

2006-01-03 Thread Jim C. Nasby
te security > aware. They might find DNS safe for their purposes, but they'd probably > like a function that shows the resulting hba entries after DNS resolution. I don't know if the normal DNS libraries allow this, but it would be cool if you could specify that an entry in pg_hba

Re: [HACKERS] Permissions vs SERIAL columns

2006-01-03 Thread Jim C. Nasby
> //Magnus > > ---(end of broadcast)--- > TIP 1: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to [EMAIL PROTECTED] so that your >message can get through to the mailing list c

Re: [HACKERS] [Bizgres-general] WAL bypass for INSERT, UPDATE and

2006-01-03 Thread Jim C. Nasby
ansaction, does that mean that no other transactions would have those permissions? I think the general use-case is that you only one the session doing the ALTER to be able to use these special modes, not anyone else who happens to be hitting the table at that time... -- Jim C. Nasby, Sr. Engin

Re: [HACKERS] [Bizgres-general] WAL bypass for INSERT, UPDATE and

2006-01-03 Thread Jim C. Nasby
ess running as a superuser. Also, it is often awkward to require that the user running that batch own the table. I'd much rather see this as a grantable permission on the table. (The same is true with truncate, btw). This way, if a DBA knew he could trust a specific role, he could allow for the

Re: [HACKERS] Oracle PL/SQL Anonymous block equivalent in postgres

2005-12-27 Thread Jim C. Nasby
than edit function def CREATE OR REPLACE FUNCTION ... test function you could just edit in-place and test. Of course having the ability to execute arbitrary plpgsql in .sql scripts would be handy in some cases as well, though as others pointed out there are alternatives. -- Jim C. Nasby

Re: [HACKERS] [Bizgres-general] WAL bypass for INSERT, UPDATE and

2005-12-27 Thread Jim C. Nasby
irection. Having a temporary table that is visible to all sessions would have a lot of use besides just ETL (the E stands for Extract, btw) operations. One example is storing session data for a webapp; most people would happily trade off losing that data on a database restart for the increased performa

Re: [HACKERS] Function call with offset and limit

2005-12-22 Thread Jim C. Nasby
u want it and PostgreSQL is simply executing what you > wrote down... Well, it would be a good optimization to make if the function is immutable and isn't otherwise referenced (ie: by WHERE or ORDER BY), there's no reason I can think of to execute it as you read through the rows. Migh

Re: [HACKERS] Automatic function replanning

2005-12-22 Thread Jim C. Nasby
g fed into it? (In other words ignore the obvious cases of bad statistics or a DDL change). -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 --

Re: [HACKERS] Automatic function replanning

2005-12-22 Thread Jim C. Nasby
ous runs. I am not > sure why that is better, or easier, than just invalidating the cached > plan if the cardinality changes. > > ----------- > > Jim C. Nasby wrote: > > On Wed, Dec 21, 2005 at 11:00:31PM -0500

Re: [HACKERS] Automatic function replanning

2005-12-22 Thread Jim C. Nasby
tements for a > column with highly varying selectivity ..? > > or is there a realistic shot at fixing this use case? FWIW, I believe that 10g has some brains in this regard, where it can detect if it should store multiple plans for one prepared statement. This is critical for them, b

Re: [HACKERS] Automatic function replanning

2005-12-22 Thread Jim C. Nasby
records comes along and has to read 5000 tuples instead, we want to log that. Probably the easiest way to accomplish this is to store a moving average of tuples read with each prepared statement entry. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software

Re: [HACKERS] [Bizgres-general] WAL bypass for INSERT, UPDATE and DELETE?

2005-12-22 Thread Jim C. Nasby
BTW, this should also probably be moved over to -hackers... -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 ---(end of

Re: [HACKERS] [Bizgres-general] WAL bypass for INSERT, UPDATE and DELETE?

2005-12-22 Thread Jim C. Nasby
ion for that. In the meantime, breaking WAL recovery needs to be something that users must specifically request, via something like UPDATE NOWAL. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasb

Re: [HACKERS] Automatic function replanning

2005-12-21 Thread Jim C. Nasby
nyway: Track normal resource consumption (ie: tuples read) for planned queries and record parameter values that result in drastically different resource consumption. This would at least make it easy for admins to identify prepared queries that have a highly variable execution cost. -- Jim C. Nasby,

Re: [HACKERS] Function call with offset and limit

2005-12-21 Thread Jim C. Nasby
mit 1; > My function is called only once. > > Is there any work around ? > > > Thanks > -- > REYNAUD Jean-Samuel <[EMAIL PROTECTED]> > Elma > > > ---(end of broadcast)------- > TIP 1: if posting/reading through Usenet, pleas

Re: [HACKERS] Automatic function replanning

2005-12-19 Thread Jim C. Nasby
On Sat, Dec 17, 2005 at 01:07:10PM -0500, Bruce Momjian wrote: > Jim C. Nasby wrote: > > Is cardinality the only thing we'd need to worry about? My idea was > > actually to track the amount of work normally required by a stored query > > plan, and if a query uses tha

Re: [HACKERS] Automatic function replanning

2005-12-17 Thread Jim C. Nasby
cached query plans when the dependent objects change or > when the cardinality of parameters changes dramatically > > > ----------- > > Jim C. Nasby wrote: > > On Tue, Dec 13, 2005 at 04:49:10PM -0500, N

Re: [HACKERS] Web archive issue?

2005-12-16 Thread Jim C. Nasby
be much better IMHO if the last updated date was changed even if there was no traffic. Otherwise there's no way to know if the updates are actually working. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 v

Re: [HACKERS] postgres version control?

2005-12-15 Thread Jim C. Nasby
ngs here. > > Is anything like this in the works either here or in Bizgres? > > Thanks in advance! > > ---(end of broadcast)----------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.or

Re: [HACKERS] 7.3 failure on platypus

2005-12-15 Thread Jim C. Nasby
you switch the OS your database is running on without a > dump/reload? err, sorry. s/switch/upgrade/ -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/

Re: [HACKERS] Automatic function replanning

2005-12-15 Thread Jim C. Nasby
o track the amount of work (probably tuples fetched) normally required to execute a prepared statement. Any time that prepared statement is executed with a set of predicates that substantially changes the amount of work required it should be remembered and considered for re-planning the next time the query

Re: [HACKERS] Which qsort is used

2005-12-15 Thread Jim C. Nasby
are this machine) and a windows machine. I have access to both some (SLOW) ultra5's and a machine running opensolaris on AMD if testing there would help. I'll need a pointer to a patch and test-case though... Oh, I also have access to an old SGI... -- Jim C. Nasby, Sr. Engineering Consul

Re: [HACKERS] 7.3 failure on platypus

2005-12-15 Thread Jim C. Nasby
(most of the time), which would be both a good way to get feet wet and reduce the load on folks such as yourself. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasi

Re: [HACKERS] Improving planning of outer joins

2005-12-15 Thread Jim C. Nasby
ough people that seem to drop in with PhD thesis and what-not pulled from the TODO that someone could end up doing this work for us. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/perva

Re: [HACKERS] Interesting speed anomaly

2005-12-15 Thread Jim C. Nasby
) view WHERE prefix||id = '...' In this case the prefixes have already been unioned together, so there's no chance for the planner to use the function index. If break the WHERE clause into seperate clauses, such as WHERE prefix='AAA' AND id = '200501' then I th

Re: [HACKERS] 7.3 failure on platypus

2005-12-12 Thread Jim C. Nasby
On Tue, Dec 13, 2005 at 02:03:13AM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > The error talks about SEMMNI and SEMMNS, but both look ok... > > > kern.ipc.semmns: 100 > > That's not enough to run two postmasters ... Odd

Re: [HACKERS] 7.3 failure on platypus

2005-12-12 Thread Jim C. Nasby
fore we upgraded the machine, so it doesn't appear to be related to that either. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [HACKERS] [GENERAL] missing something obvious about intervals?

2005-12-12 Thread Jim C. Nasby
> (1 row) This comes up often enough that it's probably worth adding a built-in function, especially if it's faster to do the multiply (though presumably a built-in function could outperform both the multiply and the more common (4.5::float || ' seconds')::interval form. -- J

Re: [HACKERS] 7.3 failure on platypus

2005-12-12 Thread Jim C. Nasby
e... I'll just gank it from playtypus's config. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Jim C. Nasby
On Mon, Dec 12, 2005 at 06:37:03PM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > On Mon, Dec 12, 2005 at 05:43:47PM -0500, Rod Taylor wrote: > >> A sudo equivalent would be a version of psql that always connected to > >> the da

[HACKERS] 7.3 failure on platypus

2005-12-12 Thread Jim C. Nasby
97/src' gmake: *** [all] Error 2 The machine was having some issues during that time and we did recently upgrade to FreeBSD 6.0, but all the other branches are clean. Any ideas? -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.com

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Jim C. Nasby
sudo gives you the ability to run a command as root, plain and simple. IE: sudo ls -la blah sudo /usr/local/etc/rc.d/010.pgsql.sh stop etc Some SQL examples would be... sudo CREATE USER ... sudo UPDATE table SET ... I have no idea what you're envisioning, but based on your description it

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Jim C. Nasby
On Mon, Dec 12, 2005 at 05:27:33PM -0500, Andrew Dunstan wrote: > >On Mon, Dec 12, 2005 at 05:00:45PM -0500, Tom Lane wrote: > > > > > >>"Jim C. Nasby" <[EMAIL PROTECTED]> writes: > >> > >> > >>>I'd love to see so

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Jim C. Nasby
On Mon, Dec 12, 2005 at 05:00:45PM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > I'd love to see something like SUDO ALTER USER ... SUDO REINDEX ... etc. > > That would make it easy to do 'normal' work with a non-superuser >

Re: [HACKERS] Please Help: PostgreSQL Query Optimizer

2005-12-12 Thread Jim C. Nasby
n the drive). More important that throughput though, is latency. Because the latency on memory is much closer to 0 (it's not truely 0 due to L1/L2 caching), you can serve concurrent requests a lot faster. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http

Re: [HACKERS] Something I don't understand with the use of schemas

2005-12-12 Thread Jim C. Nasby
ou sudo -u postgres psql it's the equivalent of su - root (though at least you wouldn't need to know the password to the postgres account). I'd love to see something like SUDO ALTER USER ... SUDO REINDEX ... etc. That would make it easy to do 'normal' work with a non-superu

Re: [HACKERS] Improving free space usage (was: Reducing relation locking overhead)

2005-12-08 Thread Jim C. Nasby
, but presumably if the index is important enough to cluster on > > then it should be well-cached. There's probably some other tweaks that > > could be done as well to make this more performant. > > Yes, I agree on all your points about better placement of new tuples, > all

Re: [HACKERS] generalizing the planner knobs

2005-12-08 Thread Jim C. Nasby
would be faster than the index scan, but it would have still been good to be able to verify that. Because of how enable_seqscan works, I couldn't. BTW, http://archives.postgresql.org/pgsql-performance/2005-04/msg00669.php is where I first mentioned this, including the cost function that

Re: [HACKERS] HOOKS for Synchronous Replication?

2005-12-08 Thread Jim C. Nasby
days and provide some > feedback. While this code might be useful, whouldn't it be much more valuable to provide hooks into xlog so that we could do non-trigger-based replication? (As well as non-trigger-based materialized views...) -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTE

[HACKERS] Improving free space usage (was: Reducing relation locking overhead)

2005-12-08 Thread Jim C. Nasby
On Thu, Dec 08, 2005 at 11:58:50AM +0200, Hannu Krosing wrote: > ??hel kenal p??eval, N, 2005-12-08 kell 01:08, kirjutas Jim C. Nasby: > > On Thu, Dec 08, 2005 at 08:57:42AM +0200, Hannu Krosing wrote: > > > ??hel kenal p??eval, N, 2005-12-08 kell 00:16, kirjutas Jim C. Nasby: &

Re: [HACKERS] Vertical Partitioning with TOAST

2005-12-08 Thread Jim C. Nasby
On Thu, Dec 08, 2005 at 10:03:43AM -0500, Bruce Momjian wrote: > Jim C. Nasby wrote: > > On Thu, Dec 08, 2005 at 12:59:47AM -0500, Tom Lane wrote: > > > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > > > This seems like a useful feature to ad

Re: [HACKERS] Vertical Partitioning with TOAST

2005-12-07 Thread Jim C. Nasby
On Thu, Dec 08, 2005 at 12:59:47AM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > This seems like a useful feature to add, allowing for easy built-in > > verticle partitioning. Are there issues with the patch as-is? > > Other than the

Re: [HACKERS] [GENERAL] 8.1, OID's and plpgsql

2005-12-07 Thread Jim C. Nasby
NING functionality in place first and then worry > about that... Along those lines, I don't see anything on the TODO list about this... -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-2

Re: [HACKERS] Reducing relation locking overhead

2005-12-07 Thread Jim C. Nasby
On Thu, Dec 08, 2005 at 08:57:42AM +0200, Hannu Krosing wrote: > ??hel kenal p??eval, N, 2005-12-08 kell 00:16, kirjutas Jim C. Nasby: > > On Sat, Dec 03, 2005 at 10:15:25AM -0500, Greg Stark wrote: > > > Tom Lane <[EMAIL PROTECTED]> writes: > > > > What's

Re: [HACKERS] Reducing relation locking overhead

2005-12-07 Thread Jim C. Nasby
e problematic and expensive to check for this every time you accessed a table, it would make sense to check only at the start of a transaction and have an index build wait until all running transactions knew that an index build was going to happen. -- Jim C. Nasby, Sr. Engineering Consultant [EMA

Re: [HACKERS] Reducing relation locking overhead

2005-12-07 Thread Jim C. Nasby
verging to 0 and > throw an error. Why throw an error? Just grab a lock that would prevent any new inserts from occuring. Or at least make that an option. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: htt

Re: [HACKERS] generalizing the planner knobs

2005-12-07 Thread Jim C. Nasby
a seqscan (100 IIRC). The problem is, some queries will produce estimates for other methodes that are more expensive than a seqscan even with the added burden. If instead of adding a fixed amount enable_seqscan=false multiplied by some amount then this would probably be impossible to occur

Re: [HACKERS] Vertical Partitioning with TOAST

2005-12-07 Thread Jim C. Nasby
gt; diff -purN postgresql-8.1.0.org/src/include/access/heapam.h > postgresql-8.1.0/src/include/access/heapam.h > --- postgresql-8.1.0.org/src/include/access/heapam.h 2005-10-15 > 11:49:42.0 +0900 > +++ postgresql-8.1.0/src/include/access/heapam.h 2005-12-01 > 15:29:29.72

Re: [HACKERS] [GENERAL] 8.1, OID's and plpgsql

2005-12-06 Thread Jim C. Nasby
#x27;t know... I'm going to move this over to -hackers to see what people over there have to say. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569

[HACKERS] Slow email caught in the act

2005-12-06 Thread Jim C. Nasby
IL PROTECTED]> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [pgsql-advocacy] joint booths at upcoming tradeshows Thread-Index: AcX13EA7k+/T1h3MQS+/wKoOVRCB/QA8IzWg From: Stephen Slezak <[EMAIL PROTECTED]> To: "Jim C. Nasby" <[EMAIL PROTECTED]>, Josh Berkus Cc: J

Re: [HACKERS] Using multi-row technique with COPY

2005-11-30 Thread Jim C. Nasby
On Tue, Nov 29, 2005 at 01:35:09PM +0100, Harald Fuchs wrote: > In article <[EMAIL PROTECTED]>, > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > > On Sun, Nov 27, 2005 at 07:44:55PM +, Simon Riggs wrote: > >> not have any unique indexes or ro

Re: [HACKERS] Using multi-row technique with COPY

2005-11-28 Thread Jim C. Nasby
up not re-using space on pages that have space available? ISTM that's something users would want to be able to over-ride. In fact, it seems like it shouldn't be a default behavior... -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://perv

Re: [HACKERS] gprof SELECT COUNT(*) results

2005-11-28 Thread Jim C. Nasby
to yours. It'd be interesting to > see the results from an SMP Opteron, if anyone's got one handy. Is there still interest in this? I've got a dual Opteron running FBSD. (What would be the profiler to use on FBSD?) -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL

Re: [HACKERS] tablespaces and non-empty directories

2005-11-22 Thread Jim C. Nasby
cation > > I think the only reason it is not done yet is because it is so easy to > do for admins, and it is impossible to do while the server is running. Along those lines, is there anything else that would benefit from being moved? pg_clog and pg_subtrans come to mind; but maybe pg_mul

Re: [HACKERS] Improving count(*)

2005-11-22 Thread Jim C. Nasby
ome tables will have a large number of pages with free space on them (which would favor storing that info in a bitmap); likewise some tables will have a small number of pages that are 'dirty', which would favor storing a list of page numbers instead of a bitmap. -- Jim C. Nasby, Sr. E

Re: [HACKERS] Should libedit be preferred to libreadline?

2005-11-22 Thread Jim C. Nasby
f libedit was supported where practical (I suspect most mainstream OSes support libedit) since it's BSD licensed. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasb

Re: [HACKERS] bind variables, soft vs hard parse

2005-11-22 Thread Jim C. Nasby
On Mon, Nov 21, 2005 at 09:14:33PM +0100, Marcus Engene wrote: > Jim C. Nasby wrote: > >It might be more useful to look at caching only planning and not > >parsing. I'm not familiar with the output of the parsing stage, but > >perhaps that could be hashed to use as a look

Re: [HACKERS] someone working to add merge?

2005-11-22 Thread Jim C. Nasby
serial PRIMARY KEY, url textNOT NULL UNIQUE ); I prefer having url_id as the PK because it's how you normally access the table. But ISTM that there are cases where yo'd want to be able to merge on two different sets of fields in one table, which is impossible if we limit it

Re: [HACKERS] MERGE vs REPLACE

2005-11-22 Thread Jim C. Nasby
e. I think it'd be better to have some way to specify in a command that you want to use some kind of error-handling trigger. Though presumably the underlying framework would be same, so it shouldn't be hard to support both. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTE

Re: [HACKERS] Bug in predicate indexes?

2005-11-22 Thread Jim C. Nasby
e l on (o.oprleft=l.oid) join pg_type r on (o.oprright=r.oid)) a; 88 (that's 8.0.3, btw) > I'm not sure this is worth documenting given that it's likely to change > by 8.2 anyway. I agree with Josh that this should be documented backwards... assuming that my count of

Re: [HACKERS] Bug in predicate indexes?

2005-11-21 Thread Jim C. Nasby
documented) limitation of the > predicate testing logic. You do not need a cast in the query, though, > only in the index's WHERE condition. I'm working on a docs patch for this (attached, but un-tested); is bigint the only datatype this applies to or are there others? -- Jim

[HACKERS] Using FSM to trigger vacuum

2005-11-21 Thread Jim C. Nasby
bloat from deleted tuples, but maybe there's some clever way around that. If the proposal to track heap block-level metadata happens, that might make this idea a lot more doable. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.com

Re: [HACKERS] Improving count(*)

2005-11-21 Thread Jim C. Nasby
it also allows VACUUM to hit only pages that need vacuuming. Presumably this could also be used as the on-disk backing for the FSM, or it could potentially replace the FSM. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 51

Re: [HACKERS] Improving count(*)

2005-11-21 Thread Jim C. Nasby
) big complaints: if you have a query where count(*) isn't nearly instant then you probably don't need an exact count in the first place and should be happy enough with an estimate. He constantly cites Google ('Result 1-10 of about 38,923') as an example of this. -- Jim

Re: [HACKERS] CLUSTER and clustered indices

2005-11-21 Thread Jim C. Nasby
alent of > removing all of the leaf blocks of the clustered index. > > Best Regards, Simon Riggs > > > ---(end of broadcast)--- > TIP 6: explain analyze is your friend > -- Jim C. Nasby, Sr. Engineering Consultant

Re: [HACKERS] [ADMIN] ERROR: could not read block

2005-11-21 Thread Jim C. Nasby
y increase > the probability of someone else finishing their I/O... If that makes it into code, ISTM it would be good if it also threw a NOTICE so that users could see if this was happening; kinda like the notice about log files being recycled frequently. -- Jim C. Nasby, Sr. Engineering Consultan

Re: [HACKERS] bind variables, soft vs hard parse

2005-11-21 Thread Jim C. Nasby
just the parser output seems somewhat useless. > > Of course I didn't mean only the parse was to be saved. The planning > goes there too. It might be more useful to look at caching only planning and not parsing. I'm not familiar with the output of the parsing stage, but perhaps that

Re: [HACKERS] OS X 7.4 failure

2005-11-21 Thread Jim C. Nasby
On Thu, Nov 17, 2005 at 12:51:47AM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > http://pgbuildfarm.org/cgi-bin/show_log.pl?nm=cuckoo&dt=2005-11-15%2023:56:22 > > I took a closer look at this, and noticed something interesting: >

Re: [HACKERS] Heading to Mexico

2005-11-21 Thread Jim C. Nasby
, and it brings colour to the proceedings here... and reminds > everybody its a global project. Plus it gives anyone in that area a chance to see if they can meet up and buy you a beer/coke/name_your_poison. Of course maybe that's reason not to publicize this info... ;P -- Jim C. Nasby,

Re: [HACKERS] [COMMITTERS] pgsql: make_restrictinfo() failed to attach the specified

2005-11-21 Thread Jim C. Nasby
ives! ;) I certainly agree that a test that will catch multiple errors is better than one that catches few (or only one), but isn't a test for a specific case better than none at all? Is the concern how long make check takes? -- Jim C. Nasby, Sr. Engineering Consultant [

Re: [HACKERS] MERGE vs REPLACE

2005-11-21 Thread Jim C. Nasby
the industry consensus is that merge should actually be REPLACE/INSERT ON DUPLICATE UPDATE then it's probably better to follow that lead. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.na

Re: [HACKERS] MERGE vs REPLACE

2005-11-21 Thread Jim C. Nasby
right set of fields and those fields are also NOT NULL. ISTM it would be good to support that case as well, since you might want to MERGE based on something other than the PK. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.c

[HACKERS] Loading 7.4 dump to 8.1 with user-custom search_path breaks

2005-11-17 Thread Jim C. Nasby
view, but ISTM it would be better if instead we had a function like pg_delete_all_users that dump called instead. For most of the dump this isn't much of an issue, because it uses standard commands that we're really careful about not breaking backwards compatability on. -- Jim C. Nasby, S

Re: [HACKERS] OS X 7.4 failure

2005-11-16 Thread Jim C. Nasby
On Wed, Nov 16, 2005 at 11:50:51AM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > I do have perl, python, tcl and nls enabled, could one of them > > be trying to pull libssl and libcrypto in for some reason? > > Perhaps --- try "o

Re: [HACKERS] OS X 7.4 failure

2005-11-16 Thread Jim C. Nasby
On Tue, Nov 15, 2005 at 10:27:06PM -0600, Jim C. Nasby wrote: > On Tue, Nov 15, 2005 at 11:04:59PM -0500, Tom Lane wrote: > > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > > So the recent thread about getting 7.4 compiling on OS X inspired me. > > > But

Re: [HACKERS] MERGE vs REPLACE

2005-11-15 Thread Jim C. Nasby
s already run :) Not true; it would be useful for development when you'd like to know that some statement is grabbing a table lock. This is something that you wouldn't normally notice in a dev environment, and it sounds like it'd be easy to do a merge that has the unintended effect o

Re: [HACKERS] Long-time 7.4 contrib failure Mac OS X 10.3.8

2005-11-15 Thread Jim C. Nasby
) ); } if ($branch !~ /^REL7_[23]/) { push(@{$conf{config_opts}},"--enable-nls"); } There's also some way you can pull an item out of an array, which could make that --with-openssl bit cleaner... -- Jim C. Nasby, Sr. Engineering Consult

Re: [HACKERS] OS X 7.4 failure

2005-11-15 Thread Jim C. Nasby
On Tue, Nov 15, 2005 at 11:04:59PM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > So the recent thread about getting 7.4 compiling on OS X inspired me. > > But what I can't understand is that I've yanked --with-ssl, but it's

Re: [HACKERS] OS X 7.4 failure

2005-11-15 Thread Jim C. Nasby
On Tue, Nov 15, 2005 at 11:04:59PM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > So the recent thread about getting 7.4 compiling on OS X inspired me. > > But what I can't understand is that I've yanked --with-ssl, but it's

Re: [HACKERS] MERGE vs REPLACE

2005-11-15 Thread Jim C. Nasby
;s the general > > case of arbitrary predicates that's hard. > > My feeling is we should implement MERGE for the limited cases we can, > and throw an error for cases we can not (or require table locking), and > then see what reports we get from users. We should probably throw a not

Re: [HACKERS] bind variables, soft vs hard parse

2005-11-15 Thread Jim C. Nasby
. Apart from greater > speed, sqlinjection becomes history as well. > > Best regards, > Marcus > > > -----------(end of broadcast)--- > TIP 6: explain analyze is your friend > -- Jim C. Nasby, Sr. Engineering Consultant

[HACKERS] OS X 7.4 failure

2005-11-15 Thread Jim C. Nasby
lse? The only things I see in configure that call for libcrypto are SSL and KRB, neither of which are configured... -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive

Re: [HACKERS] Running PostGre on DVD

2005-11-15 Thread Jim C. Nasby
On Tue, Nov 15, 2005 at 10:58:31AM -0600, Jim C. Nasby wrote: > BTW, my point was that the reason many windows users run with admin > rights is because windows doesn't provide a viable alternative (unlike > OS X). Err, sorry, hit send too soon. My point about OS X isn't meant t

Re: [HACKERS] Running PostGre on DVD

2005-11-15 Thread Jim C. Nasby
se problems; but that doesn't help for the case of trying to run a demo. BTW, my point was that the reason many windows users run with admin rights is because windows doesn't provide a viable alternative (unlike OS X). -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTE

Re: [HACKERS] outer joins and for update

2005-11-15 Thread Jim C. Nasby
On Mon, Nov 14, 2005 at 07:38:00PM -0500, Tom Lane wrote: > "Jim C. Nasby" <[EMAIL PROTECTED]> writes: > > Do we really need to prevent inserts from happening under a SELECT FOR > > UPDATE? ISTM that's trying to apply serializable concurrency to SELECT > >

Re: [HACKERS] functions marked STABLE not allowed to do INSERT

2005-11-15 Thread Jim C. Nasby
data but will always return the same results in a tablescan (current definition of STABLE). If there's performance benefits to be had on functions that are both STABLE (as per the old definition) and don't modify any data (or contain any volatile functions?) then that shou

Re: [HACKERS] Running PostGre on DVD

2005-11-15 Thread Jim C. Nasby
Well, a bigger issue is that windows makes things a lot more difficult to do if you don't have admin on your account. Yes, there is runas, but windows doesn't exactly foster people working from the command line. And IIRC runas isn't nearly as nice to use as sudo. -- Jim C. Nas

Re: R?f. : RE: [HACKERS] Running PostGre on DVD

2005-11-15 Thread Jim C. Nasby
hown. So as Stephan suggested, let's try looking at the root problem and see if there's some way to fix that. -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf

Re: [HACKERS] outer joins and for update

2005-11-14 Thread Jim C. Nasby
ession 2 decibel=# begin; BEGIN decibel=# select * from t where t='1' for update; t --- 1 (1 row) # session 1 decibel=# insert into t values('1'); INSERT 633176 1 decibel=# select * from t; t --- 1 1 (2 rows) decibel=# update t set t='2'; # Blocks on session

Re: [HACKERS] Running PostGre on DVD

2005-11-14 Thread Jim C. Nasby
cast)----------- > TIP 5: don't forget to increase your free space map settings > -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512

Re: [HACKERS] MERGE vs REPLACE

2005-11-14 Thread Jim C. Nasby
be as fast as a more elegant solution, but OTOH it'd probably be faster than plpgsql... -- Jim C. Nasby, Sr. Engineering Consultant [EMAIL PROTECTED] Pervasive Software http://pervasive.comwork: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461 --

Re: [HACKERS] MERGE vs REPLACE

2005-11-14 Thread Jim C. Nasby
XIT; > END > > -- Check for infinite loop > END > > -- > > > ---(end of broadcast)--- > TIP 1: if posting/reading through Usenet, please send an appropriate >subscribe-nomail command to [EMAIL P

Re: [HACKERS] functions marked STABLE not allowed to do INSERT

2005-11-14 Thread Jim C. Nasby
r at least > kept consequence - which would be to ban volatile > funtions too. > > (IMHO only calling volatile functions should be banned) > > > ---(end of broadcast)--- > TIP 9: In versions below 8.0, the planner will ignore your desire to >

<    4   5   6   7   8   9   10   11   12   13   >