Re: [HACKERS] Fix bloom WAL tap test

2017-11-13 Thread Alexander Korotkov
> ); > > This about halved the runtime of the TAP test, and it changed the coverage > footprint not at all according to lcov. (Said coverage is only marginally > better than what we get without running the bloom TAP test, AFAICT.) > > It seems like some effort could be p

Re: [HACKERS] How to implement a SP-GiST index as a extension module?

2017-11-13 Thread Alexander Korotkov
e is quite enough in this case. Alternatively, distance function is not what it meant to be. It would be useful if you provide complete usage example of this extension: from image to signature conversion to search queries. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Fix bloom WAL tap test

2017-11-09 Thread Alexander Korotkov
-check: temp-install > > $(prove_check) > > > > This works for me as I would expect it should. > > Looks good to me too. OK, then so be it :) -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company wal-check-on-bloom-ch

Re: [HACKERS] Fix bloom WAL tap test

2017-11-07 Thread Alexander Korotkov
seen the only difference: when tap tests are enabled, this version of Makefile runs tap tests before regression tests. While my version of Makefile runs tap tests after regression tests. That seems like more desirable behavior for me. But it would be sill nice to simplify Makefile. -- Al

Re: [HACKERS] Fix bloom WAL tap test

2017-11-07 Thread Alexander Korotkov
re ok for "patch -p1", but not ok for "git apply". Sorry for that. I resubmit both of them. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company fix-bloom-wal-check-2.patch Description: Binary data wal-check-on-bloom-chec

Re: [HACKERS] Display number of heap accesses for index scans

2017-11-06 Thread Alexander Korotkov
LAIN (ANALYZE, BUFFERS) doesn't distinguish buffers accessed in index and buffers accessed in heap -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] How to implement a SP-GiST index as a extension module?

2017-11-03 Thread Alexander Korotkov
would place some limitations. For instance, you wouldn't be able to use different distance threshold in the same query. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-11-03 Thread Alexander Korotkov
On Wed, Nov 1, 2017 at 5:55 AM, Masahiko Sawada <sawada.m...@gmail.com> wrote: > On Tue, Oct 31, 2017 at 6:17 PM, Alexander Korotkov > <a.korot...@postgrespro.ru> wrote: > > On Tue, Oct 31, 2017 at 5:16 AM, Masahiko Sawada <sawada.m...@gmail.com> > > wrote: >

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-11-03 Thread Alexander Korotkov
On Thu, Nov 2, 2017 at 5:56 AM, Robert Haas <robertmh...@gmail.com> wrote: > On Tue, Oct 31, 2017 at 2:47 PM, Alexander Korotkov > <a.korot...@postgrespro.ru> wrote: > > However, from user prospective of view, current behavior of > > hot_standby_feedback is just bro

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-10-31 Thread Alexander Korotkov
ow that it was deleted by concurrent truncation and should be assumed to be empty. Any thoughts? -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-10-31 Thread Alexander Korotkov
On Sun, Oct 29, 2017 at 12:47 AM, Pavel Stehule <pavel.steh...@gmail.com> wrote: > 2017-10-28 23:35 GMT+02:00 Alexander Korotkov <a.korot...@postgrespro.ru>: > >> On Sat, Oct 28, 2017 at 3:46 PM, Pavel Stehule <pavel.steh...@gmail.com> >> wrote: >> &g

Re: [HACKERS] CUBE seems a bit confused about ORDER BY

2017-10-30 Thread Alexander Korotkov
On Sun, Oct 29, 2017 at 1:30 AM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Fri, Oct 20, 2017 at 1:01 AM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > I've reviewed code of ~> operator and its KNN-GiST support. > Unfortunately, it appears

Re: [HACKERS] How to implement a SP-GiST index as a extension module?

2017-10-30 Thread Alexander Korotkov
//github.com/postgrespro/rum ) we > > developed using > > api available since 9.6. > > or even simple, there is contrib/bloom access method, which illustrates > developing access method as an extension. I think Connor struggles to implement just an operator class. Advising him to implement an index access method is a good way to get him away of PostgreSQL hacking for a long time :) -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] How to implement a SP-GiST index as a extension module?

