Re: [GENERAL] reporting tools

2007-10-14 Thread Bill Moran
> > Thanks, we're looking for something that will run natively on Linux. I read this, almost deleted it, read it again ... Just in case there's confusion, MONO + FYIReporting _is_ native on Linux. At least, as much so as Java on Linux is. -- Bill Moran http

Re: [GENERAL] Possibilities of Fine Grained Access Control?

2007-10-17 Thread Bill Moran
I simply haven't see the announcement). For that, the best approach I know for you is Veil: http://veil.projects.postgresql.org/curdocs/index.html -- Bill Moran http://www.potentialtech.com ---(end of broadcast)--- TIP 3: Have you checked our ex

Re: [GENERAL] a failover scenario

2007-10-18 Thread Bill Moran
eld devices that are used to record bets/payouts, etc. These devices can't be connected all the time, but a sync system is pretty easy because all they ever do is _add_ new records. Thus, you assign each handheld a unique device ID, and that's part of the primary key fo

Re: [GENERAL] keeping an index in memory

2007-10-21 Thread Bill Moran
PG are you using and what is your shared_buffers setting? With 8G of RAM, you should start with shared_buffers around 2 - 3G, if you're using a modern version of PG. With that much shared memory, a large portion of that index should stay in RAM, as long as it's being us

Re: [GENERAL] looking for some real world performance numbers

2007-10-21 Thread Bill Moran
and when it won't scale any more, deal > with it then. That's sane. > So what would really help me is some real world numbers on how > postgresql is doing in the wild under pressure. If anyone cares to > throw some out I would really appreciate it. http://people.f

Re: [GENERAL] Indexes & Primary Keys (based on the same columns)

2007-10-22 Thread Bill Moran
index so having a second index with the same > definition is redundant. Note the "same definition." Since this is a multi-column index, there may be some advantage gained by having indexes defined slightly differently. I.e., your PK is (ABCD) but you have an additional index on (

Re: [GENERAL] looking for some real world performance numbers

2007-10-22 Thread Bill Moran
y can probably re-invent the concept of an RDBMS if they want to. Yet they don't. I know a particular Googleite who's a PostgreSQL buff and is bummed that they use MySQL all over the place. -- Bill Moran http://www.potentialtech.com ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq

Re: [GENERAL] (Never?) Kill Postmaster?

2007-10-24 Thread Bill Moran
ried -m f first). Luckily, the db in question was such that the front ends didn't suffer horribly from this and reconnected, and that the database finished up its recovery in a timely manner. Hopefully, I can generate a reproducible example so I can file a bug, but haven&

Re: [GENERAL] Calculation for Max_FSM_pages : Any rules of thumb?

2007-11-01 Thread Bill Moran
er the weekend. (is > this sane?) Thanks for the advice.. vacuum full is sane, if that's what you mean. The only problem is that it locks tables while working on them, so you have to take into account what other workload might be blocked while vacuum full is working, and how long vacuum ful

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Bill Moran
sync_method = fsync >effective_cache_size = 30 >random_page_cost = 4 >cpu_tuple_cost = 0.01 >cpu_index_tuple_cost = 0.001 >cpu_operator_cost = 0.0025 > > Are there any tuning that need to be done in the OS or database side? I had > attached the iostat and vmstat results of postgresql -- Bill Moran http://www.potentialtech.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Bill Moran
__ > > > Do You Yahoo!? > > > Tired of spam? Yahoo! Mail has the best spam protection around > > > http://mail.yahoo.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 get through to the mailing list cleanly > > > > ---(end of broadcast)--- > > TIP 9: In versions below 8.0, the planner will ignore your desire to > >choose an index scan if your joining column's datatypes do not > >match > > > > -- > Reg me Please > > ---(end of broadcast)--- > TIP 9: In versions below 8.0, the planner will ignore your desire to >choose an index scan if your joining column's datatypes do not >match -- Bill Moran http://www.potentialtech.com ---(end of broadcast)--- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread Bill Moran
turn the same value than count(*), in a few msecs. I don't think so. What kind of accuracy do you have when rows are deleted? Also, sequences are not transactional, so rolled-back transactions will increment the sequence without actually adding rows. -- Bill Moran http://www.potentialtech.com ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: DB on a ramdisk (was Re: [GENERAL] Temporary, In-memory Postgres DB?)

