[GENERAL] Which is faster: md5() or hashtext()?

2010-11-05 Thread Henry C.
G'day,

I need to do a mass update on about 550 million rows (I will be breaking it up
into chunks based on id value so I can monitor progress).

Hashing one of the columns is part of the process and I was wondering which is
more efficient/faster:  md5() or hashtext()?

hashtext() produces a nice tight integer value, whereas md5() produces a fixed
string.  My instinct says hashtext(), but there may be a lot more to hashext()
than meets the eye.

Any ideas?

Thanks
Henry


-- 
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] Which is faster: md5() or hashtext()?

2010-11-05 Thread Grzegorz Jaśkiewicz
Timing is on.
psql (9.1devel)
Type help for help.

# select count(hashtext(a::text)) FROM generate_series(1,1) a;
 count
---
 1
(1 row)

Time: 106.637 ms
# select count(hashtext(a::text)) FROM generate_series(1,100) a;
  count
-
 100
(1 row)

Time: 770.823 ms
# select count(md5(a::text)) FROM generate_series(1,100) a;
  count
-
 100
(1 row)

Time: 1238.453 ms
# select count(hashtext(a::text)) FROM generate_series(1,100) a;
  count
-
 100
(1 row)

Time: 763.169 ms
# select count(md5(a::text)) FROM generate_series(1,100) a;
  count
-
 100
(1 row)

Time: 1258.958 ms


I would say hashtext is consequently beating md5 in terms of performance here.

Just remember, that it returns integer, unlike md5 that returns text.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Cloning database without dump/restore

2010-11-05 Thread Andrus
Only port 5432 is opened in server. Database can cloned using pg_dup / 
pg_restore
If server is located in internet this requires huge amount of time and 
bandwidth.


How to clone database fast ?
How to create server side pl/pgsql script which use code like in 
pg_dump/pg_restore and or in pg_migrator and clones existing database or 
other idea ?


Andrus. 



--
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] Cloning database without dump/restore

2010-11-05 Thread Grzegorz Jaśkiewicz
read documentation on backups.

-- 
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] Which is faster: md5() or hashtext()?

2010-11-05 Thread Henry C.
On Fri, November 5, 2010 09:52, Grzegorz Jaśkiewicz wrote:
 Timing is on.
 I would say hashtext is consequently beating md5 in terms of performance
 here.

nice concise answer, thanks Grzegorz.


-- 
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] Please Help...

2010-11-05 Thread Craig Ringer
On 04/11/10 16:58, Gavin Burrows wrote:

 I have literally been researching this for weeks! Now I feel I have
 reached a point where this has become an impossible task so I need help
 from the experts please :]

It sounds like you have Group Policy restrictions on password strength
in place.

You need to be more specific. PostgreSQL version, where you got it from,
Windows version, is it on a Windows domain or standalone, etc. If you're
installing on Windows 2008 server than there are password strength
requirements in place by default.


-- 
Craig Ringer

Tech-related writing: http://soapyfrogs.blogspot.com/

-- 
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] Installing PostgreSQL on Windows 7 64-bit system

2010-11-05 Thread Craig Ringer
On 05/11/10 00:50, Christopher Farah wrote:
 Hi,
 
 I've read through numerous forums
 http://forums.enterprisedb.com/posts/list/2328.page to get past the
 following error An error occurred executing the Microsoft VC++ runtime
 installer.
 
 As far as I can tell, the error can arise if user privileges are not
 correctly set or if a firewall or anti-virus software is interrupting
 the install. Having said that, I have tried a few work-arounds but need
 a systematic way to get this installed. Please direct me to the correct
 forums or troubleshooting required to install postgres.

http://wiki.postgresql.org/wiki/Running_%26_Installing_PostgreSQL_On_Native_Windows#Common_installation_errors

http://wiki.postgresql.org/wiki/Troubleshooting_Installation


-- 
Craig Ringer

Tech-related writing: http://soapyfrogs.blogspot.com/

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Problem with frequent crashes related to semctl

2010-11-05 Thread Adrian Maier

Hello !

I am running PostgreSQL 8.3.5 on a linux machine (Ubuntu 10.04).
Sometimes it happens that connecting to the database fails with error :