2017-10-30 Thread Alexander Korotkov
n above. Right now my colleagues and me don't have time for that. But I can assist you with advises if you will decide to implement that. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company vptree.tar.gz Description: GNU Zip compressed data -

Re: [HACKERS] CUBE seems a bit confused about ORDER BY

2017-10-28 Thread Alexander Korotkov
On Fri, Oct 20, 2017 at 1:01 AM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Fri, Oct 20, 2017 at 12:52 AM, Tomas Vondra < > tomas.von...@2ndquadrant.com> wrote: > >> I've noticed this suspicious behavior of "cube" data type with

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-10-28 Thread Alexander Korotkov
nd suffixes > (supported only when it has sense) "s" sorted by size and "d" as descent > > so list of tables can be sorted with commands: > > \dt+sd (in this case, the order is not strict), so command > \dtsd+ is working too (same \disd+ or \di+sd) > > These two chars are acceptable. Same principle is used for \l command > > \lsd+ or \l+sd > > What do you think about it? > I think \lsd+ command would be another postgres meme :) BTW, are you going to provide an ability to sort by name, schema? -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Index only scan for cube and seg

2017-10-28 Thread Alexander Korotkov
GetNDBOX(x) ((NDBOX *) PG_DETOAST_DATUM(x)) Thus, it should be safe to just remove both compress/decompress methods from existing opclass. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-10-24 Thread Alexander Korotkov
? + FreeFakeRelcacheEntry(rel); > + } else > + { > + XLogFlush(lsn); > + } This code violates our coding style. According to it, "else" shouldn't share its line with braces. Also, patch definitely needs some general comment explaining what's going on. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] make async slave to wait for lsn to be replayed

2017-10-23 Thread Alexander Korotkov
" > #include "utils/tqual.h" > > - > /* > * Maximum size of a NOTIFY payload, including terminating NULL. This > * must be kept small enough so that a notification message fits on one -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] CUBE seems a bit confused about ORDER BY

2017-10-19 Thread Alexander Korotkov
t; 367 | (31018, 367),(30946, 333) > 377 | (11399, 377),(11360, 294) > (15 rows) > > > Seems like a bug somewhere in gist_cube_ops, I guess? > +1, that definitely looks like a bug. Thank you for reporting! I'll take a look on it in couple days. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

[HACKERS] Re: Is anything preventing us from allowing write to foreign tables from standby?

2017-10-17 Thread Alexander Korotkov
On Wed, Sep 6, 2017 at 4:42 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > We're currently blocking writing queries on standby if even they are > modifying contents of foreign tables. But do we have serious reasons for > that? > Keeping in the mind FDW-sharding,

Re: [HACKERS] Pluggable storage

2017-10-13 Thread Alexander Korotkov
te missing features (and document it), but don't tolerate wrong features. For instance, we may have some pluggable storage which doesn't support transactions at all (and that should be documented for sure), but we shouldn't have pluggable storage which transaction support is wrong. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Pluggable storage

2017-10-13 Thread Alexander Korotkov
erent storage may need to insert entries to only *some* of indexes. Wherein these new index entries may have either same or new TIDs. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Predicate Locks for writes?

2017-10-13 Thread Alexander Korotkov
node and benchmark it. If it wouldn't have significant performance benefit, then there is no reason to do something further... -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Pluggable storage

2017-10-12 Thread Alexander Korotkov
On Wed, Oct 11, 2017 at 11:08 PM, Robert Haas <robertmh...@gmail.com> wrote: > On Mon, Oct 9, 2017 at 10:22 AM, Alexander Korotkov > <a.korot...@postgrespro.ru> wrote: > > For me, it's crucial point that pluggable storages should be able to have > >

Re: [HACKERS] Pluggable storage

2017-10-09 Thread Alexander Korotkov
On Mon, Oct 9, 2017 at 5:32 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Alexander Korotkov <a.korot...@postgrespro.ru> writes: > > For me, it's crucial point that pluggable storages should be able to have > > different MVCC implementation, and correspondingly hav

