Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-31 Thread Alexander Korotkov
ruct > > +{ > > + int spins; > > + int delays; > > + int cur_delay; > > + Pointer ptr; > > + const char *file; > > + int line; > > +} SpinDel

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-31 Thread Alexander Korotkov
Hi! On Thu, Mar 31, 2016 at 4:59 PM, Amit Kapila <amit.kapil...@gmail.com> wrote: > On Tue, Mar 29, 2016 at 10:52 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> Hi, Andres! >> >> Please, find next revision of patch in attac

Re: [HACKERS] WIP: Access method extendability

2016-03-31 Thread Alexander Korotkov
) BloomBuildState is explicitly zeroed. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company 0002-generic-xlog.15.patch Description: Binary data 0003-bloom-contrib.15.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers

Re: [HACKERS] PoC: Partial sort

2016-03-30 Thread Alexander Korotkov
t that we should try and make every small sort done by the > partial sort a quicksort. Which I think is a good idea. The common > case is that groups are small, but the qsort() insertion sort will be > very very fast for that case. > I'm not sure that in partial sort we should estimate sortin

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-30 Thread Alexander Korotkov
> > > I set that, but after that it hangs, even Initdb hangs.. > > Yea, as Tom pointed out that's not going to work. I'll try to write a > patch for approach 1). > Great! Do you need any improvements for pinunpin-cas-7.patch from me? -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] WIP: Access method extendability

2016-03-30 Thread Alexander Korotkov
On Tue, Mar 29, 2016 at 8:34 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Tue, Mar 29, 2016 at 8:29 PM, Teodor Sigaev <teo...@sigaev.ru> wrote: > >> I incorporated your changes and did some additional refinements on top of >>> them >>>

Re: [HACKERS] SQL access to access method details

2016-03-30 Thread Alexander Korotkov
exposing it. If not, default assumption is that this information shouldn't be exposed. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] WIP: Access method extendability

2016-03-29 Thread Alexander Korotkov
comments to generic_xlog.c. I'm not fan of duplicating things. What about moving interface description from comments to docs completely? -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] PoC: Partial sort

2016-03-29 Thread Alexander Korotkov
this can be marked "ready for > committer". Will you have that ready soon? > Yes, that's it. I'm working on it now. I'm going to post it until tomorrow. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] WIP: Access method extendability

2016-03-29 Thread Alexander Korotkov
On Tue, Mar 29, 2016 at 6:20 PM, David Steele <da...@pgmasters.net> wrote: > On 3/28/16 1:26 PM, Alvaro Herrera wrote: > >> Alexander Korotkov wrote: >> >>> On Thu, Mar 24, 2016 at 6:19 PM, Alvaro Herrera < >>> alvhe...@2ndquadrant.com> >>

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-28 Thread Alexander Korotkov
On Sun, Mar 27, 2016 at 4:31 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Sun, Mar 27, 2016 at 3:10 PM, Andres Freund <and...@anarazel.de> wrote: > >> On 2016-03-27 12:38:25 +0300, Alexander Korotkov wrote: >> > On Sat, Mar 26, 2016 at 1:26 AM,

Re: [HACKERS] WIP: Access method extendability

2016-03-28 Thread Alexander Korotkov
gt; that... >> >> > I did only cursory review on the bloom contrib module and don't really > have complaints there, but I know you can review that one. I'd like the > English of the generic_xlog.c description improved but I won't get to it > before weekend. What is your

[HACKERS] Autovacuum to prevent wraparound tries to consume xid