FATAL:  semctl(360458, 3, SETVAL, 0) failed: Invalid argument (PGError)

If i restart postgres the problem gets fixed.  It doesn't matter how do i
connect to the database :  i saw this happening from psql, from jdbc, and
from ruby.


The pgsql configuration is the default one : i have changed only
listen_addresses and the port.


However, the machine is configured with some pretty large values for POSIX 
queues:

  fs.mqueue.msgsize_max=2621440
  fs.mqueue.msg_max=10240
  fs.mqueue.queues_max=10240

Also, the user is unlimited in regards to queues in /etc/security/limits/conf :
  am  hardmsgqueueunlimited

These are needed for another application running on the same machine (which
performs some heavy communication via POSIX queues).  I am not sure whether
this can interfere with the semaphores used by postgres ...


Does the situation described above ring any bell for anyone? Any suggestion
about how to analyse deeper the problem ?


I am also aware that the error happened also on another machine (Fedora linux)
that has the same mqueue settings.


Best regards,
Adrian Maier


PS:   Here is an example log file :

LOG:  database system was shut down at 2010-11-04 16:50:35 EET
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started
FATAL:  semctl(360458, 6, SETVAL, 0) failed: Invalid argument
FATAL:  semctl(360458, 3, SETVAL, 0) failed: Invalid argument
FATAL:  semctl(360458, 2, SETVAL, 0) failed: Invalid argument
LOG:  received smart shutdown request
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
LOG:  semctl(327689, 0, IPC_RMID, ...) failed: Invalid argument
LOG:  semctl(360458, 0, IPC_RMID, ...) failed: Invalid argument




--
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] Cloning database without dump/restore

2010-11-05 Thread Andreas Schmitz


snapshot might be the keyword you're looking for.

regards

andreas


On 11/05/2010 09:06 AM, Andrus wrote:
Only port 5432 is opened in server. Database can cloned using pg_dup / 
pg_restore
If server is located in internet this requires huge amount of time and 
bandwidth.


How to clone database fast ?
How to create server side pl/pgsql script which use code like in 
pg_dump/pg_restore and or in pg_migrator and clones existing database 
or other idea ?


Andrus.




--
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] Problem with frequent crashes related to semctl

2010-11-05 Thread Tom Lane
Adrian Maier adrian.ma...@thalesgroup.com writes:
 I am running PostgreSQL 8.3.5 on a linux machine (Ubuntu 10.04).
 Sometimes it happens that connecting to the database fails with error :

  FATAL:  semctl(360458, 3, SETVAL, 0) failed: Invalid argument (PGError)

 If i restart postgres the problem gets fixed.  It doesn't matter how do i
 connect to the database :  i saw this happening from psql, from jdbc, and
 from ruby.

The most likely theory is that something deleted Postgres' semaphores
out from under it.  You could check this by noting the output of ipcs -s
while the database is running normally, and then comparing to the output
after it starts to fail.

If that does seem to be what's happening, look around for root-executed
scripts doing ipcrm calls.

regards, tom lane

-- 
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] Linux

2010-11-05 Thread David Siebert
I would say that if you pick any of the big four you will be fine.
CentOS
Ubuntu Server LTS
Red Hat
Suse
Debian can also be a good choice.
We used to be an OpenSuse shop but we are now moving everything to
Ubuntu Server LTS. I can not say enough good things about CentOS as far
as stability and long support times.


On 11/4/2010 11:00 AM, Michael Gould wrote:

 I know that this is probably a religion issue but we are looking to
 move Postgres to a Linux server.  We currently have a Windows 2008 R2
 active directory and all of the other servers are virtualized via
 VMWare ESXi.  One of the reasons is that we want to use a 64 bit
 Postgres server and the UUID processing contrib module does not
 provide a 64 bit version for Windows.  I would also assume that the
 database when properly tuned will probably run faster in a *inx
 environment.

 What and why should I look at certain distributions?  It appears from
 what I read, Ubanta is a good desktop but not a server.

  

 Best Regards

 
 Michael Gould, Managing Partner
 Intermodal Software Solutions, LLC
 904.226.0978
 904.592.5250 fax



[GENERAL] Modfying source code to read tuples before and after UPDATE...how to?