Re: [HACKERS] Pluggable storage

2017-10-09 Thread Alexander Korotkov
On Wed, Sep 27, 2017 at 7:51 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > I took a look on this patch. I've following notes for now. > > tuple_insert_hook tuple_insert; /* heap_insert */ >> tuple_update_hook tuple_update; /* heap_update */ >> tup

Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index

2017-10-09 Thread Alexander Korotkov
On Thu, Oct 5, 2017 at 9:48 PM, Shubham Barai <shubhambara...@gmail.com> wrote: > On 3 October 2017 at 00:32, Alexander Korotkov <a.korot...@postgrespro.ru> > wrote: > >> On Mon, Oct 2, 2017 at 9:11 PM, Andrew Borodin <amborodi...@gmail.com> >> wrote

Re: [HACKERS] Predicate Locks for writes?

2017-10-09 Thread Alexander Korotkov
That SIReadLock on tuple is necessary. However, ISTM that we could place SIReadLock on tuple after Before Row Trigger and only in the case when trigger has cancelled an update. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Add TOAST to system tables with ACL?

2017-10-04 Thread Alexander Korotkov
pt.sql Then user u1 can login successfully. $ psql temp -U u1 psql (11devel) Type "help" for help. u1@temp=# Thus, in this simple case database CONNECT privilege works with out-of-line ACL for me. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] [PATCH] Pageinspect - add functions on GIN and GiST indexes from gevel

2017-10-03 Thread Alexander Korotkov
Thanks. I'm not sure that we should port these functions from gevel directly. We could try to re-implement similar functionality which fits pageinspect approach better. In particular, we can implement some low-level functions whose show detailed information at page level. And on top of them we can implement analogues of gevel functions in SQL or PL/pgSQL. Is it feasible? -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Add TOAST to system tables with ACL?

2017-10-03 Thread Alexander Korotkov
On Tue, Oct 3, 2017 at 9:19 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Alexander Korotkov <a.korot...@postgrespro.ru> writes: > > This topic was already discussed (at least one time) in 2011. See [1] > for > > details. I'd like to raise that again. > > I'

[HACKERS] Add TOAST to system tables with ACL?

2017-10-03 Thread Alexander Korotkov
ny thoughts? Should we consider TOASTing ACL entries or should we give up with this? Links: 1. https://www.commandprompt.com/blog/grant_schema_usage_ to_2500_users_no_can_do/ -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company acl-toast

Re: [HACKERS] 64-bit queryId?

2017-10-03 Thread Alexander Korotkov
On Tue, Oct 3, 2017 at 5:55 PM, Robert Haas <robertmh...@gmail.com> wrote: > On Mon, Oct 2, 2017 at 8:07 PM, Alexander Korotkov > <a.korot...@postgrespro.ru> wrote: > > +1, > > I see 3 options there: > > 1) Drop high-order bit, as you proposed. > > 2)

Re: [HACKERS] [PATCH] Incremental sort

2017-10-03 Thread Alexander Korotkov
On Tue, Oct 3, 2017 at 2:52 PM, Robert Haas <robertmh...@gmail.com> wrote: > On Mon, Oct 2, 2017 at 12:37 PM, Alexander Korotkov > <a.korot...@postgrespro.ru> wrote: > > I've applied patch on top of c12d570f and rerun the same benchmarks. > > CSV

Re: [HACKERS] 64-bit queryId?

2017-10-02 Thread Alexander Korotkov
user-visible, and negative queryIds would look rather nonlogical. #3 would be attaching hard and long-term problem by insufficient reason. Thus, #1 looks like most harmless solution. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS][BUG] Cache invalidation for queries that contains const of temporary composite type

2017-10-02 Thread Alexander Korotkov
deally, cached plan should be automatically invalidated and stored procedure should work without error. Not really sure if it's feasible... -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index

