Re: [GENERAL] Incremental Backups in postgres

2009-11-10 Thread Greg Stark
On Tue, Nov 10, 2009 at 11:03 AM, Alban Hertroys wrote: > IMHO The simplest solution is to just write a dump to the same file every > now and then and have the backup software take care of storing only the > differences. It does have a few drawbacks; it means you'll have a file about > as large as

Re: [GENERAL] safelly erasing dirs/files

2009-11-14 Thread Greg Stark
On Sat, Nov 14, 2009 at 7:42 PM, Joao Ferreira gmail wrote: > vacuum/reindex is saying: I can't do it cause I have no space :( Hm, vacuum shouldn't require any extra space. I suppose you need enough space for the transaction log though. You can probably get away with a pretty small amount of extr

Re: [GENERAL] pg_attribute.attnum - wrong column ordinal?

2009-11-24 Thread Greg Stark
On Wed, Nov 25, 2009 at 1:03 AM, Konstantin Izmailov wrote: > My question: can pg_attribute.attnum be used to determine the sequential > ordinal positions of columns in a table? What is a right way to get the > ordinal numbers? You could use something like: row_number() over (partition by T.sch

Re: [GENERAL] pg_attribute.attnum - wrong column ordinal?

2009-11-24 Thread Greg Stark
On Wed, Nov 25, 2009 at 2:00 AM, Konstantin Izmailov wrote: > Greg, > this is brilliant - thank you very much! > > Is "partition by" compatible to PostgreSQL 8.0/8.2? I could not find > compatibility information. It works fine with PG 8.3/8.4 and Greenplum 3.3 > thou. It's 8.4 only. You could al

Re: [GENERAL] Postgresql8.4 install breaks Evolution on Ubuntu 9.10

2009-11-29 Thread Greg Stark
On Sun, Nov 29, 2009 at 4:17 PM, Magnus Hagander wrote: > On Sun, Nov 29, 2009 at 16:18, Sachin Srivastava > wrote: >> Apart from libxml2 (which is now being fixed) all other libraries you >> mentioned , dint get installed (or copied) to the PGHOME/lib directory if >> the same name library alrea

Re: [GENERAL] postgre...@fosdem 2010 - Call for talks

2009-12-03 Thread Greg Stark
On Thu, Dec 3, 2009 at 10:48 AM, Dave Page wrote: > We will have a number of 45 minutes slots, and may split one or more > into 3 back-to-back 15 minute slots if we receive suitable proposals. I would like to suggest we reduce the number of talks and have instead some more participatory round-ta

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-03 Thread Greg Stark
On Thu, Dec 3, 2009 at 8:33 AM, Craig Ringer wrote: > While true in theory, in practice it's pretty unusual to have filenames > encoded with an encoding other than the system LC_CTYPE on a modern > UNIX/Linux/BSD machine. > > I'd _very_ much prefer to have Bacula back my machines up by respecting

Re: [GENERAL] logtrigger/denyaccess triggers removed from master/slave

2009-12-21 Thread Greg Stark
On Fri, Dec 18, 2009 at 6:59 PM, tamanna madaan wrote: > I am using postgres-8.1.2 and slony-1.1.5 for replication. > I don't know about your Slony problems but the current bug-fix release for 8.1 is 8.1.19. That's 17 releases to fix security holes, crashes, data corruption bugs, etc that you're

Re: [GENERAL] date_trunc on date is immutable?

2009-12-24 Thread Greg Stark
On Fri, Dec 25, 2009 at 12:56 AM, Scott Marlowe wrote: > On Thu, Dec 24, 2009 at 4:36 PM, Kian Wright > wrote: >> I'm trying to create an index on the month and year of a date field (in >> 8.3), and I'm getting the "functions in index expression must be marked >> IMMUTABLE" error message. > > If

Re: [GENERAL] date_trunc on date is immutable?

2009-12-25 Thread Greg Stark
On Fri, Dec 25, 2009 at 1:58 AM, Scott Marlowe wrote: > Isn't it the client timezone and not the system timezone that actually > sets the tz the tstz is set to on retrieval? It's the GUC: stark=> set timezone = 'America/Los_Angeles'; SET stark=> select now(); now --

Re: [GENERAL] DELETE ERROR: tuple concurrently updated

2009-12-29 Thread Greg Stark
On Tue, Dec 29, 2009 at 9:41 AM, Михаил Кечинов wrote: > One week ago our database has crashed and after restore begins some > problems. What version? And how was this backup taken? It sounds like it might be an inconsistent backup. -- greg -- Sent via pgsql-general mailing list (pgsql-gener

Re: [GENERAL] DELETE ERROR: tuple concurrently updated

2009-12-29 Thread Greg Stark
On Tue, Dec 29, 2009 at 9:41 AM, Михаил Кечинов wrote: > When I try to delete one row from database (for example): > delete from document where numdoc = 901721617 > I have this error: > ERROR: tuple concurrently updated > SQL state: XX000 > I know, that no one deleting this row at same time. > Wha

Re: [GENERAL] WEIRD! postmaster: segfault with sub select??!

2010-01-03 Thread Greg Stark
On Sun, Jan 3, 2010 at 8:31 AM, Reto wrote: > Hi everybody, > > I'm facing a strange problem with a relatively simple sub select > whereas everything else runs perfect on this machine (PG 8.4.2 @ > Fedora 12, Core2 E4600, 4GB, 2 x 320GB). > > # SELECT DISTINCT name FROM bbr_parts WHERE id IN (SELE

Re: [GENERAL] Collate order on Mac OS X, text with diacritics in UTF-8

2010-01-16 Thread Greg Stark
On Thu, Jan 14, 2010 at 6:15 AM, Craig Ringer wrote: >>> Out of interest: Why not? >> >> There's plenty of discussion in the archives about it, but basically >> ICU would represent a pretty enormous dependency and would lock us in >> to having no other backend encoding but UTF8. > > Thanks. You're

Re: [GENERAL] postgres external table

2010-01-18 Thread Greg Stark
On Mon, Jan 18, 2010 at 2:57 PM, Tom Lane wrote: > I'm finding it hard to visualize a use-case for that.  We must postulate > that the table is so big that you don't want to import it, and yet you > don't feel a need to have any index on it.  Which among other things > implies that every query wil

Re: [GENERAL] type of field

2010-01-18 Thread Greg Stark
On Mon, Jan 18, 2010 at 8:24 PM, Jean-Yves F. Barbier <12u...@gmail.com> wrote: > I've got to store many small videos; to make things simple (backup/restore, > because users don't know very much about IT) I've choosen BYTEA + EXTERNAL, > is it the right choice? If you want to store them in the dat

Re: [GENERAL] postgres external table

2010-01-19 Thread Greg Stark
On Tue, Jan 19, 2010 at 4:41 AM, Craig Ringer wrote: > How can that work without a transactional file system, though? If the > external process writes to the file while you're half-way through reading > it, what's the database to do? In general, how do external tables cope with > the fact that the

Re: [GENERAL] Questions about connection clean-up and "invalid page header"

2010-01-25 Thread Greg Stark
On Mon, Jan 25, 2010 at 8:15 AM, Scott Marlowe wrote: >> Is there a parameter to set in the configuration or some other means to >> shorten the time before an abandoned backend's query is cancelled? > > You can shorten the tcp_keepalive settings so that dead connections > get detected faster. > T

Re: [GENERAL] Questions about connection clean-up and "invalid page header"

2010-01-25 Thread Greg Stark
On Mon, Jan 25, 2010 at 11:37 AM, Herouth Maoz wrote: > The tcp_keepalive setting would only come into play if the remote > machine crashed or was disconnected from the network. > > > That's the situation I'm having, so it's OK. Crystal, being a Windows > application, obviously runs on a different

Re: [GENERAL] Questions about connection clean-up and "invalid page header"

2010-01-25 Thread Greg Stark
On Mon, Jan 25, 2010 at 1:16 PM, Herouth Maoz wrote: > Well, I assume by the fact that eventually I get an "Unexpected end of file" > message for those queries, that something does go in and check them. Do you > have any suggestion as to how to cause the postgresql server to do so > earlier? No,

Re: [GENERAL] surprised by non-strict array_append

2010-02-03 Thread Greg Stark
If it were strict wouldn't it return NULL? greg On 3 Feb 2010 07:16, "J. Greg Davidson" wrote: I was caught out today by the non-strict behavior of array_append causing me to get an undesired result for a COALESCE. My subsequent attempt to create a STRICT VARIADIC generalization of array_appen

Re: [GENERAL] Multiple buffer cache?

2010-02-07 Thread Greg Stark
I doubt pinning buffers ever improve system on any halfway modern system. It will often *look* like it has improved performance because it improves the performance of the queries you're looking at -- but at the expense of slowing down everything else. There is a use case it would be useful for tho

[GENERAL] Re: 8.5devel: unexpected and illogical error during transaction, but transaction don't rolled back

2010-02-10 Thread Greg Stark
On Wed, Feb 10, 2010 at 6:59 AM, A. Kretschmer wrote: > test=*# analyse table_a; > ERROR:  canceling autovacuum task > CONTEXT:  automatic vacuum of table "test.public.table_a" > ANALYZE > Time: 1235,600 ms > > > I think, that's not an ERROR, just a NOTICE for me. And yes, the > transaction isn't

Re: [GENERAL] Best way to handle multi-billion row read-only table?

2010-02-10 Thread Greg Stark
On Wed, Feb 10, 2010 at 2:32 PM, Asher wrote: > The data will initially be accessed via a simple GUI which will allow > browsing over a subset of the data (subsampled down to 1 sample/minute/hour, > etc. It sounds like you could use a tool like rrd that keeps various levels of aggregation and int

Re: [GENERAL] Truncate and delete adds wal logs for slave to process.

2010-02-11 Thread Greg Stark
On Thu, Feb 11, 2010 at 5:47 PM, Chris Barnes wrote: > > Because both truncate and delete, I would think that this action would be > put into the pg_log as a log file that can be rolled back. And, when > complete, it would be shipped to the standby to be processed? > > To reduce this logging, ship

Re: [GENERAL] DDL trigger kind functionality in PostGreSQL

2010-02-20 Thread Greg Stark
On Thu, Feb 18, 2010 at 4:55 AM, dipti shah wrote: > Hi, > > I was looking for SQL DDL trigger kind of functionality in PostGreSQL but > couldn;t find any. There isn't any. > Basically I want to make sure that no users > should use "DROP" command directly on my database even though he/she owner

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-23 Thread Greg Stark
On Tue, Feb 23, 2010 at 6:48 AM, Scott Marlowe wrote: >> I'm relieved that Postgresql itself does not, in fact, suck, but >> slightly disappointed in the behavior of psql. I suppose it needs to >> buffer everything in memory to properly format its tabular output, >> among other possible reasons I

Re: [GENERAL] Sorting performance vs. MySQL

2010-02-23 Thread Greg Stark
On Tue, Feb 23, 2010 at 9:48 AM, Yeb Havinga wrote: > Greg Stark wrote: >> >> You can do \set FETCH_COUNT to have psql use a cursor automatically. >> > > It seems like a big win in this case. What would be the downside of having a > fetch_count set default in psql?

Re: [GENERAL] Implementing an Index Access Method in PG 8.4

2010-02-23 Thread Greg Stark
On Tue, Feb 23, 2010 at 10:00 AM, Carsten Kropf wrote: > I have a question according to the implementation of a new index access > method in Postgres. Is it necessary to implement a new resource manager for > XLog when I am trying to achieve a stable new index access method? > It's not currentl

Re: [GENERAL] Hung postmaster (8.3.9)

2010-03-02 Thread Greg Stark
We should probably also check and prohibit including directories as files. On Tuesday, March 2, 2010, Tom Lane wrote: > In the meantime, it seems like we ought to take two defensive steps: -- greg -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Scratching my head why results are different between machines.

2010-03-04 Thread Greg Stark
On Thu, Mar 4, 2010 at 2:14 PM, Justin Graf wrote: > To pretty much anyone outside MS, a sane human would think 64 bit apps > in SysWoW64 and 32Bit apps in System32. :'( > Ah, but you all are forgetting that the "32" here is to distinguish it from the default odbc interface which as i recall was

Re: [GENERAL] autovacuum question

2010-03-09 Thread Greg Stark
On Tue, Mar 9, 2010 at 1:47 PM, Scot Kreienkamp wrote: > I found a way to do it very easily using LVM snapshots and WAL log > shipping, but the net effect is I'm bringing a new LVM snapshot copy of > the database out of recovery every 1-2 hours.  That means I'd have to > spend 15 minutes, or one-q

Re: [GENERAL] has_schema_privilege function

2010-03-09 Thread Greg Stark
On Tue, Mar 9, 2010 at 10:28 AM, Jignesh Shah wrote: > Could you tell me is there any other robust way to make sure that user1 > doesn't have CREATE permissions on mydb schema? It depends what you're worried about. If you're worried that plperl will begin mapping booleans to perl variables differ

Re: [GENERAL] pgreplay log file replayer released

2010-03-22 Thread Greg Stark
On Wed, Mar 17, 2010 at 2:06 PM, Albe Laurenz wrote: > I announce the first release of pgreplay, version 0.9.0 (Beta). > > Project home page: http://pgreplay.projects.postgresql.org/ > > pgreplay reads a PostgreSQL log file (*not* a WAL file), > extracts the SQL statements and executes them in the

Re: [GENERAL] Cannot read block 348938 of pdbsynchtable

2010-04-08 Thread Greg Stark
On Thu, Apr 8, 2010 at 7:12 AM, Utsav Turray wrote: > Even if If i try to pad the file  25205.3  using DD command I am not able to > calculate the bytes to be padded as the total count of the blocks is comming > out to be 521228 and the error is coming cannot read the 348938 block. Assuming 25205

Re: [GENERAL] Maximum reasonable free space map

2008-12-17 Thread Greg Stark
On Wed, Dec 17, 2008 at 5:45 AM, Scott Marlowe wrote: > > If you've got 40M rows and 10% are updated each day, then it's likely > you'll want 4M fsm entries avaialble for those dead rows. FWIW you only need an entry for each *page* of the table, not every row. Of course if you have 40M rows and 1

Re: [GENERAL] Pet Peeves?

2009-01-31 Thread Greg Stark
On Sat, Jan 31, 2009 at 6:10 PM, rhubbell wrote: > Thanks, using the same apt commands, try to find pg_config $ apt-file search bin/pg_config libpq-dev: /usr/bin/pg_config postgresql-server-dev-8.3: /usr/lib/postgresql/8.3/bin/pg_config That is confusing actually. However, the readme for DBD::P

Re: [GENERAL] Pet Peeves?

2009-01-31 Thread Greg Stark
On Sat, Jan 31, 2009 at 5:34 PM, Octavio Alvarez wrote: > > It doesn't really matter. Since crosstabs are just a presentational > variation to a query with aggregate functions and GROUP BY clauses, Why are crosstabs just a presentation issue any more than GROUP BY or ORDER BY? -- greg -- Sen

Re: [GENERAL] R: R: complex custom aggregate function

2009-02-02 Thread Greg Stark
On Mon, Feb 2, 2009 at 2:30 PM, Scara Maccai wrote: > Paolo Saudin wrote: >> I use a master table with a "fulldate" field and filled with sequential >> dates to >> fill gaps when meteo data is missing. > > I'm sorry, I still don't get it: how can you be sure that postgresql won't > call perl_sli

Re: [GENERAL] Pet Peeves?

2009-02-03 Thread Greg Stark
On Thu, Jan 29, 2009 at 5:43 PM, David Fetter wrote: >> >> > * CTEs not yet integrated into the adjacency lists in pg_catalog, >> > etc. >> >> I'm not sure what you're referring to here either. > > The DAG structures in pg_depend leap to mind. There's no view that > shows the actual dependencies,

Re: [GENERAL] Pet Peeves?

2009-02-03 Thread Greg Stark
On Tue, Feb 3, 2009 at 7:04 PM, David Fetter wrote: > >> Notably, there's no indication of which lock wait queue the >> ungranted locks are in. That means to find out what's blocking a >> lock would require comparing every other lock to it and deciding >> whether it conflicts. > > Interesting :)

Re: [GENERAL] Pet Peeves?

2009-02-03 Thread Greg Stark
On Tue, Feb 3, 2009 at 10:06 PM, Simon Riggs wrote: > > On Tue, 2009-02-03 at 15:03 -0500, Chris Mayfield wrote: > >> 1. Having to rewrite entire tables out to disk the first time I scan >> them, for example: >> >> CREATE TABLE t1 AS ...; -- writes 100 GB to disk >> CREATE INDEX i1 ON t1 ...; -- r

Re: [GENERAL] Pet Peeves?

2009-02-03 Thread Greg Stark
On Tue, Feb 3, 2009 at 9:27 PM, Simon Riggs wrote: > > On Mon, 2009-02-02 at 22:48 +, Gregory Stark wrote: >> Christopher Browne writes: >> >> > - Managing jobs (e.g. - "pgcron") >> >> A number of people have mentioned a job scheduler. I think a job scheduler >> entirely inside Postgres would

Re: [GENERAL] Pet Peeves?

2009-02-05 Thread Greg Stark
On Wed, Feb 4, 2009 at 6:42 PM, Simon Riggs wrote: > > As A.M. says elsewhere, it would be good to have a trigger that fired a > NOTIFY that was picked up by a scheduled job that LISTENs every 10 > minutes for certain events. > > We need a place for code that is *not* directly initiated by a user'

Re: [GENERAL] string_to_array with empty input

2009-03-30 Thread Greg Stark
Sorry for top-posting--blame apple. Hm my first instinct was indeed to make it a zero-length array. I was thinking of the input as a "list" and surely there are no elements in a list which empty. I had to think a while until a length-1 array made sense. I suppose the thinking was string_t

Re: [GENERAL] string_to_array with empty input

2009-03-31 Thread Greg Stark
On Tue, Mar 31, 2009 at 7:45 AM, Brendan Jurd wrote: > My first thought was that it should be a zero-element array, because > then the string_to_array() behaviour would conform to the notion that > it returns an array with 1 element per string fragment bounded by the > delimiter. > > However, I no

Re: [GENERAL] string_to_array with empty input

2009-03-31 Thread Greg Stark
On Tue, Mar 31, 2009 at 3:42 PM, Sam Mason wrote: > >  string_to_array('',',')::INT[]  => invalid input syntax for integer: "" Oof. That's a good point. -- greg -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.o

Re: [GENERAL] string_to_array with empty input

2009-03-31 Thread Greg Stark
On Tue, Mar 31, 2009 at 4:34 PM, Sam Mason wrote: > > That's also a disingenuous example; what would you expect back from: > >  select count_elements(string_to_array('butter,,milk',',')) > > I think the semantics you want is what you'd get from: > >  array_filter_blanks(string_to_array($1,$2)) > >

Re: [GENERAL] string_to_array with empty input

2009-03-31 Thread Greg Stark
On Tue, Mar 31, 2009 at 5:48 PM, justin wrote: > > But consider  this fails also > > select string_to_array('1, , 3', ',' )::int[] => ERROR:  invalid input > syntax for integer: " " > > yet this works > > select string_to_array('1, 2, 3',',')::int[] Sure, and the analogous pair string_to_array('

Re: [GENERAL] string_to_array with empty input

2009-03-31 Thread Greg Stark
On Tue, Mar 31, 2009 at 6:44 PM, justin wrote: > > Consider this.  I have intelligent part numbers  that need to be split apart > to simplify searching  and do math with. > > string_to_array(' F-2500-50 ', '-' ) ::int[] Yeah, that's what I've said about three times. If you're building a parser an

Re: [HACKERS] [GENERAL] string_to_array with empty input

2009-04-01 Thread Greg Stark
On Wed, Apr 1, 2009 at 6:23 PM, David E. Wheeler wrote: > Right, it's making a special case of '', which does seem rather inconsistent > to me. "David E. Wheeler" writes: > On Apr 1, 2009, at 10:05 AM, justin wrote: > >> string_to_array('',',')::INT[] works as proposed >> >> But >> string_to_

Re: [GENERAL] Group By and wildcards...

2005-02-19 Thread Greg Stark
Bruno Wolff III <[EMAIL PROTECTED]> writes: > On Sat, Feb 19, 2005 at 12:07:12 -0200, > Jon Lapham <[EMAIL PROTECTED]> wrote: > > > > SELECT a.*, b.*, c.*, SUM(d.blah) > > FROM a, b, c, d > > WHERE > > GROUP BY a.*, b.*, c.* > > > > Instead of having to expand the "GROUP BY a.*, b.*, c.*" usi

Re: [GENERAL] Emacs and postgres

2005-02-23 Thread Greg Stark
Sean Davis <[EMAIL PROTECTED]> writes: > This is a bit off-topic > > Does anyone know of an interface between emacs and psql? I currently use it > as > my default editor and do my share of save and then \i. I just gave pgEdit a > try and liked many aspects of it, but I still like Emacs as

Re: [GENERAL] row numbering

2005-02-25 Thread Greg Stark
josue <[EMAIL PROTECTED]> writes: > to something like: > > select counter(),a,b from foo; The OLAP SQL Standard way to spell this is "ROW_NUMBER() OVER ()". Postgres doesn't have any support for any of the OLAP features however. It would be really nice because they're nigh impossible to emulat

Re: [GENERAL] Hash aggregates blowing out memory

2005-02-25 Thread Greg Stark
Mike Harding <[EMAIL PROTECTED]> writes: > The following was run -immediately- after a vacuum. You realize "vacuum" doesn't update the statistics, right? You have to do "analyze" or "vacuum analyze" for that. -- greg ---(end of broadcast)---

Re: [GENERAL] multicolumn GIST index question

2005-03-01 Thread Greg Stark
> Ron Mayer wrote: > > Did anyone get multi-column GIST indexes working using both > > the gist_btree and postgis modules? Multi-column gist indexes are basically useless at this point. The index pages are split based entirely on the first column, so the index becomes basically an index on the fi

Re: [GENERAL] Performance of Views

2005-03-01 Thread Greg Stark
Steffen Boehme <[EMAIL PROTECTED]> writes: > FROM > ss_order_orderitems a > LEFT JOIN ss_order_affiliate_tracking b ON a.order_id = b.order_id, > ss_shops c > WHERE > (a.order_id = b.order_id OR b.order_id IS NULL) AND What is that last line doing there? It's completely redunda

Re: [GENERAL] Compatible Dumps

2005-03-03 Thread Greg Stark
Richard Huxton writes: > This *will* break if the target table (1st param) is in a different schema > than > public, or if you have non-default sequence names. Including if you've renamed a serial column since creating it, or if your serial column has an extremely long name. In practice it wo

Re: [GENERAL] About Access paths

2005-03-07 Thread Greg Stark
Martijn van Oosterhout writes: > It's a fairly corner case feature, only for the case where you're > looking for the existance of an index key but don't want any other > data. I don't personally have any queries that could use such a > construct, though maybe I'm missing the point. You don't ha

Re: [GENERAL] Stuck with a query...

2005-03-08 Thread Greg Stark
Geoff Caplan <[EMAIL PROTECTED]> writes: > Hi folks, > > Sorry to ask a newbie SQL question but I'm struggling... There's no efficient way to write this in standard SQL. However Postgres has an extension DISTINCT ON that would do it: select url,count(*) from (select distinct on (session_id)

Re: [GENERAL] partitionning

2005-03-09 Thread Greg Stark
Scott Marlowe <[EMAIL PROTECTED]> writes: > With the advent of very large raid arrays with very fast caching > controllers, this methodology is becoming less and less necessary. I think the evidence is to the contrary. Witness the rather dramatic surge in inquiries about this on this list. A yea

Re: [GENERAL] partitionning

2005-03-09 Thread Greg Stark
Scott Marlowe <[EMAIL PROTECTED]> writes: > Actually, I think it is the more common scenario of migrating off of > oracle or db2 and onto postgresql, and bringing along the experience > gained there over the years that has caused this refrain to sprout up > more and more often. With a database si

Re: [GENERAL] partitionning

2005-03-09 Thread Greg Stark
Scott Marlowe <[EMAIL PROTECTED]> writes: > Wait, I'm not sure I understand your point here yet. Are you saying > something along the lines of that with a 1TB storage array, and putting > all the data in one big partitions, the DBAs had problems, but when they > partitioned it down to say 10 100G

Re: [GENERAL] partitionning

2005-03-09 Thread Greg Stark
Scott Marlowe <[EMAIL PROTECTED]> writes: > Yes, it is a way. It's just a less necessary one than it once was, with > hardware now able to provide the same performance increase with little > or no work on the users part. We've got to weigh the increased > complexity it would take to implement i

Re: [GENERAL] [PATCHES] A way to let Vacuum warn if FSM settings are low. [final?]

2005-03-13 Thread Greg Stark
Bruce Momjian writes: > These new messages: > > NOTICE: max_fsm_relations(1000) equals the number of relations checked > HINT: You have >= 44 relations. > Consider increasing the configuration parameter "max_fsm_relations". > NOTICE: the number of page slots nee

Re: [GENERAL] pseudo-serial values in dual primary key?

2005-03-19 Thread Greg Stark
Benjamin Smith <[EMAIL PROTECTED]> writes: > Is it possible to have the equivalent of a serial data type in a table, > sub-categorized? > > Assume the following: > > create table categories (id serial, title varchar); > > Now, I want to create an entries table, and by default, count seriall

Re: [GENERAL] Query performance problem

2005-03-19 Thread Greg Stark
Paul Tillotson <[EMAIL PROTECTED]> writes: > >Total runtime: 12.241 ms > > > > Still this is a third of the time of the sub-query route but 4 times longer > > than mysql - this must be an install issue? > > Just about any query will usually take a few milliseconds (try SELECT 1; to > see > the a

Re: [GENERAL] Copression

2005-03-21 Thread Greg Stark
Bruce Momjian writes: Bruce Momjian writes: > Stanislaw Tristan wrote: > > It's a possible to compress traffic between server and client while server > > returns query result? > > It's a very actually for dial-up users. > > What is solution? > > No, unless SSL compresses automatically. Witho

[GENERAL] Changing constraints to deferrable

2005-03-22 Thread Greg Stark
I want all my foreign key constraints to be deferrable. They were all created with the default (not deferrable). Is it enough to just do update pg_constraint set condeferrable = 't' where contype = 'f'; ? It doesn't seem to be enough. I still get constraint violations as soon as I try to de

Re: [GENERAL] Changing constraints to deferrable

2005-03-22 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > Is it enough to just do > > update pg_constraint set condeferrable = 't' where contype = 'f'; > > I think you'd need to start a fresh backend sessio

Re: [GENERAL] checkpoint_timeout

2005-03-22 Thread Greg Stark
Bruce Momjian writes: > I don't see something that happens every five minutes as any kind of > performance problem. I am not sure what Josh saw that made him want to > increase that. I would have thought checkpoint_timeout would be something you would adjust depending on whether you want even

Re: [GENERAL] Delay INSERT

2005-03-23 Thread Greg Stark
Dawid Kuroczko <[EMAIL PROTECTED]> writes: > PostgreSQL doesn't have such issues with blocking, so only difference > between INSERT and INSERT DELAYED from PostgreSQL's standpoint > would be waiting and not for the result... An insert can be blocked if there's a UNIQUE constraint and another tran

Re: [GENERAL] Changing constraints to deferrable

2005-03-23 Thread Greg Stark
"Florian G. Pflug" <[EMAIL PROTECTED]> writes: > Greg Stark wrote: > > I want all my foreign key constraints to be deferrable. They were all > > created > > with the default (not deferrable). > > Is it enough to just do update pg_constraint set

Re: [GENERAL] Changing constraints to deferrable

2005-03-23 Thread Greg Stark
Michael Fuhr <[EMAIL PROTECTED]> writes: > On Wed, Mar 23, 2005 at 12:13:33PM -0500, Greg Stark wrote: > > > > Consider this a plea for an ALTER TABLE ALTER CONSTRAINT command :) > > Shouldn't ALTER TABLE DROP CONSTRAINT followed by ALTER TABLE ADD > CONSTRA

Re: [GENERAL] plperl doesn't release memory

2005-03-24 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > (Come to think of it, doesn't Perl normally use its very own private malloc? > Maybe there's an issue right there ...) Perl can be built either way. It should work to have two different malloc's running side by side as long as the correct free() is always c

Re: [GENERAL] plperl doesn't release memory

2005-03-24 Thread Greg Stark
Dan Sugalski <[EMAIL PROTECTED]> writes: > Anyway, if perl's using its own memory allocator you'll want to rebuild it > to not do that. You would need to do that if you wanted to use a debugging malloc. But there's no particular reason to think that you should need to do this just to work properl

Re: [GENERAL] Debugging deadlocks

2005-03-30 Thread Greg Stark
Alvaro Herrera <[EMAIL PROTECTED]> writes: > Now this can't be applied right away because it's easy to run "out of > memory" (shared memory for the lock table). Say, a delete or update > that touches 1 tuples does not work. I'm currently working on a > proposal to allow the lock table to sp

Re: [GENERAL] Debugging deadlocks

2005-03-31 Thread Greg Stark
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Wed, Mar 30, 2005 at 05:41:04PM -0500, Greg Stark wrote: > > > > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > > > Is that true even if I'm updating/deleting 1,000 tuples that all reference > > t

Re: [GENERAL] Debugging deadlocks

2005-04-01 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Alvaro Herrera <[EMAIL PROTECTED]> writes: > > On Fri, Apr 01, 2005 at 10:14:07PM -0500, Paul Tillotson wrote: > >> ... > > > Well, at that point you need to take a lock in order to be able to > > manage locks. Managing not to step on your own feet in that

Re: [GENERAL] Debugging deadlocks

2005-04-02 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > Tom Lane <[EMAIL PROTECTED]> writes: > >> I looked at Paul's first message and thought "nah, that won't work > >> because ... because ... hmm ... hmmm ..

Re: [GENERAL] change attnum in pg_catalog.pg_attribute

2005-04-05 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > somee <[EMAIL PROTECTED]> writes: > > I want to change column order in select * from table instruction; > > I can do that changing attnum but I don't know it is safely or not for > > system. > > It won't work and will likely crash the backend. Out of curios

Re: [GENERAL] Out of memory error on select

2005-04-05 Thread Greg Stark
Werner Bohl <[EMAIL PROTECTED]> writes: > Explain output: > "HashAggregate (cost=881509.02..881510.02 rows=200 width=20)" > " Filter: (count(*) > 1)" > " -> Seq Scan on lssi_base (cost=0.00..872950.68 rows=1711668 > width=20)" If this is just a one-time query just do set enable_hashagg = o

Re: [GENERAL] [INTERFACES] calculated identity field in views, again...

2005-05-03 Thread Greg Stark
"Zlatko Matic" <[EMAIL PROTECTED]> writes: > In regular tables, I use bigserial field, but how can I create calculated > bigserial column in a view ? You would have to create a sequence and reference it with nextval('sequencename') in your view. But I doubt very much that it will do anything usef

Re: [GENERAL] [INTERFACES] calculated identity field in views, again...

2005-05-04 Thread Greg Stark
Bruno Wolff III <[EMAIL PROTECTED]> writes: > > How do I create sequence ? > > You can't create a sequence for a view. You would need to have it in a > table that is joined as part of the view. Sure you can. You can have any expression you want, including nextval('seq') in your view. The problem

Re: [PERFORM] [GENERAL] "Hash index" vs. "b-tree index" (PostgreSQL

2005-05-09 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > However: what about storing the things in hashcode order? Ordering uint32s > doesn't seem like any big conceptual problem. > > I think that efficient implementation of this would require explicitly > storing the hash code for each index entry, which we don'

Re: [PERFORM] [GENERAL] "Hash index" vs. "b-tree index" (PostgreSQL

2005-05-10 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > > What if the hash index stored *only* the hash code? That could be useful for > > indexing large datatypes that would otherwise create large indexes. > > Hmm, that could be a thought. Hm, if you go this route of having hash indexes store tuples ordered by

Re: [PERFORM] [GENERAL] "Hash index" vs. "b-tree index" (PostgreSQL

2005-05-10 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > No, not at all, because searching such an index will require a tree > descent, thus negating the one true advantage of hash indexes. The hash index still has to do a tree descent, it just has a larger branching factor than the btree index. btree indexes

Re: [PERFORM] [GENERAL] "Hash index" vs. "b-tree index" (PostgreSQL

2005-05-11 Thread Greg Stark
Neil Conway <[EMAIL PROTECTED]> writes: > I'm posting mainly because I wasn't sure what to do to avoid false positives > in > the case of hash collisions. In the hash AM code it is somewhat awkward to > fetch the pointed-to heap tuple and recheck the scankey.[1] I just did the > first thing that

Re: [GENERAL] regarding IN clause

2005-05-17 Thread Greg Stark
"Surabhi Ahuja " <[EMAIL PROTECTED]> writes: > why is it not searching the indexes(index scan)? and how can i make such a > query much faster? 130 values out of 3,000 is 4.3% of the table. If you have narrow records with, say, 20 per page that would mean reading most of the pages out of the tabl

Re: [GENERAL] numeric precision when raising one numeric to another.

2005-05-19 Thread Greg Stark
"Dann Corbit" <[EMAIL PROTECTED]> writes: > Probably, the important meaningful cases are ones that have small > exponents (HOPEFULLY less than 25) used in interest calculations. No, even in interest calculation floating point arithmetic is perfectly fine. You do your floating point arithmetic to

Re: [GENERAL] Compiling Postgresql 8.0.3 on Solaris 10

2005-05-26 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Aly Dharshi <[EMAIL PROTECTED]> writes: > > alias ls='colorls -al' > > alias rm='rm -i' > > > I don't see any aliases that are going to break the compile process. > > I beg to differ --- I think the ones quoted above match your symptoms > pretty well. So t

[GENERAL] Status of interactive psql's error handling?

2005-06-01 Thread Greg Stark
What's the current status on psql handling typos and interrupts more usefully by automatically encapsulating every statement in a savepoint? I'm just curious whether it's already in for 8.1 or if it got stalled. I ask because I just got bit again by a typo where I accidently deleted the wrong dat

Re: [GENERAL] Deleting orphaned records to establish Ref Integrity

2005-06-02 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > "Roman F" <[EMAIL PROTECTED]> writes: > > > DELETE FROM child_table WHERE parentid NOT IN > > (SELECT parentid FROM parent_table) > > Another idea is to try an outer join: > > SELECT child_table.parentid INTO tmp_table > FROM child_table LEFT

Re: [GENERAL] Determining when a row was inserted

2005-06-03 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > As it happens, the original Berkeley-era Postgres did indeed add > creation and deletion timestamps to every row, as part of their "time > travel" feature. That got ripped out very soon after the code left > Berkeley, because the overhead was just unaccepta

Re: [GENERAL] Hash Function: MD5 or other?

2005-06-14 Thread Greg Stark
Shelby Cain <[EMAIL PROTECTED]> writes: > > My question is: is the builtin MD5 appropriate for this use or should I be > > using a function from pl/something? Figures on collision rates would be > > nice as well - the typical chunk of text is probably 1k-8k. Note that MD5 is slow and CPU-intensiv

Re: [HACKERS] [GENERAL] INHERITS and planning

2005-06-15 Thread Greg Stark
Simon Riggs <[EMAIL PROTECTED]> writes: > If you really do need that many, you can go to the trouble of grouping > them in two levels of nesting, so you have a root table, multiple month > tables and then each month table with multiple day tables (etc). I wonder if testing deeply nested inherita

Re: [GENERAL] Viewing non-system objects in psql

2005-06-16 Thread Greg Stark
"Greg Sabino Mullane" <[EMAIL PROTECTED]> writes: > I maintain that it makes more sense for those few people who regularly look > at system functions to add a "S" than to have everyone else have to do > things such as "\df public." @@aol(me too). fwiw, i think "few" may be a bit optimistic her

Re: [GENERAL] Advice on structure /sequence / trigger

2005-06-16 Thread Greg Stark
David Pratt <[EMAIL PROTECTED]> writes: > I just want to get this right because it will be an important part of what I > am > preparing. Sorry for the really long message but I don't know if it would > make > any sense if I did not fully explain what i am wanting to do. I am not french > so ex

Re: [GENERAL] [HACKERS] [PATCHES] Removing Kerberos 4

2005-06-22 Thread Greg Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Last chance for any Kerberos 4 users to speak up --- otherwise I'll > apply this soon. If you just want someone to test it I can do that. I don't actually use it normally though. As far as security issues the only issues I'm aware of is a) it uses plain DES

[GENERAL] Is there a standard database model for poker?

2005-06-23 Thread Greg Stark
I know poker is just ludicrously popular these days. So surely somebody has thought of storing hands in a relational database already? Has anyone here done so in Postgres? -- greg ---(end of broadcast)--- TIP 8: explain analyze is your friend

<    1   2   3   4   5   6   >