Re: [GENERAL] Unique constraint on field inside composite type.

2016-08-22 Thread Adrian Klaver
On 08/22/2016 06:23 PM, Tom Lane wrote: Adrian Klaver writes: On 08/17/2016 11:02 PM, Silk Parrot wrote: CREATE TABLE user ( uuid UUID PRIMARY KEY DEFAULT public.uuid_generate_v4(), google_user system.google_user, facebook_user system.facebook_user, UNIQUE (google_user.email) ); ERROR: syntax

Re: [GENERAL] Permissions pg_dump / import

2016-08-22 Thread Tom Lane
Patrick B writes: > I'm doing a pg_dump and a pg_restore on the same command, using different > usernames and databases names.: > ... > But I'm getting some permissions errors: > could not execute query: ERROR: role "devel" does not exist If that's from > REVOKE ALL ON SCHEMA public FROM devel;

Re: [GENERAL] Permissions pg_dump / import

2016-08-22 Thread Patrick B
Hi guys, I'm doing a pg_dump and a pg_restore on the same command, using different usernames and databases names.: pg_dump --format=custom -v --no-password --no-owner --username=teste1 > --dbname=test1 --host=11.11.11.11 | pg_restore -v --schema=public > --no-password --no-owner --username=maste

Re: [GENERAL] Unique constraint on field inside composite type.

2016-08-22 Thread Tom Lane
Adrian Klaver writes: > On 08/17/2016 11:02 PM, Silk Parrot wrote: >> CREATE TABLE user ( >> uuid UUID PRIMARY KEY DEFAULT public.uuid_generate_v4(), >> google_user system.google_user, >> facebook_user system.facebook_user, >> UNIQUE (google_user.email) >> ); >> ERROR: syntax error at or near "."

Re: [GENERAL] Why insertion throughput can be reduced with an increase of batch size?

2016-08-22 Thread Adrian Klaver
On 08/21/2016 11:53 PM, Павел Филонов wrote: My greetings to everybody! I recently faced with the observation which I can not explain. Why insertion throughput can be reduced with an increase of batch size? Brief description of the experiment. * PostgreSQL 9.5.4 as server * https://github.

Re: [GENERAL] Unique constraint on field inside composite type.

2016-08-22 Thread Adrian Klaver
On 08/17/2016 11:02 PM, Silk Parrot wrote: Hi, I am trying to model a social login application. The application can support multiple login providers. I am thinking of creating a custom type for each provider. e.g. CREATE TYPE system.google_user AS ( email TEXT ); CREATE TYPE system.face

Re: [GENERAL] Unique constraint on field inside composite type.

2016-08-22 Thread Bruno Wolff III
On Wed, Aug 17, 2016 at 23:02:53 -0700, Silk Parrot wrote: Hi,     I am trying to model a social login application. The application can support multiple login providers. I am thinking of creating a custom type for each provider. e.g. CREATE TABLE user (     uuid UUID PRIMARY KEY DEFAULT pub

Re: [GENERAL] Why insertion throughput can be reduced with an increase of batch size?

2016-08-22 Thread Jeff Janes
On Sun, Aug 21, 2016 at 11:53 PM, Павел Филонов wrote: > My greetings to everybody! > > I recently faced with the observation which I can not explain. Why > insertion throughput can be reduced with an increase of batch size? > > Brief description of the experiment. > >- PostgreSQL 9.5.4 as se

Re: [GENERAL] Unique constraint on field inside composite type.

2016-08-22 Thread David G. Johnston
On Thu, Aug 18, 2016 at 2:02 AM, Silk Parrot wrote: > > However, the above create table query reports syntax error: > > ERROR: syntax error at or near "." > LINE 10: UNIQUE (google_user.email) > > Is there a way to create unique constraint on a field inside composite > type? > ​Not tested h

[GENERAL] Re: Easiest way to compare the results of two queries row by row and column by column

2016-08-22 Thread gilad905
Didn't mean to give the impression I'm 'shouting' :) just wanted to make sure other users will notice my reply. But you're right! it does. It even disregards the order of the rows. For some reason in a previous test I looked to me like it didn't. -- View this message in context: http://postgres

[GENERAL] Why insertion throughput can be reduced with an increase of batch size?