2017-10-02 Thread Alexander Korotkov
On Mon, Oct 2, 2017 at 9:11 PM, Andrew Borodin <amborodi...@gmail.com> wrote: > On Mon, Oct 2, 2017 at 8:00 PM, Alexander Korotkov > <a.korot...@postgrespro.ru> wrote: > > What happen if exactly this "continue" fires? > > > >> if (GistF

Re: [HACKERS][BUG] Cache invalidation for queries that contains const of temporary composite type

2017-10-02 Thread Alexander Korotkov
ion test changes (both .sql and .out) are essential parts of the patch. I see no point in posting them separately. Please, incorporate them into your patch. Did you check this patch with manually created composite type (made by CREATE TYPE typname AS ...)? -- Alexander Korotkov

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2017-10-02 Thread Alexander Korotkov
solation tests should be improved. It doesn't seems that any posting tree would be generated by the tests that you've provided, because all the TIDs could fit the single posting list. Note, that you can get some insight into GIN physical structure using pageinspect contrib. -- Alexander Korotkov

Re: [HACKERS] Commitfest 201709 is now closed

2017-10-02 Thread Alexander Korotkov
me > community. > > And thanks to you for your hard work as CFM! That's tedious and > largely thankless work, but it's needed to keep things moving. > +1, Thank you very much, Daniel! It was a pleasure working with you at commitfest. -- Alexander Korotkov Postgres Profess

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-10-02 Thread Alexander Korotkov
On Sun, Oct 1, 2017 at 8:27 PM, chenhj <chjis...@163.com> wrote: > On 2017-10-01 04:09:19,"Alexander Korotkov" <a.korot...@postgrespro.ru> > wrote: > > On Sat, Sep 30, 2017 at 8:18 PM, chenhj <chjis...@163.com> wrote: > >> On 2017-09-30 02:17:5

Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index

2017-10-02 Thread Alexander Korotkov
Hi, Andrew! On Mon, Oct 2, 2017 at 1:40 PM, Andrew Borodin <amborodi...@gmail.com> wrote: > Thanks for looking into the patch! > > On Thu, Sep 28, 2017 at 3:59 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> >> >> In gistdoinsert()

Re: [HACKERS] [PATCH] Incremental sort

2017-09-30 Thread Alexander Korotkov
On Sat, Sep 16, 2017 at 2:46 AM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Thu, Sep 14, 2017 at 2:48 AM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> Patch rebased to current master is attached. I'm going to improve my >> te

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2017-09-30 Thread Alexander Korotkov
; As I understand, all page-level predicate locking should happen only when fast update is off. Also, despite general idea is described in README-SSI, in-code comments would be useful. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-30 Thread Alexander Korotkov
On Sat, Sep 30, 2017 at 8:18 PM, chenhj <chjis...@163.com> wrote: > On 2017-09-30 02:17:54,"Alexander Korotkov" <a.korot...@postgrespro.ru> > wrote: > > > Great. Now code of this patch looks good for me. > However, we forgot about documentation. > >

Re: [HACKERS] 64-bit queryId?

2017-09-30 Thread Alexander Korotkov
might have inaccurate statistics of queries execution, but they don't notice it because they have nothing to compare. 2) Ideally, we should fix potential problems before they materialize, not only after users complaints. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-29 Thread Alexander Korotkov
On Fri, Sep 29, 2017 at 8:10 PM, chenhj <chjis...@163.com> wrote: > On 2017-09-30 00:53:31,"chenhj" <chjis...@163.com> wrote: > > On 2017-09-29 19:29:40,"Alexander Korotkov" <a.korot...@postgrespro.ru> > wrote: > > On Fri, Sep 29, 2017 at

Re: [HACKERS] Multicolumn hash indexes

2017-09-29 Thread Alexander Korotkov
we would like to repeat. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] GSoC 2017: weekly progress reports (week 4) and patch for hash index

2017-09-29 Thread Alexander Korotkov
rhaps I'm missing something important about the way that > locks need to escalate that would prevent that from working. +1, Very nice idea! Locking hash values directly seems to be superior over locking hash index pages. Shubham, do you have any comment on this? -- Alexander Korotkov Postgre

Re: [HACKERS] Fix bloom WAL tap test

