Re: [GENERAL] Index is not used for "IN (non-correlated subquery)"

2016-12-01 Thread George
On Wed, Nov 30, 2016 at 10:08 PM, George wrote: > On Wed, Nov 30, 2016 at 8:44 PM, Tom Lane wrote: >> Merlin Moncure writes: >>> On Wed, Nov 30, 2016 at 11:05 AM, George wrote: So there is definitely something wrong here. This situation makes many row-level security use cases cumberso

[GENERAL] Overwrite pg_catalog?

2016-12-01 Thread Juliano
Hi everyone, I tried to restore pg_catalog to my new database, but the existing pg_catalog can't be overwritten or dropped, and postgres auto creates pg_catalog when I create a new DB. So, there is a way to restore the pg_catalog to a new database? Regards, Juliano

[GENERAL] btree gist indices, null and open-ended tsranges

2016-12-01 Thread Chris Withers
Hi All, Working with the exclude constraint example from https://www.postgresql.org/docs/current/static/rangetypes.html: CREATE EXTENSION btree_gist; CREATE TABLE room_reservation ( room text, during tsrange, EXCLUDE USING GIST (room WITH =, during WITH &&) ); So, first observatio

Re: [GENERAL] Overwrite pg_catalog?

2016-12-01 Thread Francisco Olarte
Juliano: On Thu, Dec 1, 2016 at 12:16 PM, Juliano wrote: > I tried to restore pg_catalog to my new database, but the existing > pg_catalog can't be overwritten or dropped, and postgres auto creates > pg_catalog when I create a new DB. This is because, in general, pg_catalog is maintained by DML

Re: [GENERAL] btree gist indices, null and open-ended tsranges

2016-12-01 Thread Francisco Olarte
Hi Chris: On Thu, Dec 1, 2016 at 12:56 PM, Chris Withers wrote: > So, first observation: if I make room nullable, the exclude constraint does > not apply for rows that have a room of null. I guess that's to be expected, > right? I would expect it, given: n=> select null=null, null<>null, not (n

Re: [GENERAL] About the MONEY type

2016-12-01 Thread rob stone
My two cents . . . On Wed, 2016-11-30 at 13:35 -0800, John R Pierce wrote: > On 11/30/2016 12:16 PM, John McKown wrote: > > Speaking generically, I guess maybe MONEY needs to be somewhat > > like a TIMESTAMP. At least in PostgreSQL, a TIMESTAMP can contain > > a TIMEZONE. I guess a MONEY type shoul

[GENERAL] issue with host name lookup in PQconnectdb

2016-12-01 Thread dharani kumar
The problem i am facing is that PQconnectdb is blocking even though i specified connect_timeout=10. My observation is below. 1. To simulate this issue, i stopped the postgreSQL-x64-9.4 service and executed my application. 2. host=localhost is used, database present in the same machine. 3. I have a

[GENERAL] Moving pg_xlog

2016-12-01 Thread Robert Inder
I'm running Postgres9.4 in master/hot-standby mode on a few pairs of servers. While recovering from A Bit Of Bother last week, I came across a posting saying that pg_xlog should be on a separate partition. I tried to find out more about this, by consulting the PostgresQL documentation (i.e. http

Re: [GENERAL] Overwrite pg_catalog?

2016-12-01 Thread Melvin Davidson
On Thu, Dec 1, 2016 at 7:07 AM, Francisco Olarte wrote: > Juliano: > > On Thu, Dec 1, 2016 at 12:16 PM, Juliano wrote: > > I tried to restore pg_catalog to my new database, but the existing > > pg_catalog can't be overwritten or dropped, and postgres auto creates > > pg_catalog when I create a n

Re: [GENERAL] issue with host name lookup in PQconnectdb

2016-12-01 Thread Tom Lane
dharani kumar writes: > The problem i am facing is that PQconnectdb is blocking even though i > specified connect_timeout=10. My observation is below. > 1. To simulate this issue, i stopped the postgreSQL-x64-9.4 service and > executed my application. > 2. host=localhost is used, database present

Re: [GENERAL] Overwrite pg_catalog?

2016-12-01 Thread David G. Johnston
On Thu, Dec 1, 2016 at 4:16 AM, Juliano wrote: > Hi everyone, > > I tried to restore pg_catalog to my new database, but the existing > pg_catalog can't be overwritten or dropped, and postgres auto creates > pg_catalog when I create a new DB. > > So, there is a way to restore the pg_catalog to a n

Re: [GENERAL] Moving pg_xlog

2016-12-01 Thread Achilleas Mantzios
On 01/12/2016 15:55, Robert Inder wrote: I'm running Postgres9.4 in master/hot-standby mode on a few pairs of servers. While recovering from A Bit Of Bother last week, I came across a posting saying that pg_xlog should be on a separate partition. I tried to find out more about this, by consult

[GENERAL] PostgreSQL ODBC driver for OSX 10.8

