Re: [HACKERS] LSN as a recovery target

2016-09-04 Thread Michael Paquier
On Sun, Sep 4, 2016 at 11:30 PM, Simon Riggs wrote: > On 4 September 2016 at 14:32, Abhijit Menon-Sen wrote: >> At 2016-09-04 07:02:01 +0100, si...@2ndquadrant.com wrote: >>> >>> > By the way, what has been committed does not include the patch >>> >

Re: [HACKERS] Parallel build with MSVC

2016-09-04 Thread Michael Paquier
On Mon, Sep 5, 2016 at 9:18 AM, Noah Misch wrote: > On Wed, Apr 27, 2016 at 08:15:05AM +, Christian Ullrich wrote: >> * From: Michael Paquier [mailto:michael.paqu...@gmail.com] >> >> > On Wed, Apr 27, 2016 at 4:06 PM, Christian Ullrich >> > wrote: >>

[HACKERS] [PATCH] Send catalog_xmin separately in hot standby feedback

2016-09-04 Thread Craig Ringer
Hi all Currently hot standby feedback sends GetOldestXmin()'s result to the upstream as the required xmin. GetOldestXmin() returns a slot's catalog_xmin if that's the lowest xmin on the system. That's fine so long as we don't do logical decoding on standbys, but if we start allowing logical

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-09-04 Thread Victor Wagner
On Mon, 5 Sep 2016 07:59:02 +0530 Mithun Cy wrote: > On Aug 31, 2016 1:44 PM, "Victor Wagner" wrote: > > Thanks, I've added this to 7-th (yet unpublished here) version of my > > patch. > Hi victor, just wanted know what your plan for your patch

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-09-04 Thread Amit Kapila
On Mon, Sep 5, 2016 at 3:18 AM, Tomas Vondra wrote: > Hi, > > This thread started a year ago, different people contributed various > patches, some of which already got committed. Can someone please post a > summary of this thread, so that it's a bit more clear what

Re: [HACKERS] PassDownLimitBound for ForeignScan/CustomScan

2016-09-04 Thread Kouhei Kaigai
> On Mon, Aug 29, 2016 at 7:25 AM, Kouhei Kaigai wrote: > > > Hello, > > The attached patch adds an optional callback to support special > optimization > if ForeignScan/CustomScan are located under the Limit node in plan-tree. > > Our sort node

[HACKERS] Re: [bug fix] Cascading standby cannot catch up and get stuck emitting the same message repeatedly

2016-09-04 Thread Tsunakawa, Takayuki
From: pgsql-hackers-ow...@postgresql.org > [mailto:pgsql-hackers-ow...@postgresql.org] On Behalf Of Tsunakawa, > Our customer hit a problem of cascading replication, and we found the cause. > They are using the latest PostgreSQL 9.2.18. The bug seems to have been > fixed in 9.4 and higher during

Re: [HACKERS] OpenSSL 1.1 breaks configure and more

2016-09-04 Thread Michael Paquier
On Mon, Sep 5, 2016 at 9:32 AM, Andreas Karlsson wrote: > On 09/05/2016 02:23 AM, Tom Lane wrote: >> >> Judging by the number of people who have popped up recently with their >> own OpenSSL 1.1 patches, I think there is going to be a lot of demand for >> back-patching some sort

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-09-04 Thread Craig Ringer
On 5 September 2016 at 10:41, Craig Ringer wrote: > On 2 September 2016 at 17:49, Craig Ringer wrote: > >> So the main change becomes the one-liner in my prior mail. > > Per feedback from Simon, updated with a new test in src/test/recovery . ...

Re: [HACKERS] Logical decoding slots can go backwards when used from SQL, docs are wrong

2016-09-04 Thread Craig Ringer
On 2 September 2016 at 17:49, Craig Ringer wrote: > So the main change becomes the one-liner in my prior mail. Per feedback from Simon, updated with a new test in src/test/recovery . If you revert the change to src/backend/replication/logical/logicalfuncs.c then the test

Re: [HACKERS] Patch: Implement failover on libpq connect level.

