Re: [GENERAL] Is there a tool for checking database integrity

2012-05-07 Thread Clemens Eisserer
HI Tomas, >> No, at least in the current version. The next version (9.2) will support >> checksums, but it's meant mostly as a protection against failures at the >> I/O level. It might catch some memory issues, but it certainly won't be >> 100% protection. > >Oh, I see - it was bumped to 9.3 and

Re: [GENERAL] Use LISTEN/NOTIFY between different databases

2012-05-07 Thread Igor
> Its real situation. We use sharded cluster based on plproxy. The calling >> function for DB queries is equal in all databases (see plproxy >> documentation). Now we need to release some internal logic between clients >> based on certain events which occurred in this functions. The LISTEN/NOTIFY >

Re: [GENERAL] Difference between speed of 2 functions: SQL+STABLE and PLPGSQL+EXECUTE

2012-05-07 Thread Albe Laurenz
Dmitry Koterov wrote: > But it's quite strange that SQL+STABLE function does not recalculate the plan each time it is called. > Because when I use a bunch of SQL+STABLE functions in e.g. a sub-select of a complex query, I see in > the plan of this complex queries that function calls are "expanded".

Re: [GENERAL] COPY column order

2012-05-07 Thread Brent Wood
You can specify the column order in the copy statement: psql -d test -c "create table ttt (id serial primary key, name varchar(10), value int);" echo "10|one" | psql -d test -c "copy ttt (value,name) from stdin with delimiter '|';" psql -d test -c "select * from ttt;" id | name | value +---

[GENERAL] FATAL: lock file "postmaster.pid" already exists

2012-05-07 Thread deepak
Hi, On Windows 2008, sometimes the server fails to start due to an existing "postmaster.pid' file. I tried rebooting a few times and even force shutting down the server, and it started up fine. It seems to be a race-condition of sorts in the code that detects whether the process with PID in the f

Re: [GENERAL] Use LISTEN/NOTIFY between different databases

2012-05-07 Thread John R Pierce
On 05/07/12 1:40 PM, Igor wrote: 2012/5/7 John R Pierce mailto:pie...@hogranch.com>> On 05/07/12 1:13 PM, Igor wrote: 1.Is this possible in future releases ? 2. How I can organize interconnectbetween two clients connected to different DB? I need call NOTIFY from p

Re: [GENERAL] manipulating anyarray columns

2012-05-07 Thread Tomas Vondra
On 6.5.2012 16:41, Jov wrote: > I find this work: > > SELECT (most_common_vals::varchar::varchar[])[1:3] > FROM pg_stats > WHERE tablename = 'pg_attribute' AND attname = 'attname'; > > I try cast anyarray to varchar[] directly but failed,do'nt know why pg > not support the cast. IMHO this is e

Re: [GENERAL] Use LISTEN/NOTIFY between different databases

2012-05-07 Thread John R Pierce
On 05/07/12 1:13 PM, Igor wrote: 1.Is this possible in future releases ? 2. How I can organize interconnectbetween two clients connected to different DB? I need call NOTIFY from pgsql function in one database to another LISTEN client in another database. a listener isn't 'in a database', it

[GENERAL] Use LISTEN/NOTIFY between different databases

2012-05-07 Thread Igor
1. Is this possible in future releases ? 2. How I can organize interconnect between two clients connected to different DB ? I need call NOTIFY from pgsql function in one database to another LISTEN client in another database. -- Regards

Re: [GENERAL] Upgrading from 8.4 and 9.0 to 9.1

2012-05-07 Thread Guillaume Lelarge
On Mon, 2012-05-07 at 15:37 -0400, Scott Briggs wrote: > On Mon, May 7, 2012 at 3:28 PM, Guillaume Lelarge > wrote: > > On Mon, 2012-05-07 at 15:10 -0400, Scott Briggs wrote: > >> Hi, so I have a master-slave set of database servers that are running > >> postgres 9.0 using streaming replication an

Re: [GENERAL] Simultaneous Installations 7.4 9.x

2012-05-07 Thread Peter Eisentraut
On mån, 2012-05-07 at 11:08 -0400, Randy Johnson wrote: > Hello, > > I have a redhat E5 installation with PostgreSQL 7.4 installation. I have > been tasked with upgrading it to 9.x > > I have read that I can install both versions at the same time via YUM and > edit the config file on the new in

Re: [GENERAL] Upgrading from 8.4 and 9.0 to 9.1

2012-05-07 Thread Raymond O'Donnell
On 07/05/2012 20:37, Scott Briggs wrote: > > Let me clarify, no downtime meaning I will be failing over from the > current server running 9.0 to a new server running 9.1. This is one of the scenarios that Slony-I is designed to handle; it may be worth a look. Ray. -- Raymond O'Donnell :: Galw