2007-11-07 Thread Bill Moran
In response to "Gauthier, Dave" <[EMAIL PROTECTED]>: > > One question I had earlier that I don't think got answered was how to > undo an "initdb". "dropdb" drops a DB, but how do I undo an "initdb"? rm -rf the directory in which you

Re: [GENERAL] Syntax error in a large COPY

2007-11-07 Thread Bill Moran
posting (http://tools.ietf.org/html/rfc1855), and considering the fact that this topic has been beat to death on dozens of mailing lists and the predominant preference is _not_ for top-posting -- perhaps you should either follow the preferences of the group, or leave the group. > > But this hor

Re: [GENERAL] Calculation for Max_FSM_pages : Any rules of thumb?

2007-11-08 Thread Bill Moran
re not paying attention to their systems, and therefore the problem has been occurring for a while before it got so bad that they couldn't ignore it. As a result, a full vacuum is frequently a necessity. Folks who are monitoring their databases closely don't hit this problem nearly as often.

Re: [GENERAL] INSERT performance deteriorates quickly during a large import

2007-11-08 Thread Bill Moran
to take advantage of it, then it won't help much anyway. Additionally, you've neglected to mention the disk subsystem on this machine as well. Is it running cheapo SATA drives because the price/gig is right? > * both servers run in x86_64 mode, PostgreSQL footprint in memory st

Re: [GENERAL] Calculation for Max_FSM_pages : Any rules of thumb?

2007-11-13 Thread Bill Moran
In response to Ow Mun Heng <[EMAIL PROTECTED]>: > > On Thu, 2007-11-08 at 12:02 -0500, Bill Moran wrote: > > Frequently, when people ask for help because they've exceed max_fsm*, > > it's because they're not paying attention to their systems, and therefore

Re: [GENERAL] Calculation for Max_FSM_pages : Any rules of thumb?

2007-11-19 Thread Bill Moran
tribute | 3787 | 1403 | 184 | 1292 > > No matter how many times I vacuum/full the deleted number still doesn't > go down. Are you sure you're interpreting that number correctly? I took it to mean a counter of the number of de

Re: [GENERAL] Killing a session on windows

2007-11-29 Thread Bill Bartlett
Use "select pg_cancel_backend()" instead -- we have to do this periodically when queries get timed out by the web server but Postgres doesn't notice / doesn't get notified... - Bill -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf

Re: [GENERAL] Transaction problem

2007-12-04 Thread Bill Moran
quantity n > 0. This means that when the > > > user send the product confirmation to the system, the bd will decrease > > > the product quantity with a transaction if the number of product in > > > stock is greater than zero. > > > > > > >

Re: [GENERAL] PostgreSQL Beta4 released

2007-12-04 Thread Bill Moran
In response to "Joshua D. Drake" <[EMAIL PROTECTED]>: > > Thanks to all the testing, feedback and bug reports the community has > performed with the current betas, we now have our fourth beta > of 8.4. I assume you meant 8.3. -- Bill Moran

Re: [GENERAL] Avoid huge perfomance loss on string concatenation

2007-12-04 Thread Bill Moran
Index Cond: ((kuupaev >= '2007-11-01'::date) AND > (kuupaev <= '2007-12-04'::date))" > " -> Hash (cost=2.27..2.27 rows=27 width=19) (actual time=0.060..0.060 > rows=27 loops=1)" > "-> Seq Scan on artliik (cost=0.00..2.27 ro

Re: [GENERAL] Avoid huge perfomance loss on string concatenation

2007-12-05 Thread Bill Moran
firma1.yksus1 (yksus) MATCH SIMPLE > ON UPDATE CASCADE ON DELETE NO ACTION DEFERRABLE INITIALLY IMMEDIATE, > CONSTRAINT dok_check CHECK (krdokumnr IS NULL OR (doktyyp = ANY > (ARRAY['G'::bpchar, 'O'::bpchar]))), > CONSTRAINT dok_dokumnr_check CHECK (dokumn

Re: [GENERAL] Unreasonable size of table pg 8.2.5

2007-12-06 Thread Bill Moran
indexes, which is one of the reasons that it's not recommended for regular maintenance. Use plain VACUUM instead. If you feel the need to run a VACUUM FULL, always do a REINDEX afterward. Even still, there are apparently some corner cases around that cause index bloat. If

Re: [GENERAL] Hijack!

2007-12-11 Thread Bill Moran
ed and the > complaint rate is vanishingly small. Yet somehow business clanks on. > Imagine that! And I can't even use exchange/outlook -- web interface > to Micro$soft really sucks. Again, you're asking a community to offer you free help in spite of the fact that your tools suck. I&

Re: [GENERAL] top posting

2007-12-11 Thread Bill Moran
is back around to how we hate top-posting and despise top-posters and whatever else it is you're saying. I'm not aware of _anyone_ ever being banned or anything horrible as a result of top-posting. The worst thing that happens is that busy people begin ignoring the th

Re: [GENERAL] Need LIMIT and ORDER BY for UPDATE

2007-12-12 Thread Bill Moran
returned. > > Running a query like this over and over would pop just one record off > the queue and would guarantee an atomic reservation. While I'm not going to argue as to whether your suggestion would be a good idea or not, I will suggest you look at SELECT FOR UPDATE,

Re: [GENERAL] Need LIMIT and ORDER BY for UPDATE

2007-12-13 Thread Bill Moran
In response to "D. Dante Lorenso" <[EMAIL PROTECTED]>: > Bill Moran wrote: > > "D. Dante Lorenso" <[EMAIL PROTECTED]> wrote: > >> All, > >> > >> I'd really like to have ORDER BY and LIMIT for UPDATE and DELETE > >>

Re: [GENERAL] postgres cannot access the server configuration file

2007-12-15 Thread Bill Moran
ctory. Do I > have to create it manually? You need to run initdb to create the directory: http://www.postgresql.org/docs/8.3/static/app-initdb.html -- Bill Moran http://www.potentialtech.com ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] postgres cannot access the server configuration file

2007-12-15 Thread Bill Moran
"Sebastien ARBOGAST" <[EMAIL PROTECTED]> wrote: > > 2007/12/15, Bill Moran <[EMAIL PROTECTED]>: > > "Sebastien ARBOGAST" <[EMAIL PROTECTED]> wrote: > > > > > > I'm trying to start postgreSQL server on my Macbo

Re: [GENERAL] spreadsheet interface

2007-12-17 Thread Bill Moran
> Any suggestions? To add on to Thomas' comment. You can also install OpenOffice.org with the pgsql ODBC driver and use the OOo spreadsheet to access data directly. I haven't done this, personally, so I can't vouch for how well it works. -- Bill Moran http://www.poten

[GENERAL] install problem

2007-12-17 Thread Bill Taylor
windows on top of my old version. zip :-) Can someone tell me what I am doing wrong? We have an end of the year rush and we have a number of people world wide who would be using this once we can actually test it. Bill ---(end of broadcast)--- TIP 3

Re: [GENERAL] multiple version installation in the same machine ????

2007-12-18 Thread Bill Moran
> But when I type psql -l I get this error > -sh-3.00$ psql -l > psql: FATAL: database "postgres" does not exist > > why? Is it not possible to have multiple version installations i the same > machine(in different ports)? PostgreSQL 7.4 doesn't install a "

Re: [GENERAL] Is there PHP mysql_real_escape_string for postgresql?

2007-12-20 Thread Bill Moran
ke_escape_string()? Should PostgreSQL have a pg_pretend_to_escape_string() that effectively does nothing? -- Bill Moran http://www.potentialtech.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] [OT] Slony (initial) Replication - Slow

2008-01-03 Thread Bill Moran
0GB in multiple tables being replicated, including (on the fly) > index creation) 1) It only needs to be done once 2) You can remove the indexes from the replica and add them back in after the initial sync is complete. -- Bill Moran http://www.potentialtech.com ---(