2016-09-04 Thread Mithun Cy
On Aug 31, 2016 1:44 PM, "Victor Wagner" wrote: > Thanks, I've added this to 7-th (yet unpublished here) version of my > patch. Hi victor, just wanted know what your plan for your patch 07. Would you like to submit it to the community. I have just signed up as a reviewer for

Re: [HACKERS] Remove superuser() checks from pgstattuple

2016-09-04 Thread Andres Freund
On September 4, 2016 6:33:30 PM PDT, Tom Lane wrote: >Andres Freund writes: >> On 2016-09-04 21:09:41 -0400, Tom Lane wrote: >>> Hm, couldn't we do that automatically? At least in the case where >only >>> one base-version script is available? > >> You

Re: [HACKERS] Remove superuser() checks from pgstattuple

2016-09-04 Thread Tom Lane
Andres Freund writes: > On 2016-09-04 21:09:41 -0400, Tom Lane wrote: >> Hm, couldn't we do that automatically? At least in the case where only >> one base-version script is available? > You mean determining the baseversion? Hm, yes, that might work. But I'm > not sure how

Re: [HACKERS] Remove superuser() checks from pgstattuple

2016-09-04 Thread Andres Freund
On 2016-09-04 21:09:41 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2016-09-04 11:55:06 -0400, Tom Lane wrote: > >> It is becoming clear that the current extension update mechanism is kind > >> of brute-force for this sort of change. I have no ideas offhand about a >

Re: [HACKERS] Remove superuser() checks from pgstattuple

2016-09-04 Thread Tom Lane
Andres Freund writes: > On 2016-09-04 11:55:06 -0400, Tom Lane wrote: >> It is becoming clear that the current extension update mechanism is kind >> of brute-force for this sort of change. I have no ideas offhand about a >> better way to do it, but like Peter, I was dismayed

Re: [HACKERS] [PATCH] COPY vs \copy HINT

2016-09-04 Thread Craig Ringer
On 5 September 2016 at 09:05, Craig Ringer wrote: >I've attached an update that does so and > warns on EACCES too. ... this time, with required parens. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &

Re: [HACKERS] [PATCH] COPY vs \copy HINT

2016-09-04 Thread Craig Ringer
On 4 September 2016 at 23:33, Tom Lane wrote: > So my consciousness was raised just now by an example of exactly this > scenario over in pgsql-novice. What I forgot was that the client may > in fact be on the same machine as the server, in which case EACCES > is pretty much

Re: [HACKERS] Remove superuser() checks from pgstattuple

2016-09-04 Thread Andres Freund
On 2016-09-04 11:55:06 -0400, Tom Lane wrote: > [ warning, thread hijack ahead ] > > Stephen Frost writes: > > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > >> I think this is a good change to pursue, and we'll likely want to do > >> more similar changes in

Re: [HACKERS] Yet another small patch - reorderbuffer.c:1099

2016-09-04 Thread Tom Lane
Andres Freund writes: > On 2016-04-05 11:38:27 -0300, Alvaro Herrera wrote: >> The current arrangement looks bizantine to me, for no reason. If we >> think that one of the two branches might do something additional to the >> list deletion, surely that will be in a separate

Re: [HACKERS] Parallel build with MSVC

2016-09-04 Thread Noah Misch
On Sun, Sep 04, 2016 at 08:26:12PM -0400, Tom Lane wrote: > Noah Misch writes: > > I was tempted to back-patch this. The risk to back branch users seems > > negligible, and it would be convenient for me as a person who builds all > > branches. That reason is not good enough,

Re: [HACKERS] OpenSSL 1.1 breaks configure and more

2016-09-04 Thread Andreas Karlsson
On 09/05/2016 02:23 AM, Tom Lane wrote: Judging by the number of people who have popped up recently with their own OpenSSL 1.1 patches, I think there is going to be a lot of demand for back-patching some sort of 1.1 support into our back branches. All this talk of refactoring does not sound

Re: [HACKERS] Parallel build with MSVC

2016-09-04 Thread Tom Lane
Noah Misch writes: > I was tempted to back-patch this. The risk to back branch users seems > negligible, and it would be convenient for me as a person who builds all > branches. That reason is not good enough, so I plan not to back-patch. I > feel like I might be missing a

