Re: [GENERAL] Question about performance - Postgres 9.5

2016-08-16 Thread Sameer Kumar
On Wed, 17 Aug 2016, 1:36 p.m. Venkata B Nagothi, wrote: > On Mon, Jun 13, 2016 at 8:37 AM, Patrick B > wrote: > >> Hi guys, >> >> In the db I'm working one, it will be three tables: >> >> visits, work, others. >> >> Everything the customer do, will be logged. All inserts/updates/deletes >> will

Re: [GENERAL] Question about performance - Postgres 9.5

2016-08-16 Thread Venkata B Nagothi
On Mon, Jun 13, 2016 at 8:37 AM, Patrick B wrote: > Hi guys, > > In the db I'm working one, it will be three tables: > > visits, work, others. > > Everything the customer do, will be logged. All inserts/updates/deletes > will be logged. > > Option 1: Each table would have its own log table. > vis

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Venkata B Nagothi
On Wed, Aug 17, 2016 at 2:09 PM, Sameer Kumar wrote: > > > On Wed, Aug 17, 2016 at 12:00 PM Venkata B Nagothi > wrote: > >> On Wed, Aug 17, 2016 at 1:31 PM, Sameer Kumar >> wrote: >> >>> >>> >>> On Wed, Aug 17, 2016 at 10:34 AM Patrick B >>> wrote: >>> Hi guys, I'm using Postgre

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Sameer Kumar
On Wed, Aug 17, 2016 at 11:51 AM Patrick B wrote: > >> >> But do you have statements which causes Exclusive Locks? Ignoring them in >> OLTP won't make your life any easier. >> >> (Keeping avoiding to get into 'recovery conflict' as your sole goal) If >> you decide to run pg_dump from master, it

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Sameer Kumar
On Wed, Aug 17, 2016 at 12:00 PM Venkata B Nagothi wrote: > On Wed, Aug 17, 2016 at 1:31 PM, Sameer Kumar > wrote: > >> >> >> On Wed, Aug 17, 2016 at 10:34 AM Patrick B >> wrote: >> >>> Hi guys, >>> >>> I'm using PostgreSQL 9.2 and I got one master and one slave with >>> streaming replication.

Re: [GENERAL] schema advice for event stream with tagging and filtering

2016-08-16 Thread Venkata B Nagothi
On Tue, Aug 16, 2016 at 6:38 PM, Chris Withers wrote: > Hi All, > > What would be the best schema to use when looking to implement an event > stream with tagging and filtering? > > An event is a row with a primary key along the lines of (colo, host, > category) and an associated set of tags, wher

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Venkata B Nagothi
On Wed, Aug 17, 2016 at 1:31 PM, Sameer Kumar wrote: > > > On Wed, Aug 17, 2016 at 10:34 AM Patrick B > wrote: > >> Hi guys, >> >> I'm using PostgreSQL 9.2 and I got one master and one slave with >> streaming replication. >> >> Currently, I got a backup script that runs daily from the master, it

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Patrick B
> > > > But do you have statements which causes Exclusive Locks? Ignoring them in > OLTP won't make your life any easier. > > (Keeping avoiding to get into 'recovery conflict' as your sole goal) If > you decide to run pg_dump from master, it would block such statements > which have Exclusive locki

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Sameer Kumar
On Wed, Aug 17, 2016 at 11:36 AM Patrick B wrote: > > > 2016-08-17 15:31 GMT+12:00 Sameer Kumar : > >> >> >> On Wed, Aug 17, 2016 at 10:34 AM Patrick B >> wrote: >> >>> Hi guys, >>> >>> I'm using PostgreSQL 9.2 and I got one master and one slave with >>> streaming replication. >>> >>> Currently,

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Patrick B
2016-08-17 15:31 GMT+12:00 Sameer Kumar : > > > On Wed, Aug 17, 2016 at 10:34 AM Patrick B > wrote: > >> Hi guys, >> >> I'm using PostgreSQL 9.2 and I got one master and one slave with >> streaming replication. >> >> Currently, I got a backup script that runs daily from the master, it >> generate

