Re: [HACKERS] extend pgbench expressions with functions

2016-03-09 Thread Fabien COELHO
Hello Robert, Here is a v35 b & c. This is not acceptable: + /* guess double type (n for "inf", "-inf" and "nan") */ + if (strchr(var, '.') != NULL || strchr(var, 'n') != NULL) + { +

Re: [HACKERS] Minor documentation tweak to GetForeignPlan documentation

2016-03-09 Thread Etsuro Fujita
On 2016/03/09 4:36, Robert Haas wrote: On Fri, Jan 15, 2016 at 6:20 AM, Etsuro Fujita wrote: Attached patch makes minor modification to the GetForeignPlan documentation. This adds the description about outer_plan, the new parameter added in 9.5. Good catch. Committed and back-patched to 9.

Re: [HACKERS] PATCH: index-only scans with partial indexes

2016-03-09 Thread Kyotaro HORIGUCHI
Hello, thank you for the comments. The new v8 patch is attched. At Tue, 08 Mar 2016 18:08:55 -0500, Tom Lane wrote in <21567.1457478...@sss.pgh.pa.us> > Kyotaro HORIGUCHI writes: > > Hello, This is a (maybe) committer-ready patch of a Tomas > > Vondra's project. > > I think this needs quite a

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2016-03-09 Thread Etsuro Fujita
On 2016/03/08 2:35, Robert Haas wrote: On Mon, Mar 7, 2016 at 7:53 AM, Etsuro Fujita wrote: Another option to avoid such a hazard would be to remove the two changes from ExecInitModifyTable and create ExecAuxRowMarks and junk filters even in the pushdown case. I made the changes because we won

Re: [HACKERS] Disabling an index temporarily

2016-03-09 Thread Joel Jacobson
On Mon, Dec 14, 2015 at 10:27 AM, Tom Lane wrote: > Corey Huinker writes: >> So, I'd propose we following syntax: >> ALTER INDEX foo SET DISABLED >> -- does the SET indisvalid = false shown earlier. > > This is exactly *not* what Tatsuo-san was after, though; he was asking > for a session-local d

Re: [HACKERS] PATCH: index-only scans with partial indexes

2016-03-09 Thread Kyotaro HORIGUCHI
Sorry, I should correct one point. At Wed, 09 Mar 2016 17:29:49 +0900 (Tokyo Standard Time), Kyotaro HORIGUCHI wrote in <20160309.172949.8413.horiguchi.kyot...@lab.ntt.co.jp> > Hello, thank you for the comments. The new v8 patch is attched. > > At Tue, 08 Mar 2016 18:08:55 -0500, Tom Lane

Re: [HACKERS] SP-GiST support for inet datatypes

2016-03-09 Thread Emre Hasegeli
>> Spgist index tree is much better than gist - 12149 pages vs 1334760 ! I assume this is the reason why it is bigger. IP addresses are very well suited to SP-GiST. They naturally do not overlap. > I also noticed, that spgist is much faster than gist for other inet > operators. I'd like to see

Re: [HACKERS] pgbench small bug fix

2016-03-09 Thread Fabien COELHO
On Wed, Jan 27, 2016 at 2:31 PM, Fabien COELHO wrote: - when a duration (-T) is specified, ensure that pgbench ends at that time (i.e. do not wait for a transaction beyond the end of the run). Every other place where doCustom() returns false is implemented as return clientDone(...). I t

Re: [HACKERS] Novice Presentation and Company Project

2016-03-09 Thread Eduardo Morras
On Wed, 9 Mar 2016 00:06:43 -0500 Noah Misch wrote: > On Thu, Mar 03, 2016 at 12:04:56PM +0100, Eduardo Morras wrote: > > My company is developing code for Postgresql for another company > > and want to communicate, debate and share the results with the > > community. > > > > The objetives are u

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-03-09 Thread Shulgin, Oleksandr
On Tue, Mar 8, 2016 at 9:10 PM, Joel Jacobson wrote: > On Wed, Mar 9, 2016 at 1:25 AM, Shulgin, Oleksandr > wrote: > > Thank you for spending your time to run these :-) > > n/p, it took like 30 seconds :-) > Great! I'm glad to hear it was as easy to use as I hoped for :-) > I don't want to be

[HACKERS] the include-timestamp data returned by pg_logical_slot_peek_changes() is always 2000-01-01 in 9.5.1

2016-03-09 Thread 李海龙
HI, pgsql-hackers The include-timestamp data returned by pg_logical_slot_peek_changes() is always 2000-01-01 in 9.5.1, is it not normal? The following is the test: [postgres@pgtest ~]$ cat /etc/issue CentOS release 6.4 (Final) Kernel \r on an \m [postgres@pgtest ~]$ uname -av Linux pgtest

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-03-09 Thread Shulgin, Oleksandr
On Tue, Mar 8, 2016 at 8:16 PM, Alvaro Herrera wrote: > Shulgin, Oleksandr wrote: > > > Alright. I'm attaching the latest version of this patch split in two > > parts: the first one is NULLs-related bugfix and the second is the > > "improvement" part, which applies on top of the first one. > > I

[HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission

2016-03-09 Thread Amit Kapila
On Wed, Mar 9, 2016 at 11:46 AM, Haribabu Kommi wrote: > > > I tried replacing the random() with PostmaterRandom() for a test and it worked. > This is generating different random values, so the issue is not occurring. > > "Global/PostgreSQL.2115609797" > > I feel, we should add the the data direct

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-09 Thread Yury Zhuravlev
Good point. It did not occur to me that this would bring a hard dependency for non-Windows builds. Let's keep both scripts then. The attached is changed to do so. Hello. What about putenv problem? We can't write: #define putenv(x) pgwin32_putenv(x) because in new CRT putenv have different signat

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-03-09 Thread Tomas Vondra
Hi, On Wed, 2016-03-09 at 10:58 +0100, Shulgin, Oleksandr wrote: > On Tue, Mar 8, 2016 at 9:10 PM, Joel Jacobson > wrote: > On Wed, Mar 9, 2016 at 1:25 AM, Shulgin, Oleksandr > wrote: > > Thank you for spending your time to run these :-) > > n/p, it took

Re: [HACKERS] WIP: Upper planner pathification

2016-03-09 Thread Alexander Korotkov
Hi, Tom! I have a question about Sort path. AFAICS this question wasn't mentioned in the upthread discussion. We're producing Sort plans in two ways: from explicit Sort paths, and from other paths which implicitly assumes sorting (like MergeJoin path). Would it be better to produce Sort plan only

[HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission

2016-03-09 Thread Haribabu Kommi
On Wed, Mar 9, 2016 at 10:06 PM, Amit Kapila wrote: > On Wed, Mar 9, 2016 at 11:46 AM, Haribabu Kommi > wrote: >> >> >> I tried replacing the random() with PostmaterRandom() for a test and it >> worked. >> This is generating different random values, so the issue is not occurring. >> >> "Global/Po

Re: [HACKERS] multivariate statistics v11

2016-03-09 Thread Alvaro Herrera
Hi, I gave a very quick skim to patch 0002. Not a real review yet. But there are a few trivial points to fix: * You still have empty sections in the SGML docs (such as the EXAMPLES). I suppose the syntax is now firm enough that we can get some. (I looked at the other patches to see whether it

Re: [HACKERS] the include-timestamp data returned by pg_logical_slot_peek_changes() is always 2000-01-01 in 9.5.1

2016-03-09 Thread Craig Ringer
On 9 March 2016 at 18:13, 李海龙 wrote: > > > HI, pgsql-hackers > > The include-timestamp data returned by pg_logical_slot_peek_changes() is > always 2000-01-01 in 9.5.1, is it not normal? > Did you enable track_commit_timestamps in the server? If not, and it's returning 2000-01-01 I think that'

Re: [HACKERS] WIP: Access method extendability

2016-03-09 Thread Alvaro Herrera
Hi. As I just said to Tomas Vondra: since your patch creates a new object type, please make sure to add a case to cover it in the object_address.sql test. That verifies some things such as pg_identify_object and related. Thanks, -- Álvaro Herrerahttp://www.2ndQuadrant.com/ Post

Re: [HACKERS] Optimizer questions

2016-03-09 Thread Konstantin Knizhnik
On 09.03.2016 09:15, Tom Lane wrote: I wrote: BTW, there's some additional refactoring I had had in mind to do in grouping_planner to make its handling of the targetlist a bit more organized; in particular, I'd like to see it using PathTarget representation more consistently throughout the pos

Re: [HACKERS] WIP: Upper planner pathification

2016-03-09 Thread Amit Kapila
On Tue, Mar 8, 2016 at 2:31 AM, Tom Lane wrote: > > I wrote: > >> Attached is a version that addresses today's concerns, and also finishes > >> filling in the loose ends I'd left before, such as documentation and > >> outfuncs.c support. I think this is in a committable state now, though > >> I p

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-03-09 Thread Tomas Vondra
Hi, On Wed, 2016-03-09 at 11:23 +0100, Shulgin, Oleksandr wrote: > On Tue, Mar 8, 2016 at 8:16 PM, Alvaro Herrera > wrote: > Shulgin, Oleksandr wrote: > > > Alright. I'm attaching the latest version of this patch > split in two > > parts: the first one is

Re: [HACKERS] WAL log only necessary part of 2PC GID

2016-03-09 Thread Jesper Pedersen
On 03/08/2016 11:54 PM, Pavan Deolasee wrote: On Fri, Mar 4, 2016 at 9:16 PM, Jesper Pedersen wrote: I can confirm the marginal speed up in tps due to the new WAL size. The TWOPHASE_MAGIC constant should be changed, as the file header has changed definition, right ? Thanks for looking at it

Re: [HACKERS] fun with "Ready for Committer" patches

2016-03-09 Thread Robert Haas
On Tue, Mar 8, 2016 at 6:18 PM, Tatsuo Ishii wrote: >> It's hard to miss the fact that there are an absolutely breathtaking >> number of patches in this CommitFest - 80! - that are in the "needs >> review" state. We really, really, really need more review to happen - > > Many of "needs review" st

Re: [HACKERS] fun with "Ready for Committer" patches

2016-03-09 Thread Robert Haas
On Tue, Mar 8, 2016 at 9:44 PM, Craig Ringer wrote: > On 9 March 2016 at 07:18, Tatsuo Ishii wrote: >> Many of "needs review" state patches already have reviewer(s). Do you >> mean we want more reviewers in addition to them for such patches? > > Yeah. Personally I'm not too confident about what p

Re: [HACKERS] Parallel Aggregate

2016-03-09 Thread Robert Haas
On Tue, Mar 8, 2016 at 4:26 PM, David Rowley wrote: >> The first one in the list will be the cheapest; why not just look at >> that? Sorted partial paths are interesting if some subsequent path >> construction step can make use of that sort ordering, but they're >> never interesting from the poin

Re: [HACKERS] Proposal: RETURNING primary_key()

2016-03-09 Thread Robert Haas
On Tue, Mar 8, 2016 at 8:12 PM, Craig Ringer wrote: > There certainly are server/protocol frustrations. I'm sympathetic to all of these and think we should work on fixing them, particularly... > STRING TYPE ISSUES > --- > > PgJDBC can work around Pg's IMO somewhat overzealous type checks ... Th

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2016-03-09 Thread Amit Kapila
On Fri, Mar 4, 2016 at 7:11 PM, Alexander Korotkov wrote: > >> >> If yes, then the only slight worry is that there will lot of repetition in wait_event_type column, otherwise it is okay. > > > There is morerows attribute of entry tag in Docbook SGML, it behaves like rowspan in HTML. > Thanks for

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-09 Thread Petr Jelinek
On 09/03/16 12:09, Yury Zhuravlev wrote: Good point. It did not occur to me that this would bring a hard dependency for non-Windows builds. Let's keep both scripts then. The attached is changed to do so. Hello. What about putenv problem? We can't write: #define putenv(x) pgwin32_putenv(x) becau

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2016-03-09 Thread Robert Haas
On Wed, Mar 9, 2016 at 8:31 AM, Amit Kapila wrote: > Thanks for the suggestion. I have updated the patch to include > wait_event_type information in the wait_event table. I think we should remove "a server process is" from all of these entries. Also, I think this kind of thing should be tighte

Re: [HACKERS] Freeze avoidance of very large table.

2016-03-09 Thread Masahiko Sawada
On Wed, Mar 9, 2016 at 3:38 AM, Robert Haas wrote: > On Tue, Mar 8, 2016 at 12:59 PM, Masahiko Sawada > wrote: >>> How about instead changing things so that we specifically reject >>> indexes? And maybe some kind of a check that will reject anything >>> that lacks a relfilnode? That seems like

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-03-09 Thread Petr Jelinek
On 09/03/16 05:31, Noah Misch wrote: On Tue, Mar 08, 2016 at 10:32:28PM +0900, Michael Paquier wrote: Subject: [PATCH 3/4] Fix use of locales for VS 2015 lc_codepage is a flag missing from locale.h, causing this code path introduced in VS 2012 to fail. Perhaps there is a reason for this field t

Re: [HACKERS] Declarative partitioning

2016-03-09 Thread Robert Haas
On Mon, Mar 7, 2016 at 8:39 PM, Amit Langote wrote: >> Which means your creates would look like (following Robert Haas's implied >> suggestion that we leave off the string literal quotes): >> >> CREATE TABLE foo_ax1x PARTITION OF foo FOR VALUES ( , (b,2) ); >> CREATE TABLE foo_ax1x PARTITION

Re: [HACKERS] Declarative partitioning

2016-03-09 Thread Robert Haas
On Fri, Feb 26, 2016 at 1:05 AM, Amit Langote wrote: > I think setting up N ResultRelInfos in advance where the tuple would only > ever require one might be superfluous. But that may point to some flaw in > my original design or thinking about the case. You have a point. But maybe we should get

Re: [HACKERS] WAL log only necessary part of 2PC GID

2016-03-09 Thread Petr Jelinek
Hi, I wonder why you define the gidlen as uint32 when it would fit into uint8 which in the current TwoPhaseFileHeader struct should be win of 8 bytes on padding (on 64bit). I think that's something worth considering given that this patch aims to lower the size of the data. -- Petr Jelinek

Re: [HACKERS] Proposal: RETURNING primary_key()

2016-03-09 Thread Craig Ringer
On 9 March 2016 at 21:30, Robert Haas wrote: > On Tue, Mar 8, 2016 at 8:12 PM, Craig Ringer > wrote: > > There certainly are server/protocol frustrations. > > I'm sympathetic to all of these and think we should work on fixing > them, particularly... > > > STRING TYPE ISSUES > > --- > > > > PgJDB

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2016-03-09 Thread Thom Brown
On 9 March 2016 at 13:31, Amit Kapila wrote: > On Fri, Mar 4, 2016 at 7:11 PM, Alexander Korotkov > wrote: > > > >> > >> If yes, then the only slight worry is that there will lot of repetition > in wait_event_type column, otherwise it is okay. > > > > > > There is morerows attribute of entry tag

Re: [HACKERS] WIP: Upper planner pathification

2016-03-09 Thread Tom Lane
Alexander Korotkov writes: > I have a question about Sort path. AFAICS this question wasn't mentioned in > the upthread discussion. > We're producing Sort plans in two ways: from explicit Sort paths, and from > other paths which implicitly assumes sorting (like MergeJoin path). > Would it be bette

[HACKERS] Explain [Analyze] produces parallel scan for select Into table statements.

2016-03-09 Thread Mithun Cy
Hi All, Explain [Analyze] Select Into table. produces the plan which uses parallel scans. *Test:* create table table1 (n int); insert into table1 values (generate_series(1,500)); analyze table1; set parallel_tuple_cost=0; set max_parallel_degree=3; postgres=# explain select into table

[HACKERS] Alter or rename enum value

2016-03-09 Thread Matthias Kurz
Hi! Right now it is not possible to rename an enum value. Are there plans to implement this anytime soon? I had a bit of a discussion on the IRC channel and it seems it shouldn't be that hard to implement this. Again, I am talking about renaming the values, not the enum itself. Thanks! Greetings

Re: [HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-03-09 Thread Aleksander Alekseev
Hello, Michael Thanks a lot for steps to reproduce you provided. I tested your path on Ubuntu Linux 14.04 LTS (GCC 4.8.4) and FreeBSD 10.2 RELEASE (Clang 3.4.1). In both cases patch applies cleanly, there are no warnings during compilation and all regression tests pass. A few files are not proper

Re: [HACKERS] Crash with old Windows on new CPU

2016-03-09 Thread Magnus Hagander
On Sat, Feb 13, 2016 at 4:45 PM, Christian Ullrich wrote: > On February 13, 2016 4:10:34 PM Tom Lane wrote: > > > Christian Ullrich writes: > >> * Robert Haas wrote: > >>> Thanks for the report and patch. Regrettably I haven't the Windows > >>> knowledge to have any idea whether it's right or

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-03-09 Thread Alvaro Herrera
Tomas Vondra wrote: > FWIW while looking at the code I noticed that we skip wide varlena > values but not cstrings. Seems a bit suspicious. Uh, can you actually have columns of cstring type? I don't think you can ... -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Devel

Re: [HACKERS] OOM in libpq and infinite loop with getCopyStart()

2016-03-09 Thread Alvaro Herrera
Aleksander Alekseev wrote: > pg_receivexlog: could not send replication command "START_REPLICATION": > out of memory pg_receivexlog: disconnected; waiting 5 seconds to try > again pg_receivexlog: starting log streaming at 0/100 (timeline 1) > > Breakpoint 1, getCopyStart (conn=0x610180, copyt

Re: [HACKERS] the include-timestamp data returned by pg_logical_slot_peek_changes() is always 2000-01-01 in 9.5.1

2016-03-09 Thread Andres Freund
On March 9, 2016 4:26:01 AM PST, Craig Ringer wrote: >On 9 March 2016 at 18:13, 李海龙 wrote: > >> >> >> HI, pgsql-hackers >> >> The include-timestamp data returned by >pg_logical_slot_peek_changes() is >> always 2000-01-01 in 9.5.1, is it not normal? It's a bug in 9.5, that has been fixed. You

Re: [HACKERS] Crash with old Windows on new CPU

2016-03-09 Thread Christian Ullrich
* Magnus Hagander wrote: On Sat, Feb 13, 2016 at 4:45 PM, Christian Ullrich wrote: On February 13, 2016 4:10:34 PM Tom Lane wrote: I'm also suspicious of the "#if _MSC_VER == 1800" tests, that is, the code compiles on *exactly one* MSVC version. The bug exists in only that compiler ver

Re: [HACKERS] Crash with old Windows on new CPU

2016-03-09 Thread Magnus Hagander
On Wed, Mar 9, 2016 at 4:36 PM, Christian Ullrich wrote: > * Magnus Hagander wrote: > > On Sat, Feb 13, 2016 at 4:45 PM, Christian Ullrich >> wrote: >> > > On February 13, 2016 4:10:34 PM Tom Lane wrote: >>> >> > I'm also suspicious of the "#if _MSC_VER == 1800" tests, that is, the code co

Re: [HACKERS] Pushing down sorted joins

2016-03-09 Thread Robert Haas
On Wed, Mar 9, 2016 at 2:23 AM, Ashutosh Bapat wrote: > [ new patch ] This looks OK to me. Committed! -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subs

Re: [HACKERS] WIP: Upper planner pathification

2016-03-09 Thread Tom Lane
Amit Kapila writes: > On latest commit-51c0f63e, I am seeing some issues w.r.t parallel query. > Consider a below case: > create table t1(c1 int, c2 char(1000)); > insert into t1 values(generate_series(1,30),''); > analyze t1; > set max_parallel_degree=2; > postgres=# explain select c1, c

[HACKERS] Suspicious behaviour on applying XLOG_HEAP2_VISIBLE.

2016-03-09 Thread Masahiko Sawada
Hi all, I faced suspicious behaviour on hot standby server related to visibility map. The scenario is, 1. Create table and check internal of visibility map on master server. postgres(1)=# create table hoge (col int); CREATE TABLE postgres(1)=# insert into hoge select generate_series(1,10); INSERT

Re: [HACKERS] Alter or rename enum value

2016-03-09 Thread Andrew Dunstan
On 03/09/2016 09:56 AM, Matthias Kurz wrote: Hi! Right now it is not possible to rename an enum value. Are there plans to implement this anytime soon? I had a bit of a discussion on the IRC channel and it seems it shouldn't be that hard to implement this. Again, I am talking about renaming t

Re: [HACKERS] Alter or rename enum value

2016-03-09 Thread Tom Lane
Andrew Dunstan writes: > On 03/09/2016 09:56 AM, Matthias Kurz wrote: >> Right now it is not possible to rename an enum value. >> Are there plans to implement this anytime soon? > I don't know of any plans, but it would be a useful thing. I agree it > wouldn't be too hard. The workaround is to d

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-03-09 Thread Tomas Vondra
On Wed, 2016-03-09 at 12:02 -0300, Alvaro Herrera wrote: > Tomas Vondra wrote: > > > FWIW while looking at the code I noticed that we skip wide varlena > > values but not cstrings. Seems a bit suspicious. > > Uh, can you actually have columns of cstring type? I don't think you > can ... Yeah, b

Re: [HACKERS] the include-timestamp data returned by pg_logical_slot_peek_changes() is always 2000-01-01 in 9.5.1

2016-03-09 Thread hailong . li
On 2016年03月09日 23:31, Andres Freund wrote: Did you enable track_commit_timestamps in the server? That's unrelated, commit ts is about an xid timestamp mapping. Yes, whether enable track_commit_timestamp or not, I have just done the test again and the result is the same. Thxs all! Best

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-03-09 Thread Tom Lane
Tomas Vondra writes: > On Wed, 2016-03-09 at 12:02 -0300, Alvaro Herrera wrote: >> Tomas Vondra wrote: >>> FWIW while looking at the code I noticed that we skip wide varlena >>> values but not cstrings. Seems a bit suspicious. >> Uh, can you actually have columns of cstring type? I don't think y

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-03-09 Thread Shulgin, Oleksandr
On Wed, Mar 9, 2016 at 1:33 PM, Tomas Vondra wrote: > Hi, > > On Wed, 2016-03-09 at 11:23 +0100, Shulgin, Oleksandr wrote: > > On Tue, Mar 8, 2016 at 8:16 PM, Alvaro Herrera > > wrote: > > > > Also, I can't quite figure out why the "else" now in line 2131 > > is now "else if trac

Re: [HACKERS] More stable query plans via more predictable column statistics

2016-03-09 Thread Tom Lane
"Shulgin, Oleksandr" writes: > Yes, I now recall that my actual concern was that sample_cnt may calculate > to 0 due to the latest condition above, but that also implies track_cnt == > 0, and then we have a for loop there which will not run at all due to this, > so I figured we can avoid calculati

Re: [HACKERS] Proposal: RETURNING primary_key()

2016-03-09 Thread Igal @ Lucee.org
On 3/8/2016 5:12 PM, Craig Ringer wrote: One of the worst problems (IMO) is in the driver architecture its self. It attempts to prevent blocking by guestimating the server's send buffer state and its recv buffer state, trying to stop them filling and causing the server to block on writes. It sh

Re: [HACKERS] multivariate statistics v14

2016-03-09 Thread Jeff Janes
On Wed, Mar 9, 2016 at 7:02 AM, Tomas Vondra wrote: > Hi, > > thanks for the feedback. Attached is v14 of the patch series, fixing > most of the points you've raised. Hi Tomas, Applied to aa09cd242fa7e3a694a31f, I still get the seg faults in make check if I configure without --enable-cassert.

Re: [HACKERS] Crash with old Windows on new CPU

2016-03-09 Thread Alvaro Herrera
Magnus Hagander wrote: > On Wed, Mar 9, 2016 at 4:36 PM, Christian Ullrich > wrote: > > And apparently not a single one with VS 2013. OK, I'll see what I can do > > about setting some up soonish, at least with (server) 2008 and (client) 7. > > FWIW, I have a local build of 9.5.1 with this patch i

Re: [HACKERS] Crash with old Windows on new CPU

2016-03-09 Thread Christian Ullrich
* Magnus Hagander wrote: On Wed, Mar 9, 2016 at 4:36 PM, Christian Ullrich wrote: * Magnus Hagander wrote: How does this work wrt mingw, though? Do we have the same problem there? AIUI this code can never run on mingw, correct? Not unless mingw defines _MSC_VER. The question is then -

Re: [HACKERS] [PATCH v6] GSSAPI encryption support

2016-03-09 Thread David Steele
Hi Robbie, On 3/8/16 5:44 PM, Robbie Harwood wrote: > Hello friends, > > Here's yet another version of GSSAPI encryption support. It's also > available for viewing on my github: I got this warning when applying the first patch in the set: ../other/v6-0001-Move-common-GSSAPI-code-into-its-own-f

Re: [HACKERS] Alter or rename enum value

2016-03-09 Thread Andrew Dunstan
On 03/09/2016 11:07 AM, Tom Lane wrote: Andrew Dunstan writes: On 03/09/2016 09:56 AM, Matthias Kurz wrote: Right now it is not possible to rename an enum value. Are there plans to implement this anytime soon? I don't know of any plans, but it would be a useful thing. I agree it wouldn't be

Re: [HACKERS] WIP: Upper planner pathification

2016-03-09 Thread Alvaro Herrera
Tom Lane wrote: > Amit Kapila writes: > > Without setting max_parallel_degree, it works fine and generate the > > appropriate results. Here the issue seems to be that the code in > > grouping_planner doesn't apply the required PathTarget to Path below Gather > > Path due to which when we generat

Re: [HACKERS] Alter or rename enum value

2016-03-09 Thread Tom Lane
Andrew Dunstan writes: > On 03/09/2016 11:07 AM, Tom Lane wrote: >> I have a vague recollection that we discussed this at the time the enum >> stuff went in, and there are concurrency issues? Don't recall details >> though. > Rings a vague bell, but should it be any worse than adding new labels?

Re: [HACKERS] [PROPOSAL] VACUUM Progress Checker.

2016-03-09 Thread Robert Haas
On Wed, Mar 9, 2016 at 2:37 AM, Amit Langote wrote: > On 2016/03/09 10:11, Amit Langote wrote: >> The attached revision addresses above and one of Horiguchi-san's comments >> in his email yesterday. > > I fixed one more issue in 0002 per Horiguchi-san's comment. Sorry about > so many versions. I

Re: [HACKERS] WIP: Upper planner pathification

2016-03-09 Thread Robert Haas
On Wed, Mar 9, 2016 at 12:07 PM, Alvaro Herrera wrote: > Tom Lane wrote: >> Amit Kapila writes: > >> > Without setting max_parallel_degree, it works fine and generate the >> > appropriate results. Here the issue seems to be that the code in >> > grouping_planner doesn't apply the required PathTa

Re: [HACKERS] multivariate statistics v14

2016-03-09 Thread Tomas Vondra
Hi, On Wed, 2016-03-09 at 08:45 -0800, Jeff Janes wrote: > On Wed, Mar 9, 2016 at 7:02 AM, Tomas Vondra > wrote: > > Hi, > > > > thanks for the feedback. Attached is v14 of the patch series, fixing > > most of the points you've raised. > > > Hi Tomas, > > Applied to aa09cd242fa7e3a694a31f, I s

Re: [HACKERS] extend pgbench expressions with functions

2016-03-09 Thread Robert Haas
On Wed, Mar 9, 2016 at 3:09 AM, Fabien COELHO wrote: > I'm not sure what is "not acceptable" as it "totally breaks the error > handling" in the above code. > > I assumed that you want to check that sscanf can read what sprintf generated > when handling "\set". I'd guess that libc would be broken i

[HACKERS] Patch to implement pg_current_logfile() function

2016-03-09 Thread Gilles Darold
Hi, Here is a patch that is supposed to solve the remaining problem to find the current log file used by the log collector after a rotation. There is lot of external command to try to find this information but it seems useful to have an internal function to retrieve the name of the current log fil

Re: [HACKERS] WIP: Upper planner pathification

2016-03-09 Thread Tom Lane
Alvaro Herrera writes: > Tom Lane wrote: >> Yeah, fixed. I had assumed that the existing coding in create_gather_plan >> was OK, because it looked like it was right for a non-projecting node. >> But actually Gather can project (why though?), so it's not right. > This looks related: > https://www

Re: [HACKERS] pgcrypto: add s2k-count

2016-03-09 Thread Alvaro Herrera
Alvaro Herrera wrote: > Anyway, assuming that the iteration count was already being used > correctly, then as far as I'm concerned we're ready to go. The attached > patch is what I would commit. I read some more (gnupg code as well as our own) and applied some more tweaks, and pushed. -- Álvar

Re: [HACKERS] raw output from copy

2016-03-09 Thread Corey Huinker
> > >> The regression tests seem to adequately cover all new functionality, >> though I wonder if we should add some cases that highlight situations where >> BINARY mode is insufficient. >> >> One thing I tried to test RAW was to load an existing json file. My own personal test was to load an exis

Re: [HACKERS] Declarative partitioning

2016-03-09 Thread Corey Huinker
> > > I think we're converging on a good syntax, but I don't think the > choice of nothingness to represent an open range is a good idea, both > because it will probably create grammar conflicts now or later and > also because it actually is sort of confusing and unintuitive to read > given the res

[HACKERS] enums and indexing

2016-03-09 Thread Andrew Dunstan
Currently we don't have a way to create a GIN index on an array of enums, or to use an enum field in a GIST index, so it can't be used in an exclusion constraint, among other things. I'd like to work on fixing that if possible. Are there any insuperable barriers? If not, what do we need to do?

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2016-03-09 Thread Robert Haas
On Wed, Mar 9, 2016 at 3:30 AM, Etsuro Fujita wrote: > Great! I changed the naming. I also updated docs as proposed by you in a > previous email, and rebased the patch to the latest HEAD. Please find > attached an updated version of the patch. Thanks. The new naming looks much better (and bet

Re: [HACKERS] pgcrypto: add s2k-count

2016-03-09 Thread Jeff Janes
On Tue, Mar 8, 2016 at 4:09 PM, Alvaro Herrera wrote: > Jeff Janes wrote: >> pgcrypto supports s2k-mode for key-stretching during symmetric >> encryption, and even defaults to s2k-mode=3, which means configurable >> iterations. But it doesn't support s2k-count to actually set those >> iterations

Re: [HACKERS] pgcrypto: add s2k-count

2016-03-09 Thread Alvaro Herrera
Jeff Janes wrote: > On Tue, Mar 8, 2016 at 4:09 PM, Alvaro Herrera > wrote: > Yeah, I find that pretty impenetrable too. I just treated it as a > black box, I changed how the number passed into it gets set, but not > the meaning of that number. Initially I had the user set the one-byte > forma

Re: [HACKERS] multivariate statistics v14

2016-03-09 Thread Jeff Janes
On Wed, Mar 9, 2016 at 9:21 AM, Tomas Vondra wrote: > Hi, > > On Wed, 2016-03-09 at 08:45 -0800, Jeff Janes wrote: >> On Wed, Mar 9, 2016 at 7:02 AM, Tomas Vondra >> wrote: >> > Hi, >> > >> > thanks for the feedback. Attached is v14 of the patch series, fixing >> > most of the points you've raise

Re: [HACKERS] pgbench small bug fix

2016-03-09 Thread Robert Haas
On Wed, Mar 9, 2016 at 4:12 AM, Fabien COELHO wrote: >> On Wed, Jan 27, 2016 at 2:31 PM, Fabien COELHO >> wrote: >>> >>> - when a duration (-T) is specified, ensure that pgbench ends at that >>>time (i.e. do not wait for a transaction beyond the end of the run). >> >> >> Every other place wh

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2016-03-09 Thread Tom Lane
Robert Haas writes: > Overall, I think this is looking pretty good. I hadn't been paying any attention to this thread, but I wonder whether this entire approach isn't considerably inferior to what we can do now with the planner pathification patch. To quote from the new docs: PlanForeignModi

Re: [HACKERS] multivariate statistics v14

2016-03-09 Thread Tomas Vondra
On Wed, 2016-03-09 at 18:21 +0100, Tomas Vondra wrote: > Hi, > > On Wed, 2016-03-09 at 08:45 -0800, Jeff Janes wrote: > > On Wed, Mar 9, 2016 at 7:02 AM, Tomas Vondra > > wrote: > > > Hi, > > > > > > thanks for the feedback. Attached is v14 of the patch series, fixing > > > most of the points you

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2016-03-09 Thread Robert Haas
On Wed, Mar 9, 2016 at 1:12 PM, Tom Lane wrote: > Robert Haas writes: >> Overall, I think this is looking pretty good. > > I hadn't been paying any attention to this thread, but I wonder whether > this entire approach isn't considerably inferior to what we can do now > with the planner pathificat

Re: [HACKERS] WIP: Upper planner pathification

2016-03-09 Thread Robert Haas
On Wed, Mar 9, 2016 at 12:33 PM, Tom Lane wrote: > Alvaro Herrera writes: >> Tom Lane wrote: >>> Yeah, fixed. I had assumed that the existing coding in create_gather_plan >>> was OK, because it looked like it was right for a non-projecting node. >>> But actually Gather can project (why though?),

[HACKERS] Re: [HACKERS] Re: [HACKERS] Re: [HACKERS] Windows service is not starting so there’s message in log: FATAL: "could not create shared memory segment “Global/PostgreSQL.851401618”: Permission

2016-03-09 Thread Robert Haas
On Wed, Mar 9, 2016 at 7:16 AM, Haribabu Kommi wrote: > On Wed, Mar 9, 2016 at 10:06 PM, Amit Kapila wrote: >> On Wed, Mar 9, 2016 at 11:46 AM, Haribabu Kommi >> wrote: >>> >>> >>> I tried replacing the random() with PostmaterRandom() for a test and it >>> worked. >>> This is generating differen

Re: [HACKERS] Freeze avoidance of very large table.

2016-03-09 Thread Robert Haas
On Wed, Mar 9, 2016 at 9:09 AM, Masahiko Sawada wrote: Attached latest 2 patches. > * 000 patch : Incorporated the review comments and made rewriting > logic more clearly. That's better, thanks. But your comments don't survive pgindent. After running pgindent, I get this: + /* +

Re: [HACKERS] extend pgbench expressions with functions

2016-03-09 Thread Fabien COELHO
Hello Robert, [...] With your patch, you get different behavior depending on exactly how the input is malformed. I understand that you require only one possible error message on malformed input, instead of failing when converting to double if the input looked like a double (there was a '.'

Re: [HACKERS] pgbench small bug fix

2016-03-09 Thread Fabien COELHO
OK, I've committed the fix for the -T part. It didn't back-patch cleanly, and it is a minor bug, so I'm not inclined to worry about it further. I agree that it is a very minor bug and not necessary worth back-patching. I didn't commit the fix for the -P part, because Alvaro objected to the

Re: [HACKERS] Alter or rename enum value

2016-03-09 Thread Matthias Kurz
Besides not being able to rename enum values there are two other limitations regarding enums which would be nice to get finally fixed: 1) There is also no possibility to drop a value. 2) Quoting the docs ( http://www.postgresql.org/docs/9.5/static/sql-altertype.html): "ALTER TYPE ... ADD VALUE (t

Re: [HACKERS] WIP: Upper planner pathification

2016-03-09 Thread Alexander Korotkov
On Wed, Mar 9, 2016 at 5:47 PM, Tom Lane wrote: > Alexander Korotkov writes: > > I have a question about Sort path. AFAICS this question wasn't mentioned > in > > the upthread discussion. > > We're producing Sort plans in two ways: from explicit Sort paths, and > from > > other paths which impli

Re: [HACKERS] Recovery test failure for recovery_min_apply_delay on hamster

2016-03-09 Thread Michael Paquier
On Wed, Mar 9, 2016 at 12:29 PM, Alvaro Herrera wrote: > Michael Paquier wrote: >> After sleeping (best debugger ever) on that, actually a way popped up >> in my mind, and I propose the attached, which refactors a bit 005 and >> checks that the LSN position of master has been applied on standby >>

Re: [HACKERS] pg_ctl promote wait

2016-03-09 Thread Michael Paquier
On Mon, Feb 29, 2016 at 4:29 PM, Michael Paquier wrote: > On Mon, Feb 29, 2016 at 4:28 PM, Michael Paquier > wrote: >> I would suggest using >> $node_standby->poll_query_until('SELECT pg_is_in_recovery()') to >> validate the end of the test. > > Meh. SELECT NOT pg_is_in_recovery(). This will wait

Re: [HACKERS] [PATCH v6] GSSAPI encryption support

2016-03-09 Thread Robbie Harwood
David Steele writes: > On 3/8/16 5:44 PM, Robbie Harwood wrote: >> >> Here's yet another version of GSSAPI encryption support. It's also >> available for viewing on my github: > > I got this warning when applying the first patch in the set: > > ../other/v6-0001-Move-common-GSSAPI-code-into-its-

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2016-03-09 Thread Tom Lane
Robert Haas writes: > On Wed, Mar 9, 2016 at 1:12 PM, Tom Lane wrote: >> I hadn't been paying any attention to this thread, but I wonder whether >> this entire approach isn't considerably inferior to what we can do now >> with the planner pathification patch. To quote from the new docs: > Well,

Re: [HACKERS] [PROPOSAL] VACUUM Progress Checker.

2016-03-09 Thread Tomas Vondra
Hi, On Wed, 2016-03-09 at 12:16 -0500, Robert Haas wrote: > On Wed, Mar 9, 2016 at 2:37 AM, Amit Langote > wrote: > > On 2016/03/09 10:11, Amit Langote wrote: > >> The attached revision addresses above and one of Horiguchi-san's comments > >> in his email yesterday. > > > > I fixed one more issu

Re: [HACKERS] fun with "Ready for Committer" patches

2016-03-09 Thread Michael Paquier
On Wed, Mar 9, 2016 at 9:47 PM, Robert Haas wrote: > On Tue, Mar 8, 2016 at 9:44 PM, Craig Ringer wrote: >> On 9 March 2016 at 07:18, Tatsuo Ishii wrote: >>> Many of "needs review" state patches already have reviewer(s). Do you >>> mean we want more reviewers in addition to them for such patches

Re: [HACKERS] fun with "Ready for Committer" patches

2016-03-09 Thread Andres Freund
On 2016-03-10 06:14:25 +0900, Michael Paquier wrote: > IMO, during a review one needs to think of himself as a committer. > Once the reviewer switches the patch to "Ready for committer", it > means that the last version of the patch present would have been the > version that gained the right to be

Re: [HACKERS] fun with "Ready for Committer" patches

2016-03-09 Thread Michael Paquier
On Wed, Mar 9, 2016 at 10:19 PM, Andres Freund wrote: > On 2016-03-10 06:14:25 +0900, Michael Paquier wrote: >> IMO, during a review one needs to think of himself as a committer. >> Once the reviewer switches the patch to "Ready for committer", it >> means that the last version of the patch presen

Re: [HACKERS] TAP / recovery-test fs-level backups, psql enhancements etc

2016-03-09 Thread Alvaro Herrera
Craig Ringer wrote: > 004 allows filtering on RecursiveCopy by a predicate function. Needed for > filesystem level backups (007). It could probably be squashed with 007 if > desired. I pushed this after some tinkering: * filtering applies to all directory entries, not just files. So you can fil

  1   2   >