2017-09-29 Thread Alexander Korotkov
On Wed, Sep 6, 2017 at 5:06 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Wed, Sep 6, 2017 at 4:08 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> I just realized that these lines of contrib/bloom/t/001_wal.pl don't >> che

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-29 Thread Alexander Korotkov
On Fri, Sep 29, 2017 at 10:07 AM, chenhj <chjis...@163.com> wrote: > On 2017-09-29 05:31:51, "Alexander Korotkov" <a.korot...@postgrespro.ru> > wrote: > > On Thu, Sep 28, 2017 at 10:52 PM, chenhj <chjis...@163.com> wrote: > >> On 2017-09-29 00:43:1

Re: [HACKERS] GSoC 2017: weekly progress reports (week 8)

2017-09-28 Thread Alexander Korotkov
On Thu, Sep 28, 2017 at 2:22 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Fri, Jul 28, 2017 at 7:58 AM, Shubham Barai <shubhambara...@gmail.com> > wrote: > >> I am attaching a patch for predicate locking in SP-Gist index >> > > I took a

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-28 Thread Alexander Korotkov
On Thu, Sep 28, 2017 at 10:52 PM, chenhj <chjis...@163.com> wrote: > On 2017-09-29 00:43:18,"Alexander Korotkov" <a.korot...@postgrespro.ru> > wrote: > > On Thu, Sep 28, 2017 at 6:44 PM, chenhj <chjis...@163.com> wrote: > >> On 2017-09-28 01:29:2

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-28 Thread Alexander Korotkov
On Thu, Sep 28, 2017 at 6:44 PM, chenhj <chjis...@163.com> wrote: > On 2017-09-28 01:29:29,"Alexander Korotkov" <a.korot...@postgrespro.ru> > wrote: > > It appears that your patch conflicts with fc49e24f. Please, rebase it. > > > Yes, i had rebased i

Re: [HACKERS] GSoC 2017: weekly progress reports (week 8)

2017-09-28 Thread Alexander Korotkov
of another busy page during split (see other branches in doPickSplit()). Your patch doesn't seem to handle this case correctly. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] GSoC 2017 : Patch for predicate locking in Gist index

2017-09-28 Thread Alexander Korotkov
ffer(stack->buffer, GIST_EXCLUSIVE); > CheckForSerializableConflictIn(r, NULL, stack->buffer); > xlocked = true; However, page might be exclusively locked before. And in this case CheckForSerializableConflictIn() would be skipped. That happens very rarely (someone fixes incomplete split before we did), but nevertheless. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2017-09-28 Thread Alexander Korotkov
On Thu, Sep 28, 2017 at 12:45 AM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Wed, Aug 9, 2017 at 6:30 PM, Shubham Barai <shubhambara...@gmail.com> > wrote: > >> Please find the updated patch for predicate locking in gin index here. >> >>

Re: [HACKERS] GSoC 2017: weekly progress reports (week 6)

2017-09-27 Thread Alexander Korotkov
y tree leaf page. So, there is no necessity to lock posting tree leaf pages at all. Alternatively, if entry has posting tree, you can skip locking entry tree leaf page and lock posting tree leaf pages instead. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-27 Thread Alexander Korotkov
On Mon, Sep 25, 2017 at 6:26 PM, chenhj <chjis...@163.com> wrote: > On 2017-09-23 01:59:0, "Alexander Korotkov" <a.korot...@postgrespro.ru> > wrote: > > On Fri, Sep 22, 2017 at 7:16 PM, chenhj <chjis...@163.com> wrote: > >> This is the new pacth

Re: [HACKERS] Pluggable storage

2017-09-27 Thread Alexander Korotkov
ple_freeze API method is wrong for abstraction. We probably should make rewrite_heap_tuple() or even the whole rebuild_relation() an API method... Heap reloptions are untouched for now. Storage AM should be able to provide its own specific options just like index AMs do. That's all I have for

Re: [HACKERS] Pluggable storage

2017-09-27 Thread Alexander Korotkov
are parts of API implementation, not hooks. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Pluggable storage

2017-09-27 Thread Alexander Korotkov
ks long for me too. But we should look on this question from uniformity point of view. FdwRoutine, TsmRoutine, IndexAmRoutine use _function suffix. This is why I think we should use _function suffix for StorageAmRoutine unless we're going to change that for other *Routines too. -- Alexand