2010-11-05 Thread rmd22

Hello there,

I am a total novice to Postgresql, but very much interested in learning how
it works.

I have to modify the source code of Postgresql-9.0.1 such that whenever I
run an UPDATE command it should print out the old and new tuples. Since I am
a beginner I would appreciate it a lot if anyone of you out there could
point me in right direction. Which files will I need to modify to get the
desired results? 
-- 
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Modfying-source-code-to-read-tuples-before-and-after-UPDATE-how-to-tp3251651p3251651.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Modfying source code to read tuples before and after UPDATE...how to?

2010-11-05 Thread rmd22

Hello there,

I am a total novice to Postgresql, but very much interested in learning how
it works.

I have to modify the source code of Postgresql-9.0.1 such that whenever I
run an UPDATE command it should print out the old and new tuples. Since I am
a beginner I would appreciate it a lot if anyone of you out there could
point me in right direction. Which files will I need to modify to get the
desired results?
 
-- 
View this message in context: 
http://postgresql.1045698.n5.nabble.com/Modfying-source-code-to-read-tuples-before-and-after-UPDATE-how-to-tp3251612p3251612.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Alter Table + Default Value + Serializable

2010-11-05 Thread Sébastien Lardière
Hi,

I've got a problem with a query run on production system. We've got some
data export in a serializable transaction, and, 2 days ago, someone ran
a DDL ( alter table foo add column ba test default 'blabla'), and then,
the data export is empty. I try to reproduce the scenario below :

begin ;
drop table if exists test ;
create table test ( id serial primary key, t text ) ;
insert into test ( t ) values ( 'test1') ;
insert into test ( t ) values ( 'test2') ;
insert into test ( t ) values ( 'test3') ;
commit ;

-- session 1|-- session 2
begin ; |
alter table test|
  add column toto int   |
  default 1 ;   |
|begin ;
|set transaction isolation level serializable ;
|select * from test ;
|
|
commit ;|
| id | t | toto
|+---+--
|(0 rows)
|
|commit ;
|
|select * from test ;
| id |   t   | toto
|+---+--
|  1 | test1 |1
|  2 | test2 |1
|  3 | test3 |1
|(3 rows)


I can't understand why, in the 2nd session, my serialisable transaction
see 0 rows ? It's not true, there is rows.

If the DDL in the first transaction doesn't have 'default 1', the
transaction see the 3 rows. If my transaction in the 2nd session is
'read committed', the same.

What's happen with the the serializable transaction and the default ?

Cheers,

-- 
Sébastien


-- 
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] Alter Table + Default Value + Serializable

2010-11-05 Thread Sébastien Lardière
On 11/05/2010 04:28 PM, Sébastien Lardière wrote:
 Hi,

 I've got a problem with a query run on production system. We've got some
 data export in a serializable transaction, and, 2 days ago, someone ran
 a DDL ( alter table foo add column ba test default 'blabla'), and then,
 the data export is empty. I try to reproduce the scenario below :

I forgot to mention that this scenario works with 8.3 and 9.0.

-- 
Sébastien


-- 
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] Cloning database without dump/restore

2010-11-05 Thread John R Pierce

On 11/05/10 1:06 AM, Andrus wrote:
Only port 5432 is opened in server. Database can cloned using pg_dup / 
pg_restore
If server is located in internet this requires huge amount of time and 
bandwidth.




you can't log onto the server, no ssh? thats a harsh constraint.

moving the data to another server will require significant amounts of 
time and bandwidth, yes.  I don't believe there's any way to avoid that.




How to clone database fast ?
How to create server side pl/pgsql script which use code like in 
pg_dump/pg_restore and or in pg_migrator and clones existing database 
or other idea ?


roughly, for every object in the database (pick through the pg_catalog), 
create an equivalent table in the new database...wait.   pl/pgsql 
can't connect to another database, at least not without a package like 
dblink ...  then copy all the data from the source table to the 
destination table.


This will have to move the same amount of data over the network to the 
new server, there's no way to avoid that.




--
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] Modfying source code to read tuples before and after UPDATE...how to?

2010-11-05 Thread Raymond O'Donnell

On 05/11/2010 11:17, rmd22 wrote:


Hello there,

I am a total novice to Postgresql, but very much interested in learning how
it works.

I have to modify the source code of Postgresql-9.0.1 such that whenever I
run an UPDATE command it should print out the old and new tuples. Since I am
a beginner I would appreciate it a lot if anyone of you out there could
point me in right direction. Which files will I need to modify to get the
desired results?


When you say print out, what do you mean exactly? Also, could you 
achieve what you want with a trigger?


Ray.

--
Raymond O'Donnell :: Galway :: Ireland
r...@iol.ie

--
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] Alter Table + Default Value + Serializable

2010-11-05 Thread Tom Lane
=?ISO-8859-1?Q?S=E9bastien_Lardi=E8re?= slardi...@hi-media.com writes:
 I've got a problem with a query run on production system. We've got some
 data export in a serializable transaction, and, 2 days ago, someone ran
 a DDL ( alter table foo add column ba test default 'blabla'), and then,
 the data export is empty. I try to reproduce the scenario below :

[ serializable transaction reading from recently-rewritten table ]

Yeah, that's going to be a problem.  By the time the serializable
transaction gets to read the altered table, it's a new table all of
whose rows were inserted by the ALTERing transaction.  So none of them
are visible to the serializable transaction's snapshot.  I don't think
there's a lot that can be done about that.  There are some people
working on a reimplementation of serializable mode, but I'm not sure
that it addresses this particular issue; and even if it does, the
likely behavior would be that the serializable transaction would fail
outright rather than give you a surprising view of the table.

It's possible to defend against this type of scenario in the
serializable transaction: lock all the tables you want to touch
before starting the first SELECT.  For instance

begin;
set transaction isolation level serializable ;
lock table test in access share mode;
select * from test;
...

This ensures you don't take your snapshot until any concurrent ALTERs
have committed.  This might not be too practical for everyday work,
of course, but if you have to have a fix that's what to do.

regards, tom lane

-- 
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] Alter Table + Default Value + Serializable

2010-11-05 Thread Sébastien Lardière
On 11/05/2010 05:19 PM, Tom Lane wrote:
 and even if it does, the
 likely behavior would be that the serializable transaction would fail
 outright rather than give you a surprising view of the table.

thanks for your answer,

I have to say that I would prefer an error in the serializable
transaction, instead of the actual behavior

Nevertheless, thank you, we will lock our tables

regards,

-- 
Sébastien


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] update one table from multiple tables postgres

2010-11-05 Thread akp geek
Hi All -

  I need to update one table with the data from multiple
tables.

   1. I have created a trigger on a table table
   2. Create a view with all the logic
   3. created a trigger funtion.
with in the function, I have tried to populate the table, but I am not able
to get hold of the data from the other tables where there is no trigger on
those tables.

Can you please help giving me suggestion on how to implement it

Kind Regards


[GENERAL] PITR on different machine/architecture?

2010-11-05 Thread Andreas Brandl
Hi,

we are implementing archiving/PITR for a postgresql instance operating on 
OpenBSD/64-bit. Is it possible to restore the backup on a completely different 
machine (i.e. other OS/32-bit)? What about restoring on (slightly) different 
versions of postgresql?

Thanks!

Best regards,
Andreas 


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] experience with tags schemas

2010-11-05 Thread Matthieu Huin

Greetings,

Does anyone here have any experience with tags schemas on postgresql ?

I am struggling with a schema inspired by scuttle described here :

http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html

Performances drop dramatically when the data set increases. Is it 
normal and I should look at other data structures ? Or am I doing 
something wrong ?


If you need more information, I'll be happy to give it to you.

--
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] PITR on different machine/architecture?

2010-11-05 Thread Vick Khera
On Fri, Nov 5, 2010 at 1:54 PM, Andreas Brandl m...@andreas-brandl.de wrote:
 we are implementing archiving/PITR for a postgresql instance operating on 
 OpenBSD/64-bit. Is it possible to restore the backup on a completely 
 different machine (i.e. other OS/32-bit)? What about restoring on (slightly) 
 different versions of postgresql?


If you run the same 32-bit binaries on both OpenBSD systems, it *should* work.