Re: [GENERAL] Upgrading from 8.4 and 9.0 to 9.1

2012-05-07 Thread Scott Briggs
On Mon, May 7, 2012 at 3:28 PM, Guillaume Lelarge wrote: > On Mon, 2012-05-07 at 15:10 -0400, Scott Briggs wrote: >> Hi, so I have a master-slave set of database servers that are running >> postgres 9.0 using streaming replication and I'd like to migrate them >> to 9.1.  My question is, can 9.0 do

Re: [GENERAL] Upgrading from 8.4 and 9.0 to 9.1

2012-05-07 Thread Guillaume Lelarge
On Mon, 2012-05-07 at 15:10 -0400, Scott Briggs wrote: > Hi, so I have a master-slave set of database servers that are running > postgres 9.0 using streaming replication and I'd like to migrate them > to 9.1. My question is, can 9.0 do streaming replication to 9.1? No. > If > not, what's the b

Re: [GENERAL] errors on restoring postgresql binary dump to glusterfs

2012-05-07 Thread Magnus Hagander
On Mon, May 7, 2012 at 7:34 PM, Liang Ma wrote: > On Mon, May 7, 2012 at 12:54 PM, Magnus Hagander wrote: >> On Mon, May 7, 2012 at 5:02 PM, Liang Ma wrote: >>> On Fri, May 4, 2012 at 3:58 AM, Magnus Hagander wrote: On Mon, Apr 30, 2012 at 8:34 PM, Liang Ma wrote: > Hi There, > >>

[GENERAL] Upgrading from 8.4 and 9.0 to 9.1

2012-05-07 Thread Scott Briggs
Hi, so I have a master-slave set of database servers that are running postgres 9.0 using streaming replication and I'd like to migrate them to 9.1. My question is, can 9.0 do streaming replication to 9.1? If not, what's the best way to upgrade a production database to 9.1 with no downtime? I als

Re: [GENERAL] errors on restoring postgresql binary dump to glusterfs

2012-05-07 Thread Liang Ma
On Mon, May 7, 2012 at 12:54 PM, Magnus Hagander wrote: > On Mon, May 7, 2012 at 5:02 PM, Liang Ma wrote: >> On Fri, May 4, 2012 at 3:58 AM, Magnus Hagander wrote: >>> On Mon, Apr 30, 2012 at 8:34 PM, Liang Ma wrote: Hi There, While trying to restore a ~700GM binary dump by comma

Re: [GENERAL] errors on restoring postgresql binary dump to glusterfs

2012-05-07 Thread Magnus Hagander
On Mon, May 7, 2012 at 5:02 PM, Liang Ma wrote: > On Fri, May 4, 2012 at 3:58 AM, Magnus Hagander wrote: >> On Mon, Apr 30, 2012 at 8:34 PM, Liang Ma wrote: >>> Hi There, >>> >>> While trying to restore a ~700GM binary dump by command >>> >>> pg_restore -d dbdata < sampledbdata-20120327.pgdump >

[GENERAL] Re: How to know there is any ODBC Driver installed in the Linux redhat 5.7 server? Thanks

2012-05-07 Thread leaf_yxj
At 2012-05-05 01:37:50,"Adrian Klaver-3 [via PostgreSQL]" wrote: On 05/04/2012 10:23 AM, leaf_yxj wrote: > I tried test the ODBC driver. I failed and I was told I should install the > odbc driver manager to configure the ODBC driver first, then I can test the > ODBC drive. And the following

[GENERAL] Simultaneous Installations 7.4 9.x

2012-05-07 Thread Randy Johnson
Hello, I have a redhat E5 installation with PostgreSQL 7.4 installation. I have been tasked with upgrading it to 9.x I have read that I can install both versions at the same time via YUM and edit the config file on the new installation to use a different port until go live time. Can anyone con

Re: [GENERAL] errors on restoring postgresql binary dump to glusterfs

2012-05-07 Thread Liang Ma
Hi Magnus, Thank you for answering my post. Please see comments on your answer below. On Fri, May 4, 2012 at 3:58 AM, Magnus Hagander wrote: > On Mon, Apr 30, 2012 at 8:34 PM, Liang Ma wrote: >> Hi There, >> >> While trying to restore a ~700GM binary dump by command >> >> pg_restore -d dbdata

Re: [GENERAL] Re: How to know there is any ODBC Driver installed in the Linux redhat 5.7 server? Thanks

2012-05-07 Thread Adrian Klaver
On 05/07/2012 07:10 AM, leaf_yxj wrote: Hi Adrian, Thanks. I tried to understand how the ODBC driver works. Is that true that there should be some odbc driver manager and otherwise the ODBC driver can't work properly. Our ODBC driver is installed on linux 5.7 for the informatic use. Before we d