Re: [HACKERS] make async slave to wait for lsn to be replayed

2017-09-26 Thread Alexander Korotkov
er command. I propose following syntax options. WAITLSN lsn; WAITLSN lsn TIMEOUT delay; WAITLSN lsn INFINITE; WAITLSN lsn NOWAIT; For me that looks rather better. What do you think? -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-22 Thread Alexander Korotkov
r->safe_psql() and $node_slave->safe_psql() instead. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Should we cacheline align PGXACT?

2017-09-22 Thread Alexander Korotkov
On Thu, Sep 21, 2017 at 12:08 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Mon, Sep 18, 2017 at 12:41 PM, Daniel Gustafsson <dan...@yesql.se> > wrote: > >> > On 16 Sep 2017, at 01:51, Alexander Korotkov <a.korot...@postgrespro.ru> >> wr

Re: [HACKERS] Should we cacheline align PGXACT?

2017-09-21 Thread Alexander Korotkov
On Mon, Sep 18, 2017 at 12:41 PM, Daniel Gustafsson <dan...@yesql.se> wrote: > > On 16 Sep 2017, at 01:51, Alexander Korotkov <a.korot...@postgrespro.ru> > wrote: > > > > On Tue, Sep 5, 2017 at 2:47 PM, Daniel Gustafsson <dan...@yesql.se > <mailto:dan

Re: [HACKERS] compress method for spgist - 2

2017-09-21 Thread Alexander Korotkov
On Thu, Sep 21, 2017 at 3:14 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Alexander Korotkov <aekorot...@gmail.com> writes: > > On Thu, Sep 21, 2017 at 2:06 AM, Darafei "Komяpa" Praliaskouski < > >> It seems to me that any circle with radius of any

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-09-21 Thread Alexander Korotkov
bles for "non verbose" mode of commands too. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-09-21 Thread Alexander Korotkov
to output of \dt+ commands > > - there result is platform depend. > > How so? \dt+ reports relation sizes whose are platform depended. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] compress method for spgist - 2

2017-09-20 Thread Alexander Korotkov
any query, saying: "index can't help you for this kind value, only recheck can deal with that". Therefore, we would at least guarantee that results of sequential scan and index scan are the same. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] compress method for spgist - 2

2017-09-20 Thread Alexander Korotkov
l rework and resubmit circle patch later. I'm not particularly sure that polygon.sql is a good place for testing sp-gist opclass for polygons... But we've already done so for box.sql. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company 0001-spgist-compress

Re: [HACKERS] compress method for spgist - 2

2017-09-20 Thread Alexander Korotkov
low exact calculations and take less space. > How about removing circle from the scope of this patch, so it is smaller > and cleaner? Good point. Polygons are enough for compress function example. Opclass for circles could be submitted as separate patch. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions

2017-09-20 Thread Alexander Korotkov
On Wed, Sep 20, 2017 at 5:02 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > Alexander Korotkov <a.korot...@postgrespro.ru> writes: > > On Wed, Sep 20, 2017 at 4:25 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: > >> Yes. We don't allow out-of-line values, but we do al

Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions

2017-09-20 Thread Alexander Korotkov
So GiST opclass should either implement decompress method with detoasting or detoast every input key in all other methods. BTW, this comment looks still invalid for me... > #define SIGLENINT 4 /* >122 => key will *toast*, so very slow!!! */ -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] compress method for spgist - 2

2017-09-20 Thread Alexander Korotkov
On Mon, Sep 18, 2017 at 6:21 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Tue, Aug 25, 2015 at 4:05 PM, Michael Paquier < > michael.paqu...@gmail.com> wrote: > >> On Thu, Jul 23, 2015 at 6:18 PM, Teodor Sigaev <teo...@sigaev.ru> wrote

Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions

2017-09-20 Thread Alexander Korotkov
stance, this comment in hstore_gist.c seems misleading for me. #define SIGLENINT 4 /* >122 => key will *toast*, so very slow!!! */ -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Index Only Scan support for cube