Re: [GENERAL] large table vacuum issues

2008-01-05 Thread Bill Moran
n alternate maintenance between the two. This is something along the RAID 5 argument, no matter how you argue it, it's a bad idea. If you claim you can't afford to buy more hardware, then you made a mistake in pricing out your product to your client. -- Bill Moran http://www.potentialtech.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Sun acquires MySQL

2008-01-16 Thread Bill Moran
In response to dvanatta <[EMAIL PROTECTED]>: > > What's up with 3 of the 7 being from Pennsylvania? What's the connection? Well, as everyone knows, Pennsylvania is a haven for brilliant people. In fact, simply living in Pennsylvania makes you smarter

Re: [GENERAL] advocacy: drupal and PostgreSQL

2008-01-17 Thread Bill Moran
able to accept that Drupal wants to run on more than just MySQL. If he loves MySQL so much, he should join a project that only supports MySQL and leave the Drupal people to their work. There's a LOT of effort in the Drupal community to build code abstractions that will make the system

Re: [GENERAL] advocacy: drupal and PostgreSQL

2008-01-17 Thread Bill Moran
In response to Tom Hart <[EMAIL PROTECTED]>: > Bill Moran wrote: [snip] > > To a large degree, I think Karoly has blown the situation out of > > proportion. Look at how it affects _this_ list every time he starts > > bitching, for example. > > > > >

