Re: [HACKERS] PostGreSQL and zlib

2007-10-25 Thread Gregory Stark
of just doing the compression. Postgres also will automatically try to compress data like byteas if the record is larger than 2kB (1/4 of the block size if you've changed the block size). So you may not have to do anything if you're just looking to save space on disk. -- Gregory Stark EnterpriseDB

Re: [HACKERS] 8.3beta1 testing on Solaris

2007-10-25 Thread Gregory Stark
an xid to be allocated and seeing how much it slows down the benchmark would be a good substitute. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 4: Have you searched our list archives

Re: [HACKERS] 8.3beta1 testing on Solaris

2007-10-25 Thread Gregory Stark
of buffers isn't particularly interesting unless there's some magic numbers we're trying to hit. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [PERFORM] [HACKERS] 8.3beta1 testing on Solaris

2007-10-26 Thread Gregory Stark
NUM_CLOG_BUFFERS just moves around the arbitrary bottleneck. This benchmark is useful in that it gives us an idea where the bottleneck lies for various values of NUM_CLOG_BUFFERS but it doesn't tell us what value realistic users are likely to bump into. -- Gregory Stark EnterpriseDB http

Re: [HACKERS] Avoiding planning redundant backwards merges

2007-10-27 Thread Gregory Stark
. So the case that wouldn't be covered would be if you have a descending index on one table and an ascending index on another table and try to merge join them? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast

[HACKERS] Append nodes and orderings

2007-10-27 Thread Gregory Stark
with equivalence classes. There are a few comments indicating we don't currently fully track columns of subrels of append rels in equivalence classes. I'm not sure what the consequences of adding those columns as full members of the equivalence classes would be. -- Gregory Stark EnterpriseDB http

Re: [HACKERS] Proposal: real procedures again (8.4)

2007-10-27 Thread Gregory Stark
. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can

[HACKERS] min/max planner optimization

2007-10-27 Thread Gregory Stark
accumulate paths to produce that order. And when we come to produce the final plan we check if we have an already-ordered path which will produce the required column and has a startup cost less than the total cost of the cheapest path. -- Gregory Stark EnterpriseDB http

Re: [HACKERS] Proposal: real procedures again (8.4)

2007-10-27 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Gregory Stark [EMAIL PROTECTED] writes: Pavel Stehule [EMAIL PROTECTED] writes: Why new calling convention? I would to support byref variables and then I have to carry memory context info ... and maybe some others I think first you have to invent something

Re: [HACKERS] min/max planner optimization

2007-10-27 Thread Gregory Stark
. In particular nested loop and merge joins. Unique also preserves the order but I can't see how it could be useful here. And of course potentially Append nodes in the future... -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast

Re: [HACKERS] Backend misfeasance for DEFAULT NULL

2007-10-28 Thread Gregory Stark
match? Perhaps it should be even later and we should store the NULL default in the catalog but filter it out when we build the relcache? Then pg_dump wouldn't need any special intelligence to detect when the default doesn't match the parent -- Gregory Stark EnterpriseDB http

Re: [HACKERS] Backend misfeasance for DEFAULT NULL

2007-10-28 Thread Gregory Stark
justified. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [HACKERS] Proposal: real procedures again (8.4)

2007-10-29 Thread Gregory Stark
. That was legal in the old protocol. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [HACKERS] UTF-8 for SGML docs?

2007-10-31 Thread Gregory Stark
, you can't use it. Are entities like #x3041; ok? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

Re: [HACKERS] Postgresql 8.3 beta crash

2007-11-01 Thread Gregory Stark
. It could be an autoconf test though. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! ---(end of broadcast)--- TIP 2: Don't 'kill -9' the postmaster

[HACKERS] xlogdump

2007-11-02 Thread Gregory Stark
contrib module and it's likely to suffer the same bitrot problem if it lives in pgfoundry. Incidentally I would like to call xlog.c:RecordIsValid() which is currently a static function. Any objection to exporting it? It doesn't depend on any external xlog.c state. -- Gregory Stark EnterpriseDB

Re: [HACKERS] Clarification about HOT

2007-11-02 Thread Gregory Stark
sequentially, not randomly. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire

Re: [HACKERS] type money causes unrestorable dump

2007-11-03 Thread Gregory Stark
lc_monetary setting. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! ---(end of broadcast)--- TIP 4: Have you searched our list archives? http

Re: [HACKERS] Profiling vs autovacuum

2007-11-04 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: However, accumulation of zillions of gmon.out files is definitely a downside of the approach; one that I've noticed myself. Comments? All I can add is that I've run into this problem myself too. -- Gregory Stark EnterpriseDB http

Re: [HACKERS] plpgsql keywords are hidden reserved words

2007-11-05 Thread Gregory Stark
in the plpgsql lexer, and that means that it will never be substituted for by read_sql_construct(). So it's effectively a reserved word. Perhaps we should be throwing a more intelligible error if you have a parameter (or variable?) named in a way that will conflict? -- Gregory Stark EnterpriseDB

Re: [HACKERS] pgsql: Add a note about another issue that needs to be considered before

2007-11-05 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Gregory Stark [EMAIL PROTECTED] writes: FWIW I found another issue with this variable when I was experimenting with small block sizes. If you set the target = the tuple header the toaster breaks. This is because it's doing unsigned arithmetic (Size

Re: [HACKERS] Open items for 8.3

2007-11-05 Thread Gregory Stark
be great if this would push to the wiki. That has been working really well through the cycle. How many developers have even jumped through the hoops to get wiki accounts? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning

Re: [HACKERS] Visibility map thoughts

2007-11-05 Thread Gregory Stark
from what a DSM would need. We could skip vacuuming such HOT updated dead tuples, assuming a page prune will get it the next time we access the page I suppose. Or we could use a separate bit for more aggressive vacuum information. -- Gregory Stark EnterpriseDB http

Re: [HACKERS] Visibility map thoughts

2007-11-06 Thread Gregory Stark
to clear the bit and only if the page was marked as having the bit set. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! ---(end of broadcast)--- TIP 9: In versions below 8.0

Re: [HACKERS] Visibility map thoughts

2007-11-06 Thread Gregory Stark
POSIX systems we know of. I suppose if we could keep count of tuples and a count of free space and use a whole word. Map files would be 1M per 2G heap file (on an 8kb blocksize and 4-byte words). More complicated than necessary but I'm just thinking out loud. -- Gregory Stark EnterpriseDB

Re: [HACKERS] Weird type selection choice

2007-11-06 Thread Gregory Stark
originally posted works on Oracle. I wonder how they do it. I think they only have one type which uses different storage formats depending on the data. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support

Re: [HACKERS] EquivalenceClasses vs volatile functions

2007-11-06 Thread Gregory Stark
always generate resjunk columns for ORDER BY expressions, and get the planner to collapse out columns that are redundant. But that seems too big a change to contemplate for 8.3. That clearly sounds right. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained

Re: [HACKERS] A small rant about coding style for backend functions

2007-11-07 Thread Gregory Stark
analogous to the important kind of style details like what Tom was pointing out about using GETARG_* at the top of your function to make the argument types clear. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's

Re: [HACKERS] A small rant about coding style for backend functions

2007-11-08 Thread Gregory Stark
on that for patches. We reformat with pgindent periodically anyways. It's like a doctor's practice concerned about malpractice claims publishing a written guideline explicitly listing which articles of clothing aren't professional looking enough. -- Gregory Stark EnterpriseDB http

Re: [HACKERS] interval * numeric operator

2007-11-08 Thread Gregory Stark
? +1 I've been casting to Numeric anyway. Shouldn't the cast be implicit anyways? What does having double precision operators buy us? Wouldn't it introduce ambiguities? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support

Re: [HACKERS] A small rant about coding style for backend functions

2007-11-08 Thread Gregory Stark
fall under and so on. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! ---(end of broadcast)--- TIP 4: Have you searched our list archives? http

Re: [HACKERS] [PERFORM] Estimation problem with a LIKE clause containing a /

2007-11-08 Thread Gregory Stark
the concept of open versus closed end-points through deeper into the estimation logic? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! ---(end of broadcast)--- TIP 3: Have you

Re: [HACKERS] Free Space Map thoughts

2007-11-08 Thread Gregory Stark
of the advantages of using separate files. It would be easy to have or not have a whole file. It would be pretty hard to know whether the bits spread on every nth page are missing and hard to add them later if the table grows and they're needed. -- Gregory Stark EnterpriseDB http

Re: [HACKERS] [PERFORM] Estimation problem with a LIKE clause containing a /

2007-11-09 Thread Gregory Stark
the bogus range to calculate the histogram estimate but apply the LIKE pattern directly to the most-frequent-values instead of applying the bogus range? Or would that be too much code re-organization for now? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce

Re: [HACKERS] New tzdata available

2007-11-09 Thread Gregory Stark
it isn't clear how to judge the amount of warning. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner

Re: [HACKERS] Proposal: Select ... AS OF Savepoint

2007-11-12 Thread Gregory Stark
-- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http

Re: [HACKERS] Simplifying Text Search

2007-11-12 Thread Gregory Stark
of tsqueries. But that seems pretty integral to the functionality and I don't see any way to avoid it. It's not entirely unlike the idea of regexps which I'm sure would seem unnatural if we were just meeting them with no background. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com

Re: [HACKERS] How to keep a table in memory?

2007-11-13 Thread Gregory Stark
a slower or ad-hoc non-prepared query is allowed to evict those pages. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! ---(end of broadcast)--- TIP 1: if posting/reading

Re: [HACKERS] Simplifying Text Search

2007-11-13 Thread Gregory Stark
an equivalent to LIKE for regexps. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate

Re: [HACKERS] Simplifying Text Search

2007-11-13 Thread Gregory Stark
Peter Eisentraut [EMAIL PROTECTED] writes: Am Dienstag, 13. November 2007 schrieb Gregory Stark: Peter Eisentraut [EMAIL PROTECTED] writes: What we'd need is a way to convert a LIKE pattern into a tsquery ('%foo%bar%' = 'foo bar'). Then you might even be able to sneak index-optimized

[HACKERS] Unnecessary casts in pg_cast

2007-11-13 Thread Gregory Stark
| -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating at http

Re: [HACKERS] Simplifying Text Search

2007-11-13 Thread Gregory Stark
casted text to tsquery then define a text = tsquery operator which does what @@ does. Then you could write queries like: WHERE col = 'foo bar' ? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support

Re: [HACKERS] Simplifying Text Search

2007-11-13 Thread Gregory Stark
Simon Riggs [EMAIL PROTECTED] writes: Proposed changes: 1. Add function contains() 2. Alter docs to show use of contains() All other @@ features still the same Have you yet given any advantages of contains over @@ ? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com

Re: [HACKERS] Simplifying Text Search

2007-11-17 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Magnus Hagander [EMAIL PROTECTED] writes: On Wed, Nov 14, 2007 at 07:46:58AM +, Gregory Stark wrote: Have you yet given any advantages of contains over @@ ? Familiarity for users of SQL Server that are migrating? ;-) (http://msdn2.microsoft.com/en-us

Re: [HACKERS] LDC - Load Distributed Checkpoints with PG8.3b2 on Solaris

2007-11-17 Thread Gregory Stark
system usage: CPU 0.11s/0.09u sec elapsed 6.02 sec it seems like a serious omission that this gives you no hint how many pages were scanned. Isn't it pages removed + remain? 116 in this case. How do 40 tuples take 105 pages? -- Gregory Stark EnterpriseDB http

Re: [HACKERS] Spinlock backoff algorithm

2007-11-17 Thread Gregory Stark
but the database's internal arithmetic is done using software emulated math. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! ---(end of broadcast)--- TIP 6: explain analyze is your

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-17 Thread Gregory Stark
creation step rather than when people are checking in changes. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! ---(end of broadcast)--- TIP 7: You can help support

Re: [HACKERS] [COMMITTERS] pgsql: update files for beta3

2007-11-17 Thread Gregory Stark
release. Of course having every developer run autoconf suffers from that problem too. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! ---(end of broadcast

Re: [HACKERS] 8.3devel slower than 8.2 under read-only load

2007-11-22 Thread Gregory Stark
have you recompiled 8.2.5 recently? That is, are they compiled with the same version of gcc? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! ---(end of broadcast

[HACKERS] Ordered Append Node

2007-11-22 Thread Gregory Stark
rows=1 width=4) (actual time=0.017..21.192 rows=1 loops=1) Total runtime: 44.737 ms -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! ---(end of broadcast)--- TIP 1

Re: [HACKERS] Ordered Append Node

2007-11-22 Thread Gregory Stark
to line up. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org

Re: [HACKERS] Ordered Append Node

2007-11-23 Thread Gregory Stark
making slow in exchange for even a small speedup at run-time. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! ---(end of broadcast)--- TIP 3: Have you checked our

Re: [HACKERS] 8.3devel slower than 8.2 under read-only load

2007-11-23 Thread Gregory Stark
prepare queries though? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe

Re: [HACKERS] 8.3devel slower than 8.2 under read-only load

2007-11-24 Thread Gregory Stark
that may be a net loss. This is a conflict which will affect Postgres in the future as well. Generally I/O costs win over cpu costs in databases since only relatively small systems are cpu-bound. Large systems are typically I/O-bound. -- Gregory Stark EnterpriseDB http

Re: [HACKERS] 8.3devel slower than 8.2 under read-only load

2007-11-24 Thread Gregory Stark
to have infrastructure similar to the buldfarm running a standard set of benchmarks every day. It would be fascinating to see the graphs day-by-day of performance. Hopefully we wouldn't see too many dips and just a steady increase over time. -- Gregory Stark EnterpriseDB http

Re: [HACKERS] 8.3devel slower than 8.2 under read-only load

2007-11-24 Thread Gregory Stark
Guillaume Smet [EMAIL PROTECTED] writes: On Nov 24, 2007 5:16 PM, Gregory Stark [EMAIL PROTECTED] wrote: Several of the major changes in 8.3 are I/O vs CPU tradeoffs which could be causing a slowdown if you're measuring primarily CPU resources. I'm thinking of both HOT and packed varlenas. I

Re: [HACKERS] 8.3devel slower than 8.2 under read-only load

2007-11-25 Thread Gregory Stark
Guillaume Smet [EMAIL PROTECTED] writes: Using pgbench -n -S -c 10 -t 10, I also have CVS tip as fast as CVS from january. But using my set of queries, it's not. Were you ever able to send your queries? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about

Re: [HACKERS] 8.3devel slower than 8.2 under read-only load

2007-11-25 Thread Gregory Stark
because it means that databases which load piles of contrib modules have that much more of an effect here. Some contrib modules create a *lot* of operators. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services

Re: [HACKERS] quote_literal(integer) does not exist

2007-11-25 Thread Gregory Stark
really worked that well previously. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating

Re: [HACKERS] 8.3devel slower than 8.2 under read-only load

2007-11-26 Thread Gregory Stark
would be worryign is if runing a query which uses both varchar and some other ambiguous operator causes it to lose all its gain. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! ---(end of broadcast

Re: [HACKERS] Replacement Selection

2007-11-26 Thread Gregory Stark
). And, during merge passes, make use of available sort memory to load multiple tuples from any one input 'tape' at a time, thereby improving locality of access to the temp file. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand

Re: [HACKERS] Table inheritance, unique constraints and foreign key problem

2007-11-26 Thread Gregory Stark
this message: ERROR: SELECT FOR UPDATE/SHARE is not supported for inheritance queries Look at src/backend/optimizer/path/allpaths.c:287 for a comment about this. I'm a bit puzzled myself why this affects SELECT FOR UPDATE/SHARE but not straight UPDATES and DELETES. -- Gregory Stark

Re: [HACKERS] PostGreSQL and recursive queries...

2007-11-27 Thread Gregory Stark
much into it. I know it's a big patch, just the sheer amount of code that has to be gone through carefully to port it forward might make it kind of hard. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support

Re: [HACKERS] Poorly named support routines for GIN tsearch index opclasses

2007-11-27 Thread Gregory Stark
this? Is this useful? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http

Re: [HACKERS] Time to update list of contributors

2007-11-27 Thread Gregory Stark
Josh Berkus [EMAIL PROTECTED] writes: All, Time for the annual update of this list: ... Greg Stark, USA I'm not sure what the countries are supposed to signify but that's neither the country I hail from nor where I'm currently living. -- Gregory Stark EnterpriseDB http

Re: [HACKERS] PG 7.3 is five years old today

2007-11-28 Thread Gregory Stark
and not affected by whether Postgres 7.3 is still around. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning ---(end of broadcast)--- TIP 1: if posting/reading through Usenet

Re: [HACKERS] Time to update list of contributors

2007-11-28 Thread Gregory Stark
Gregory Stark [EMAIL PROTECTED] writes: Josh Berkus [EMAIL PROTECTED] writes: All, Time for the annual update of this list: ... Greg Stark, USA I'm not sure what the countries are supposed to signify but that's neither the country I hail from nor where I'm currently living. Sorry

Re: [HACKERS] [pgsql-www] Time to update list of contributors

2007-11-28 Thread Gregory Stark
Joshua D. Drake [EMAIL PROTECTED] writes: On Wed, 28 Nov 2007 13:58:27 + Gregory Stark [EMAIL PROTECTED] wrote: Gregory Stark [EMAIL PROTECTED] writes: Josh Berkus [EMAIL PROTECTED] writes: All, Time for the annual update of this list: ... Greg Stark, USA I'm not sure

Re: [HACKERS] String encoding during connection handshake

2007-11-28 Thread Gregory Stark
you a MyString you have the same problems of needing to know what encoding was used. Presumably you would put that in a member variable of the MyString class but that just goes to how the data structures in C are laid out and what you're considering extra information. -- Gregory Stark

Re: [HACKERS] jaguar is up

2007-11-28 Thread Gregory Stark
where a relcache flush could be received. Wouldn't it make more sense (and test more code) to go ahead and cache all the same data but flush it whenever a relcache flush could possibly be received? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's

Re: [HACKERS] How to write a c-function to return multiple bytea rows

2007-11-28 Thread Gregory Stark
and the actual heap_form_tuple call. The tuple will be copied when you call tuplestore_puttuple (which should be done in the same context the tuplestore was created in). -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's

Re: [HACKERS] Table inheritance, unique constraints and foreign key problem

2007-11-29 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Gregory Stark [EMAIL PROTECTED] writes: I'm a bit puzzled myself why this affects SELECT FOR UPDATE/SHARE but not straight UPDATES and DELETES. In straight UPDATE/DELETE we have enough structure in the query to know how to associate each tuple returned

Re: [HACKERS] convert int to bytea

2007-11-29 Thread Gregory Stark
[EMAIL PROTECTED] writes: select 124::bytea doesn't work Is there an other way? (preferabily simple :) This kind of question would be more appropriate on pgsql-general. What do you want the resulting bytea to look like? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com

Re: [HACKERS] Status report on 8.3 release

2007-11-29 Thread Gregory Stark
if you want to test it now. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [HACKERS] CommandCounterIncrement versus plan caching

2007-11-29 Thread Gregory Stark
) returns text as 'select val from tab where id = $1' language sql stable; CREATE FUNCTION postgres=# update tab set val = lookup(id-1); UPDATE 3 postgres=# select * from tab; id | val +- 1 | 2 | a 3 | b (3 rows) -- Gregory Stark EnterpriseDB http://www.enterprisedb.com

Re: [HACKERS] PostGreSQL and recursive queries...

2007-11-30 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Gregory Stark [EMAIL PROTECTED] writes: I could imagine problems the planner would have to deal with though, such as what type is bogon in this query? WITH RECURSIVE x(bogon) AS (select bogon from x) select * from x; Just a note --- that's

Re: [HACKERS] PostGreSQL and recursive queries...

2007-11-30 Thread Gregory Stark
it's planned then go back and replan recursive queries making use of the new information to catch things like: create function foo(int) returns text ... create function foo(text) returns int ... with recursive x(bogon) as (select 1 union all select foo(bogon) from x) select * from x -- Gregory

Re: [HACKERS] [GENERAL] Empty arrays with ARRAY[]

2007-11-30 Thread Gregory Stark
[]); could be allowed if they could be contrived to introduce an assignment cast. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! ---(end of broadcast)--- TIP 2: Don't 'kill -9