2016-12-01 Thread Igor Korot
Hi, ALL, This is my first post here. I have actually 2 questions which are kind of related. 1. Is there an OSX version of the ODBC PostgreSQL driver? 1a. If there is none - is there an instructions on how to build and install it? 2. Is PostgreSQL ODBC driver works with iODBC? Thank you. -- Se

Re: [GENERAL] PostgreSQL ODBC driver for OSX 10.8

2016-12-01 Thread Adrian Klaver
On 12/01/2016 08:01 AM, Igor Korot wrote: Hi, ALL, This is my first post here. I have actually 2 questions which are kind of related. 1. Is there an OSX version of the ODBC PostgreSQL driver? 1a. If there is none - is there an instructions on how to build and install it? https://odbc.postgres

Re: [GENERAL] PostgreSQL ODBC driver for OSX 10.8

2016-12-01 Thread Igor Korot
Adrian, On Thu, Dec 1, 2016 at 11:37 AM, Adrian Klaver wrote: > On 12/01/2016 08:01 AM, Igor Korot wrote: >> >> Hi, ALL, >> This is my first post here. >> I have actually 2 questions which are kind of related. >> >> 1. Is there an OSX version of the ODBC PostgreSQL driver? >> 1a. If there is non

Re: [GENERAL] PostgreSQL ODBC driver for OSX 10.8

2016-12-01 Thread Adrian Klaver
On 12/01/2016 08:41 AM, Igor Korot wrote: Adrian, On Thu, Dec 1, 2016 at 11:37 AM, Adrian Klaver wrote: On 12/01/2016 08:01 AM, Igor Korot wrote: Hi, ALL, This is my first post here. I have actually 2 questions which are kind of related. 1. Is there an OSX version of the ODBC PostgreSQL dr

Re: [GENERAL] Overwrite pg_catalog?

2016-12-01 Thread Joshua D. Drake
On 12/01/2016 03:16 AM, Juliano wrote: Hi everyone, I tried to restore pg_catalog to my new database, but the existing pg_catalog can't be overwritten or dropped, and postgres auto creates pg_catalog when I create a new DB. So, there is a way to restore the pg_catalog to a new database? Why w

Re: [GENERAL] Index is not used for "IN (non-correlated subquery)"

2016-12-01 Thread Tom Lane
George writes: > explain analyze select * > from wg3ppbm_transaction where partner_uuid in ( > select p.uuid > from wg3ppbm_userpartner up > join wg3ppbm_partner p on p.id = up.partner_id > ); > "Hash Semi Join (cost=2.07..65628.14 rows=663727 width=380) (actu

Re: [GENERAL] PostgreSQL ODBC driver for OSX 10.8

2016-12-01 Thread Adrian Klaver
On 12/01/2016 08:41 AM, Igor Korot wrote: Adrian, On Thu, Dec 1, 2016 at 11:37 AM, Adrian Klaver wrote: On 12/01/2016 08:01 AM, Igor Korot wrote: Hi, ALL, This is my first post here. I have actually 2 questions which are kind of related. 1. Is there an OSX version of the ODBC PostgreSQL dr

Re: [GENERAL] Index is not used for "IN (non-correlated subquery)"

2016-12-01 Thread George
On Thu, Dec 1, 2016 at 6:58 PM, Tom Lane wrote: > George writes: >> explain analyze select * >> from wg3ppbm_transaction where partner_uuid in ( >> select p.uuid >> from wg3ppbm_userpartner up >> join wg3ppbm_partner p on p.id = up.partner_id >> ); > >> "Hash S

Re: [GENERAL] Index is not used for "IN (non-correlated subquery)"

2016-12-01 Thread Tom Lane
George writes: > On Thu, Dec 1, 2016 at 6:58 PM, Tom Lane wrote: >> What >> do you get for >> select * from pg_stats where tablename = 'wg3ppbm_userpartner'; >> and likewise for wg3ppbm_partner? > It is a wide table. Do you want me to dump csv here? Shouldn't be *that* wide, with only one row i

[GENERAL] [GENERAL] Replication between différent versions of the same OS.

2016-12-01 Thread Benoit Lobréau
Hi, Is it possible to use the built in replication to replicate between two PostgreSQL in the same version but in different version of the same OS (Say Pg 9.1 Ubuntu 12 to Pg 9.1 Ubuntu 14) I think I read in Hackers that since PostgreSQL uses the OS libraries for encoding. It could cause silent c

Re: [GENERAL] [GENERAL] Replication between différent versions of the same OS.

2016-12-01 Thread Jehan-Guillaume de Rorthais
On Thu, 1 Dec 2016 20:11:06 +0100 Benoit Lobréau wrote: > Hi, > > Is it possible to use the built in replication to replicate between two > PostgreSQL in the same version but in different version of the same OS (Say > Pg 9.1 Ubuntu 12 to Pg 9.1 Ubuntu 14) > > I think I read in Hackers that sinc

[GENERAL] Re: [GENERAL] [GENERAL] Replication between différent versions of the same OS.