Re: [GENERAL] Best practices for protect applications agains Sql injection.

2008-01-23 Thread Bill Moran
icious > users. http://www.potentialtech.com/cms/node/49 -- Bill Moran http://www.potentialtech.com ---(end of broadcast)--- TIP 6: explain analyze is your friend

Re: [GENERAL] Getting all tables into memory

2008-01-24 Thread Bill Moran
| 375574 | 3703 > maia_mail_recipients_pkey | 377340 | 3471 > bayes_token_pkey | 447008 | 3200 > awl_pkey | 189259 | 2965 > maia_mail_recipients_idx_recipient_id | 377340 | 2696 > awl

Re: [GENERAL] close connection

2008-01-24 Thread Bill Moran
little more context ... are you writing a C application, or using the psql program or something else? -- Bill Moran http://www.potentialtech.com ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] Disk configurations....

2008-01-24 Thread Bill Moran
> > Would you go with 3x300gb disks or would you use more smaller disks to > > get there? Do NOT use RAID5. Use RAID 10. If you can afford it, get a SCSI RAID controller with battery-backed cache and 15,000 RPM drives. -- Bill Moran http://www.potentialtech.com ---(end of broadcast)--- TIP 5: don't forget to increase your free space map settings

Re: [GENERAL] exporting postgre data

2008-01-25 Thread Bill Moran
l the stuff pg_dump does, but just using a GUI interface to manage all the options. I guess it has the addition of managing the interaction between pg_dump on one server an pg_restore on another as well. Doesn't really have any more features that I'm aware of, just has a nice "one

Re: [GENERAL] VACUUM FULL for performance

2010-10-07 Thread Bill Moran
L is not a silver bullet, and is not _guaranteed_ to improve performance. There are also very few cases where it's a good idea to do it as routine maintenance. However, it is a tool that is useful at times, and it's worthwhile to understand how it works. -- Bill Moran http://www.p

Re: [GENERAL] Problem with initdb: creates database which do not exists

2010-10-18 Thread Bill Moran
) The port provides the variable postgresql_data which can be used to change the rc script's behavior. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Why Select Count(*) from table - took over 20 minutes?

2010-10-26 Thread Bill Moran
e and store it somewhere for quick retrieval. In an MVCC database, count(*) is designed to be accurate, which requires a scan of the entire table (which appears to take about 20 mins on your hardware). MVCC just isn't optimized for a table that never changes. However, it's easy to ca

Re: [GENERAL] What is better method to backup postgresql DB.

2010-10-26 Thread Bill Moran
since you're new to PostgreSQL, I _HIGHLY_ recommend that you don't assume that you're getting backups until you can demonstrate that you can restore them. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-general ma

Re: [GENERAL] 8.4 Data Not Compatible with 9.0.1 Upgrade?

2010-11-01 Thread Bill Moran
umped/recreated, or ran through the new upgrade process (which (as yet) I have no experience with). If the Arch Linux stuff doesn't do that automatically, then you'll have to do it manually. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/