Re: [HACKERS] Release Note Changes

2007-11-30 Thread Gregory Stark
-stopper problem for them. If they're mentioned at all a single release note bullet point saying Many optimizations and concurrency improvements in areas such as transaction start and finish, checkpoint start, record visibility checking, merge join plans, ... would suffice. -- Gregory Stark

Re: [HACKERS] Replacement Selection

2007-12-01 Thread Gregory Stark
of. The hard part is understanding the algorithm itself and working out the details of the array management. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training! ---(end

Re: [HACKERS] CommandCounterIncrement versus plan caching

2007-12-01 Thread Gregory Stark
prepared queries and then executes them a few billion times you can run into the same limitation. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's 24x7 Postgres support! ---(end of broadcast)--- TIP 5

Re: [HACKERS] CommandCounterIncrement versus plan caching

2007-12-01 Thread Gregory Stark
Gregory Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] writes: I think this can be fixed by changing the Executor so that it doesn't use snapshot-curcid for this purpose. Instead, add a field to EState showing the CommandID to mark tuples with. ExecutorStart, which has enough

[HACKERS] There's random access and then there's random access

2007-12-02 Thread Gregory Stark
in the page-at-a-time buffer. That's probably safer too since for such scans we're more likely to not actually read all the results anyways; there could be a limit or something else above which will stop us. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Get trained by Bruce

