Re: [HACKERS] patch proposal

2016-08-17 Thread Michael Paquier
On Tue, Aug 16, 2016 at 11:06 PM, Stephen Frost wrote: > I could see supporting an additional "pause" option that means "pause at > the end of WAL if you don't reach the recovery target point". I'd also > be happy with a warning being emitted in the log if the recovery target

Re: [HACKERS] Most efficient way for libPQ .. PGresult serialization

2016-08-17 Thread Tatsuo Ishii
> On 18 August 2016 at 10:05, Joshua Bay wrote: > >> Hi, >> >> I was trying to implement a middleware that lies between client and >> postgres. >> >> So, this middleware is supposed to run query with libpq, do its job on >> them, and then serialize the result of query, and

Re: [HACKERS] patch proposal

2016-08-17 Thread Venkata B Nagothi
On Wed, Aug 17, 2016 at 11:27 PM, Stephen Frost wrote: > Venkata, > > * Venkata B Nagothi (nag1...@gmail.com) wrote: > > Agreed. Additional option like "pause" would. As long as there is an > option > > to ensure following happens if the recovery target is not reached - > > >

Re: [HACKERS] Anyone want to update our Windows timezone map?

2016-08-17 Thread Michael Paquier
On Tue, Aug 16, 2016 at 6:22 PM, Magnus Hagander wrote: > I think what we want is basically the UNION ALL of all the different active > versions. If we just use the definitions from Win10, we will map incorrectly > on Win7. As long as they are not *conflicting*, we should

Re: [HACKERS] Most efficient way for libPQ .. PGresult serialization

2016-08-17 Thread Craig Ringer
On 18 August 2016 at 10:05, Joshua Bay wrote: > Hi, > > I was trying to implement a middleware that lies between client and > postgres. > > So, this middleware is supposed to run query with libpq, do its job on > them, and then serialize the result of query, and send it to

Re: [HACKERS] How to do failover in pglogical replication?

2016-08-17 Thread Craig Ringer
On 17 August 2016 at 18:21, roshan_myrepublic wrote: > Hi, > > I am currently exploring pglogical replication for my db servers. I would > like to know how can I automatically failover from Provider Node to > Subscriber Node, if the Provider node goes down for some

[HACKERS] synchronous_commit = remote_flush

2016-08-17 Thread Thomas Munro
Hi hackers, To do something about the confusion I keep seeing about what exactly "on" means, I've often wished we had "remote_flush". But it's not obvious how the backwards compatibility could work, ie how to keep the people happy who use "local" vs "on" to control syncrep, and also the people

Re: [HACKERS] Increasing timeout of poll_query_until for TAP tests

2016-08-17 Thread Michael Paquier
On Thu, Aug 4, 2016 at 6:56 AM, Michael Paquier wrote: > On Thu, Aug 4, 2016 at 2:34 AM, Alvaro Herrera > wrote: >> Michael Paquier wrote: >>> On Wed, Aug 3, 2016 at 7:21 AM, Alvaro Herrera >>> wrote: >> >>> > Why

Re: [HACKERS] Patch: initdb: "'" for QUOTE_PATH (non-windows)