Anything different will not because the files will not be binary
compatible... I wonder if that is true for the minor rev number, like
9.0.0 vs. 9.0.1.  That I cannot answer.

-- 
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] experience with tags schemas

2010-11-05 Thread Richard Broersma
On Fri, Nov 5, 2010 at 10:07 AM, Matthieu Huin matthieu.h...@wallix.com wrote:

 Does anyone here have any experience with tags schemas on postgresql ?

I don't, but this problem look strangely familiar to a
problem/solution found in Joe Celko book SQL puzzles.

Check out puzzle 17 answer #2:

http://sites.google.com/site/ankurpshah2/joe-celkos-sql-puzzles-and-answers-s.pdf


-- 
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[GENERAL] Access postgresql data base from .net

2010-11-05 Thread mike stanton
Hello all; we´ve got a project where we have a system built originally for 
.net/sql-server. Now we want to change sql-server for a postgresql database. 
And preferably without using the ODBC driver which we have heard is prone to 
errors. Is there a producto which we can use which does not imply a major 
rewrite of all the SQL ?. Obviously we may have problemas with differences 
between Sql-server and Postgresql syntax, but we don´t want to de a rewrite.

Hope to hear soon, any help appreciated.

Mike Stanton W.
Santiago Chile


__ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 5575 (20101029) __

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com



Re: [GENERAL] Access postgresql data base from .net

2010-11-05 Thread Dann Corbit
From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of mike stanton
Sent: Friday, November 05, 2010 12:08 PM
To: pgsql-general@postgresql.org
Cc: mike stanton
Subject: [GENERAL] Access postgresql data base from .net

Hello all; we´ve got a project where we have a system built originally for 
.net/sql-server. Now we want to change sql-server for a postgresql database. 
And preferably without using the ODBC driver which we have heard is prone to 
errors.

What specific errors did you hear about?
I suggest testing the rumors.  If there really is some problem, then submit a 
bug report.
Sometimes, people want you to use their tools, and so they will exaggerate the 
problem with competitive tools.


Is there a producto which we can use which does not imply a major rewrite of 
all the SQL ?.

Probably most interface tools will work if you are using ISO standard SQL.  Any 
place where you are using SQL language extensions you will have to do some work.
You can find interfaces here:
http://pgfoundry.org/softwaremap/trove_list.php?form_cat=310

There are also a very large number of commercial interfaces for PostgreSQL 
available. You can find out about those here:
http://www.sqlsummit.com/DataAcce.htm


Obviously we may have problemas with differences between Sql-server and 
Postgresql syntax, but we don´t want to de a rewrite.

What specific problems are you having?


Hope to hear soon, any help appreciated.

Mike Stanton W.
Santiago Chile


__ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 5575 (20101029) __

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com


Re: [GENERAL] experience with tags schemas

2010-11-05 Thread Chris Browne
matthieu.h...@wallix.com (Matthieu Huin) writes:
 Greetings,

 Does anyone here have any experience with tags schemas on postgresql ?

 I am struggling with a schema inspired by scuttle described here :

 http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html

 Performances drop dramatically when the data set increases. Is it
 normal and I should look at other data structures ? Or am I doing
 something wrong ?

 If you need more information, I'll be happy to give it to you.

I'd expect the Toxi solution (where do they get the names!??!?!) to be
the fastest one of the litter, as most of the burden of work goes into
the narrow table, tagmap.  (It's also easily extended to cope with the
way Deli.cio.us does tagging, as you can attach user IDs to tagmap)

In any case, it would make a lot of sense to run EXPLAIN ANALYZE on some
of the queries; that ought to provide some insight as to what parts are
behaving notably badly.

The article provides some good grist for the argument that proper
normalization frequently *IMPROVES* performance.  (Contrary to the all
too common NoSQL is Web Scale arguments that we must denormalize for
performance.)
-- 
If this was helpful, http://svcs.affero.net/rm.php?r=cbbrowne rate me
http://www3.sympatico.ca/cbbrowne/lsf.html
Like I've always  said, if you don't have anything  nice to say, come
sit by me. -- Steel Magnolias

-- 
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] Cloning database without dump/restore