2016-03-28 Thread Alexander Korotkov
Xid. That completely fixes this situation for me: ShmemVariableCache was successfully updated. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company fix_vac_truncate_clog_xid_consume.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsq

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-28 Thread Alexander Korotkov
e to do that myself. > > > > Also I agree with you about tsvector_setweight(). There is not a problem > > with it because this weights are immutable and so there is not benefits > > from new function. > > Ideally Alexander can also look at it. If not, then you shoul

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-27 Thread Alexander Korotkov
On Sun, Mar 27, 2016 at 3:10 PM, Andres Freund <and...@anarazel.de> wrote: > On 2016-03-27 12:38:25 +0300, Alexander Korotkov wrote: > > On Sat, Mar 26, 2016 at 1:26 AM, Alexander Korotkov < > > a.korot...@postgrespro.ru> wrote: > > > > > Thank you very

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-27 Thread Alexander Korotkov
On Sat, Mar 26, 2016 at 1:26 AM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > Thank you very much for testing! > I also got access to 4 x 18 Intel server with 144 threads. I'm going to > post results of tests on this server in next Monday. > I've run pgbench tes

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-25 Thread Alexander Korotkov
Hi, Dilip! On Fri, Mar 25, 2016 at 8:32 PM, Dilip Kumar <dilipbal...@gmail.com> wrote: > On Fri, Mar 25, 2016 at 8:09 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> Could anybody run benchmarks? Feature freeze is soon, but it would be >> *very

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-25 Thread Alexander Korotkov
;> > > Do you know when you'll have a chance to respond to reviews and provide a > new patch? > > Time is short and it's not encouraging that you say there is "still much > work to be done". Perhaps it would be best to mark this "returned with > feedback&quo

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-25 Thread Alexander Korotkov
On Tue, Mar 22, 2016 at 1:08 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Tue, Mar 22, 2016 at 7:57 AM, Dilip Kumar <dilipbal...@gmail.com> > wrote: > >> >> On Tue, Mar 22, 2016 at 12:31 PM, Dilip Kumar <dilipbal...@gmail.com> >&g

Re: [HACKERS] WIP: Access method extendability

2016-03-25 Thread Alexander Korotkov
th these issues. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company fix-pg_dump-comment.patch Description: Binary data fix-am-tab-complete.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.

2016-03-24 Thread Alexander Korotkov
significant infrastructural changes. It just change some well-isolated placed. Let's give it a chance. I've signed as additional reviewer and I'll do my best in spotting all possible issues in this patch. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

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

2016-03-24 Thread Alexander Korotkov
, it's too late to include something new to 9.6. This is why I've rework it and publish at github as an extension for 9.6: https://github.com/postgrespro/pg_wait_sampling/ Hopefully, it could be considered as contrib for 9.7. -- Alexander Korotkov Postgres Professional: http

Re: [HACKERS] WIP: Access method extendability

2016-03-23 Thread Alexander Korotkov
On Tue, Mar 22, 2016 at 11:53 PM, Alvaro Herrera <alvhe...@2ndquadrant.com> wrote: > Alexander Korotkov wrote: > > On Tue, Mar 22, 2016 at 1:26 AM, Alvaro Herrera < > alvhe...@2ndquadrant.com> > > wrote: > > > > I noticed this state of affairs because I

Re: [HACKERS] improving GROUP BY estimation

2016-03-22 Thread Alexander Korotkov
Hi, Tomas! On Mon, Mar 21, 2016 at 2:39 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Fri, Mar 18, 2016 at 1:20 PM, Dean Rasheed <dean.a.rash...@gmail.com> > wrote: > >> Probably a better URL to give is >> http://www.adellera.it/investigations

Re: [HACKERS] pg_dump dump catalog ACLs

2016-03-22 Thread Alexander Korotkov
uming most of proacl values are NULLs when you change it, acl wouldn't be dumped since NULL <> value IS NULL. In general, these checks using subqueries looks complicated for me, hard to validate and needs a lot of testing. Could we implement function "bool need_acl_dump(oid objoid, o

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-22 Thread Alexander Korotkov
ot intended to it so because it would significantly complicate code. It's not yes clear that traffic in this place is high enough to make such optimizations. Since v4 patch implements slightly different approach. Could you please test it? We need to check that this approach worth putting more ef

Re: [HACKERS] WIP: Access method extendability