Re: [HACKERS] There's random access and then there's random access

2007-12-02 Thread Gregory Stark
Douglas McNaught [EMAIL PROTECTED] writes: On 12/2/07, Gregory Stark [EMAIL PROTECTED] wrote: The two interfaces I'm aware of for this are posix_fadvise() and libaio. I've run tests with a synthetic benchmark which generates a large file then reads a random selection of blocks from within

Re: [HACKERS] There's random access and then there's random access

2007-12-02 Thread Gregory Stark
Tom Lane [EMAIL PROTECTED] writes: Gregory Stark [EMAIL PROTECTED] writes: Recently there was a post on -performance about a particular case where Postgres doesn't make very good use of the I/O system. This is when you try to fetch many records spread throughout a table in random order

[HACKERS] Kludge in pg_standby.c

2007-12-03 Thread Gregory Stark
, strerror(EWINDOWSBLOWS)); exit(2); } -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's RemoteDBA services! ---(end of broadcast)--- TIP 1: if posting/reading through

Re: [HACKERS] Sorting Improvements for 8.4

2007-12-03 Thread Gregory Stark
and then we don't really have a choice about which tape we want to preread from. And it's a good thing too since maintaining such a list of bounds and finding the lowest or highest would mean maintaining a second heap which would basically double the cpu cost of sorting. -- Gregory Stark