Re: [GENERAL] 8.4 Data Not Compatible with 9.0.1 Upgrade?

2010-11-01 Thread Bill Moran
In response to Carlos Mennens : > On Mon, Nov 1, 2010 at 12:45 PM, Bill Moran wrote: > > I can't speak for Arch Linux' upgrade setup, but going from 8.4 -> 9.0 > > requires that the data directory either be dumped/recreated, or ran > > through the new upgrade

Re: [GENERAL] 8.4 Data Not Compatible with 9.0.1 Upgrade?

2010-11-01 Thread Bill Moran
connect to PostgreSQL simply > because the logs tell me the data is not compatible. Am I missing > something? To clarify my earlier comments, if you're going to use pg_upgrade, you probably won't need to downgrade to 8.4. My comments about putting 8.4 back on would have be necessar

[GENERAL] Group by and lmit

2010-11-02 Thread Bill Reynolds
y has about 5-8k per x. select x, y, count(*) as counter from mytable group by x, y order by x, counter, y I only want the first 500 for each x. Any tips or tricks someone might know would be appreciated. I'm using postgres 8.3.7. Thanks, Bill

Re: [GENERAL] PHP Web Auditing and Authorization

2010-11-03 Thread Bill Moran
s. First, set custom_variable_classes in your postgresql.conf. You can then use the SET command to set variables of that class, and use them in your functions: postgresql.conf: custom_variable_classes='myapp' In your code, run the following query as part of you session instantiation:

Re: [GENERAL] PHP Web Auditing and Authorization

2010-11-03 Thread Bill Moran
In response to "Massa, Harald Armin" : > Bill, > > > > > > > We got this same kind of thing working by using PostgreSQL env variables. > > First, set custom_variable_classes in your postgresql.conf. You can then > > use the SET command to set

Re: [GENERAL] Linux

2010-11-04 Thread Bill Moran
you'll probably have a distro that you'll be happy with. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Vacuuming and reindexing tables that I don't own

2010-11-10 Thread Bill Moran
I can GRANT on the table to allow the application user to VACUUM it. Anyone have any suggestions for this, short of creating a superuser account for this particular process to connect as? -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-

Re: [GENERAL] Understanding Schema's

2010-12-14 Thread Bill Moran
ou're starting out, an easy way to think of schemas is like directories on an operating system. It's not an exact analogy, but it helps one to understand the purposes, benefits, etc. -Bill -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] DB files, sizes and cleanup

2010-12-17 Thread Bill Moran
atbases and restoring them, as a vacuum full might take a very, very long time. If you can demonstrate that the cause of this is table bloat, then I would go through all your databases and do a vacuum full/reindex or do a dump/restore if the problem is very bad. Once you have

Re: [GENERAL] Concatenating several rows with a semicolon

2010-12-28 Thread Bill Moran
it appears as if your yw field is a textual field being used to store a date, so I expect you have bigger problems coming down the pike. In all essence, you XML should probably look like this: ... etc ... And that yw field should be replaced with a week_ending field that is a date type. You can extract that into year and week using date_part(). Just 15 years of DB experience making me antsy ... does this make me one of those people who freak out when someone says something wrong on a message board and just _HAS_ to correct them? -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Concatenating several rows with a semicolon

2010-12-28 Thread Bill Moran
In response to Alexander Farber : > Hello Bill and others, > > I don't agree about yw being a bad thing > since I have weekly raings in my app, > but your XML suggestion - Do as you like, but I'll bet my reputation that decision will become an unnecessary limitation fo

Re: [GENERAL] Date Parameter To Query Confusing Optimizer