[GENERAL] Re: How to know there is any ODBC Driver installed in the Linux redhat 5.7 server? Thanks

2012-05-07 Thread leaf_yxj
Hi Adrian, Thanks. I tried to understand how the ODBC driver works. Is that true that there should be some odbc driver manager and otherwise the ODBC driver can't work properly. Our ODBC driver is installed on linux 5.7 for the informatic use. Before we deploy the informatic, we want to test the

Re: [GENERAL] Streaming replication: sequences on slave seemingly ahead of sequences on master

2012-05-07 Thread Merlin Moncure
On Mon, May 7, 2012 at 8:52 AM, Michael Nolan wrote: > To cross-pollinate with another thread, if temporary tables (and > insert/delete/update transactions to them) are to be supported on a slave, > will the applications using those temporary tables expect to be able to use > 'nextval' on inserts

Re: [GENERAL] Streaming replication: sequences on slave seemingly ahead of sequences on master

2012-05-07 Thread Fujii Masao
On Mon, May 7, 2012 at 10:33 PM, Tom Lane wrote: > Simon Riggs writes: >> On 7 May 2012 09:01, Vincent de Phily >> wrote: >>> Would be nice to see it added to the documentation (unless I just didn't >>> find >>> it ?), as it is quite surprising, and might lead to problems if people >>> expect

Re: [GENERAL] Streaming replication: sequences on slave seemingly ahead of sequences on master

2012-05-07 Thread Michael Nolan
On Mon, May 7, 2012 at 4:01 AM, Vincent de Phily < vincent.deph...@mobile-devices.fr> wrote: > On Sunday 06 May 2012 10:29:17 Simon Riggs wrote: > > On 4 May 2012 14:55, Vincent de Phily > > wrote: > > > Would be nice to see it added to the documentation (unless I just didn't > find > it ?), as

Re: [GENERAL] Streaming replication: sequences on slave seemingly ahead of sequences on master

2012-05-07 Thread Tom Lane
Simon Riggs writes: > On 7 May 2012 09:01, Vincent de Phily > wrote: >> Would be nice to see it added to the documentation (unless I just didn't find >> it ?), as it is quite surprising, and might lead to problems if people expect >> to be able to read sequence values from the slave. > If you t

Re: [GENERAL] COPY column order

2012-05-07 Thread Adrian Klaver
On 05/07/2012 05:33 AM, MD33 wrote: Hi there I'm trying to use COPY with HEADER option but my header line in file is in different order than the column order specified in database. Is the column name order necessary in my file ?? From the docs: http://www.postgresql.org/docs/9.0/interactive/sq

[GENERAL] COPY column order

2012-05-07 Thread MD33
Hi there I'm trying to use COPY with HEADER option but my header line in file is in different order than the column order specified in database. Is the column name order necessary in my file ?? thxs -- View this message in context: http://postgresql.1045698.n5.nabble.com/COPY-column-order-tp56

Re: [GENERAL] Streaming replication: sequences on slave seemingly ahead of sequences on master

2012-05-07 Thread Simon Riggs
On 7 May 2012 09:19, Magnus Hagander wrote: > On Mon, May 7, 2012 at 10:14 AM, Simon Riggs wrote: >> On 7 May 2012 09:01, Vincent de Phily >> wrote: >> >>> Would be nice to see it added to the documentation (unless I just didn't >>> find >>> it ?), as it is quite surprising, and might lead to

Re: [GENERAL] Streaming replication: sequences on slave seemingly ahead of sequences on master

2012-05-07 Thread Magnus Hagander
On Mon, May 7, 2012 at 10:14 AM, Simon Riggs wrote: > On 7 May 2012 09:01, Vincent de Phily > wrote: > >> Would be nice to see it added to the documentation (unless I just didn't find >> it ?), as it is quite surprising, and might lead to problems if people expect >> to be able to read sequence

Re: [GENERAL] Streaming replication: sequences on slave seemingly ahead of sequences on master

2012-05-07 Thread Simon Riggs
On 7 May 2012 09:01, Vincent de Phily wrote: > Would be nice to see it added to the documentation (unless I just didn't find > it ?), as it is quite surprising, and might lead to problems if people expect > to be able to read sequence values from the slave. If you think so, please submit a patch

Re: [GENERAL] Streaming replication: sequences on slave seemingly ahead of sequences on master

2012-05-07 Thread Vincent de Phily
On Sunday 06 May 2012 10:29:17 Simon Riggs wrote: > On 4 May 2012 14:55, Vincent de Phily wrote: > > It all seems to be working fine, except that when checking the data > > (selecting latest primary key and sequence value for all tables) on > > master and slave, some sequence ids are higher on th