Re: [HACKERS] Sorting Improvements for 8.4

2007-12-03 Thread Gregory Stark
than what I was thinking. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning ---(end of broadcast)--- TIP 7: You can help support the PostgreSQL project by donating

Re: [HACKERS] There's random access and then there's random access

2007-12-04 Thread Gregory Stark
Gregory Stark [EMAIL PROTECTED] writes: The two interfaces I'm aware of for this are posix_fadvise() and libaio. I've run tests with a synthetic benchmark which generates a large file then reads a random selection of blocks from within it using either synchronous reads like we do now

Re: [HACKERS] There's random access and then there's random access

2007-12-04 Thread Gregory Stark
function which is only really useful for this one use case. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [HACKERS] There's random access and then there's random access

2007-12-04 Thread Gregory Stark
is that the advantage of the ordered blocks doesn't diminish with prefetching. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's On-Demand Production Tuning ---(end of broadcast)--- TIP 6: explain analyze

Re: [HACKERS] There's random access and then there's random access

2007-12-04 Thread Gregory Stark
Decibel! [EMAIL PROTECTED] writes: On Dec 4, 2007, at 1:42 PM, Gregory Stark wrote: I'm debating between two ways to structure the code right now. Do I put the logic to peek ahead in nodeBitmapHeapScan to read ahead and remember the info seen or in tidbitmap with an new api function which