2010-11-05 Thread Dimitri Fontaine
Andrus kobrule...@hot.ee writes:
 How to clone database fast ?
 How to create server side pl/pgsql script which use code like in
 pg_dump/pg_restore and or in pg_migrator and clones existing database or
 other idea ?

See pg_basebackup here:

  https://github.com/dimitri/pg_basebackup

I'm wouldn't expect it to be fast though.
-- 
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

-- 
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] Linux

2010-11-05 Thread Jason Long
I use Centos for production and Fedora for development and I am very
happy with both.  Especially Centos as I have never had an update break
anything.

On Fri, 2010-11-05 at 09:50 -0400, David Siebert wrote:
 I would say that if you pick any of the big four you will be fine.
 CentOS
 Ubuntu Server LTS
 Red Hat
 Suse
 Debian can also be a good choice.
 We used to be an OpenSuse shop but we are now moving everything to
 Ubuntu Server LTS. I can not say enough good things about CentOS as
 far as stability and long support times.
 
 
 On 11/4/2010 11:00 AM, Michael Gould wrote: 
  I know that this is probably a religion issue but we are looking
  to move Postgres to a Linux server.  We currently have a Windows
  2008 R2 active directory and all of the other servers are
  virtualized via VMWare ESXi.  One of the reasons is that we want to
  use a 64 bit Postgres server and the UUID processing contrib module
  does not provide a 64 bit version for Windows.  I would also assume
  that the database when properly tuned will probably run faster in a
  *inx environment.
  
  What and why should I look at certain distributions?  It appears
  from what I read, Ubanta is a good desktop but not a server.
  
   
  
  Best Regards
  
  
  
  Michael Gould, Managing Partner
  Intermodal Software Solutions, LLC
  904.226.0978
  904.592.5250 fax
 



-- 
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] Linux

2010-11-05 Thread Scott Marlowe
On Fri, Nov 5, 2010 at 2:58 PM, Jason Long
mailing.li...@octgsoftware.com wrote:
 I use Centos for production and Fedora for development and I am very
 happy with both.  Especially Centos as I have never had an update break
 anything.

I have to agree that Centos is tank-like in its reliability and its
updates.  It's a stable, safe option.  And it has real long term
support.  While I'm currently using Ubuntu LTS 10.04.1, I know that
LTS to Ubuntu isn't nearly as big of a commitment as long term support
for Centos / RedHat is.

I've seen bugs reported right after 8.04 LTS came out, bugs that were
never addressed or fixed.  Many of them affected me.  The standard
answer was try 8.10, try 9.xx, try etc...

Imagine if you were running RHEL 5 or Centos 5 and they told you to
try fedora for a fix.  No way.  Ubuntu still has a long way to go to
catch up to that level of commercial friendly support and bug fixing.
But if you're willing to put up with their awful bug fixing pace, and
the release, as released, works for you, then it's an ok option.

-- 
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] Access postgresql data base from .net

2010-11-05 Thread mike stanton

Dann, perhaps the a better question would be.if we use, for example, 
npgsql, we'd have to adapt code and use the tools own calls. And that means 
rewriting. Is this true?.

Cheers
Mike 
  - Original Message - 
  From: Dann Corbit 
  To: 'mike stanton' ; pgsql-general@postgresql.org 
  Cc: mike stanton 
  Sent: Friday, November 05, 2010 5:12 PM
  Subject: Re: [GENERAL] Access postgresql data base from .net


  From: pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of mike stanton
  Sent: Friday, November 05, 2010 12:08 PM
  To: pgsql-general@postgresql.org
  Cc: mike stanton
  Subject: [GENERAL] Access postgresql data base from .net

   

  Hello all; we´ve got a project where we have a system built originally for 
.net/sql-server. Now we want to change sql-server for a postgresql database. 
And preferably without using the ODBC driver which we have heard is prone to 
errors.

   

  What specific errors did you hear about?

  I suggest testing the rumors.  If there really is some problem, then submit a 
bug report.

  Sometimes, people want you to use their tools, and so they will exaggerate 
the problem with competitive tools.

   

   

  Is there a producto which we can use which does not imply a major rewrite of 
all the SQL ?. 

   

  Probably most interface tools will work if you are using ISO standard SQL.  