Re: [GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Sameer Kumar
On Wed, Aug 17, 2016 at 10:34 AM Patrick B wrote: > Hi guys, > > I'm using PostgreSQL 9.2 and I got one master and one slave with streaming > replication. > > Currently, I got a backup script that runs daily from the master, it > generates a dump file with 30GB of data. > > I changed the script t

[GENERAL] Running pg_dump from a slave server

2016-08-16 Thread Patrick B
Hi guys, I'm using PostgreSQL 9.2 and I got one master and one slave with streaming replication. Currently, I got a backup script that runs daily from the master, it generates a dump file with 30GB of data. I changed the script to start running from the slave instead the master, and I'm getting

Re: [GENERAL] what change in postgres 9.5 improvements for multi-CPU machines

2016-08-16 Thread Andres Freund
On 2016-03-25 18:11:21 +0800, 657985...@qq.com wrote: > hello everyone: > I was bothered by the postgres spinlock for a long time . How to > understand this sentence "postgres 9.5 performance improvements for multi-CPU > machines" > at present my database is 9.3.5 。 Can it solve the spin

Re: [GENERAL] Any reasons for 'DO' statement not returning result?

2016-08-16 Thread Adrian Klaver
On 08/16/2016 01:15 PM, Jim Nasby wrote: On 8/16/16 1:05 PM, Adrian Klaver wrote: On 08/16/2016 07:54 AM, Jim Nasby wrote: On 8/14/16 5:13 AM, Xtra Coder wrote: - ability to switch session language from 'sql' to 'pl/pgsql' Actually, something I wish I had was the ability to temporarily switc

Re: [GENERAL] Any reasons for 'DO' statement not returning result?

2016-08-16 Thread Adrian Klaver
On 08/16/2016 01:15 PM, Jim Nasby wrote: On 8/16/16 1:05 PM, Adrian Klaver wrote: On 08/16/2016 07:54 AM, Jim Nasby wrote: On 8/14/16 5:13 AM, Xtra Coder wrote: - ability to switch session language from 'sql' to 'pl/pgsql' Actually, something I wish I had was the ability to temporarily switc

Re: [GENERAL] Postgres Pain Points: 1 pg_hba conf

2016-08-16 Thread John R Pierce
On 8/16/2016 1:32 PM, support-tiger wrote: localall all trust so all unix 'domain' connections will allow any process on the system to authenticate as any SQL user.I nearly always use peer here. my applications which want to connect as a different

Re: [GENERAL] Postgres Pain Points: 1 pg_hba conf

2016-08-16 Thread support-tiger
On 08/13/2016 01:37 PM, John R Pierce wrote: On 8/13/2016 8:29 AM, support-tiger wrote: experimented with this some more with no progress. only trust seems to work which is not what we want - will try some more versions with md5 but this is why I've called this out as such a pain point. show

Re: [GENERAL] Any reasons for 'DO' statement not returning result?

2016-08-16 Thread Jim Nasby
On 8/16/16 1:05 PM, Adrian Klaver wrote: On 08/16/2016 07:54 AM, Jim Nasby wrote: On 8/14/16 5:13 AM, Xtra Coder wrote: - ability to switch session language from 'sql' to 'pl/pgsql' Actually, something I wish I had was the ability to temporarily switch to an entirely different interpreter (su

Re: [GENERAL] Any reasons for 'DO' statement not returning result?

2016-08-16 Thread Pavel Stehule
2016-08-16 21:50 GMT+02:00 Jim Nasby : > On 8/16/16 11:17 AM, Chris Travers wrote: > >> I am thinking adding a temporary keyword to functions would make a lot >> more sense. >> > > Well, right now that's just syntactic sugar, so I think the only real > benefit might be visibility (though, really w

Re: [GENERAL] C++ port of Postgres

2016-08-16 Thread Jim Nasby
On 8/16/16 2:52 AM, Gavin Flower wrote: In both cases, part of the motivation to change from C was to appeal to new developers - from what I remember of the discussions. I have moved this discussion over to -hackers. (https://www.postgresql.org/message-id/f7682c24-4271-1ff5-d963-053ecb0fc...@b

Re: [GENERAL] Any reasons for 'DO' statement not returning result?

2016-08-16 Thread Jim Nasby
On 8/16/16 11:17 AM, Chris Travers wrote: I am thinking adding a temporary keyword to functions would make a lot more sense. Well, right now that's just syntactic sugar, so I think the only real benefit might be visibility (though, really we should be marketing the idea that you can create al

Re: [GENERAL] Jsonb extraction very slow

2016-08-16 Thread Jim Nasby
On 8/16/16 10:19 AM, Tom Lane wrote: [ thinks for a bit... ] In principle we could have the planner notice whether there are multiple references to the same Var of a varlena type, and then cue the executor to do a pre-emptive detoasting of that field of the input tuple slot. But it would be har

[GENERAL] schema advice for event stream with tagging and filtering

2016-08-16 Thread Chris Withers
Hi All, What would be the best schema to use when looking to implement an event stream with tagging and filtering? An event is a row with a primary key along the lines of (colo, host, category) and an associated set of tags, where each tag has a type and a value (eg: {"color": "red", "owner"

Re: [GENERAL] Any reasons for 'DO' statement not returning result?

2016-08-16 Thread Adrian Klaver
On 08/16/2016 07:54 AM, Jim Nasby wrote: On 8/14/16 5:13 AM, Xtra Coder wrote: - ability to switch session language from 'sql' to 'pl/pgsql' Actually, something I wish I had was the ability to temporarily switch to an entirely different interpreter (such as ipython), while still retaining curr

Re: [GENERAL] Any reasons for 'DO' statement not returning result?

2016-08-16 Thread Chris Travers
On Tue, Aug 16, 2016 at 3:11 PM, Merlin Moncure wrote: > On Sun, Aug 14, 2016 at 5:58 AM, Chris Travers > wrote: > > >> > >> All this seems to be a huge change which will definitely not appear any > >> time soon. > > > > I am willing to bet that DO $$ $$; blocks are neither planned nor > > param

Re: [GENERAL] C++ port of Postgres

2016-08-16 Thread Joy Arulraj
Thanks, I do hope so. On Tue, Aug 16, 2016 at 7:00 AM, FarjadFarid(ChkNet) < farjad.fa...@checknetworks.com> wrote: > Well done. This is a much needed conversion. As Peter’s article says, it > does open up more opportunities. > > > > *From:* pgsql-general-ow...@postgresql.org [mailto:pgsql-gener

Re: [GENERAL] C++ port of Postgres

2016-08-16 Thread Joy Arulraj
On Tue, Aug 16, 2016 at 3:52 AM, Gavin Flower wrote: > On 16/08/16 18:24, dandl wrote: > >> >> Just wondering what the end goal is for this project... Is it to just >> maintain an up to date Postgres fork that will compile with a C++ compiler? >> Is it to get a conversation going for a direction

Re: [GENERAL] Jsonb extraction very slow

2016-08-16 Thread Tom Lane
Jim Nasby writes: > On 8/11/16 8:45 AM, Tom Lane wrote: >> What were you doing to "get ten keys out"? If those were ten separate >> JSON operators, they'd likely have done ten separate decompressions. >> You'd have saved something by having the TOAST data already fetched into >> shared buffers, b

Re: [GENERAL] Jsonb extraction very slow

2016-08-16 Thread Jim Nasby
On 8/11/16 8:45 AM, Tom Lane wrote: Jim Nasby writes: I never dug into why. As Tom posited, decompression might explain the time to get a single key out. Getting 10 keys instead of just 1 wasn't 10x more expensive, but it was significantly more expensive than just getting a single key. What w

Re: [GENERAL] Any reasons for 'DO' statement not returning result?

2016-08-16 Thread Jim Nasby
On 8/14/16 5:13 AM, Xtra Coder wrote: - ability to switch session language from 'sql' to 'pl/pgsql' Actually, something I wish I had was the ability to temporarily switch to an entirely different interpreter (such as ipython), while still retaining current database connection and context. Tha

Re: [GENERAL] schema advice for event stream with tagging and filtering

2016-08-16 Thread Ilya Kazakevich
>>> An event is a row with a primary key along the lines of (colo, host, >>> category) and an associated set of tags, where each tag has a type >>> and a value >>> (eg: {"color": "red", "owner": "fred", "status": "open"...}). >> >> What about simple table with several columns and hstore field for

Re: [GENERAL] schema advice for event stream with tagging and filtering

2016-08-16 Thread Chris Withers
On 16/08/2016 14:29, Ilya Kazakevich wrote: Hi, An event is a row with a primary key along the lines of (colo, host, category) and an associated set of tags, where each tag has a type and a value (eg: {"color": "red", "owner": "fred", "status": "open"...}). What about simple table with sever

Re: [GENERAL] schema advice for event stream with tagging and filtering

2016-08-16 Thread Ilya Kazakevich
Hi, >An event is a row with a primary key along the lines of (colo, host, >category) and an associated set of tags, where each tag has a type and a value >(eg: {"color": "red", "owner": "fred", "status": "open"...}). What about simple table with several columns and hstore field for tags? You ma

Re: [GENERAL] Jsonb extraction very slow

2016-08-16 Thread Merlin Moncure
On Thu, Aug 11, 2016 at 8:45 AM, Tom Lane wrote: > Jim Nasby writes: >> I never dug into why. As Tom posited, decompression might explain the >> time to get a single key out. Getting 10 keys instead of just 1 wasn't >> 10x more expensive, but it was significantly more expensive than just >> getti

Re: [GENERAL] Any reasons for 'DO' statement not returning result?

2016-08-16 Thread Merlin Moncure
On Sun, Aug 14, 2016 at 5:58 AM, Chris Travers wrote: > > On Sun, Aug 14, 2016 at 12:13 PM, Xtra Coder wrote: >> >> Thanks, I'm aware about ability to create temp functions, but this is >> actually too much overhead - I mean unneeded boilerplate code, but it seems >> in current state it is "the l

Re: [GENERAL] ERROR: MultiXactId XXXXX has not been created yet -- apparent wraparound

2016-08-16 Thread Ioana Danes
On Mon, Aug 15, 2016 at 11:40 AM, Adrian Klaver wrote: > On 08/15/2016 08:05 AM, Ioana Danes wrote: > >> >> >> On Mon, Aug 15, 2016 at 10:52 AM, Adrian Klaver >> mailto:adrian.kla...@aklaver.com>> wrote: >> >> >> >> >> They are not the same servers but they have similar setup. >>

Re: [GENERAL] PostgreXL

2016-08-16 Thread Michael Paquier
On Tue, Aug 16, 2016 at 8:30 PM, Trupti Padiya wrote: > I am new to postgreXL and I want to perform the following: > > 1) I have set of tables which i want to put on server/coordinator > 2) Out of those tables, I want to put few tables on node 1, and few on node > 2 and few on both nodes. > > Say

[GENERAL] PostgreXL

2016-08-16 Thread Trupti Padiya
Hello all, I am new to postgreXL and I want to perform the following: 1) I have set of tables which i want to put on server/coordinator 2) Out of those tables, I want to put few tables on node 1, and few on node 2 and few on both nodes. Say for e.g. I have tables: Table1, Table2, Table3, Table4,

Re: [GENERAL] C++ port of Postgres

2016-08-16 Thread FarjadFarid(ChkNet)
Well done. This is a much needed conversion. As Peter’s article says, it does open up more opportunities. From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Joy Arulraj Sent: 14 August 2016 22:06 To: pgsql-general@postgresql.org Subject: [GENER

[GENERAL] PgAdmin: debugging stored function in v9.4 instable?

2016-08-16 Thread Martijn Tonies (Upscene Productions)
Hi all, I’m testing the stored function debugger on PostgreSQL 9.4.5 on Windows. Quite often, the debugger just hangs, waiting for the target process. Is this a known issue? With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL

[GENERAL] schema advice for event stream with tagging and filtering

2016-08-16 Thread Chris Withers
Hi All, What would be the best schema to use when looking to implement an event stream with tagging and filtering? An event is a row with a primary key along the lines of (colo, host, category) and an associated set of tags, where each tag has a type and a value (eg: {"color": "red", "owner"

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-08-16 Thread Amitabh Kant
On Tue, Aug 16, 2016 at 1:08 PM, Achilleas Mantzios < ach...@matrix.gatewaynet.com> wrote: > On 29/07/2016 21:06, Larry Rosenman wrote: > >> On 2016-07-29 12:59, Bruce Momjian wrote: >> >>> On Fri, Jul 29, 2016 at 07:49:36PM +0200, Maeldron T. wrote: >>> And yes, I hate upgrading PostgreSQL e

Re: [GENERAL] Critical failure of standby

2016-08-16 Thread Simon Riggs
On 16 August 2016 at 08:11, James Sewell wrote: > As per the logs there was a crash of one standby, which seems to have > corrupted that standby and the two cascading standby. > >- No backups >- Full page writes enabled >- Fsync enabled > > WAL records are CRC checked, so it may just

Re: [GENERAL] C++ port of Postgres

2016-08-16 Thread Gavin Flower
On 16/08/16 18:24, dandl wrote: Just wondering what the end goal is for this project... Is it to just maintain an up to date Postgres fork that will compile with a C++ compiler? Is it to get a conversation going for a direction for Postgres itself to move? The former I don't see gaining much

Re: [GENERAL] Uber migrated from Postgres to MySQL

2016-08-16 Thread Achilleas Mantzios
On 29/07/2016 21:06, Larry Rosenman wrote: On 2016-07-29 12:59, Bruce Momjian wrote: On Fri, Jul 29, 2016 at 07:49:36PM +0200, Maeldron T. wrote: And yes, I hate upgrading PostgreSQL especially on FreeBSD where pg_upgrade isn’t really an option. Is that because it is hard to install the old a

Re: [GENERAL] Critical failure of standby

2016-08-16 Thread James Sewell
Hey Sameer, As per the logs there was a crash of one standby, which seems to have corrupted that standby and the two cascading standby. - No backups - Full page writes enabled - Fsync enabled Cheers, James Sewell, Solutions Architect Suite 112, Jones Bay Wharf, 26-32 Pirrama Road, P