Re: [GENERAL] how can I use "pg_basebackup" and not include pg_log of master ?

2017-03-20 Thread Michael Paquier
On Tue, Mar 21, 2017 at 12:08 PM, lin wrote: > Can I modify "sendDir" function to skip the log_direction (default is > "pg_log") ? Of course you can patch your own version of the backend. That will just not be supported by community if there are bugs in your patches. You are looking at Log_direc

Re: [GENERAL] how can I use "pg_basebackup" and not include pg_log of master ?

2017-03-20 Thread lin
Can I modify "sendDir" function to skip the log_direction (default is "pg_log") ? the sendDir function is : static int64 sendDir(char *path, int basepathlen, bool sizeonly, List *tablespaces) { DIR *dir; struct dirent *de; charpathbuf[MAXPGPATH]; struct stat statbuf; int64size = 0; dir =

[GENERAL] Why is this functional index not used?

2017-03-20 Thread Klaus P. Pieper
Given a country table and an order table: CREATE TABLE g.country ( -- inherited from table g.standard: oid uuid NOT NULL, -- … some more columns inherited… lisocode integer NOT NULL, -- Numeric ISO 3166 code szisoalpha2 character varying(2), -- The 2 letter country code szisoalpha

Re: [GENERAL] Advice about software engineering inside Postgres?

2017-03-20 Thread Merlin Moncure
On Mon, Mar 20, 2017 at 2:32 PM, Guyren Howe wrote: > I’m working on a project to get the likes of web developers to make more > effective use of Postgres. This amounts to saying that much of the M in MVC > should be implemented as code and relations in Postgres. > This is fairly insightful, I t

[GENERAL] Advice about software engineering inside Postgres?

2017-03-20 Thread Guyren Howe
I’m working on a project to get the likes of web developers to make more effective use of Postgres. This amounts to saying that much of the M in MVC should be implemented as code and relations in Postgres. The more I think about this, the more I see that a model written in Node, say, that just

Re: [GENERAL] JSONB Overlap Operator.

2017-03-20 Thread Merlin Moncure
On Fri, Mar 17, 2017 at 9:43 AM, Eduardo Felipe wrote: > Hi there! > > In a project I was experimenting with replacing array columns with JSONB > columns, to allow a greater flexibility of types. > > One thing that I found missing is the "overlap" operator (&&). > > JSONB includes all other operat

Re: [GENERAL] Google Cloud Platform, snapshots and WAL

2017-03-20 Thread Ben Chobot
> On Mar 20, 2017, at 6:31 AM, Moreno Andreo wrote: > > Hi everyone, > >I have my PostgreSQL 9.5 server running on a VM instance on Google Compute > Engine (Google Cloud Platform) on Debian Jessie (8.3), and I have another > dedicated VM instance that, every night at 3.00, takes a snapsho

Re: [GENERAL] Postgres goes to auto recovery mode after system restart(check this draft)

2017-03-20 Thread George Neuner
On Mon, 20 Mar 2017 12:05:01 +0100, Karsten Hilbert wrote: >On Mon, Mar 20, 2017 at 06:48:36AM -0400, George Neuner wrote: > >> Windows informs all processes that it is shutting down (or entering >> sleep, or waking up, etc.), but the notifications take different forms >> depending on whether the

Re: [GENERAL] CenOS 5/Postgresql 9.6

2017-03-20 Thread Steve Crawford
Looks like I'll be compiling. BTW, I'm not planning on running a server on it but have a couple pieces of expensive specialized hardware that are only certified on RHEL 5 i386 systems. They do need to talk to the server and I don't want to delay the migration of the rest of the infrastructure just

[GENERAL] JSONB Overlap Operator.

2017-03-20 Thread Eduardo Felipe
Hi there! In a project I was experimenting with replacing array columns with JSONB columns, to allow a greater flexibility of types. One thing that I found missing is the "overlap" operator (&&) . JSONB includes all other operators

Re: [GENERAL] pg_dump pg_restore hanging in CentOS for large data

2017-03-20 Thread Sridevi B
Hi Tom, Please find my answers below. ->ulimit : Verified in file /etc/security/limits.conf - it has been configured as 2. Should I increase the limit and try again? please let me know. root - nofile 2 postgres - nofile 2 ->ssl_renegotiation_limit : Its been set as

Re: [GENERAL] Best way to alter a foreign constraint

2017-03-20 Thread Melvin Davidson
On Mon, Mar 20, 2017 at 11:07 AM, Sylvain MARECHAL < marechal.sylva...@gmail.com> wrote: > Le 19/03/2017 à 09:54, Sylvain Marechal a écrit : > > 2017-03-18 20:40 GMT+01:00 Adrian Klaver : > >> On 03/18/2017 12:05 PM, Sylvain Marechal wrote: >> >>> Hello all, >>> >>> Some of my tables were badly de

Re: [GENERAL] Best way to alter a foreign constraint

2017-03-20 Thread Sylvain MARECHAL
Le 19/03/2017 à 09:54, Sylvain Marechal a écrit : 2017-03-18 20:40 GMT+01:00 Adrian Klaver >: On 03/18/2017 12:05 PM, Sylvain Marechal wrote: Hello all, Some of my tables were badly designed and have 2 indexes, like the following ex

Re: [GENERAL] Postgres goes to auto recovery mode after system restart(check this draft)

2017-03-20 Thread Tom Lane
Karsten Hilbert writes: > On Mon, Mar 20, 2017 at 06:48:36AM -0400, George Neuner wrote: >> pg_ctl is a command-line program that can run as a service. But since >> it creates no window, when run as an application it cannot receive any >> environment messages. > Would it make sense to have pg_ct

[GENERAL] Google Cloud Platform, snapshots and WAL

2017-03-20 Thread Moreno Andreo
Hi everyone, I have my PostgreSQL 9.5 server running on a VM instance on Google Compute Engine (Google Cloud Platform) on Debian Jessie (8.3), and I have another dedicated VM instance that, every night at 3.00, takes a snapshot of the whole disk, without stopping the PG instance itself. Sn

Re: [GENERAL] testcase failing on git master / how to progress

2017-03-20 Thread Michael Paquier
On Sat, Mar 18, 2017 at 2:06 PM, Tom Lane wrote: > If critters are falling over left and right on the commit you pulled, > then you got a bad version. If all is green on the buildfarm but > it's not working for you, then we'd like to hear details. If you can still produce failures even on latest

Re: [GENERAL] how can I use "pg_basebackup" and not include pg_log of master ?

2017-03-20 Thread Michael Paquier
On Mon, Mar 20, 2017 at 9:28 PM, lin wrote: >all. I use "pg_basebackup" to make slave, but the master has too large > logs of pg_log, How Can I use "pg_basebackup" but not include logs of > "pg_log" ? Unfortunately not, there have been several discussions about being able to define a blacklis

[GENERAL] how can I use "pg_basebackup" and not include pg_log of master ?

2017-03-20 Thread lin
Hi, all. I use "pg_basebackup" to make slave, but the master has too large logs of pg_log, How Can I use "pg_basebackup" but not include logs of "pg_log" ? best regards, wln

Re: [GENERAL] Postgres goes to auto recovery mode after system restart(check this draft)

2017-03-20 Thread Karsten Hilbert
On Mon, Mar 20, 2017 at 06:48:36AM -0400, George Neuner wrote: > Windows informs all processes that it is shutting down (or entering > sleep, or waking up, etc.), but the notifications take different forms > depending on whether the process is a service or a normal application. > Services receive

Re: [GENERAL] Postgres goes to auto recovery mode after system restart(check this draft)

2017-03-20 Thread George Neuner
On Mon, 20 Mar 2017 11:04:35 +0100, Francisco Olarte wrote: >Manoj: > >On Mon, Mar 20, 2017 at 10:55 AM, Manojkumar S > wrote: >> I started Postgres from command line using pg_ctl.exe and restarted my >> windows machine. Whenever I start postgres again after machine restart, >> postgres goe

Re: [GENERAL] Postgres goes to auto recovery mode after system restart(check this draft)

2017-03-20 Thread Francisco Olarte
Manoj: On Mon, Mar 20, 2017 at 10:55 AM, Manojkumar S wrote: > I started Postgres from command line using pg_ctl.exe and restarted my > windows machine. Whenever I start postgres again after machine restart, > postgres goes to auto recovery mode. What is the reason for this behavior? Uncle

[GENERAL] Postgres goes to auto recovery mode after system restart(check this draft)

2017-03-20 Thread Manojkumar S
Hello, I started Postgres from command line using pg_ctl.exe and restarted my windows machine. Whenever I start postgres again after machine restart, postgres goes to auto recovery mode. What is the reason for this behavior? Is there a way to overcome this? . The same behavior is being