Re: [GENERAL] pgpool fail to load balance after database restart

2016-10-11 Thread Tatsuo Ishii
Michael, He already posted the identical question to the Pgpool-II mailing list yesterday. Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese:http://www.sraoss.co.jp > On Wed, Oct 12, 2016 at 10:04 AM, Dylan Luong

Re: [GENERAL] ANN: Upscene releases Database Workbench 5.2.4

2016-10-11 Thread Michael Paquier
On Tue, Oct 11, 2016 at 5:18 PM, John R Pierce wrote: > On 10/11/2016 12:09 AM, Martijn Tonies (Upscene Productions) wrote: >> >> Upscene Productions is proud to announce the availability of >> the next version of the popular multi-DBMS development tool: >> " Database

Re: [GENERAL] pgpool fail to load balance after database restart

2016-10-11 Thread Michael Paquier
On Wed, Oct 12, 2016 at 10:04 AM, Dylan Luong wrote: > I am new to pgpool. You may want to ask directly on the mailing lists of pgpool, even if Tatsuo-san or anybody involved in it are looking at this mailing list: http://pgpool.net/mediawiki/index.php/Mailing_lists --

[GENERAL] pgpool fail to load balance after database restart

2016-10-11 Thread Dylan Luong
Hi, I am new to pgpool. I have just installed pgpool and configured Master/Slave mode with "stream" sub_mode. I have enabled load balance as that is the main feature we want test out. I have enabled Health Check. The load balance appears to work as I can see connections to both Master and

Re: [GENERAL] BDR: changing dsn on a running node

2016-10-11 Thread Craig Ringer
On 12 October 2016 at 00:55, Sylvain MARECHAL wrote: > Le 07/10/2016 à 23:54, Natan Abolafya a écrit : > > Is it possible to change the dsn connection string of a node without leaving > the group? I couldn’t find the related documentation unfortunately. > > We’re

Re: [GENERAL] LOG: munmap(0x7fff80000000) failed: Invalid argument