2017-09-20 Thread Alexander Korotkov
There is no extra detoasting here. GBT_VARKEY *key = (GBT_VARKEY *) PG_DETOAST_DATUM(entry->key); > if (key != (GBT_VARKEY *) DatumGetPointer(entry->key)) -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-09-19 Thread Alexander Korotkov
On Tue, Sep 19, 2017 at 7:54 PM, Pavel Stehule <pavel.steh...@gmail.com> wrote: > 2017-09-19 16:14 GMT+02:00 Alexander Korotkov <a.korot...@postgrespro.ru>: > >> On Fri, Sep 8, 2017 at 7:13 AM, Pavel Stehule <pavel.steh...@gmail.com> >> wrote: >> &g

Re: [HACKERS] Re: proposal - psql: possibility to specify sort for describe commands, when size is printed

2017-09-19 Thread Alexander Korotkov
t; > > rebased again + fix obsolete help > For me, patch applies cleanly, builds and passed regression tests. However, patch misses regression tests covering added functionality. Patch is definitely harmless, i.e. it doesn't affect anybody who doesn't use new functionality. But I still

Re: [HACKERS] compress method for spgist - 2

2017-09-18 Thread Alexander Korotkov
is 2d to 4d approach to polygons would be good example of SP-GiST compress method in core. Would anyone be volunteering for writing such patch? If nobody, then I could do it -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] SQL/JSON in PostgreSQL

2017-09-17 Thread Alexander Korotkov
0009 is unfinished and contains a lot of FIXMEs. But > the ability to use arbitrary Postgres operators in JSON path with > explicitly > specified types is rather interesting, and I think it should be shown now > to get a some kind of pre-review. > > We are supporting v11 and v10 bra

Re: [HACKERS] [PATCH]make pg_rewind to not copy useless WAL files

2017-09-16 Thread Alexander Korotkov
etching more covered by tap tests. In particular, new tests may generate more WAL files and make sure that pg_rewind fetches only required files among them. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Should we cacheline align PGXACT?

2017-09-15 Thread Alexander Korotkov
On Tue, Sep 5, 2017 at 2:47 PM, Daniel Gustafsson <dan...@yesql.se> wrote: > > On 04 Apr 2017, at 14:58, David Steele <da...@pgmasters.net> wrote: > > > > On 4/4/17 8:55 AM, Alexander Korotkov wrote: > >> On Mon, Apr 3, 2017 at 9:58 PM, Andres Freund <an

Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions

2017-09-15 Thread Alexander Korotkov
On Fri, Sep 15, 2017 at 3:36 PM, Andrey Borodin <x4...@yandex-team.ru> wrote: > > 14 сент. 2017 г., в 18:42, Alexander Korotkov <a.korot...@postgrespro.ru> > написал(а): > > It would be good if someone would write patch for removing useless > compress/decompress me

Re: [HACKERS] COMMIT TRIGGERs, take n, implemented with CONSTRAINT TRIGGERS

2017-09-15 Thread Alexander Korotkov
- > contrib/master/commit_trigger.sql Do I understand correctly that this is SQL implementation of COMMIT TRIGGER functionality which is a prototype used to demonstrate it. And if this prototype is well-accepted then you're going to write a patch for builtin COMMIT TRIGGER functionality. Is it rig

Re: [HACKERS] [PATCH] Call RelationDropStorage() for broader range of object drops.

2017-09-14 Thread Alexander Korotkov
with supporting this > more completely. So what you're doing now is probably acceptable. +1, FDW looks OK for prototyping pluggable storage, but it doesn't seem suitable for permanent implementation. BTW, Hadi, could you visit "Pluggable storage" thread and check how suitable upcoming pl

Re: [HACKERS] Pluggable storage

2017-09-14 Thread Alexander Korotkov
esample methods are already pluggable, making them storage-AM-specific would lead to user-visible changes. I.e. tablesample method should be created for particular storage AM or set of storage AMs. However, I didn't yet figure out what should API exactly look like... -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Allow GiST opcalsses without compress\decompres functions