2016-03-22 Thread Alexander Korotkov
so problem of dependencies in DROP EXTENSION. > http://www.postgresql.org/message-id/26822.1414516...@sss.pgh.pa.us (Oct > 2014) > > And then Alexander posted this version, without any discussion that > evidenced that those old objections were overridden. What happened > her

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Alexander Korotkov
n_dependency_type FUNCTION function_with_argtypes { AlterExtensionContentsStmt *n = makeNode(AlterExtensionContentsStmt); n->extname = $3; n->action = $4; n->objtype = OBJECT_FUNCTION; n->objname = $7->funcname; n->objargs = $7->funcargs; n->deptype = $5; $$ = (Node *)n; } I didn't try it. Probably it causes a grammar conflicts. In this case I don't insist on it. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] [PATCH] Phrase search ported to 9.6

2016-03-21 Thread Alexander Korotkov
( 'nyc' | 'big' & 'appl' | 'new' & 'york' ) & 'citi' & 'foo' & ( 'bar' | 'qq' ) (1 row) select rewrite( ARRAY['moscow', keyword, sample] ) from test_tsquery; However, such reorderings look unclear and need motivation. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] improving GROUP BY estimation

2016-03-21 Thread Alexander Korotkov
ionally, it also turns out to work very well even when > the > * number of distinct values is small. > */ > +1 Thank you for work on this patch. The formula you propose and explanation look great! -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] dealing with extension dependencies that aren't quite 'e'

2016-03-21 Thread Alexander Korotkov
N; > + n->objname = $7->funcname; > + n->objargs = $7->funcargs; > + n->deptype = 'x'; > $$ = (Node *)n; > } by introducing separate rule extension_dependency_type. In the same way we could dependency type

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-19 Thread Alexander Korotkov
On Sat, Mar 19, 2016 at 3:22 PM, Dilip Kumar <dilipbal...@gmail.com> wrote: > > On Mon, Mar 14, 2016 at 3:09 AM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> I've drawn graphs for these measurements. The variation doesn't look >> random here.

Re: [HACKERS] Declarative partitioning

2016-03-19 Thread Alexander Korotkov
Append > instead of > > MergeAppend when possible); > > Optimization of hash join when both tables are patitioned by join key. > > > > I'd like to validate that this development plan doesn't overlaps with > your > > plans. If out plans are not overlapping th

[HACKERS] initdb: introduce PG_CMD_PRINTF intestead of PG_CMD_PRINTF{1,2,3}

2016-03-19 Thread Alexander Kuleshov
Hello all, The src/bin/initdb/initdb.c provides three macros to write data to cmdfd. All of these macro do the same, but with different amount of arguments for fprintf(). Attached patch introduces PG_CMD_PRINTF macro which will take set of variadic arguments via __VA_ARGS__ to replace the

Re: [HACKERS] Declarative partitioning

2016-03-19 Thread Alexander Korotkov
man-beta-release/ [3] http://akorotkov.github.io/blog/2016/03/14/pg_pathman-condition-processing/ -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Background Processes and reporting

2016-03-15 Thread Alexander Korotkov
hat would be enough for testing of GUC controlled, off by default features. Then we can turn our conversation from theoretical thoughts to particular benchmarks which would be objective and convincing to everybody. Otherwise, let's just add these features to the list of unwanted functionality and close this question. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-13 Thread Alexander Korotkov
On Fri, Mar 11, 2016 at 7:08 AM, Dilip Kumar <dilipbal...@gmail.com> wrote: > > On Thu, Mar 10, 2016 at 8:26 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> I don't think we can rely on median that much if we have only 3 runs. >> For 3 ru

Re: [HACKERS] PoC: Partial sort

2016-03-13 Thread Alexander Korotkov
this path more carefully next week. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company partial-sort-basic-7.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription

Re: [HACKERS] Background Processes and reporting

2016-03-12 Thread Alexander Korotkov
On Sat, Mar 12, 2016 at 2:45 AM, Andres Freund <and...@anarazel.de> wrote: > On 2016-03-12 02:24:33 +0300, Alexander Korotkov wrote: > > Idea of individual time measurement of every wait event met criticism > > because it might have high overhead [1]. > > Rig