2016-10-11 Thread Tom Lane
Chris Richards writes: > Oh the email spam :P No problem. I'm starting to think that this isn't actually a Postgres bug, but rather something funny with your kernel. The code in sysv_shmem is certainly as fragile as can be, but I'm darned if I can find an existing code path

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-11 Thread Jason Dusek
SELECT version(), (SELECT setting FROM pg_settings WHERE name = 'default_transaction_deferrable') AS default_transaction_deferrable, (SELECT setting FROM pg_settings WHERE name = 'default_transaction_isolation') AS default_transaction_isolation; ─[ RECORD 1

Re: [GENERAL] LOG: munmap(0x7fff80000000) failed: Invalid argument

2016-10-11 Thread Chris Richards
Oh the email spam :P I did another reboot test to validate the error. It does exist; it does not spam munmap error like it did with the aptitude install. I then marked the log file, shutdown (1 munmap during), marked it again and then started it (1 munmap during). MARK PRE-SHUTDOWN 2016-10-11

Re: [GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-11 Thread Kevin Grittner
On Tue, Oct 11, 2016 at 2:29 PM, Jason Dusek wrote: > I notice the following oddity: > =# CREATE TABLE with_pk (i integer PRIMARY KEY); > CREATE TABLE > =# BEGIN; > BEGIN > =# INSERT INTO with_pk VALUES (2), (2) ON CONFLICT DO NOTHING; > ERROR: could not serialize

Re: [GENERAL] LOG: munmap(0x7fff80000000) failed: Invalid argument

2016-10-11 Thread Chris Richards
One extra bit, if this helps: chrisr@ff1:~$ cat /proc/meminfo MemTotal:8163104 kB MemFree: 2183692 kB MemAvailable:3648680 kB Buffers: 170080 kB Cached: 1231708 kB SwapCached:0 kB Active: 1083596 kB Inactive: 442312 kB

Re: [GENERAL] LOG: munmap(0x7fff80000000) failed: Invalid argument

2016-10-11 Thread Chris Richards
What more would you like--I'm happy to oblige? The upgrade steps I listed installed into a new directory, new conf file. I didn't even migrate my (skeletal) 9.3 database. Here's the 9.5 command-line. I've attached the referenced config file. $ chrisr@ff1:~$ ps ax | grep bin/post 10 ?S

Re: [GENERAL] My DB has has 5TB, many operations are very slow (on Google Cloud Compute)

2016-10-11 Thread Melvin Davidson
On Tue, Oct 11, 2016 at 3:16 PM, Francisco Olarte wrote: > Rakesh: > > On Tue, Oct 11, 2016 at 9:00 PM, Rakesh Kumar > wrote: > >>Cores do not help, postgres is single-threaded. RAM MAY help, but I > > I hope this is no longer true from 9.6

[GENERAL] SERIALIZABLE and INSERTs with multiple VALUES

2016-10-11 Thread Jason Dusek
Hi All, I notice the following oddity: =# CREATE TABLE with_pk (i integer PRIMARY KEY);CREATE TABLE =# BEGIN;BEGIN =# INSERT INTO with_pk VALUES (1) ON CONFLICT DO NOTHING;INSERT 0 1 =# INSERT INTO with_pk VALUES (1) ON CONFLICT DO NOTHING;INSERT 0 0 =# END;COMMIT =# BEGIN;BEGIN =#

Re: [GENERAL] My DB has has 5TB, many operations are very slow (on Google Cloud Compute)

2016-10-11 Thread Francisco Olarte
Rakesh: On Tue, Oct 11, 2016 at 9:00 PM, Rakesh Kumar wrote: >>Cores do not help, postgres is single-threaded. RAM MAY help, but I > I hope this is no longer true from 9.6 for those queries where PG can use > parallelism. It does, AFAIK, but for queries, not AFAIK

Re: [GENERAL] My DB has has 5TB, many operations are very slow (on Google Cloud Compute)

2016-10-11 Thread Francisco Olarte
Melvin: On Tue, Oct 11, 2016 at 8:33 PM, Melvin Davidson wrote: > FYI, moving between tablespaces requires an exclusive table lock, so it's > naturally going to be slow. Requiring and exclusive table lock does not imply slownes. Just try 'lock table x in exclusive mode'

Re: [GENERAL] My DB has has 5TB, many operations are very slow (on Google Cloud Compute)

2016-10-11 Thread Lucas Possamai
> > Instance RAM: 60GB > Instance CPU: 16Cores I got a 3TB Postgres Database running with a Dual Socket Octo Core Intel Xeon E5-2630v3 with 128GB of RAM and SATA disks. I think yes, you could improve your server's RAM. However Melvin is right, there is no enough information. Lucas

Re: [GENERAL] My DB has has 5TB, many operations are very slow (on Google Cloud Compute)

2016-10-11 Thread Rakesh Kumar
>Cores do not help, postgres is single-threaded. RAM MAY help, but I I hope this is no longer true from 9.6 for those queries where PG can use parallelism. >suspect your operations are IO bound. Of course, with the sparseness >of the details, one can not say too much. -- Sent via

Re: [GENERAL] My DB has has 5TB, many operations are very slow (on Google Cloud Compute)

2016-10-11 Thread Melvin Davidson
On Tue, Oct 11, 2016 at 2:17 PM, Francisco Olarte wrote: > On Thu, Oct 6, 2016 at 12:36 AM, David A wrote: > > My DB has has 5TB, it's on Google Cloud Compute, mostly on SSDs, part on > > Standard Persistent Disks. > > Querying is ok, but

Re: [GENERAL] Postgresql using lxd faild to find address

2016-10-11 Thread Scott Mead
On Mon, Oct 10, 2016 at 11:25 AM, Scottix wrote: > Hi I am using postgresql 9.5 in lxd container on Ubuntu. Using the stock > 64bit 16.04 ubuntu image. Postgres is working just fine within the > container, but when I try to assign the ip address associated to the > container

Re: [GENERAL] My DB has has 5TB, many operations are very slow (on Google Cloud Compute)

2016-10-11 Thread Francisco Olarte
On Thu, Oct 6, 2016 at 12:36 AM, David A wrote: > My DB has has 5TB, it's on Google Cloud Compute, mostly on SSDs, part on > Standard Persistent Disks. > Querying is ok, but deleting, moving between tablespaces, dropping tables, > etc, etc is hugely slow > (note: I do have

Re: [GENERAL] forcing a table (parent in inheritance) tor emain empty

2016-10-11 Thread Rémi Cura
Perfect ! Cheers, Rémi C 2016-10-11 19:12 GMT+02:00 Julien Rouhaud : > On 11/10/2016 19:04, Rémi Cura wrote: > > This solution is very nice. > > Sadly the check is inherited by the children > > (I only want the parent to be empty, not the children). > > > > It seems

Re: [GENERAL] forcing a table (parent in inheritance) tor emain empty

2016-10-11 Thread Julien Rouhaud
On 11/10/2016 19:04, Rémi Cura wrote: > This solution is very nice. > Sadly the check is inherited by the children > (I only want the parent to be empty, not the children). > > It seems the element that are not inherited are > > * Indexes > * Unique constraints > * Primary Keys > *

Re: [GENERAL] forcing a table (parent in inheritance) tor emain empty

2016-10-11 Thread Rémi Cura
This solution is very nice. Sadly the check is inherited by the children (I only want the parent to be empty, not the children). It seems the element that are not inherited are - Indexes - Unique constraints - Primary Keys - Foreign keys - Rules and Triggers thanks anyway for

Re: [GENERAL] BDR: changing dsn on a running node

2016-10-11 Thread Sylvain MARECHAL
Le 07/10/2016 à 23:54, Natan Abolafya a écrit : Hi Is it possible to change the dsn connection string of a node without leaving the group? I couldn’t find the related documentation unfortunately. We’re using BDR in a dynamic environment where the hostname/ip of a node may be changed any

Re: [GENERAL] forcing a table (parent in inheritance) tor emain empty

2016-10-11 Thread Manuel Gómez
On Tue, Oct 11, 2016 at 12:27 PM, Rémi Cura wrote: > Hey dear list, > I can't find a nice solution to enforce a necessary behaviour in my case : > I want a parent table to remain empty. > > Of course I could define a trigger and return NULL in any case, but I'd like > a more

[GENERAL] Postgresql using lxd faild to find address

2016-10-11 Thread Scottix
Hi I am using postgresql 9.5 in lxd container on Ubuntu. Using the stock 64bit 16.04 ubuntu image. Postgres is working just fine within the container, but when I try to assign the ip address associated to the container it fails to recognize it at boot. When I restart postgresql it recognizes it

[GENERAL] BDR: changing dsn on a running node

2016-10-11 Thread Natan Abolafya
Hi Is it possible to change the dsn connection string of a node without leaving the group? I couldn't find the related documentation unfortunately. We're using BDR in a dynamic environment where the hostname/ip of a node may be changed any time. Leaving and rejoining the BDR group seems to be

[GENERAL] My DB has has 5TB, many operations are very slow (on Google Cloud Compute)

2016-10-11 Thread David A
Hi, My DB has has 5TB, it's on Google Cloud Compute, mostly on SSDs, part on Standard Persistent Disks. Querying is ok, but deleting, moving between tablespaces, dropping tables, etc, etc is hugely slow (note: I do have a number of indexes) Instance RAM: 60GB Instance CPU: 16Cores I'm just

[GENERAL] forcing a table (parent in inheritance) tor emain empty

2016-10-11 Thread Rémi Cura
Hey dear list, I can't find a nice solution to enforce a necessary behaviour in my case : I want a parent table to remain empty. Of course I could define a trigger and return NULL in any case, but I'd like a more elegant approach using check or constraints. Any thought appreciated, Cheers, Rémi

Re: [GENERAL] confusion about user paring with pg_hba and pg_ident

2016-10-11 Thread Tom Lane
arnaud gaboury writes: > I am a little confused about some of my settings when it comes to map > linux/psql users. I think you're misunderstanding what the user-mapping stuff does. It does not silently translate the username in the connection request to something else;

Re: [GENERAL] Create recursive view schema.name

2016-10-11 Thread Lele Gaifax
Tom Lane writes: > The manual says > CREATE RECURSIVE VIEW name (columns) AS SELECT ...; > is equivalent to > CREATE VIEW name AS WITH RECURSIVE name (columns) AS (SELECT ...) > SELECT columns FROM name; > > I guess it could be more explicit about the fact

Re: [GENERAL] confusion about user paring with pg_hba and pg_ident

2016-10-11 Thread Adrian Klaver
On 10/11/2016 06:47 AM, arnaud gaboury wrote: Did you remember to reload Postgres? YES I did it this time My mistake, forget to look at your connection string: psql postgres:///mattermost You have not told Postgres what user you want mattermost to connect as. It worked for you

Re: [GENERAL] confusion about user paring with pg_hba and pg_ident

2016-10-11 Thread arnaud gaboury
On Tue, Oct 11, 2016 at 3:45 PM Adrian Klaver wrote: > On 10/11/2016 04:25 AM, arnaud gaboury wrote: > > > I am a little confused about some of my settings when it comes to map > > > linux/psql users. > > > > > > I have two databases: mattermost and thetradinghall > >

Re: [GENERAL] Create recursive view schema.name

2016-10-11 Thread Tom Lane
Lele Gaifax writes: > I have a working recursive-CTE query, and I tried wrapping it in a view: > reading the documentation I found the "CREATE RECURSIVE VIEW" form, so I tried > it. > It works as far as I use a "simple" name for the view: > but I get an error when I create

Re: [GENERAL] confusion about user paring with pg_hba and pg_ident

2016-10-11 Thread Adrian Klaver
On 10/11/2016 04:25 AM, arnaud gaboury wrote: I am a little confused about some of my settings when it comes to map linux/psql users. I have two databases: mattermost and thetradinghall I have two linux users: mattermost and dovecot. mattermost is the one who want to talk to mattermost and

Re: [GENERAL] ALTER TABLE without long waiting is possibly ?

2016-10-11 Thread Condor
On 11-10-2016 15:59, Vitaly Burovoy wrote: On 10/11/16, Condor wrote: Hello, today I need to alter one of our biggest tables to add two new columns with default value 0. Server version: PostgreSQL 9.5.4 on x86_64-slackware-linux-gnu, compiled by

Re: [GENERAL] HA Cluster Solution?

2016-10-11 Thread Andreas Kretschmer
On 10 October 2016 21:14:55 CEST, Periko Support wrote: >I'm trying to get better numbers, is a option in the table. >Meanwhile I reading some system performance numbers. >Yes odoo is strange sometimes. >But a cluster will be good for HA. >Thanks. > > Please

Re: [GENERAL] ALTER TABLE without long waiting is possibly ?

2016-10-11 Thread Vitaly Burovoy
On 10/11/16, Condor wrote: > > Hello, > > today I need to alter one of our biggest tables to add two new columns > with default value 0. > Server version: PostgreSQL 9.5.4 on x86_64-slackware-linux-gnu, compiled > by x86_64-slackware-linux-gcc (GCC) 5.3.0, 64-bit > > when I do:

[GENERAL] confusion about user paring with pg_hba and pg_ident

2016-10-11 Thread arnaud gaboury
I am a little confused about some of my settings when it comes to map linux/psql users. I have two databases: mattermost and thetradinghall I have two linux users: mattermost and dovecot. mattermost is the one who want to talk to mattermost and dovecot the one who want to talk to

Re: [GENERAL] Transactional-DDL DROP/CREATE TABLE

2016-10-11 Thread Geoff Winkless
On 10 October 2016 at 14:49, Merlin Moncure wrote: > MVCC rules (which DDL generally fall under) try to interleave work as > much as possible which is the problem you're facing. Mmff. Yes, that exposes a fundamental misunderstanding on my part: I had thought that under MVCC

[GENERAL] ALTER TABLE without long waiting is possibly ?

2016-10-11 Thread Condor
Hello, today I need to alter one of our biggest tables to add two new columns with default value 0. Server version: PostgreSQL 9.5.4 on x86_64-slackware-linux-gnu, compiled by x86_64-slackware-linux-gcc (GCC) 5.3.0, 64-bit when I do: ALTER TABLE stocks ADD COLUMN promo INTEGER DEFAULT 0;

Re: [GENERAL] ANN: Upscene releases Database Workbench 5.2.4

2016-10-11 Thread John R Pierce
On 10/11/2016 12:09 AM, Martijn Tonies (Upscene Productions) wrote: Upscene Productions is proud to announce the availability of the next version of the popular multi-DBMS development tool: " Database Workbench 5.2.4 " The 5.2 release includes support for PostgreSQL and adds several other

[GENERAL] Create recursive view schema.name

2016-10-11 Thread Lele Gaifax
Hi all, I'm using PG 9.6, learning the "recursive" queries. I have a working recursive-CTE query, and I tried wrapping it in a view: reading the documentation I found the "CREATE RECURSIVE VIEW" form, so I tried it. It works as far as I use a "simple" name for the view: CREATE OR REPLACE

[GENERAL] ANN: Upscene releases Database Workbench 5.2.4

2016-10-11 Thread Martijn Tonies (Upscene Productions)
Upscene Productions is proud to announce the availability of the next version of the popular multi-DBMS development tool: " Database Workbench 5.2.4 " The 5.2 release includes support for PostgreSQL and adds several other features and bugfixes. Database Workbench 5 comes in multiple editions