Re: [HACKERS] TOASTed size

2007-12-05 Thread Gregory Stark
Simon Riggs [EMAIL PROTECTED] writes: On Wed, 2007-12-05 at 08:24 +, Gregory Stark wrote: Tom Lane [EMAIL PROTECTED] writes: Simon Riggs [EMAIL PROTECTED] writes: I'm thinking that there isn't any way currently of working out how big a compressed toast object is? pg_column_size

Re: [HACKERS] TOASTed size

2007-12-05 Thread Gregory Stark
integer). -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's PostGIS support! ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [HACKERS] TOASTed size

2007-12-05 Thread Gregory Stark
What it turns out is hard to determine is whether the column was stored externally. To do that you have to rely on the trick of checking pg_column_size(table.*) and that only works if it's the only column likely to be stored externally. -- Gregory Stark EnterpriseDB http

[HACKERS] Problem with ControlFileData structure being ABI dependent

2007-12-06 Thread Gregory Stark
. Are we sure Slony et al don't use time_t or enums or anything else which may have changed between these two runtimes? -- Gregory Stark EnterpriseDB http://www.enterprisedb.com Ask me about EnterpriseDB's Slony Replication support! ---(end of broadcast

Re: [HACKERS] Problem with ControlFileData structure being ABI dependent

2007-12-06 Thread Gregory Stark
Rainer Bauer [EMAIL PROTECTED] writes: Gregory Stark wrote: This is because of (at least) two changes in the ABI between the runtimes used by mingw and VC++. 1) Enums are apparently 8 bytes on VC++ but 4 bytes on mingw They are 4 bytes here on my 32 bit WinXP machine with VS2005SP1. Oh, I