Any place where you are using SQL language extensions you will have to do some 
work.

  You can find interfaces here:

  http://pgfoundry.org/softwaremap/trove_list.php?form_cat=310

   

  There are also a very large number of commercial interfaces for PostgreSQL 
available. You can find out about those here:

  http://www.sqlsummit.com/DataAcce.htm

   

   

  Obviously we may have problemas with differences between Sql-server and 
Postgresql syntax, but we don´t want to de a rewrite.

   

  What specific problems are you having?

   

   

  Hope to hear soon, any help appreciated.

   

  Mike Stanton W.
  Santiago Chile



  __ Información de ESET NOD32 Antivirus, versión de la base de firmas 
de virus 5575 (20101029) __

  ESET NOD32 Antivirus ha comprobado este mensaje.

  http://www.eset.com



  __ Información de ESET NOD32 Antivirus, versión de la base de firmas 
de virus 5575 (20101029) __

  ESET NOD32 Antivirus ha comprobado este mensaje.

  http://www.eset.com



__ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 5575 (20101029) __

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com



Re: [GENERAL] Access postgresql data base from .net

2010-11-05 Thread Dann Corbit
In theory, if you are already using a .NET data provider, then you simply 
change the data source.  In practice, you might have to make a few small 
changes.

That is the entire beauty of using OLEDB, ODBC, .NET providers, etc.  Since you 
are coding to an industry standard, every data access tool that conforms to the 
standard should work without modification.

Now, if you are sending a SQL string that says SP_WHO PostgreSQL is not going 
to give you a list of attached users because that command is Microsoft 
SQL*Server specific.  But if you have a table with the identical data 
structure, then SELECT ssn FROM employees WHERE bonus_conditions_met = 1 
should work the same no matter what the data source is.

If you are using a database specific data interface (for instance, if you are 
connecting via DB-Library) then you will have to do some recoding, because 
DB-Library is specific to SQL*Server and Sybase.

If you have an ODBC connection to a database in your code, and all your calls 
are ODBC calls, and if the application is written properly, then changing the 
database should be as simple as setting up a new data source.   Same for OLEDB. 
 Same for JDBC.  Same for .NET providers.  This is the entire and fundamental 
reason for using these tools.   Otherwise, we would all be using custom 
database API libraries instead.

From: mike stanton [mailto:mike.stan...@autocastillo.cl]
Sent: Friday, November 05, 2010 2:47 PM
To: Dann Corbit
Subject: Re: [GENERAL] Access postgresql data base from .net

Dann, perhaps the a better question would be.if we use, for example, 
npgsql, we'd have to adapt code and use the tools own calls. And that means 
rewriting. Is this true?.

Cheers
Mike
- Original Message -
From: Dann Corbitmailto:dcor...@connx.com
To: 'mike stanton'mailto:mike.stan...@autocastillo.cl ; 
pgsql-general@postgresql.orgmailto:pgsql-general@postgresql.org
Cc: mike stantonmailto:mstan...@acsa.cl
Sent: Friday, November 05, 2010 5:12 PM
Subject: Re: [GENERAL] Access postgresql data base from .net

From: 
pgsql-general-ow...@postgresql.orgmailto:pgsql-general-ow...@postgresql.org 
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of mike stanton
Sent: Friday, November 05, 2010 12:08 PM
To: pgsql-general@postgresql.orgmailto:pgsql-general@postgresql.org
Cc: mike stanton
Subject: [GENERAL] Access postgresql data base from .net

Hello all; we´ve got a project where we have a system built originally for 
.net/sql-server. Now we want to change sql-server for a postgresql database. 
And preferably without using the ODBC driver which we have heard is prone to 
errors.

What specific errors did you hear about?
I suggest testing the rumors.  If there really is some problem, then submit a 
bug report.
Sometimes, people want you to use their tools, and so they will exaggerate the 
problem with competitive tools.


Is there a producto which we can use which does not imply a major rewrite of 
all the SQL ?.

Probably most interface tools will work if you are using ISO standard SQL.  Any 
place where you are using SQL language extensions you will have to do some work.
You can find interfaces here:
http://pgfoundry.org/softwaremap/trove_list.php?form_cat=310

There are also a very large number of commercial interfaces for PostgreSQL 
available. You can find out about those here:
http://www.sqlsummit.com/DataAcce.htm


