Re: [GENERAL] Missing folder rhel-6Workstation-x86_64 for 9.6 repo (redhat)

2017-06-15 Thread Sari Thiele
Hi, it would be really great, if someone can look at this. Just to be clear, I am talking about the folder here: https://download.postgresql.org/pub/repos/yum/9.6/redhat/ There is one for RHEL7 Workstation, but not for RHEL6. Thanks, Sari On 06/13/2017 10:32 AM, Sari Thiele wrote: > Hi, > >

Re: [GENERAL] plpgsql function with offset - Postgres 9.1

2017-06-15 Thread Peter J. Holzer
On 2017-06-16 10:19:45 +1200, Patrick B wrote: > 2017-05-29 19:27 GMT+12:00 Albe Laurenz : > Patrick B wrote: > > I am running a background task on my DB, which will copy data from > tableA > to tableB. For > > that, I'm writing a PL/PGSQL function which basically needs to do the >

Re: [GENERAL] Connection options

2017-06-15 Thread David G. Johnston
On Thu, Jun 15, 2017 at 3:16 PM, Tom Lane wrote: > Igor Korot writes: > > On Thu, Jun 15, 2017 at 4:46 PM, David G. Johnston > > wrote: > >> The options you pass from the client via the "options" attribute are > >> interpreted by *the server* as command-line options. They are not > options > >

Re: [GENERAL] plpgsql function with offset - Postgres 9.1

2017-06-15 Thread David G. Johnston
On Thu, Jun 15, 2017 at 3:49 PM, Patrick B wrote: > 2017-06-16 10:35 GMT+12:00 David G. Johnston : > >> On Thu, Jun 15, 2017 at 3:19 PM, Patrick B >> wrote: >> >>> 2017-05-29 19:27 GMT+12:00 Albe Laurenz : >>> Patrick B wrote: > I am running a background task on my DB, which will copy

Re: [GENERAL] plpgsql function with offset - Postgres 9.1

2017-06-15 Thread Patrick B
2017-06-16 10:35 GMT+12:00 David G. Johnston : > On Thu, Jun 15, 2017 at 3:19 PM, Patrick B > wrote: > >> 2017-05-29 19:27 GMT+12:00 Albe Laurenz : >> >>> Patrick B wrote: >>> > I am running a background task on my DB, which will copy data from >>> tableA to tableB. For >>> > that, I'm writing a

Re: [GENERAL] plpgsql function with offset - Postgres 9.1

2017-06-15 Thread David G. Johnston
On Thu, Jun 15, 2017 at 3:19 PM, Patrick B wrote: > 2017-05-29 19:27 GMT+12:00 Albe Laurenz : > >> Patrick B wrote: >> > I am running a background task on my DB, which will copy data from >> tableA to tableB. For >> > that, I'm writing a PL/PGSQL function which basically needs to do the >> follow

Re: [GENERAL] plpgsql function with offset - Postgres 9.1

2017-06-15 Thread Patrick B
2017-05-29 19:27 GMT+12:00 Albe Laurenz : > Patrick B wrote: > > I am running a background task on my DB, which will copy data from > tableA to tableB. For > > that, I'm writing a PL/PGSQL function which basically needs to do the > following: > > > > > > 1.Select the data from tableA > > 2.

Re: [GENERAL] Connection options

2017-06-15 Thread Tom Lane
Igor Korot writes: > On Thu, Jun 15, 2017 at 4:46 PM, David G. Johnston > wrote: >> The options you pass from the client via the "options" attribute are >> interpreted by *the server* as command-line options. They are not options >> that control libpq itself. > Can you give an example or try to

Re: [GENERAL] Connection options

2017-06-15 Thread David G. Johnston
On Thu, Jun 15, 2017 at 2:41 PM, Igor Korot wrote: > > On Thu, Jun 15, 2017 at 4:46 PM, David G. Johnston > wrote: > > On Thu, Jun 15, 2017 at 1:23 PM, Igor Korot wrote: > >> > >> And could you clarify on the first part of this? > >> From the quote I poste it sounds like this is available only

Re: [GENERAL] Connection options

2017-06-15 Thread Adrian Klaver
On 06/15/2017 02:41 PM, Igor Korot wrote: Hi, David, On Thu, Jun 15, 2017 at 4:46 PM, David G. Johnston wrote: On Thu, Jun 15, 2017 at 1:23 PM, Igor Korot wrote: And could you clarify on the first part of this? From the quote I poste it sounds like this is available only in command-line to

Re: [GENERAL] Connection options