2017-09-14 Thread Alexander Korotkov
in IndexOnlyScan enabling. BTW, this change in the patch look suspicious for me. > @@ -913,7 +931,6 @@ gistproperty(Oid index_oid, int attno, > ReleaseSysCache(tuple); > > /* Now look up the opclass family and input datatype. */ > - > tuple = SearchSysCache1(CLAOID, ObjectI

Re: [HACKERS] Red-black trees: why would anyone want preorder or postorder traversal?

2017-09-10 Thread Alexander Korotkov
> +1, I don't see any point in leaving DirectWalk and InvertedWalk in RB-tree. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] Fix bloom WAL tap test

2017-09-06 Thread Alexander Korotkov
On Wed, Sep 6, 2017 at 4:08 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > I just realized that these lines of contrib/bloom/t/001_wal.pl don't > check that queries give same results on master and standby. They just > check that *return codes* of psql are equal.

[HACKERS] Is anything preventing us from allowing write to foreign tables from standby?

2017-09-06 Thread Alexander Korotkov
patch enabling writing to foreign tables from standbys. It works from the first glance for me. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company standby-fdw-writable.patch Description: Binary data -- Sent via pgsql-hackers mailing list (pgsql

[HACKERS] Fix bloom WAL tap test

2017-09-06 Thread Alexander Korotkov
n code. For safety, this patch replaces psql() with safe_psql() in other places too. I think this should be backpatched to 9.6 as bugfix. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company fix-bloom-wal-check.patch Description: Binary data -- Sent

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-09-04 Thread Alexander Korotkov
> { > LogAccessExclusiveLockPrepare(); > - log_lock = true; > +// log_lock = true; > } > > /* Perhaps, it's certainly bad idea to disable replaying AccessExclusiveLock *every time*, we should skip taking AccessExclusiveLock only while writing XLOG_SMGR_TRUNCATE record. Besides that, this code violates out coding style. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] ALTER INDEX .. SET STATISTICS ... behaviour

2017-09-04 Thread Alexander Korotkov
Hi, Adrien! On Mon, Sep 4, 2017 at 3:57 PM, Adrien Nayrat <adrien.nay...@dalibo.com> wrote: > On 08/30/2017 02:26 PM, Alexander Korotkov wrote: > I reviewed this patch. It works as expected but I have few remarks : > Thank you for reviewing my patch!. > * There i

Re: [HACKERS] WIP: long transactions on hot standby feedback replica / proof of concept

2017-09-04 Thread Alexander Korotkov
cumentation for previous releases would be good too. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] LWLock optimization for multicore Power machines

2017-08-30 Thread Alexander Korotkov
On Thu, Apr 6, 2017 at 5:38 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Thu, Apr 6, 2017 at 5:37 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> On Thu, Apr 6, 2017 at 2:16 AM, Andres Freund <and...@anarazel.de> wrote: &g

Re: [HACKERS] ALTER INDEX .. SET STATISTICS ... behaviour

2017-08-30 Thread Alexander Korotkov
On Thu, Jun 1, 2017 at 4:10 PM, Alexander Korotkov < a.korot...@postgrespro.ru> wrote: > On Wed, May 31, 2017 at 7:18 PM, Alexander Korotkov < > a.korot...@postgrespro.ru> wrote: > >> On Wed, May 31, 2017 at 6:53 PM, Tom Lane <t...@sss.pgh.pa.us> wrote: &

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2017-08-16 Thread Alexander Korotkov
on error it would be more natural to give up with current transaction and continue with next one. -- Alexander Korotkov Postgres Professional: http://www.postgrespro.com The Russian Postgres Company

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-08-14 Thread Alexander Korotkov
On Mon, Aug 14, 2017 at 2:09 PM, Mark Rofail <markm.rof...@gmail.com> wrote: > On Tue, Aug 8, 2017 at 3:24 PM, Alexander Korotkov <aekorot...@gmail.com> > wrote: > >> On Tue, Aug 8, 2017 at 4:12 PM, Mark Rofail <markm.rof...@gmail.com> >> wrote: >>

  1   2   3   4   5   6   7   8   9   10   >