[HACKERS] [PATCH] Use MemoryContextAlloc() in the MemoryContextAllocZero() and MemoryContextAllocZeroAligned()

2016-03-11 Thread Alexander Kuleshov
Hello all, Attached patch simplifies the MemoryContextAllocZero() and MemoryContextAllocZeroAligned(). The MemoryContextAllocZero() and MemoryContextAllocZeroAligned() functions does almost the same that MemoryContextAlloc() does. Additionally these functions fills allocated memory context with

Re: [HACKERS] Background Processes and reporting

2016-03-11 Thread Alexander Korotkov
gress reporting patch, but a quick scan of the thread doesn't > show authors of the wait events patch participating there. > > > > Can’t we think one more time about implementation provided by Ildus > > and Alexander here [3]? > > I don't think so. Afaics the proposed patch tri

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-03-10 Thread Alexander Korotkov
h if we have only 3 runs. For 3 runs we can only apply Kornfeld method which claims that confidence interval should be between lower and upper values. Since confidence intervals for master and patched versions are overlapping we can't conclude that expected TPS numbers are different. Dilip, could you do more runs? 10, for example. Using such statistics we would be able to conclude something. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

[HACKERS] utils/misc: Simplify search of end of argv in save_ps_display_args()

2016-03-10 Thread Alexander Kuleshov
Hello, Attached patch provides trivial simplification of the search of end of the argv[] area by replacing for() loop with calculation based on argc. diff --git a/src/backend/utils/misc/ps_status.c b/src/backend/utils/misc/ps_status.c index 892a810..d8f2105 100644 ---

Re: [HACKERS] WIP: Upper planner pathification

2016-03-09 Thread Alexander Korotkov
On Wed, Mar 9, 2016 at 5:47 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Alexander Korotkov <a.korot...@postgrespro.ru> writes: > > I have a question about Sort path. AFAICS this question wasn't mentioned > in > > the upthread discussion. > > We're producing S

Re: [HACKERS] WIP: Upper planner pathification

2016-03-09 Thread Alexander Korotkov
from explicit Sort path? Thus, MergeJoin path would add explicit children Sort paths. That would be more unified way. I ask about this from point of view of my "Partial Sort" patch. The absence of implicit sorts would help to make this patch more simple and clean. -- Alexande

Re: [HACKERS] syslog configurable line splitting behavior

2016-03-04 Thread Alexander Korotkov
s and syslog_split_lines that > can toggle these behaviors. > Would it have any usage if we make PG_SYSLOG_LIMIT configurable (-1 for disable) instead of introducing boolean? -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] pg_resetxlog reference page reorganization

2016-03-04 Thread Alexander Korotkov
> the style of the other ref pages, with a normal options list. > Patch applies cleanly on head, documentation compiles with no problem. pg_resetxlog page definitely looks much better than it was before. I don't see any problems or issues with this patch. So, I mark it "Ready for committer"

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

2016-03-04 Thread Alexander Korotkov
On Fri, Mar 4, 2016 at 4:20 PM, Amit Kapila <amit.kapil...@gmail.com> wrote: > On Fri, Mar 4, 2016 at 4:01 PM, Alexander Korotkov <aekorot...@gmail.com> > wrote: > >> On Fri, Mar 4, 2016 at 7:05 AM, Amit Kapila <amit.kapil...@gmail.com> >> wrote: >&

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

2016-03-04 Thread Alexander Korotkov
user a priori knows which wait event have which type. Readability of this large table will be also improved. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] improving GROUP BY estimation

2016-03-03 Thread Alexander Korotkov
ark means geometrical average, i.e. sqrt((small number) * (huge number)). -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] improving GROUP BY estimation

2016-03-03 Thread Alexander Korotkov
On Thu, Mar 3, 2016 at 7:35 PM, Tomas Vondra <tomas.von...@2ndquadrant.com> wrote: > On 03/03/2016 12:53 PM, Alexander Korotkov wrote: > >> I've assigned to review this patch. >> >> I've checked version estimate-num-groups-v2.txt by Mark Dilger. >> It appli