2016-08-17 Thread Andres Freund
On August 17, 2016 8:15:56 PM PDT, Michael Paquier wrote: >+{ /* pg_ctl command w path, properly quoted */ >+PQExpBuffer pg_ctl_path = createPQExpBuffer(); >+printfPQExpBuffer(pg_ctl_path, "%s%spg_ctl", >+bin_dir, >+

Re: [HACKERS] Patch: initdb: "'" for QUOTE_PATH (non-windows)

2016-08-17 Thread Michael Paquier
On Thu, Aug 18, 2016 at 11:35 AM, Ryan Murphy wrote: Be careful of top-posting, this is not this ML style: http://www.idallen.com/topposting.html >> I think that's actually a good thing to forbid. > > I think I agree Andres, there are already comments in the

Re: [HACKERS] Add -c to rsync commands on SR tutorial wiki page

2016-08-17 Thread Stephen Frost
* Jim Nasby (jim.na...@bluetreble.com) wrote: > https://wiki.postgresql.org/wiki/Binary_Replication_Tutorial does > not specify -c for any of the rsync commands. That's maybe safe for > WAL, but I don't think it's safe for any of the other uses, right? > I'd like someone to confirm before I just

Re: [HACKERS] Add -c to rsync commands on SR tutorial wiki page

2016-08-17 Thread Peter Eisentraut
On 8/17/16 5:34 PM, Jim Nasby wrote: > https://wiki.postgresql.org/wiki/Binary_Replication_Tutorial does not > specify -c for any of the rsync commands. That's maybe safe for WAL, but > I don't think it's safe for any of the other uses, right? I'd like > someone to confirm before I just change

Re: [HACKERS] Patch: initdb: "'" for QUOTE_PATH (non-windows)

2016-08-17 Thread Ryan Murphy
> I think that's actually a good thing to forbid. I think I agree Andres, there are already comments in the appendShellString function to this effect - they say that CR/LF chars in a file name are mostly used for malicious hacking attempts anyways - I know I've hardly ever needed a newline in a

Re: [HACKERS] Way to access LSN (for each transaction) by directly talking to postgres?

2016-08-17 Thread Joshua Bay
Sorry I forgot to reply. Thanks! using decoding plugins works great On Wed, Aug 3, 2016 at 8:37 PM, Michael Paquier wrote: > On Thu, Aug 4, 2016 at 3:02 AM, Joshua Bay wrote: > > Could you please tell me how I can get LSN of each transaction at

[HACKERS] Most efficient way for libPQ .. PGresult serialization

2016-08-17 Thread Joshua Bay
Hi, I was trying to implement a middleware that lies between client and postgres. So, this middleware is supposed to run query with libpq, do its job on them, and then serialize the result of query, and send it to the client ! (client deserializes to PGresult) I could simply iterate over rows

Re: [HACKERS] WIP: Barriers

2016-08-17 Thread Thomas Munro
On Tue, Aug 16, 2016 at 1:55 AM, Robert Haas wrote: > On Sat, Aug 13, 2016 at 7:18 PM, Thomas Munro > wrote: >> My use case for this is coordinating the phases of parallel hash >> joins, but I strongly suspect there are other cases. Parallel

Re: [HACKERS] Patch: initdb: "'" for QUOTE_PATH (non-windows)

2016-08-17 Thread Andres Freund
On 2016-08-18 09:14:44 +0900, Michael Paquier wrote: > On Thu, Aug 18, 2016 at 12:21 AM, Ryan Murphy wrote: > > I have created a better patch (attached) that correctly escapes the shell > > arguments using PQExpBufferStr and the appendShellString function, as per > >

Re: [HACKERS] Changed SRF in targetlist handling

2016-08-17 Thread Andres Freund
On 2016-08-03 20:22:03 -0700, Andres Freund wrote: > On 2016-08-02 16:30:55 -0700, Andres Freund wrote: > > > > Besides that I'm structurally wondering whether turning the original > > > > query into a subquery is the right thing to do. It requires some kind of > > > > ugly munching of Query->*,

Re: [HACKERS] Patch: initdb: "'" for QUOTE_PATH (non-windows)

2016-08-17 Thread Michael Paquier
On Thu, Aug 18, 2016 at 9:30 AM, Ryan Murphy wrote: (please avoid top-posting) >> As far as I know, it is perfectly possible to have LF/CR in a path >> name (that's bad practice btw...), and your patch would make initdb >> fail in such cases. Do we want to authorize that?

Re: [HACKERS] CLUSTER, reform_and_rewrite_tuple(), and parallelism

2016-08-17 Thread Andres Freund
On 2016-08-17 17:35:32 -0700, Peter Geoghegan wrote: > On Wed, Aug 17, 2016 at 5:20 PM, Andres Freund wrote: > > libc isn't compiled with -fno-omit-frame-pointer (and even if, it uses > > assembly without setup of the frame pointer), so frame pointer based > > call graphs are

Re: [HACKERS] CLUSTER, reform_and_rewrite_tuple(), and parallelism

2016-08-17 Thread Peter Geoghegan
On Wed, Aug 17, 2016 at 5:20 PM, Andres Freund wrote: > libc isn't compiled with -fno-omit-frame-pointer (and even if, it uses > assembly without setup of the frame pointer), so frame pointer based > call graphs are wrong through libc. The attributions are based on > random

Re: [HACKERS] Patch: initdb: "'" for QUOTE_PATH (non-windows)

2016-08-17 Thread Ryan Murphy
That's a fair point Michael. I would be willing to make such a change, but since c doesn't have optional function arguments I'm not sure the least intrusive way to do that. Do you have a suggestion? On Wednesday, August 17, 2016, Michael Paquier wrote: > On Thu, Aug

Re: [HACKERS] CLUSTER, reform_and_rewrite_tuple(), and parallelism

2016-08-17 Thread Andres Freund
On 2016-08-17 21:17:56 -0300, Alvaro Herrera wrote: > Peter Geoghegan wrote: > > > This doesn't seem that interesting, but not sure what you're looking for. > > > > I also attach cycles flamegraph. > > I may be blind, but what are those write() calls attributed to > heap_form_tuple? libc isn't

Re: [HACKERS] CLUSTER, reform_and_rewrite_tuple(), and parallelism

2016-08-17 Thread Alvaro Herrera
Peter Geoghegan wrote: > This doesn't seem that interesting, but not sure what you're looking for. > > I also attach cycles flamegraph. I may be blind, but what are those write() calls attributed to heap_form_tuple? -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL

Re: [HACKERS] CLUSTER, reform_and_rewrite_tuple(), and parallelism

2016-08-17 Thread Andres Freund
On 2016-08-17 16:58:49 -0700, Peter Geoghegan wrote: > On Wed, Aug 17, 2016 at 4:28 PM, Andres Freund wrote: > > Could you also provide a strace -ttt -T -c and a cpu cycles flamegraph? > > Here is the output from that strace invocation, plus a -p (to attach > to the relevant

Re: [HACKERS] Patch: initdb: "'" for QUOTE_PATH (non-windows)

2016-08-17 Thread Michael Paquier
On Thu, Aug 18, 2016 at 12:21 AM, Ryan Murphy wrote: > I have created a better patch (attached) that correctly escapes the shell > arguments using PQExpBufferStr and the appendShellString function, as per > Michael and Andres' suggestions. > > Further suggestions welcome of

Re: [HACKERS] CLUSTER, reform_and_rewrite_tuple(), and parallelism

2016-08-17 Thread Peter Geoghegan
On Wed, Aug 17, 2016 at 4:28 PM, Andres Freund wrote: > Could you also provide a strace -ttt -T -c and a cpu cycles flamegraph? Here is the output from that strace invocation, plus a -p (to attach to the relevant backend): strace: -t has no effect with -c strace: -T has no

Re: [HACKERS] PATCH: Exclude additional directories in pg_basebackup

2016-08-17 Thread Michael Paquier
On Thu, Aug 18, 2016 at 1:35 AM, Alvaro Herrera wrote: > I don't remember how pg_snapshot works, but it's probably fine > to start with an empty subdir (is it possible to export a snapshot from > a prepared transaction?) >From xact.c: /* * Likewise, don't allow

Re: [HACKERS] [RFC] Change the default of update_process_title to off

2016-08-17 Thread Tsunakawa, Takayuki
From: Magnus Hagander [mailto:mag...@hagander.net] Applied and backpatched to 9.6. Thank you very much. I didn’t expect 9.6 to be patched, so I’m very happy. Regards Takayuki Tsunakawa

Re: [HACKERS] [GENERAL] C++ port of Postgres

2016-08-17 Thread Craig Ringer
On 18 August 2016 at 02:14, Gavin Flower wrote: > My main language is Java, and there are a lot of very good reasons for > rewriting Postgres in Java, but I'd never push that - as there are also > many good reasons for NOT rewriting Postgres in Java! > I don't

Re: [HACKERS] CLUSTER, reform_and_rewrite_tuple(), and parallelism

2016-08-17 Thread Andres Freund
On 2016-08-17 16:23:29 -0700, Peter Geoghegan wrote: > On Wed, Aug 17, 2016 at 4:16 PM, Andres Freund wrote: > >> Does anyone have any ideas on how to: > >> > >> 1). Directly address the reform_and_rewrite_tuple() bottleneck. > > > > What part of is actually the expensive bit?

Re: [HACKERS] psql: tab completion for \l

2016-08-17 Thread Ian Barwick
Hi On 8/17/16 2:41 PM, Gerdan Santos wrote: > The following review has been posted through the commitfest application: > make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: tested, passed > Documentation:tested, passed > > I

Re: [HACKERS] CLUSTER, reform_and_rewrite_tuple(), and parallelism

2016-08-17 Thread Peter Geoghegan
On Wed, Aug 17, 2016 at 4:16 PM, Andres Freund wrote: >> Does anyone have any ideas on how to: >> >> 1). Directly address the reform_and_rewrite_tuple() bottleneck. > > What part of is actually the expensive bit? It does a whole lot of > things. Forming/Deforming tuples, the

Re: [HACKERS] CLUSTER, reform_and_rewrite_tuple(), and parallelism

2016-08-17 Thread Andres Freund
> Does anyone have any ideas on how to: > > 1). Directly address the reform_and_rewrite_tuple() bottleneck. What part of is actually the expensive bit? It does a whole lot of things. Forming/Deforming tuples, the hash lookups in rewrite_heap_tuple(), ...? Andres -- Sent via pgsql-hackers

[HACKERS] CLUSTER, reform_and_rewrite_tuple(), and parallelism

2016-08-17 Thread Peter Geoghegan
During preliminary analysis of what it would take to produce a parallel CLUSTER patch that is analogous of what I came up with for CREATE INDEX, which in general seems quite possible, I identified reform_and_rewrite_tuple() as a major bottleneck for the current CLUSTER implementation. Excluding

Re: [HACKERS] regexp_match() returning text

2016-08-17 Thread Tom Lane
"David G. Johnston" writes: > I didn't compile either patch but given the scope and complexity I'd say it > is ready for committer without that confirmed. Tom usually touches the > regexp code and I'm pretty sure he'll look at this with an eye no one else > has.

Re: [HACKERS] PATCH: Exclude additional directories in pg_basebackup

2016-08-17 Thread David Steele
On 8/17/16 2:53 PM, Robert Haas wrote: > On Wed, Aug 17, 2016 at 2:50 PM, David Steele wrote: >> Hi Robert, >> >> On 8/17/16 11:27 AM, Robert Haas wrote: >>> On Mon, Aug 15, 2016 at 3:39 PM, David Steele wrote: Recently a hacker proposed a patch to

Re: [HACKERS] Why we lost Uber as a user

2016-08-17 Thread Jim Nasby
On 8/17/16 2:51 PM, Simon Riggs wrote: On 17 August 2016 at 12:19, Greg Stark wrote: On Wed, Aug 17, 2016 at 1:36 AM, Jim Nasby wrote: Something I didn't see mentioned that I think is a critical point: last I looked, HOT standby (and presumably SR)

Re: [HACKERS] Pluggable storage

2016-08-17 Thread Alvaro Herrera
Anastasia Lubennikova wrote: > 13.08.2016 02:15, Alvaro Herrera: > >To support this, we introduce StorageTuple and StorageScanDesc. > >StorageTuples represent a physical tuple coming from some storage AM. > >It is necessary to have a pointer to a StorageAmRoutine in order to > >manipulate the

[HACKERS] Add -c to rsync commands on SR tutorial wiki page

2016-08-17 Thread Jim Nasby
https://wiki.postgresql.org/wiki/Binary_Replication_Tutorial does not specify -c for any of the rsync commands. That's maybe safe for WAL, but I don't think it's safe for any of the other uses, right? I'd like someone to confirm before I just change the page... my intention is to just stick -c

Re: [HACKERS] Declarative partitioning - another take

2016-08-17 Thread Robert Haas
On Wed, Aug 17, 2016 at 2:21 AM, Amit Langote wrote: > I am slightly tempted to eliminate the pg_partition catalog and associated > syscache altogether and add a column to pg_class as Robert suggested. > That way, all relid_is_partition() calls will be replaced by >

Re: [HACKERS] Why we lost Uber as a user

2016-08-17 Thread Simon Riggs
On 17 August 2016 at 12:19, Greg Stark wrote: > On Wed, Aug 17, 2016 at 1:36 AM, Jim Nasby wrote: >> Something I didn't see mentioned that I think is a critical point: last I >> looked, HOT standby (and presumably SR) replays full page writes. That means

Re: [HACKERS] PATCH: Exclude additional directories in pg_basebackup

2016-08-17 Thread Kevin Grittner
On Wed, Aug 17, 2016 at 1:50 PM, David Steele wrote: >>> That patch got me thinking about what else could be excluded and after >>> some investigation I found the following: pg_notify, pg_serial, >>> pg_snapshots, pg_subtrans. These directories are all cleaned, zeroed, >>>

Re: [HACKERS] Bug in intarray bench script

2016-08-17 Thread Tom Lane
"Andreas 'ads' Scherbaum" writes: > The patch changes the benchmark tool in a way that the explain output is > printed to standard out - what one would expect from the "-e" (explain) > option. > The new status of this patch is: Ready for Committer Pushed, thanks.

Re: [HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Tom Lane
Robert Haas writes: > I don't understand why you think this would create non-trivial > portability issues. The patch as submitted breaks entirely on platforms without pread/pwrite. Yes, we can add a configure test and some shim functions to fix that, but the argument that

Re: [HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Claudio Freire
On Wed, Aug 17, 2016 at 10:40 AM, Tom Lane wrote: > Oskari Saarenmaa writes: >> On my laptop a simple pgbench run (scale 100, 15 minutes) shows a 1.5% >> performance improvement. > > I would have hoped for a lot better result before anyone would propose > that

Re: [HACKERS] PATCH: Exclude additional directories in pg_basebackup

2016-08-17 Thread Robert Haas
On Wed, Aug 17, 2016 at 2:50 PM, David Steele wrote: > Hi Robert, > > On 8/17/16 11:27 AM, Robert Haas wrote: >> On Mon, Aug 15, 2016 at 3:39 PM, David Steele wrote: >>> Recently a hacker proposed a patch to add pg_dynshmem to the list of >>> directories

Re: [HACKERS] Curing plpgsql's memory leaks for statement-lifespan values

2016-08-17 Thread Tom Lane
Pavel Stehule writes: > I am sending a review of this patch: > ... > I'll mark this patch as ready for commiter Pushed, thanks for the review. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] PATCH: Exclude additional directories in pg_basebackup

2016-08-17 Thread David Steele
Hi Robert, On 8/17/16 11:27 AM, Robert Haas wrote: > On Mon, Aug 15, 2016 at 3:39 PM, David Steele wrote: >> Recently a hacker proposed a patch to add pg_dynshmem to the list of >> directories whose contents are excluded in pg_basebackup. I wasn't able >> to find the

Re: [HACKERS] Are these supported??

2016-08-17 Thread Greg Stark
On Wed, Aug 17, 2016 at 4:22 PM, Robert Haas wrote: > We've supported having joins in a DELETE since PostgreSQL 8.1. Er, yes. Though he does say he's trying to use the same syntax as select... -- greg -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Robert Haas
On Wed, Aug 17, 2016 at 9:40 AM, Tom Lane wrote: > Oskari Saarenmaa writes: >> On my laptop a simple pgbench run (scale 100, 15 minutes) shows a 1.5% >> performance improvement. > > I would have hoped for a lot better result before anyone would propose > that we

Re: [HACKERS] [GENERAL] C++ port of Postgres

2016-08-17 Thread Gavin Flower
On 17/08/16 23:40, Aleksander Alekseev wrote: I'm sure this wasn't your intent, but the tone of your response is part of why people don't get involved with Postgres development... Please note that you're the only person in the entire thread that's said anything to the effect of a holy war...

Re: [HACKERS] PATCH: Exclude additional directories in pg_basebackup

2016-08-17 Thread Alvaro Herrera
Robert Haas wrote: > Eh ... I doubt very much that it's safe to blow away the entire > contents of an SLRU between shutdown and startup, even if the data is > technically transient data that won't be needed again after the system > is reset. Hmm. At least async.c (pg_notify) deletes the whole

Re: [HACKERS] drop src/backend/port/darwin/system.c ?

2016-08-17 Thread Tom Lane
Robert Haas writes: > On Wed, Aug 17, 2016 at 9:55 AM, Tom Lane wrote: >> Peter Eisentraut writes: >>> /* only needed in OS X 10.1 and possibly early 10.2 releases */ >>> Maybe it's time to let it go? >> One part of

Re: [HACKERS] drop src/backend/port/darwin/system.c ?

2016-08-17 Thread Robert Haas
On Wed, Aug 17, 2016 at 9:55 AM, Tom Lane wrote: > Peter Eisentraut writes: >> /* only needed in OS X 10.1 and possibly early 10.2 releases */ >> Maybe it's time to let it go? > > One part of me says it's not hurting anything, but another

Re: [HACKERS] [GENERAL] C++ port of Postgres

2016-08-17 Thread Robert Haas
On Wed, Aug 17, 2016 at 11:36 AM, Andrew Gierth wrote: >> "Robert" == Robert Haas writes: > > Robert> Hmm, so sizeof() has different semantics in C vs. C++? > > No. '1' has different semantics in C vs C++. (In C, '1' is an int, > whereas

Re: [HACKERS] Assertion failure in REL9_5_STABLE

2016-08-17 Thread Alvaro Herrera
Marko Tiikkaja wrote: > Running one specific test from our application against REL9_5_STABLE > (current as of today) gives me this: > > #2 0x7effb59595be in ExceptionalCondition ( > conditionName=conditionName@entry=0x7effb5b27a88 "!(CritSectionCount > 0 > ||

Re: [HACKERS] LWLocks in DSM memory

2016-08-17 Thread Andres Freund
On 2016-08-17 08:31:36 -0400, Robert Haas wrote: > On Tue, Aug 16, 2016 at 5:03 PM, Andres Freund wrote: > > On 2016-08-15 18:15:23 -0400, Robert Haas wrote: > >> On Thu, Aug 11, 2016 at 2:19 PM, Robert Haas wrote: > >> > Therefore, I plan to commit

Re: [HACKERS] LWLocks in DSM memory

2016-08-17 Thread Andres Freund
On 2016-08-16 23:09:07 -0400, Robert Haas wrote: > On Tue, Aug 16, 2016 at 5:03 PM, Andres Freund wrote: > > On 2016-08-15 18:15:23 -0400, Robert Haas wrote: > >> On Thu, Aug 11, 2016 at 2:19 PM, Robert Haas wrote: > >> > Therefore, I plan to commit

Re: [HACKERS] [Patch] RBTree iteration interface improvement

2016-08-17 Thread Aleksander Alekseev
> > Having said that, though: if the iteration state is not part of the > > object, it's not very clear whether we can behave sanely if someone > > changes the tree while an iteration is open. It will need careful > > thought as to what sort of guarantees we can make about that. If > > it's too

Re: [HACKERS] [GENERAL] C++ port of Postgres

2016-08-17 Thread Andrew Gierth
> "Robert" == Robert Haas writes: Robert> Hmm, so sizeof() has different semantics in C vs. C++? No. '1' has different semantics in C vs C++. (In C, '1' is an int, whereas in C++ it's a char. It so happens that (sizeof '1') is the only case which is valid in both C

Re: [HACKERS] PATCH: Exclude additional directories in pg_basebackup

2016-08-17 Thread Robert Haas
On Mon, Aug 15, 2016 at 3:39 PM, David Steele wrote: > Recently a hacker proposed a patch to add pg_dynshmem to the list of > directories whose contents are excluded in pg_basebackup. I wasn't able > to find the original email despite several attempts. > > That patch got me

Re: [HACKERS] Are these supported??

2016-08-17 Thread Robert Haas
On Wed, Aug 17, 2016 at 10:38 AM, Greg Stark wrote: > You can't have joins in a DELETE -- which table would it actually > delete from? You can use a subselect to do look up information from > other tables in your delete though. We've supported having joins in a DELETE since

Re: [HACKERS] Patch: initdb: "'" for QUOTE_PATH (non-windows)

2016-08-17 Thread Ryan Murphy
I have created a better patch (attached) that correctly escapes the shell arguments using PQExpBufferStr and the appendShellString function, as per Michael and Andres' suggestions. Further suggestions welcome of course. Ryan On Wed, Aug 17, 2016 at 8:28 AM, Ryan Murphy

Re: [HACKERS] [GENERAL] C++ port of Postgres

2016-08-17 Thread Robert Haas
On Tue, Aug 16, 2016 at 5:08 PM, Piotr Stefaniak wrote: > On 2016-08-16 18:33, Robert Haas wrote: >> It wouldn't be that much work to maintain, either: we'd >> just set up some buildfarm members that compiled using C++ and when >> they turned red, we'd go fix it. > >

Re: [HACKERS] [GENERAL] C++ port of Postgres

2016-08-17 Thread Dmitry Igrishin
2016-08-17 14:40 GMT+03:00 Aleksander Alekseev : >> I'm sure this wasn't your intent, but the tone of your response is >> part of why people don't get involved with Postgres development... >> >> Please note that you're the only person in the entire thread that's >> said

Re: [HACKERS] Are these supported??

2016-08-17 Thread Craig Ringer
On 17 August 2016 at 11:33, Vince Vielhaber wrote: > > I recently moved a mybb forum away from mysql to postgres. Along the way > I encountered a couple of things that either didn't seem to be supported or > I'm just not doing it right. First, the server this is on is

Re: [HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Oskari Saarenmaa
17.08.2016, 16:40, Tom Lane kirjoitti: Oskari Saarenmaa writes: On my laptop a simple pgbench run (scale 100, 15 minutes) shows a 1.5% performance improvement. I would have hoped for a lot better result before anyone would propose that we should deal with all the portability

Re: [HACKERS] Are these supported??

2016-08-17 Thread Greg Stark
On Wed, Aug 17, 2016 at 4:33 AM, Vince Vielhaber wrote: > > I recently moved a mybb forum away from mysql to postgres. Along the way I > encountered a couple of things that either didn't seem to be supported or > I'm just not doing it right. > > First, the server this

Re: [HACKERS] Why we lost Uber as a user

2016-08-17 Thread Craig Ringer
On 17 August 2016 at 21:35, Bruce Momjian wrote: > > > I saw from the Uber article that they weren't going to per-row logical > > replication but _statement_ replication, which is very hard to do > > because typical SQL doesn't record what concurrent transactions > > committed

Re: [HACKERS] Bug in to_timestamp().

2016-08-17 Thread amul sul
On Wednesday, August 17, 2016 5:15 PM, Artur Zakirov wrote: >I attached new patch "0001-to-timestamp-format-checking-v2.patch". It >fixes behaviour for Amul's scenarious: > Great. > >> Following are few scenarios where we break existing behaviour: >> >> SELECT

Re: [HACKERS] [GENERAL] C++ port of Postgres

2016-08-17 Thread Serge Rielau
> On Aug 16, 2016, at 10:16 PM, Craig Ringer wrote: > > On 17 August 2016 at 09:49, Andres Freund > wrote: > > > You need to include the files surrounded by extern "C" { }. > > I'd really like to adopt the convention

Re: [HACKERS] drop src/backend/port/darwin/system.c ?

2016-08-17 Thread Tom Lane
Peter Eisentraut writes: > /* only needed in OS X 10.1 and possibly early 10.2 releases */ > Maybe it's time to let it go? One part of me says it's not hurting anything, but another part says that if it were broken we wouldn't know. And it looks like we can

Re: [HACKERS] Why we lost Uber as a user

2016-08-17 Thread Bruce Momjian
On Wed, Aug 17, 2016 at 01:27:18PM +0800, Craig Ringer wrote: > It's really bugging me that people are talking about "statement based" > replication in MySQL as if it's just sending SQL text around. MySQL's > statemnet > based replication is a lot smarter than that, and in the >

Re: [HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Tom Lane
Oskari Saarenmaa writes: > On my laptop a simple pgbench run (scale 100, 15 minutes) shows a 1.5% > performance improvement. I would have hoped for a lot better result before anyone would propose that we should deal with all the portability issues this'll create. > A 1.5%

[HACKERS] How to do failover in pglogical replication?

2016-08-17 Thread roshan_myrepublic
Hi, I am currently exploring pglogical replication for my db servers. I would like to know how can I automatically failover from Provider Node to Subscriber Node, if the Provider node goes down for some reasons. How can I redirect all the traffic to SubscriberNode automatically ? In the normal

[HACKERS] Are these supported??

2016-08-17 Thread Vince Vielhaber
Hi all, been awhile! Some may be saying "not long enough" but eh. I recently moved a mybb forum away from mysql to postgres. Along the way I encountered a couple of things that either didn't seem to be supported or I'm just not doing it right. First, the server this is on is running

Re: [HACKERS] Patch: initdb: "'" for QUOTE_PATH (non-windows)

2016-08-17 Thread Ryan Murphy
That makes sense, Michael and Andres. I started to make a solution that uses a PQExpBuffer, appendShellString, etc. I think it will work just fine, but I think I need to alter the Makefile as well, to get initdb.c to be compiled using -L../../../src/fe_utils -lpgfeutils. Otherwise I am having

Re: [HACKERS] patch proposal

2016-08-17 Thread Stephen Frost
Venkata, * Venkata B Nagothi (nag1...@gmail.com) wrote: > Agreed. Additional option like "pause" would. As long as there is an option > to ensure following happens if the recovery target is not reached - > > a) PG pauses the recovery at the end of the WAL > b) Generates a warning in the log

Re: [HACKERS] EXLCUDE constraints and Hash indexes

2016-08-17 Thread Andrew Gierth
> "Jeff" == Jeff Janes writes: Jeff> From: https://www.postgresql.org/docs/9.4/static/sql-createtable.html Jeff> "The access method must support amgettuple (see Chapter 55); at Jeff> present this means GIN cannot be used. Although it's allowed, there is Jeff>

Re: [HACKERS] Surprising behaviour of \set AUTOCOMMIT ON

2016-08-17 Thread Robert Haas
On Tue, Aug 16, 2016 at 5:25 PM, Rahila Syed wrote: >>I think I like the option of having psql issue an error. On the >>server side, the transaction would still be open, but the user would >>receive a psql error message and the autocommit setting would not be >>changed.

Re: [HACKERS] Pluggable storage

2016-08-17 Thread Anastasia Lubennikova
13.08.2016 02:15, Alvaro Herrera: Many have expressed their interest in this topic, but I haven't seen any design of how it should work. Here's my attempt; I've been playing with this for some time now and I think what I propose here is a good initial plan. This will allow us to write

Re: [HACKERS] parallel.c is not marked as test covered

2016-08-17 Thread Amit Kapila
On Wed, Aug 17, 2016 at 1:34 AM, Peter Eisentraut wrote: > On 6/20/16 11:16 PM, Tom Lane wrote: >>> > I think this test would only fail if it runs out of workers, and that >>> > would only happen in an installcheck run against a server configured in >>> > a

[HACKERS] drop src/backend/port/darwin/system.c ?

2016-08-17 Thread Peter Eisentraut
/* only needed in OS X 10.1 and possibly early 10.2 releases */ Maybe it's time to let it go? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [sqlsmith] Failed assertion in joinrels.c

2016-08-17 Thread Robert Haas
On Wed, Aug 17, 2016 at 7:25 AM, Amit Kapila wrote: > On Wed, Aug 10, 2016 at 11:27 AM, Dilip Kumar wrote: >> On Wed, Aug 10, 2016 at 10:04 AM, Dilip Kumar wrote: >>> This seems better, after checking at other places I found

Re: [HACKERS] LWLocks in DSM memory

2016-08-17 Thread Robert Haas
On Tue, Aug 16, 2016 at 5:03 PM, Andres Freund wrote: > On 2016-08-15 18:15:23 -0400, Robert Haas wrote: >> On Thu, Aug 11, 2016 at 2:19 PM, Robert Haas wrote: >> > Therefore, I plan to commit this patch, removing the #include >> > unless someone

Re: [HACKERS] Bug in to_timestamp().

2016-08-17 Thread Artur Zakirov
I attached new patch "0001-to-timestamp-format-checking-v2.patch". It fixes behaviour for Amul's scenarious: Following are few scenarios where we break existing behaviour: SELECT TO_TIMESTAMP('2015-12-31 13:43:36', ' MM DD HH24 MI SS'); SELECT TO_TIMESTAMP('2011$03!18 23_38_15',

Re: [HACKERS] [GENERAL] C++ port of Postgres

2016-08-17 Thread Aleksander Alekseev
> I'm sure this wasn't your intent, but the tone of your response is > part of why people don't get involved with Postgres development... > > Please note that you're the only person in the entire thread that's > said anything to the effect of a holy war... > > OTOH, if the community takes the

Re: [HACKERS] [sqlsmith] Failed assertion in joinrels.c

2016-08-17 Thread Amit Kapila
On Wed, Aug 10, 2016 at 11:27 AM, Dilip Kumar wrote: > On Wed, Aug 10, 2016 at 10:04 AM, Dilip Kumar wrote: >> This seems better, after checking at other places I found that for >> invalid type we are using ERRCODE_UNDEFINED_OBJECT and for invalid >>

Re: [HACKERS] Why we lost Uber as a user

2016-08-17 Thread Greg Stark
On Wed, Aug 17, 2016 at 1:36 AM, Jim Nasby wrote: > Something I didn't see mentioned that I think is a critical point: last I > looked, HOT standby (and presumably SR) replays full page writes. That means > that *any* kind of corruption on the master is *guaranteed* to

Re: [HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Victor Wagner
On Wed, 17 Aug 2016 12:17:35 +0200 Magnus Hagander wrote: > On Wed, Aug 17, 2016 at 11:34 AM, Victor Wagner > wrote: > > I don't think that all platforms, supported by PostgreSQL support > > this API. Especially, I cannot find any mention of

Re: [HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Magnus Hagander
On Wed, Aug 17, 2016 at 12:41 PM, Dagfinn Ilmari Mannsåker < ilm...@ilmari.org> wrote: > Magnus Hagander writes: > > [pread/pwrite] > > > Yeah, Windows does not have those API calls, but it shouldn't be rocket > > science to write a wrapper for it. The standard windows APIs

Re: [HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Dagfinn Ilmari Mannsåker
Magnus Hagander writes: [pread/pwrite] > Yeah, Windows does not have those API calls, but it shouldn't be rocket > science to write a wrapper for it. The standard windows APIs can do the > same thing -- but they'll need access to the HANDLE for the file and not > the posix

Re: [HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Magnus Hagander
On Wed, Aug 17, 2016 at 11:34 AM, Victor Wagner wrote: > On Wed, 17 Aug 2016 10:58:09 +0300 > Oskari Saarenmaa wrote: > > > > > > > The attached patch replaces FileWrite and FileRead with FileWriteAt > > and FileReadAt and removes most FileSeek calls. FileSeek

Re: [HACKERS] [GENERAL] C++ port of Postgres

2016-08-17 Thread Aleksander Alekseev
> Two big projects lately move to C++ from C: > GCC, Mesa > > You can read their reasons. > Only C++ we can use without full rewrite currently. (or ObjectC maybe) > If we wish fix C limitations. > I would like just to leave this link here: https://en.wikipedia.org/wiki/List_of_fallacies Long

Re: [HACKERS] [Patch] Temporary tables that do not bloat pg_catalog (a.k.a fast temp tables)

2016-08-17 Thread Aleksander Alekseev
> That doesn't really solve the problem, because OTHER backends won't be > able to see them. So, if I create a fast temporary table in one > session that depends on a permanent object, some other session can > drop the permanent object. If there were REAL catalog entries, that > wouldn't work,

Re: [HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Victor Wagner
On Wed, 17 Aug 2016 10:58:09 +0300 Oskari Saarenmaa wrote: > > The attached patch replaces FileWrite and FileRead with FileWriteAt > and FileReadAt and removes most FileSeek calls. FileSeek is still > around so we can find the end of a file, but it's not used for > anything

Re: [HACKERS] [RFC] Change the default of update_process_title to off

2016-08-17 Thread Magnus Hagander
On Tue, Aug 16, 2016 at 3:37 PM, Tom Lane wrote: > Robert Haas writes: > > On Tue, Aug 16, 2016 at 5:53 AM, Magnus Hagander > wrote: > >> What's our take on backpatching such changes? Should this be 9.6 only, > or > >> back

[HACKERS] Use pread and pwrite instead of lseek + write and read

2016-08-17 Thread Oskari Saarenmaa
Hi, The Uber blog post, among other things, pointed out that PG uses lseek + read instead of pread. I didn't see any discussion around that and my Google searches didn't find any posts about pread / pwrite for the past 10 years. With that plus the "C++ port" thread in mind, I was wondering

Re: [HACKERS] WIP: Covering + unique indexes.

2016-08-17 Thread Andrew Borodin
> That was a bug caused by high key truncation, that occurs when index has more > than 3 levels. Fixed. Affirmative. I've tested index construction with 100M rows and subsequent execution of select queries using index, works fine. Best regards, Andrey Borodin, Octonica & Ural Federal University.

  1   2   >