Re: [GENERAL] Storing images in PostgreSQL databases (again)

2006-10-12 Thread Robert L Mathews

Michelle Konzack [EMAIL PROTECTED] wrote:


I do this already but have problems since I have
stored arround 130 million files on a server...


 ...


MD5 hashes are 32 Bytes long, maybe they change
it to 64 Bytes?

I have already over 2000 collisions and checked
it, that the files are NOT the same.


You mean you have 2000 collisions out of the checksums of 130 million 
different files? That can't be right.


An MD5 hash is 128 bits, and using the values found in 
http://en.wikipedia.org/wiki/Birthday_attack, you don't reach a 50% 
chance of a single collision until you've checksummed 2.2 x 10^19 
different inputs. That's, ummm, 22,000,000,000,000,000,000, I think, 
which is much larger than 130,000,000.


In other words, you should not expect even a single collision until you 
have 169,230,769,231 times as many files as you currently have, which 
should not be a issue before the end of the useful life of the solar system.


If you have 2000 collisions after 130 million different files (or even 
if you have two collisions), something is almost certainly wrong with 
your code, unfortunately.


--
Robert L Mathews

 The trouble with doing something right the first time is
  that nobody appreciates how difficult it was.

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [GENERAL] PostgreSQL 8.0 Feature List?

2004-08-10 Thread Robert L Mathews
At 8/10/04 9:30 AM, [EMAIL PROTECTED] wrote:

Slony-I is released... [snip]

 
 Also, what is the etymology of the term Slony?

Elephants, especially this one: http://slony.info

Is the project called Slony-1 or Slony1 (numeral one), or Slony-I 
(uppercase i)?

It appears to be referred to multiple ways, even on the Web site, which 
means that it's difficult to search for and I don't know how to pronounce 
it when I talk to other people.

(I'm convinced that hard-to-pronounce names make people decide not to 
mention cool things to other people for fear they'll look stupid, 
directly resulting in less word-of-mouth.)

-- 
Robert L Mathews, Tiger Technologies  http://www.tigertech.net/

 Ignorance more frequently begets confidence than does knowledge.
   -- Darwin


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


[GENERAL] libpq.so.2 and postgresql-libs-7.3.3 RPM

2003-06-28 Thread Robert L Mathews
I have a Red Hat 7.3 box, and I updated from PostgreSQL 7.2.3 to 7.3.3 
via RPM (the PGDG RPMs). When I did so, Perl DBD::Pg routines started 
failing, breaking various scripts, and I had to downgrade to PostgreSQL 
7.2.3 again in somewhat of a rush as I sorted things out.

The problem was that the postgresql-libs-7.3.3-1 RPM package advertises 
itself as providing libpq.so.2, when in fact it does not do so: it 
provides only libpq.so.3.

Other packages (in particular, perl-DBD-Pg) rely on libpq.so.2 being 
present, so upgrading makes them stop working. That would be okay -- 
people should obviously upgrade perl-DBD-Pg at the same time -- but the 
problem is that the incorrect Provides: libpq.so.2 prevents any sort of 
warning from being shown, so people don't know that there's a problem in 
advance.

It appears from a Google search that other people have had this problem:

  http://groups.google.com/groups?q=libpq.so.2+rpm+7.3.1

A few people recommend simply symlinking libpq.so.2 - libpq.so.3, but 
that seems to defeat the purpose of changing the library version.

Anyway: unless I'm missing something, shouldn't the Provides: 
libpq.so.2 be removed from the RPM source spec to prevent this problem? 
Alternately, if it _is_ safe to symlink to libpq.so.3, shouldn't the RPM 
do that?

-- 
Robert L Mathews, Tiger Technologies


---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send unregister YourEmailAddressHere to [EMAIL PROTECTED])


[GENERAL] Re: Postgres hangs during VACUUM (autocommit = false)

2001-08-21 Thread Robert L Mathews

At 8/21/01 3:51 PM, Mark Coffman wrote:

I am having trouble with setting up a scheduled VACUUM.  Since VACUUM needs
an exclusive lock, I can never get it to run.  I am using persistant
connections from a web server and use a single module to make the
connection.  I cannot autocommit because I need transactions.

So a ps gives several similar processes:

postgres 24298  0.6  1.1  6548 2964 ?S14:00   0:15 postgres:
httpd epilogue [local] idle in transaction
postgres 24345  0.7  1.1  6496 2984 ?S14:01   0:15 postgres:
httpd epilogue [local] idle in transaction
postgres 24391  0.9  1.1  6488 2900 ?S14:02   0:19 postgres:
httpd epilogue [local] idle in transaction

I've tried doing a $dbh-commit() ; but that does no good.  I read all the
posts I could find on this, but is there any way for me to schedule a VACUUM
that won't hang?

Where are you trying your $dbh-commit()? You need to put it at the end 
of the transactions from your Web server, even if the Web server only did 
a select and didn't modify anything.

I had the same problem you're having, and found I wasn't using the commit 
after I did a select. Adding $dbh-commit() as the last thing the 
persistent Web client does, in all cases, fixed it.

--
Robert L Mathews, Tiger Technologies


---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster



[GENERAL] Re: erServer beta

2001-04-15 Thread Robert L Mathews

At 4/15/01 3:20 PM, The Hermit Hacker [EMAIL PROTECTED] wrote:

everything that is currently available is actually in contrib right now
... Thomas is currently working on tools for it, but nothing ready for
even beta testing yet ..

Hmmm? At http://www.erserver.com/, there's a page that starts off:

"eRServer was released for Beta on December 24, 2000."

And then it has links to download eRServer tools from the pgsql.com site.

Is this different from what's in the contrib directory? I've never quite 
been able to get straight in my head whether eRServer is an Open Source 
project, or whether it's initially closed source and planned to be 
released as Open Source later, or what; there was lots of confusing talk 
about it a while back (confused me, anyway).

Can someone in the know give us a definite explanation of what kind of 
project eRServer is, how it's going to be developed, what its current 
state is, etc.? I really could use replication, but it doesn't seem clear 
whether the eRServer stuff is going be further developed in a way that I 
could use (what's there is somewhat unpolished so far, although the 
initial effort is appreciated).

--
Robert L Mathews, Tiger Technologies


---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]