Re: [HACKERS] improving GROUP BY estimation

2016-03-03 Thread Alexander Korotkov
, especially because getting rid of this error would require way more computations. But it worth mentioning in comments though. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] The plan for FDW-based sharding

2016-03-02 Thread Alexander Korotkov
> Alternately, you can just work on the individual FDW features, which > *everyone* thinks are a good idea, and when most of them are done, > FDW-based scaleout will be such an obvious solution that nobody will argue > with it. +1 Thank you, Josh. I think this is excellent summary for conversation about FDW-based sharding. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] The plan for FDW-based sharding

2016-03-02 Thread Alexander Korotkov
vances. However, other things are unclear. You can try to build full-featured prototype to convince people. Despite it would take some resources it will save more resources because it would save us from errors. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] The plan for FDW-based sharding

2016-03-02 Thread Alexander Korotkov
Ms would be really chance in this situation. Users could use extension right now. And then when after many years we finally implement the right design, they could migrate to in-core solution. But 5-10 years of fast FTS does matter. > I suspect that > a transaction manager API would end up si

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-02-29 Thread Alexander Korotkov
On Sat, Feb 27, 2016 at 2:44 AM, Andres Freund <and...@anarazel.de> wrote: > On 2016-02-02 13:12:50 +0300, Alexander Korotkov wrote: > > On Tue, Feb 2, 2016 at 12:43 AM, Andres Freund <and...@anarazel.de> > wrote: > > > > > On 2016-02-01 13:06:57 +0300, A

Re: [HACKERS] Relation cache invalidation on replica

2016-02-26 Thread Alexander Korotkov
s what \d+ does), but planner doesn't pick it. Assuming that in new session planner picks this index, it seems to be bug for me. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] The plan for FDW-based sharding

2016-02-24 Thread Alexander Korotkov
e that FDW should be the only sharding approach. It's unproven that FDW can do work that Postgres XC/XL does. With FDW we can have some low-hanging fruits. That's good. But it's unclear we can have high-hanging fruits (like data redistribution) with FDW approach. And if we can it's unclear that

Re: [HACKERS] about google summer of code 2016

2016-02-18 Thread Alexander Korotkov
e for GSoC 2016. It contains unimplemented ideas from 2015 page. Now, GSoC accepting proposals from organizations. Typically, we have call for mentors in hackers mailing list in this period. Thom, do we apply this year? -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Figures in docs

2016-02-17 Thread Alexander Lakhin
ppropriate than having a single large XML, then we will propose a procedure to perform such conversion (that will result in corresponding mega patch). Best regards, Alexander Lakhin 17.02.2016 08:41, Tatsuo Ishii пишет: On Wed, Feb 17, 2016 at 4:17 AM, Tatsuo Ishii <is...@postgres

Re: [HACKERS] Figures in docs

2016-02-17 Thread Alexander Lakhin
17.02.2016 09:17, Tatsuo Ishii wrote: >> Hi. >> >> In DocBook 4.2 sgml dtd, figure tag is supported already. >> that was implemented for multi output format. > Ok, there's no technical problems with figures then. MySQL docs has > some nice figures. I am jealous. The "figure" tag is just a

Re: [HACKERS] Sequence Access Method WIP

2016-02-16 Thread Alexander Korotkov
On Sat, Jan 30, 2016 at 3:37 PM, Petr Jelinek <p...@2ndquadrant.com> wrote: > On 29 January 2016 at 23:59, Robert Haas <robertmh...@gmail.com> wrote: > > On Fri, Jan 29, 2016 at 5:24 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > >> Alexander Korotkov <a.korot.

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-02-02 Thread Alexander Korotkov
On Tue, Feb 2, 2016 at 12:43 AM, Andres Freund <and...@anarazel.de> wrote: > On 2016-02-01 13:06:57 +0300, Alexander Korotkov wrote: > > On Mon, Feb 1, 2016 at 11:34 AM, Alexander Korotkov < > > a.korot...@postgrespro.ru> wrote: > > >> ClientBasePa