Re: [HACKERS] OpenSSL 1.1 breaks configure and more

2016-09-04 Thread Tom Lane
Andreas Karlsson writes: > On 08/30/2016 08:42 AM, Heikki Linnakangas wrote: >> PS. I just remembered that I've wanted to refactor the pgcrypto calls >> for symmetric encryption to use the newer EVP API for some time, and >> even posted a patch for that >>

Re: [HACKERS] Parallel build with MSVC

2016-09-04 Thread Noah Misch
On Wed, Apr 27, 2016 at 08:15:05AM +, Christian Ullrich wrote: > * From: Michael Paquier [mailto:michael.paqu...@gmail.com] > > > On Wed, Apr 27, 2016 at 4:06 PM, Christian Ullrich > > wrote: > > > > * From: Michael Paquier [mailto:michael.paqu...@gmail.com] > > > >>

Re: [HACKERS] OpenSSL 1.1 breaks configure and more

2016-09-04 Thread Andreas Karlsson
On 08/30/2016 08:42 AM, Heikki Linnakangas wrote: There's the ResourceOwner mechanism, see src/backend/utils/resowner/. That would be the proper way to do this. Call RegisterResourceReleaseCallback() when the context is allocated, and have the callback free it. One pitfall to watch out for is

Re: [HACKERS] Remove superuser() checks from pgstattuple

2016-09-04 Thread Stephen Frost
Tom, * Tom Lane (t...@sss.pgh.pa.us) wrote: > [ warning, thread hijack ahead ] quite. > Stephen Frost writes: > > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > >> I think this is a good change to pursue, and we'll likely want to do > >> more similar changes

Re: [HACKERS] Change error code for hstore syntax error

2016-09-04 Thread Marko Tiikkaja
Hi Sherrylyn, On 2016-05-09 19:42, Sherrylyn Branchaw wrote: I'm attaching a revised patch; please let me know if there are any other issues before I submit to the commitfest. I think this is mostly good, but these two should be changed: errmsg("unexpected end of string: \"%s\"",

Re: [HACKERS] \timing interval

2016-09-04 Thread Jim Nasby
On 9/3/16 2:35 PM, Tom Lane wrote: I pushed the patch using this: Time: 176460001.200 ms (2 d 01:01:00.001) and all else as before. I'd find this useful in the final output of EXPLAIN ANALYZE as well; any objections to adding it? -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin

[HACKERS] Minor fix to comments

2016-09-04 Thread Jim Nasby
I noticed some imbalanced '-'s in execnodes.h. Though, ISTM newer code doesn't use -'s in comments anymore, so maybe it'd be better to just ditch them? -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it

Re: [HACKERS] pg_sequence catalog

2016-09-04 Thread Greg Stark
On Wed, Aug 31, 2016 at 3:01 PM, Tom Lane wrote: > > Uh, not as subtly as all that, because "select * from sequence" will > now return a different set of columns, which will flat out break a > lot of clients that use that method to get sequence properties. So? Clients expect

Re: [HACKERS] Obsolete TODO item "-Wcast-align" ?

2016-09-04 Thread Christian Convey
On Sun, Sep 4, 2016 at 5:56 PM, Tom Lane wrote: > Christian Convey writes: >> I chose this item from the TODO page: "[E] Remove warnings created by >> -Wcast-align". It didn't have a check-mark after the "[E]", which I >> took to mean it's an

Re: [HACKERS] Obsolete TODO item "-Wcast-align" ?

2016-09-04 Thread Tom Lane
Christian Convey writes: > I chose this item from the TODO page: "[E] Remove warnings created by > -Wcast-align". It didn't have a check-mark after the "[E]", which I > took to mean it's an outstanding issue. > However, I'm starting to wonder if it's already been

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-09-04 Thread Tomas Vondra
Hi, This thread started a year ago, different people contributed various patches, some of which already got committed. Can someone please post a summary of this thread, so that it's a bit more clear what needs review/testing, what are the main open questions and so on? I'm interested in doing