2016-08-22 Thread Павел Филонов
My greetings to everybody! I recently faced with the observation which I can not explain. Why insertion throughput can be reduced with an increase of batch size? Brief description of the experiment. - PostgreSQL 9.5.4 as server - https://github.com/sfackler/rust-postgres library as client

[GENERAL] Unique constraint on field inside composite type.

2016-08-22 Thread Silk Parrot
Hi,     I am trying to model a social login application. The application can support multiple login providers. I am thinking of creating a custom type for each provider. e.g. CREATE TYPE system.google_user AS (    email TEXT ); CREATE TYPE system.facebook_user AS (    id TEXT );    And having

Re: [GENERAL] incorrect checksum detected on "global/pg_filenode.map" when VACUUM FULL is executed

2016-08-22 Thread Kevin Grittner
On Mon, Aug 22, 2016 at 3:02 AM, Michael Paquier wrote: > On Mon, Aug 22, 2016 at 4:45 PM, Tatsuki Kadomoto > wrote: >> Thanks for suggestion for upgrade. I know that's the way to go, but it's not >> so easy due to circumstances on my side. > > Well, I guess it depends on how much you care about

Re: [GENERAL] PG vs ElasticSearch for Logs

2016-08-22 Thread Andy Colson
On 8/22/2016 2:39 AM, Thomas Güttler wrote: Am 19.08.2016 um 19:59 schrieb Andy Colson: On 8/19/2016 2:32 AM, Thomas Güttler wrote: I want to store logs in a simple table. Here my columns: Primary-key (auto generated) timestamp host service-on-host loglevel msg json (optional)

Re: [GENERAL] PG vs ElasticSearch for Logs

2016-08-22 Thread Sameer Kumar
On Mon, 22 Aug 2016, 3:40 p.m. Thomas Güttler, wrote: > > > Am 19.08.2016 um 19:59 schrieb Andy Colson: > > On 8/19/2016 2:32 AM, Thomas Güttler wrote: > >> I want to store logs in a simple table. > >> > >> Here my columns: > >> > >> Primary-key (auto generated) > >> timestamp > >> host > >

Re: [GENERAL] incorrect checksum detected on "global/pg_filenode.map" when VACUUM FULL is executed

2016-08-22 Thread Tatsuki Kadomoto
Michael, Thank you very much. Regards, Tatsuki From: Michael Paquier Sent: Monday, August 22, 2016 5:02:40 PM To: Tatsuki Kadomoto Cc: John R Pierce; PostgreSQL mailing lists Subject: Re: [GENERAL] incorrect checksum detected on "global/pg_filenode.map" when

Re: [GENERAL] incorrect checksum detected on "global/pg_filenode.map" when VACUUM FULL is executed

2016-08-22 Thread Michael Paquier
On Mon, Aug 22, 2016 at 4:45 PM, Tatsuki Kadomoto wrote: > Thanks for suggestion for upgrade. I know that's the way to go, but it's not > so easy due to circumstances on my side. Well, I guess it depends on how much you care about your data. > Meanwhile, could you tell me what is this "global/pg

Re: [GENERAL] incorrect checksum detected on "global/pg_filenode.map" when VACUUM FULL is executed

2016-08-22 Thread Tatsuki Kadomoto
John, Michael, Thanks for suggestion for upgrade. I know that's the way to go, but it's not so easy due to circumstances on my side. Meanwhile, could you tell me what is this "global/pg_filenode.map" for? Regards, Tatsuki From: pgsql-general-ow...@postgresq

Re: [GENERAL] PG vs ElasticSearch for Logs

2016-08-22 Thread Thomas Güttler
Am 19.08.2016 um 19:59 schrieb Andy Colson: On 8/19/2016 2:32 AM, Thomas Güttler wrote: I want to store logs in a simple table. Here my columns: Primary-key (auto generated) timestamp host service-on-host loglevel msg json (optional) I am unsure which DB to choose: Postgres, E

Re: [GENERAL] PG vs ElasticSearch for Logs

2016-08-22 Thread Thomas Güttler
Thank you Chris for looking at my issue in such detail. Yes, the parallel feature rocks. Regards, Thomas Güttler Am 19.08.2016 um 22:40 schrieb Chris Mair: On 19/08/16 10:57, Thomas Güttler wrote: What do you think? I store most of my logs in flat textfiles syslog style, and use grep fo