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

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. > >

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...

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

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

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) ); >>

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

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

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

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)

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

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

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 >>

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.

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 - > >

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

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 >

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

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

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/

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

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

[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

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

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

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

[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

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

[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

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

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. > > > >

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

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

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

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,

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

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

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.

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) + { +

<    1   2