[HACKERS] Obsolete TODO item "-Wcast-align" ?

2016-09-04 Thread Christian Convey
Hi guys, I'm trying to get my feet wet in PG development, but I ran into a snag with the TODO item I picked. Could someone please tell me if I'm making an obvious error? I chose this item from the TODO page: "[E] Remove warnings created by -Wcast-align". It didn't have a check-mark after the

Re: [HACKERS] Better locale-specific-character-class handling for regexps

2016-09-04 Thread Tom Lane
I wrote: > I got tired of hearing complaints about the issue described in > this thread: > https://www.postgresql.org/message-id/flat/24241.1329347196%40sss.pgh.pa.us > Here's a proposed fix. I've not done extensive performance testing, > but it seems to be as fast or faster than the old code in

Re: [HACKERS] [PATCH] Alter or rename enum value

2016-09-04 Thread Emre Hasegeli
> I started looking at this patch. I'm kind of unhappy with having *both* > IF EXISTS and IF NOT EXISTS options on the statement, especially since > the locations of those phrases in the syntax seem to have been chosen > with a dartboard. This feels way more confusing than it is useful. > Is

Re: [HACKERS] Better locale-specific-character-class handling for regexps

2016-09-04 Thread Tom Lane
Heikki Linnakangas writes: > On 08/23/2016 03:54 AM, Tom Lane wrote: >> ! the color map for characters above MAX_SIMPLE_CHR is really a 2-D array, >> ! whose rows correspond to character ranges that are explicitly mentioned >> ! in the input, and whose columns correspond to sets

Re: Transactional enum additions - was Re: [HACKERS] Alter or rename enum value