Re: [HACKERS] Fix KNN GiST ordering type

2016-02-02 Thread Alexander Korotkov
On Mon, Feb 1, 2016 at 7:31 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > KNN GiST detects which type it should return by returning type of ordering > operator. > But it appears that type of sk_func is detected after it was replaced with > distance function. That

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2016-02-02 Thread Alexander Korotkov
On Tue, Feb 2, 2016 at 2:54 PM, Robert Haas <robertmh...@gmail.com> wrote: > On Mon, Feb 1, 2016 at 3:47 AM, Alexander Korotkov > <a.korot...@postgrespro.ru> wrote: > > OK. This one looks good for me too. > > All right, I pushed both this and the other one as a singl

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2016-02-01 Thread Alexander Korotkov
On Mon, Feb 1, 2016 at 10:26 AM, Amit Kapila <amit.kapil...@gmail.com> wrote: > On Sat, Jan 30, 2016 at 2:15 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > > > > On Sat, Jan 30, 2016 at 10:58 AM, Amit Kapila <amit.kapil...@gmail.com> > wrote:

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-02-01 Thread Alexander Korotkov
Patch > 11716916454 > 8108547105559 > 32241619262818 > 64206868233606 > 128137084217013 > Great, thanks! -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-02-01 Thread Alexander Korotkov
On Mon, Feb 1, 2016 at 11:34 AM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Mon, Feb 1, 2016 at 7:05 AM, Dilip Kumar <dilipbal...@gmail.com> wrote: > >> >> On Sun, Jan 31, 2016 at 11:44 AM, Dilip Kumar <dilipbal...@gmail.com> >> wrote: &

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

2016-02-01 Thread Alexander Korotkov
air enough for me. And then we save 16 bits for lock number. It's certainly not enough for some tranches. For instance, number of buffers could be easily more than 2^16. However, we could expose at least lower 16 bits. It would be at least something. Using this information user at least can make a conclusi

[HACKERS] Fix KNN GiST ordering type

2016-02-01 Thread Alexander Korotkov
to 9.5. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company fix-knn-gist-ordering-type.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2016-01-30 Thread Alexander Korotkov
On Sat, Jan 30, 2016 at 10:58 AM, Amit Kapila <amit.kapil...@gmail.com> wrote: > On Fri, Jan 29, 2016 at 6:47 PM, Robert Haas <robertmh...@gmail.com> > wrote: > > > > On Fri, Jan 29, 2016 at 6:59 AM, Alexander Korotkov > > <a.korot...@postgrespro.ru> wro

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2016-01-29 Thread Alexander Korotkov
good for me. It compiles without warnings, passes regression tests. I also did small testing of replication slots in order to check that it works correctly. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2016-01-29 Thread Alexander Korotkov
ropping old API I don't think it's useful to have LWLocks without having shared memory. There is another thing I'd like extensions to be able to do. It would be nice if extensions could use dynamic shared memory instead of static. Then extensions could use shared memory without being in shared_preload_libraries. But if extension register DSM, then there is no way to tell other backends to use it for that extension. Also DSM would be deallocated when all backends detached from it. This it out of scope for this patch though. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2016-01-29 Thread Alexander Korotkov
hasn't been reviewed at all, but the other two have seen a > bit of discussion and evolution. Is anyone doing any more reviewing? I'd like to add another one: fixed tranche id for each SLRU. And I'm going to make review over others. -- Alexander Korotkov Postgres Professional: http://w

Re: [HACKERS] [PATCH] Refactoring of LWLock tranches

2016-01-29 Thread Alexander Korotkov
er patches (separate tranche for PGProcs and separate tranche > for ReplicationSlots). Also, LWLockAssign() can be removed after > those patches > Also couple of minor comments from me. I think this + StrNCpy(LWLockTrancheRequestArray[LWLockTrancheRequestsCount].tranche_name, > tranche_name, strlen(tranche_name) + 1); should be + StrNCpy(LWLockTrancheRequestArray[LWLockTrancheRequestsCount].tranche_name, > tranche_name, > sizeof(LWLockTrancheRequestArray[LWLockTrancheRequestsCount].tranche_name)); And as far as I know english "it's" should be "its" in the sentence below. + from _PG_init. Tranche repersents an array of LWLocks > and > + can be accessed by it's name. First parameter > tranche_name -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Optimizer questions