2011-01-04 Thread Bill Moran
7;t want to put a > database-specific SQL query in place. You could do "BEWTEEN CAST(? AS DATE) AND CAST(? AS DATE)" and it wouldn't be database-specific. You might also want to consider top-posting. I'm not sure why I read enough of this to understand it, as I usually g

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Bill Moran
be part of a unique seed for UUIDs, or (b) be a prefix to a autonumber ID that would be a lot easier to read and work with manually. In the end, we chose b for the human factor. Face it, reading, remembering, and typing UUIDs kinda sucks. -- Bill Moran http://www.potentialtech.com http://people.c

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Bill Moran
In response to Scott Ribe : > On Jan 5, 2011, at 8:05 AM, Bill Moran wrote: > > > Beyond that, the namespace size for a UUID is so incomprehensibly huge > > that the chance of two randomly generated UUIDs having the same value > > is incomprehensibly unlikely > >

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Bill Moran
In response to Rob Sargent : > > > On 01/05/2011 08:55 AM, Bill Moran wrote: > > In response to Scott Ribe : > > > >> On Jan 5, 2011, at 8:05 AM, Bill Moran wrote: > >> > >>> Beyond that, the namespace size for a UUID is so incomprehensibly h

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Bill Moran
In response to Scott Ribe : > On Jan 5, 2011, at 8:55 AM, Bill Moran wrote: > > > That statement demonstrates a lack of investigation and/or consideration > > of the circumstances. > > No, it doesn't. > > > However, if there are 5000 devices generating

Re: [GENERAL] UUID column as pimrary key?

2011-01-05 Thread Bill Moran
ve a guarantee is one of the options, why would you take ANY risk at all, no matter how small? (BTW: I hope that the people who think that the risk is acceptable aren't writing medical software. Even if it only kills one person every 10,000 years because they were given the wrong medicine,

Re: [GENERAL] UUID column as pimrary key?

2011-01-06 Thread Bill Moran
Use them anyway if you want. As far as statistics are concerned, the chance that someone as batfuck insane as Hitler would rise to power in a major country is 1 in 1,102,196,287,287,859,992,396,273,293,203 -- yet it happened. There. I Godwined the damn thing. -- Bill Moran http://www.potentialtech

[GENERAL] Apology

2011-01-06 Thread Bill Moran
r flamewar that I have been contributing to. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] UUID column as pimrary key?

2011-01-06 Thread Bill Moran
y to take lives. The possibility of collisions is not fallacious, however, the use of "infinite" (I don't remember who wrote that) is obviously not correct. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Remote Connection

2011-01-10 Thread Bill Moran
ng and what version does Delphi think you're using? It seems to me that the Delphi IDE is connecting differently than the app it compiles for you, and that said app is trying to set a configuration parameter that doesn't exist, then aborting when that fails. Can't im

Re: [GENERAL] My DataBase can't accept conntecion

2011-01-12 Thread Bill Moran
of the config parameter will fix the problem. More serious issues are possible, such as client programs going idle and never releasing the connection, but I wouldn't assume such problems until you have evidence. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] database slowdown

2011-01-18 Thread Bill Moran
gt; > this? (raid, scsi, etc) > > Does ps ever show 'idle in transaction'? > > Have you checked pg_locks to see what you are waiting on? > > Have you watched vmstat while its at 80% full vs when its at 80% free? > >  (does the iowait go up?) > > > > >

Re: [GENERAL] ERROR: index row requires 9984 bytes, maximum size is 8191

2011-01-19 Thread Bill Moran
error with your function, although it looks simple enough. What is the output of SELECT MAX(octet_length(email)) FROM users; and SELECT MAX(octet_length(reverse(email))) FROM users; -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-gen

Re: [GENERAL] Copying databases with extensions - pg_dump question

2011-01-21 Thread Bill Moran
en that will be faithfully preserved when the database is restored. What are you doing to cause it to behave differently? -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make ch

Re: [GENERAL] Copying databases with extensions - pg_dump question

2011-01-21 Thread Bill Moran
In response to Ivan Voras : > On 21/01/2011 14:39, Bill Moran wrote: > > In response to Ivan Voras: > > > >> A fairly frequent operation I do is copying a database between servers, > >> for which I use pg_dump. Since the database contains some extensions - >

Re: [GENERAL] Server stops responding in every week

2011-01-21 Thread Bill Moran
SELECT * FROM pg_locks; If there are exclusive locks being held by some process that kicks off once a week, it could block anything else from occurring. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-general mailing list (pgsq

Re: [GENERAL] Store base64 in database. Use bytea or text?

2011-01-25 Thread Bill Moran
ut escaping anything. Personally, I'd use text. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Store base64 in database. Use bytea or text?

2011-01-25 Thread Bill Moran
lly > store it as bytea. Base64 probably isn't even a particularly good > choice for escaping binary, let alone storing it. > > You should just use a generic escaping function. libpq has > PQescapeByteaConn(), for example. A warning: last I checked, PHP's pg_escap

Re: [GENERAL] Store base64 in database. Use bytea or text?

2011-01-26 Thread Bill Moran
_data = pg_unescape_bytea($row['bytea_field']); (note that I may have omitted some steps for clarity) DO NOT use parametrized queries with PHP and bytea (I hate to say that, because parametrized fields are usually a very good idea). PHP has a bug that mangles bytea data when pushed

Re: [GENERAL] Why does my DB size differ between Production and DR? (Postgres 8.4)

2011-02-02 Thread Bill Moran
the master database will be interrupted while you do maintenance (step 1a does not interrupt other work going on). Schedule downtime for about 2x that time, just in case things run a little longer. 3) Run steps 1a - 1c on the master. Start 1a before your maintenance window starts, with

[GENERAL] Why does a normally fast query run so slow when the table is in a partition?

2011-02-02 Thread Bill Thoen
37)) -> Index Scan using clu_co_pkey on clu_co clu (cost=0.00..8.31 rows=1 width=48) (actual time=0.090..0.096 rows=1 loops=1) Output: vfm.clu.source_disc, vfm.clu.ogc_fid, vfm.clu.statecd, vfm.clu.countycd, vfm.clu.tractnb