2017-06-15 Thread Igor Korot
Hi, David, On Thu, Jun 15, 2017 at 4:46 PM, David G. Johnston wrote: > On Thu, Jun 15, 2017 at 1:23 PM, Igor Korot wrote: >> >> And could you clarify on the first part of this? >> From the quote I poste it sounds like this is available only in >> command-line >> tools. And if someone will use it

Re: [GENERAL] Connection options

2017-06-15 Thread David G. Johnston
On Thu, Jun 15, 2017 at 1:23 PM, Igor Korot wrote: > And could you clarify on the first part of this? > From the quote I poste it sounds like this is available only in > command-line > tools. And if someone will use it inside the program it will be ignored. > ​The options you pass from the clien

Re: [GENERAL] Connection options

2017-06-15 Thread Adrian Klaver
On 06/15/2017 01:23 PM, Igor Korot wrote: Hi, Adrian, On Thu, Jun 15, 2017 at 4:13 PM, Adrian Klaver wrote: On 06/15/2017 12:02 PM, Igor Korot wrote: Hi, again, On Thu, Jun 15, 2017 at 2:59 PM, Igor Korot wrote: Hi, ALL, I'm looking at the documentation at www.postgresql.org/docs/curr

Re: [GENERAL] Connection options

2017-06-15 Thread Igor Korot
Hi, Adrian, On Thu, Jun 15, 2017 at 4:13 PM, Adrian Klaver wrote: > On 06/15/2017 12:02 PM, Igor Korot wrote: >> >> Hi, again, >> >> On Thu, Jun 15, 2017 at 2:59 PM, Igor Korot wrote: >>> >>> Hi, ALL, >>> I'm looking at the documentation at >>> www.postgresql.org/docs/current/static/libpq-conn

Re: [GENERAL] Freeing memory in native extension in case of error

2017-06-15 Thread Gabriel Furstenheim Milerud
Great, thanks On 15 June 2017 at 22:07, Tom Lane wrote: > Gabriel Furstenheim Milerud writes: >> I've written an extension in C to sum jsonb. For that I use the >> jsonbiterator defined in >> https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/jsonb_util.c#L743 > >> In the com

Re: [GENERAL] Connection options

2017-06-15 Thread Adrian Klaver
On 06/15/2017 12:02 PM, Igor Korot wrote: Hi, again, On Thu, Jun 15, 2017 at 2:59 PM, Igor Korot wrote: Hi, ALL, I'm looking at the documentation at www.postgresql.org/docs/current/static/libpq-connect.html section 32.1.2. The part for "option" reads: [quote] Specifies command-line options

Re: [GENERAL] Freeing memory in native extension in case of error

2017-06-15 Thread Tom Lane
Gabriel Furstenheim Milerud writes: > I've written an extension in C to sum jsonb. For that I use the > jsonbiterator defined in > https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/jsonb_util.c#L743 > In the comments of JsonbIteratorNext it states: 'Callers in such a > scenar

[GENERAL] Freeing memory in native extension in case of error

2017-06-15 Thread Gabriel Furstenheim Milerud
Hi, I've written an extension in C to sum jsonb. For that I use the jsonbiterator defined in https://github.com/postgres/postgres/blob/master/src/backend/utils/adt/jsonb_util.c#L743 In the comments of JsonbIteratorNext it states: 'Callers in such a scenario, that are particularly sensitive to leak

Re: [GENERAL] Connection options

2017-06-15 Thread Igor Korot
Hi, again, On Thu, Jun 15, 2017 at 2:59 PM, Igor Korot wrote: > Hi, ALL, > I'm looking at the documentation at > www.postgresql.org/docs/current/static/libpq-connect.html > section 32.1.2. > > The part for "option" reads: > > [quote] > Specifies command-line options to send to the server... > [/

[GENERAL] Connection options

2017-06-15 Thread Igor Korot
Hi, ALL, I'm looking at the documentation at www.postgresql.org/docs/current/static/libpq-connect.html section 32.1.2. The part for "option" reads: [quote] Specifies command-line options to send to the server... [/quote] Does this mean that if I'm writing a C/C++ program, I shouldn't care about

Re: [GENERAL] Trigger problems/questions

2017-06-15 Thread Jim Fulton
On Thu, Jun 15, 2017 at 1:56 PM, Tom Lane wrote: > Jim Fulton writes: > > I have an object database that's mirrored to a table with data in a JSONB > > column. Data are organized into "communities". Community ids aren't > > stored directly in content but can be found by recursively following >

Re: [GENERAL] Trigger problems/questions