2016-01-29 Thread Alexander Korotkov
eq Scan on t1 (cost=0.00..15406.00 rows=100 width=12) (actual time=0.012..78.828 rows=100 Planning time: 0.132 ms Execution time: 301.308 ms (12 rows) In this example LIMIT pushdown makes query 5 times faster. It would be very nice if optimizer make this automatically. -- Alexander K

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-01-29 Thread Alexander Korotkov
e features. Should we think more about naming? Does two kinds of generic records confuse people? -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Sequence Access Method WIP

2016-01-29 Thread Alexander Korotkov
am entry automatically. > > I'm thinking we'd do CREATE ACCESS METHOD foobar TYPE INDEX or something > like that. > Ok! Let's nail down the syntax and I can integrate it into my createam patch. I would prefer "CREATE {INDEX | SEQUENCE | ... } ACCESS METHOD name HANDLER handler;&

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2016-01-29 Thread Alexander Korotkov
355356 > 64 532052 552148 > 128412755 478826 > 256 346701 372057 > Could you please re-run these tests few times? Just to be sure it's a reproducible regression with s=300 and not a statistical error. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] PoC: Partial sort

2016-01-24 Thread Alexander Korotkov
Hi, Tomas! On Sat, Jan 23, 2016 at 3:07 PM, Tomas Vondra <tomas.von...@2ndquadrant.com> wrote: > On 10/20/2015 01:17 PM, Alexander Korotkov wrote: > >> On Fri, Oct 16, 2015 at 7:11 PM, Alexander Korotkov >> <aekorot...@gmail.com <mailto:aekorot...@gmail.com>>

Re: [HACKERS] PoC: Partial sort

2016-01-24 Thread Alexander Korotkov
ode, and whether it's possible to feed partially sorted > > tuples into other nodes. > > That's cool, but I'm particularly interested in seeing Alexander get > back to this because it's an important project on its own. We should > really have this. > Thank you for your review and

Re: [HACKERS] Optimizer questions

2016-01-05 Thread Alexander Korotkov
should make this better, or at least make it practical to make it > better. > Hmm... Besides costing it would be nice to postpone calculation of expensive tlist functions after LIMIT. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Commit fest status for 2015-11

2015-12-24 Thread Alexander Korotkov
d with Feedback: 22. > > Total: 103. > > Many thanks to Michael for doing the CF management work this time! > ​+1 ​Michael, thank you for the great job. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Patch: pg_trgm: gin index scan performance for similarity search

2015-12-24 Thread Alexander Korotkov
we use this upper bound. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Fuzzy substring searching with the pg_trgm extension

2015-12-19 Thread Alexander Korotkov
tch in commitfest: > https://commitfest.postgresql.org/8/448/ ​Great. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] statistics for array types

2015-12-18 Thread Alexander Korotkov
On Wed, Sep 16, 2015 at 8:01 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Mon, Aug 24, 2015 at 8:26 PM, Jeff Janes <jeff.ja...@gmail.com> wrote: > >> On Thu, Aug 20, 2015 at 6:00 PM, Tomas Vondra < >> tomas.von...@2ndquadrant.com> wrote: &g

[HACKERS] Proposal: custom compression methods

2015-12-13 Thread Alexander Korotkov
ni...@gmail.com> who started work on this patch and sent me draft of proposal in Russian. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2015-12-11 Thread Alexander Korotkov
On Thu, Dec 10, 2015 at 9:26 AM, Amit Kapila <amit.kapil...@gmail.com> wrote: > On Wed, Dec 9, 2015 at 2:17 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> On Tue, Dec 8, 2015 at 6:00 PM, Amit Kapila <amit.kapil...@gmail.com> >> wrote

[HACKERS] Isolation of table creation

2015-12-11 Thread Alexander Korotkov
. # select * from tmp; i --- (0 rows) # insert into tmp values (2); INSERT 0 1 # select * from tmp; i --- 2 (1 row) # commit; COMMIT Is it a bug? -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2015-12-09 Thread Alexander Korotkov
On Tue, Dec 8, 2015 at 6:00 PM, Amit Kapila <amit.kapil...@gmail.com> wrote: > On Tue, Dec 8, 2015 at 3:56 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: >> >> ​Agree. This patch need to be carefully verified. Current experiments >> just

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2015-12-08 Thread Alexander Korotkov
On Tue, Dec 8, 2015 at 1:04 PM, Andres Freund <and...@anarazel.de> wrote: > On 2015-12-08 12:53:49 +0300, Alexander Korotkov wrote: > > ​This is why atomic increment *could be* cheaper than loop over CAS and, > it > > worth having experiments. ​Another idea is that we c

Re: [HACKERS] Use pg_rewind when target timeline was switched

2015-12-01 Thread Alexander Korotkov
g_rewind is rather explicit on the > subject and looks fine as-is, and that's what Alexander and I agreed > on upthread. If there is something forgotten though, this may be the > fact that we do not mention in 9.5's documentation that pg_rewind can > *not* handle timeline switches

Re: [HACKERS] Some questions about the array.

2015-11-11 Thread Alexander Korotkov
On Mon, Nov 9, 2015 at 8:23 PM, Pavel Stehule <pavel.steh...@gmail.com> wrote: > 2015-11-09 17:55 GMT+01:00 Alexander Korotkov <a.korot...@postgrespro.ru>: > >> On Mon, Nov 9, 2015 at 4:53 PM, Pavel Stehule <pavel.steh...@gmail.com> >> wrote: >> >

Re: [HACKERS] Some questions about the array.

2015-11-09 Thread Alexander Korotkov
Assuming array[~n] has a current meaning, could we give a try to new syntax which doesn't have current meaning? Not yet sure what exactly it could be... -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Summary of Vienna sharding summit, new TODO item

2015-11-07 Thread Alexander Korotkov
ble to > > external sharding solutions as well. > > > > Is this acceptable? > > Added to TODO. Great, thank you, Bruce! -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] WIP: Rework access method interface