Re: [GENERAL] Why does a normally fast query run so slow when the table is in a partition?

2011-02-03 Thread Bill Thoen
27;s intolerant of inconsistency. Probably a good thing for a database. On 2/2/2011 3:10 PM, Steve Crawford wrote: On 02/02/2011 01:35 PM, Bill Thoen wrote: Steve Crawford wrote: On 02/02/2011 12:17 PM, Bill Thoen wrote: I've got a large (and growing) database set up as a partitioned d

Re: [GENERAL] how to avoid repeating expensive computation in select

2011-02-03 Thread Bill Moran
is more practical for you depends on a number of factors about the table, the data, and the function. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Directing Partitioned Table Searches

2011-02-04 Thread Bill Thoen
some queries w/o the overhead of searching partitions unnecessarily. Can it be done? Regards, -- *Bill Thoen* GISnet - www.gisnet.com <http://www.gisnet.com/> 1401 Walnut St., Suite C Boulder, CO 80302 303-786-9961 tel 303-443-4856 fax bth...@gisnet.com -- Sent via pgsql-general mailin

Re: [GENERAL] Directing Partitioned Table Searches

2011-02-07 Thread Bill Thoen
pecify the MI table instead of the base clu table. Thanks. That sounds simple enough. Since I want to automate this, I guess the next step is to learn how to create and execute a "dynamic" query. I think I know how to do that. -- *Bill Thoen* GISnet - www.gisnet.com <http:

Re: [GENERAL] Schema version control

2011-02-10 Thread Bill Moran
t; > Or some kinda flags like: > create table dbver(key text); > > then an update would be named: "add xyz to bob". > > then the update code: > > q = select key from dbver where key = 'add xyz to bob'; > if q.eof then > alter table bo

Re: [GENERAL] Schema version control

2011-02-10 Thread Bill Moran
In response to Andy Colson : > On 2/10/2011 4:18 PM, Bill Moran wrote: > > > > We have this kickass solution we built at work called dbsteward that > > just takes care of all of this for us, automatically. You just give > > it the new version and the old vers

Re: [GENERAL] Schema version control

2011-02-10 Thread Bill Moran
In response to Rob Sargent : > Top-posting is frowned upon by some (not me), but since Bill started it... Oops ... the weird thing is that I'm usually really anal about not top- posting ... > I for one will be waiting to see your dbsteward. How does it compare > functionally or

Re: [GENERAL] Schema version control