2016-09-04 Thread Tom Lane
Emre Hasegeli writes: >> + /* >> +* If the row is hinted as committed, it's surely safe. This provides a >> +* fast path for all normal use-cases. >> +*/ >> + if (HeapTupleHeaderXminCommitted(enumval_tup->t_data)) >> + return; >> + >> + /* >> +*

Re: [HACKERS] Make better use of existing enums in plpgsql

2016-09-04 Thread Pavel Stehule
Hi 2016-08-19 16:56 GMT+02:00 Peter Eisentraut < peter.eisentr...@2ndquadrant.com>: > plpgsql.h defines a number of enums, but most of the code passes them > around as ints. The attached patch updates structs and function > prototypes to take enum types instead. This clarifies the struct >

Re: [HACKERS] Remove superuser() checks from pgstattuple

2016-09-04 Thread Tom Lane
[ warning, thread hijack ahead ] Stephen Frost writes: > * Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: >> I think this is a good change to pursue, and we'll likely want to do >> more similar changes in contrib. But I'm worried that what is logically >> a

Re: [HACKERS] Remove superuser() checks from pgstattuple

2016-09-04 Thread Stephen Frost
* Peter Eisentraut (peter.eisentr...@2ndquadrant.com) wrote: > On 8/23/16 5:22 PM, Stephen Frost wrote: > > Now that we track initial privileges on extension objects and changes to > > those permissions, we can drop the superuser() checks from the various > > functions which are part of the

Re: [HACKERS] [PATCH] COPY vs \copy HINT

2016-09-04 Thread Tom Lane
I wrote: > Craig Ringer writes: >> I thought about that but figured it didn't really matter too much, >> when thinking about examples like >> # COPY batch_demo FROM '/root/secret.csv' WITH (FORMAT CSV); >> ERROR: could not open file "/root/secret.csv" for reading:

Re: [HACKERS] Add support for restrictive RLS policies

2016-09-04 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Thu, Sep 1, 2016 at 12:04 PM, Stephen Frost wrote: > > As outlined in the commit message, this adds support for restrictive RLS > > policies. We've had this in the backend since 9.5, but they were only > > available via hooks

Re: [HACKERS] [PATCH] Reload SSL certificates on SIGHUP

2016-09-04 Thread Andreas Karlsson
On 08/31/2016 11:34 PM, Peter Geoghegan wrote: On Sun, Nov 22, 2015 at 7:29 PM, Andreas Karlsson wrote: Sorry for dropping this patch, but now I have started looking at it again. Any chance of picking this up again soon, Andreas? I think it's an important project. I would

Re: [HACKERS] LSN as a recovery target

2016-09-04 Thread Simon Riggs
On 4 September 2016 at 14:32, Abhijit Menon-Sen wrote: > At 2016-09-04 07:02:01 +0100, si...@2ndquadrant.com wrote: >> >> > By the way, what has been committed does not include the patch >> > adding the parsing context in case of an error as wanted upthread. >> > Perhaps

Re: [HACKERS] Better locale-specific-character-class handling for regexps

2016-09-04 Thread Heikki Linnakangas
On 08/23/2016 03:54 AM, Tom Lane wrote: ! That's still not quite enough, though, because of locale-dependent ! character classes such as [[:alpha:]]. In Unicode locales these classes ! may have thousands of entries that are above MAX_SIMPLE_CHR, and we ! certainly don't want to be searching

Re: [HACKERS] LSN as a recovery target

2016-09-04 Thread Abhijit Menon-Sen
At 2016-09-04 07:02:01 +0100, si...@2ndquadrant.com wrote: > > > By the way, what has been committed does not include the patch > > adding the parsing context in case of an error as wanted upthread. > > Perhaps that's not worth adding now as there is the GUC refactoring > > potentially happening

Re: [HACKERS] pg_hba_file_settings view patch

2016-09-04 Thread Christoph Berg
Re: Simon Riggs 2016-09-03 > pg_hba_file_settings seems a clumsy name. I'd prefer pg_hba_settings, > since that name could live longer than the concept of pg_hba.conf, > which seems likely to become part of ALTER SYSTEM in

Re: [HACKERS] [sqlsmith] Failed assertion in numeric aggregate

2016-09-04 Thread Heikki Linnakangas
On 09/03/2016 08:59 PM, Tom Lane wrote: Andreas Seltenreich writes: Digging in the coredumps, it looks like set_var_from_num() is invoked on an uninitialized NumericVar. Sample gdb session below. Hm, yeah, looks like numeric_poly_deserialize is missing a required

Re: Transactional enum additions - was Re: [HACKERS] Alter or rename enum value

2016-09-04 Thread Emre Hasegeli
> Got around to looking at this. Attached is a revised version that I think > is in committable shape. The main non-cosmetic change is that the test > for "type was created in same transaction as new value" now consists of > comparing the xmins of the pg_type and pg_enum rows, without consulting

Re: [HACKERS] IF (NOT) EXISTS in psql-completion

2016-09-04 Thread Pavel Stehule
Hi This patch needs rebase. Regards Pavel

Re: [HACKERS] patch: function xmltable

2016-09-04 Thread Pavel Stehule
Hi minor update - using DefElem instead own private parser type Regards Pavel diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 5148095..189d201 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -10099,6 +10099,47 @@ SELECT xmlroot(xmlparse(document 'abc'),

Re: [HACKERS] Vacuum: allow usage of more than 1GB of work mem

2016-09-04 Thread Simon Riggs
On 3 September 2016 at 04:25, Claudio Freire wrote: > The attached patch allows setting maintainance_work_mem or > autovacuum_work_mem higher than 1GB (and be effective), by turning the > allocation of the dead_tuples into a huge allocation. > > This results in fewer index

Re: [HACKERS] LSN as a recovery target

2016-09-04 Thread Michael Paquier
On Sun, Sep 4, 2016 at 3:02 PM, Simon Riggs wrote: > On 4 September 2016 at 04:50, Michael Paquier > wrote: >> On Sun, Sep 4, 2016 at 8:05 AM, Michael Paquier >> wrote: >>> On Sun, Sep 4, 2016 at 1:57 AM, Simon Riggs

Re: [HACKERS] LSN as a recovery target

2016-09-04 Thread Simon Riggs
On 4 September 2016 at 04:50, Michael Paquier wrote: > On Sun, Sep 4, 2016 at 8:05 AM, Michael Paquier > wrote: >> On Sun, Sep 4, 2016 at 1:57 AM, Simon Riggs wrote: >>> On 24 August 2016 at 05:50, Michael Paquier