Obviously we may have problemas with differences between Sql-server and 
Postgresql syntax, but we don´t want to de a rewrite.

What specific problems are you having?


Hope to hear soon, any help appreciated.

Mike Stanton W.
Santiago Chile


__ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 5575 (20101029) __

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com


__ Información de ESET NOD32 Antivirus, versión de la base de firmas de 
virus 5575 (20101029) __

ESET NOD32 Antivirus ha comprobado este mensaje.

http://www.eset.com


Re: [GENERAL] Access postgresql data base from .net

2010-11-05 Thread Francisco Figueiredo Jr.
We've made changes to support @ parameter prefix exactly to easy
porting of sqlserver client queries to postgresql. This way you may
need minimum changes to your code. Just to those specific sql calls.


On Fri, Nov 5, 2010 at 19:40, mike stanton mike.stan...@autocastillo.cl wrote:

 Dann, perhaps the a better question would be.if we use, for example,
 npgsql, we'd have to adapt code and use the tools own calls. And that means
 rewriting. Is this true?.

 Cheers
 Mike

 - Original Message -
 From: Dann Corbit
 To: 'mike stanton' ; pgsql-general@postgresql.org
 Cc: mike stanton
 Sent: Friday, November 05, 2010 5:12 PM
 Subject: Re: [GENERAL] Access postgresql data base from .net

 From: pgsql-general-ow...@postgresql.org
 [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of mike stanton
 Sent: Friday, November 05, 2010 12:08 PM
 To: pgsql-general@postgresql.org
 Cc: mike stanton
 Subject: [GENERAL] Access postgresql data base from .net



 Hello all; we´ve got a project where we have a system built originally for
 .net/sql-server. Now we want to change sql-server for a postgresql database.
 And preferably without using the ODBC driver which we have heard is prone to
 errors.



 What specific errors did you hear about?

 I suggest testing the rumors.  If there really is some problem, then submit
 a bug report.

 Sometimes, people want you to use their tools, and so they will exaggerate
 the problem with competitive tools.

 



 Is there a producto which we can use which does not imply a major rewrite of
 all the SQL ?.



 Probably most interface tools will work if you are using ISO standard SQL.
 Any place where you are using SQL language extensions you will have to do
 some work.

 You can find interfaces here:

 http://pgfoundry.org/softwaremap/trove_list.php?form_cat=310



 There are also a very large number of commercial interfaces for PostgreSQL
 available. You can find out about those here:

 http://www.sqlsummit.com/DataAcce.htm

 



 Obviously we may have problemas with differences between Sql-server and
 Postgresql syntax, but we don´t want to de a rewrite.



 What specific problems are you having?

 



 Hope to hear soon, any help appreciated.



 Mike Stanton W.
 Santiago Chile

 __ Información de ESET NOD32 Antivirus, versión de la base de firmas
 de virus 5575 (20101029) __

 ESET NOD32 Antivirus ha comprobado este mensaje.

 http://www.eset.com

 __ Información de ESET NOD32 Antivirus, versión de la base de firmas
 de virus 5575 (20101029) __

 ESET NOD32 Antivirus ha comprobado este mensaje.

 http://www.eset.com




-- 
Regards,

Francisco Figueiredo Jr.
Npgsql Lead Developer
http://www.npgsql.org
http://fxjr.blogspot.com
http://twitter.com/franciscojunior

-- 
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] Access postgresql data base from .net

2010-11-05 Thread John R Pierce

On 11/05/10 2:40 PM, mike stanton wrote:
Dann, perhaps the a better question would be.if we use, for 
example, npgsql, we'd have to adapt code and use the tools own calls. 
And that means rewriting. Is this true?.




npgsql implements oledb, I thought, which hooks right up to the .NET 
database glue?   That should just hook up to your existing SQL code.  If 
your SQL code follows the standards, it should work with little or no 
tweaking.


however

if you are using any Microsoft SQL Server specific features, you'll need 
to rewrite those parts to switch to /anything/ else.Any transact*sql 
procedures will need rewriting into pl/pgsql.


SQL Server's ETL tool should be able to copy your schema and data into 
postgres tables.





--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general