2015-11-03 Thread Alexander Korotkov
ew ones. So basically, I see zero value in exposing CREATE/ > ALTER OP CLASS's internal working representation to the verifiers. > I'm OK with validating opclass directly by system catalog, i.e. looping over SearchSysCacheList results. Teodor was telling me something similar personally. I

Re: [HACKERS] WIP: Access method extendability

2015-11-02 Thread Alexander Korotkov
fied. GenericXLogFinish swaps the data between page copy and page itself. That allow us to avoid critical section in used code. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company generic-xlog.4.patch.gz Description: GNU Zip compressed data

[HACKERS] [PATCH] we have added support for box type in SP-GiST index

2015-10-31 Thread Alexander Lebedev
Hello, Hacker. * [PATCH] add a box index to sp-gist We have extended sp-gist with an index that keeps track of boxes We have used ideas underlying sp-gist range implementation to represent 2D boxes as points in 4D space. We use quad tree analogue, but in 4-dimensional space. We call

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2015-10-30 Thread Alexander Korotkov
On Thu, Oct 29, 2015 at 8:18 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Thu, Sep 24, 2015 at 6:36 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> On Thu, Sep 24, 2015 at 6:32 PM, Andres Freund <and...@anarazel.de> >&g

Re: [HACKERS] Move PinBuffer and UnpinBuffer to atomics

2015-10-29 Thread Alexander Korotkov
On Thu, Sep 24, 2015 at 6:36 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Thu, Sep 24, 2015 at 6:32 PM, Andres Freund <and...@anarazel.de> wrote: > >> On 2015-09-15 20:16:10 +0300, YUriy Zhuravlev wrote: >> > We will be tested. >> >>

<    1   2   3   4   5   6   7   8   9   10   >