2011-02-10 Thread Bill Moran
In response to Thomas Kellerer : > Bill Moran wrote on 10.02.2011 23:59: > > The overview: > > You store your schema and data as XML (this is easy to migrate to, because > > it includes a tool that makes the XML from a live database) > > Keep your XML schema files in s

Re: [GENERAL] Schema version control

2011-02-10 Thread Bill Moran
In response to Rob Sargent : > > On 02/10/2011 03:59 PM, Bill Moran wrote: > > In response to Rob Sargent : > >> I for one will be waiting to see your dbsteward. How does it compare > >> functionally or stylistically with Ruby's migration tools (which

Re: [GENERAL] Schema version control

2011-02-10 Thread Bill Moran
In response to Glenn Maynard : > On Thu, Feb 10, 2011 at 6:44 PM, Bill Moran wrote: > > > dbsteward can do downgrades ... you just feed it the old schema and > > the new schema in reverse of how you'd do an upgrade ;) > > > > Oh, also, it allows us to do insta

Re: [GENERAL] Schema version control

2011-02-11 Thread Bill Moran
to come live in the next few months. -- Bill Moran http://www.potentialtech.com http://people.collaborativefusion.com/~wmoran/ -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] Schema version control

2011-02-11 Thread Bill Moran
In response to Alban Hertroys : > On 10 Feb 2011, at 23:59, Bill Moran wrote: > > > The overview: > > You store your schema and data as XML (this is easy to migrate to, because > > it includes a tool that makes the XML from a live database) > > Keep your XML schem

Re: [GENERAL] plsql question

2011-02-11 Thread Bill Thoen
On 2/10/2011 6:40 PM, Geoffrey Myers wrote: I am trying to write a plsql routine that will delete a range of characters based on their octal or hexadecimal values. Something like the 'tr' shell command will do: cat file| tr -d ['\177'-'\377'] Can't seem to figure this one out. Pointers woul

Re: [GENERAL] Deadlock on the same select for update

2011-02-21 Thread Bill Moran
Process 11884: SELECT * FROM teddy WHERE id IN > (112747007,112747008,112747011,112747013,112747015,112747016,112747020,112747021,112747022,112747024,112747025,112747028,112747030,112747032,112747034,112747035,112747038,112747043,112747044,112747045,112747050,112747052,112747053) > FOR UPDATE My experience is that you have no guarantee what order SELECT FOR UPDATE will lock those rows in, thus the chance for deadlock is there. -- Bill Moran http://www.potentialtech.com http://

Re: [GENERAL] Permission denied when inserting

2011-02-28 Thread Bill Moran
> > Access privileges > > ----++---+--- > > > > public | out2cp | table | > > {swcoll=r/petrcech,swcgi=r/petrcech,s

Re: [GENERAL] Thousands of users using one schema -> ERROR: row is too big

2011-03-01 Thread Bill Moran
If so, when do you think it is reasonable > to include it? I would think that a better solution would be to follow best practices and create roles and put users in those roles, so you don't have to have so many grants on objects. -- Bill Moran http://www.potentialtech.com http:/

Re: [GENERAL] Grant question

2011-03-02 Thread Bill Moran
ar "B_USER" > > SQL state: 42601 > > Character: 42 You're missing case folding. B_USER != b_user, and when you don't put quotes around it, the case is folded to lower case. My personal experience advises against using case-sensitive anything in an SQL database, bu

Re: [GENERAL] Logic AND between some strings

2011-03-07 Thread Bill Thoen
Just to make sure, you're asking for the logical AND, not the bitwise AND? In other words you're not talking about getting into bit shifting with << and >> and masking with &? For the logical AND, you need to use expressions that evaluate to TRUE or FALSE, and follow the rules in this "truth t

Re: [GENERAL] PG and dynamic statements in stored procedures/triggers?

2011-03-07 Thread Bill Thoen
On 3/7/2011 7:55 AM, Adrian Klaver wrote: On Monday, March 07, 2011 6:45:11 am Durumdara wrote: Hi! Thanks! How do I create "cursor" or "for select" in PGSQL with dynamic way? For example :tbl = GenTempTableName() insert into :tbl... insert into :tbl... insert into :tbl... for select :part

<    1   2   3   4   5   6   7   8   9   10   >