2016-12-01 Thread Benoit Lobréau
Thanks a lot. That s what I was looking for ;) Yes, I was trying to avoid logical replication. I guess it s time for me to delve into it...

Re: [GENERAL] PostgreSQL ODBC driver for OSX 10.8

2016-12-01 Thread Igor Korot
Hi, guys, I downloaded the latest sources, but the configure failed. I have OSX 10.8 here. Which version of the driver is compatible? [code] Igors-MacBook-Air:buildMac igorkorot$ ../configure --with-iodbc=/Library/Frameworks/iODBC.framework/iODBC checking for a BSD-compatible install... /usr/bin/

Re: [GENERAL] PostgreSQL ODBC driver for OSX 10.8

2016-12-01 Thread Adrian Klaver
On 12/01/2016 04:21 PM, Igor Korot wrote: Hi, guys, I downloaded the latest sources, but the configure failed. I have OSX 10.8 here. Which version of the driver is compatible? That is going to need more information: 1) What are version of Postgres are you trying to connect to? 2) Do you have

Re: [GENERAL] PostgreSQL ODBC driver for OSX 10.8

2016-12-01 Thread Igor Korot
Hi, Adrian, On Thu, Dec 1, 2016 at 7:30 PM, Adrian Klaver wrote: > On 12/01/2016 04:21 PM, Igor Korot wrote: >> >> Hi, guys, >> I downloaded the latest sources, but the configure failed. >> I have OSX 10.8 here. >> >> Which version of the driver is compatible? > > > That is going to need more inf

Re: [GENERAL] Moving pg_xlog

2016-12-01 Thread Michael Paquier
On Thu, Dec 01, 2016 at 05:48:51PM +0200, Achilleas Mantzios wrote: > On 01/12/2016 15:55, Robert Inder wrote: > > I'm running Postgres9.4 in master/hot-standby mode on a few pairs of > > servers. > > > > While recovering from A Bit Of Bother last week, I came across a > > posting saying that pg

Re: [GENERAL] Overwrite pg_catalog?

2016-12-01 Thread Michael Paquier
On Thu, Dec 01, 2016 at 01:07:09PM +0100, Francisco Olarte wrote: > Juliano: > > On Thu, Dec 1, 2016 at 12:16 PM, Juliano wrote: > > I tried to restore pg_catalog to my new database, but the existing > > pg_catalog can't be overwritten or dropped, and postgres auto creates > > pg_catalog when I c

Re: [GENERAL] Moving pg_xlog

2016-12-01 Thread Jeff Janes
On Thu, Dec 1, 2016 at 5:55 AM, Robert Inder wrote: > I'm running Postgres9.4 in master/hot-standby mode on a few pairs of > servers. > > While recovering from A Bit Of Bother last week, I came across a > posting saying that pg_xlog should be on a separate partition. > > I tried to find out more

Re: [GENERAL] Moving pg_xlog

2016-12-01 Thread David G. Johnston
On Thu, Dec 1, 2016 at 7:59 PM, Jeff Janes wrote: > On Thu, Dec 1, 2016 at 5:55 AM, Robert Inder > wrote: > >> >> I'd really like to read an explicit discussion of this in the official >> documentation, rather than just glean what I can from answers to >> questions. >> > > The official documenta

Re: [GENERAL] Moving pg_xlog

2016-12-01 Thread Melvin Davidson
On Thu, Dec 1, 2016 at 10:17 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Thu, Dec 1, 2016 at 7:59 PM, Jeff Janes wrote: > >> On Thu, Dec 1, 2016 at 5:55 AM, Robert Inder >> wrote: >> >>> >>> I'd really like to read an explicit discussion of this in the official >>> documentat

Re: [GENERAL] Moving pg_xlog

2016-12-01 Thread Michael Paquier
On Fri, Dec 2, 2016 at 1:04 PM, Melvin Davidson wrote: > Well, while the location of pg_xlog is not currently configurable, on Linux > system the way to do it is to: > 1. stop PostgreSQL > 2. move the pg_xlog directory to a separate partition > 3. create a symbolic link to point to the new p

Re: [GENERAL] Moving pg_xlog

2016-12-01 Thread Lucas Possamai
2016-12-02 17:10 GMT+13:00 Michael Paquier : > On Fri, Dec 2, 2016 at 1:04 PM, Melvin Davidson > wrote: > > Well, while the location of pg_xlog is not currently configurable, on > Linux system the way to do it is to: > > 1. stop PostgreSQL > > 2. move the pg_xlog directory to a separate parti

R: [GENERAL] CachedPlan logs until full disk

2016-12-01 Thread Job
Dear Tom, thank you for the reply. Tonight this problem happened again: >> CachedPlan: 1024 total in 1 blocks; 640 free (0 chunks); 384 used >> CachedPlanSource: 1024 total in 1 blocks; 336 free (0 chunks); 688 used >> SPI Plan: 1024 total in 1 blocks; 912 free (0 chunks); 112 used >>