2017-06-15 Thread Tom Lane
Jim Fulton writes: > I have an object database that's mirrored to a table with data in a JSONB > column. Data are organized into "communities". Community ids aren't > stored directly in content but can be found by recursively following > __parent__ properties. I want to be able to index content

Re: [GENERAL] Trigger problems/questions

2017-06-15 Thread Jim Fulton
On Thu, Jun 15, 2017 at 1:44 PM, Adrian Klaver wrote: > On 06/15/2017 10:23 AM, Jim Fulton wrote: > ... > I do not pretend to fully understand what the the triggers/functions are > really doing, but I did notice this: > > create or replace function populate_community_zoid_triggerf() > > ... >

Re: [GENERAL] Trigger problems/questions

2017-06-15 Thread Adrian Klaver
On 06/15/2017 10:23 AM, Jim Fulton wrote: I have an object database that's mirrored to a table with data in a JSONB column. Data are organized into "communities". Community ids aren't stored directly in content but can be found by recursively following __parent__ properties. I want to be able

Re: [GENERAL] CREATE FOREIGN TABLE difficulties

2017-06-15 Thread Paul Lavoie
The ‘does not actually create’ the table was the piece I was missing. I wasn’t sure either way from reading the documentation for the command, but makes sense from a perspective of trying to keep the databases independent. One of the reasons I went down this path was the hopes to not need to ma

Re: [DOCS] [GENERAL] pg_upgrade --link on Windows

2017-06-15 Thread Bruce Momjian
On Tue, Jun 13, 2017 at 04:07:48PM -0400, Bruce Momjian wrote: > On Fri, Jun 9, 2017 at 07:55:55AM -0700, Adrian Klaver wrote: > I apologize for not being smarter on this thread. When I helped with > the Windows port, I was told Windows didn't have hard links for use by > tablespace directories,

Re: [GENERAL] CREATE FOREIGN TABLE difficulties

2017-06-15 Thread Adrian Klaver
On 06/15/2017 09:49 AM, Paul Lavoie wrote: Hi, Long time user, new poster… For assorted reasons I’ve decided to shard a database across multiple instances of postgresql running on the same machine. I’ve set up a lot of children servers with a ‘fdw’ user to work with the foreign data wrapper a

[GENERAL] Trigger problems/questions

2017-06-15 Thread Jim Fulton
I have an object database that's mirrored to a table with data in a JSONB column. Data are organized into "communities". Community ids aren't stored directly in content but can be found by recursively following __parent__ properties. I want to be able to index content records on their community i

Re: [GENERAL] Index-only scan on GIN index for COUNT() queries

2017-06-15 Thread Alexander Kuzmenkov
On 15.06.2017 17:43, Seamus Abshere wrote: Theoretically, could support be added for Index-only scans on GIN indexes when only a COUNT() is requested? Hi Seamus, I am working on a patch that adds this possibility for GIN and any other indexes that support bitmap scans. You can follow the deve

[GENERAL] CREATE FOREIGN TABLE difficulties

2017-06-15 Thread Paul Lavoie
Hi, Long time user, new poster… For assorted reasons I’ve decided to shard a database across multiple instances of postgresql running on the same machine. I’ve set up a lot of children servers with a ‘fdw’ user to work with the foreign data wrapper and created the child database along with a s

[GENERAL] Index-only scan on GIN index for COUNT() queries

2017-06-15 Thread Seamus Abshere
hi, We have a GIN index on jsonb_col. We always get Bitmap Index Scan + Bitmap Heap Scan when we do things like SELECT COUNT(*) FROM mytable WHERE jsonb_col ? 'key1' Theoretically, could support be added for Index-only scans on GIN indexes when only a COUNT() is requested? Thanks, Seamus PS. H

Re: [GENERAL] Repmgr + pgbouncer - Notification of master promotion to application level ...

2017-06-15 Thread Andreas Kretschmer
Am 15.06.2017 um 11:57 schrieb Martin Goodson: The issues I think I would have with pgbouncer at the application level is ... 1) What if an application server is down when pgbouncer tries to update where the database IP is pointing to? When it is brought back into service could that crea

Re: [GENERAL] Repmgr + pgbouncer - Notification of master promotion to application level ...

2017-06-15 Thread Martin Goodson
On 15/06/2017 05:27, Andreas Kretschmer wrote: Am 15.06.2017 um 01:18 schrieb Martin Goodson: I'm just wondering how people may have implemented this. Do people setup pgbouncer nodes on the database servers themselves, on application servers, in the middle tier between the application and