Re: [HACKERS] Problem with ControlFileData structure being ABI depe ndent

2007-12-07 Thread Gregory Stark
this in c.h: #ifdef WIN32 #ifndef _USE_32BIT_TIME_T #error Postgres uses 32 bit time_t add #define _USE_32BIT_TIME_T on Windows #endif #endif For modules which *do* use time_t this is safer. However for modules which don't use time_t it'll be an unnecessary hassle. -- Gregory Stark

Re: [HACKERS] pg_controldata doesn't report 64/32bit?

2007-12-07 Thread Gregory Stark
Gregory Stark [EMAIL PROTECTED] writes: Tom Lane [EMAIL PROTECTED] writes: Josh Berkus [EMAIL PROTECTED] writes: I've just noticed that pg_controldata doesn't say anything about whether the database is 64-bit or 32-bit. That's because there is no such concept. I think the relevant

Re: [HACKERS] pg_controldata doesn't report 64/32bit?

2007-12-07 Thread Gregory Stark
members or pointers so an LP64 architecture actually would have the same member sizes as a 32-bit architecture. So if there's an LP64 architecture which has the same maxalign (presumably 64-bit for doubles) as its 32-bit cousin then it's actually possible we wouldn't notice? -- Gregory Stark

<    6   7   8   9   10   11   12   13   14   15   >