Re: [HACKERS] Jsonb transform for pl/python

2017-11-09 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed Hello Anthony, Great job! I decided to take a closer look

[HACKERS] Re: [BUGS] 10.0: Logical replication doesn't execute BEFORE UPDATE OF trigger

2017-10-10 Thread Aleksander Alekseev
alternative we could just return an error in response to ALTER TABLE ... ENABLE REPLICA TRIGGER query for triggers that we know will never be executed. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

[HACKERS] Re: [BUGS] 10.0: Logical replication doesn't execute BEFORE UPDATE OF trigger

2017-10-10 Thread Aleksander Alekseev
p_changes.pl .. ok t/002_types.pl ok t/003_constraints.pl .. ok t/004_sync.pl . ok t/005_encoding.pl . ok t/006_rewrite.pl .. ok t/007_ddl.pl .. ok All tests successful. ``` -- Best regards, Aleksander Alekseev diff --git a/src/test/subscription/t/003_constra

[HACKERS] 10.0: Logical replication doesn't execute BEFORE UPDATE OF trigger

2017-10-09 Thread Aleksander Alekseev
with exit code 1 ``` What do you think? -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Automatic testing of patches in commit fest

2017-09-18 Thread Aleksander Alekseev
itectures, e.g. x64, x86, arm. [1]: https://www.postgresql.org/message-id/20160321130850.6ed6f598%40fujitsu [2]: https://github.com/afiskon/pgscripts/blob/master/valgrind.sh [3]: https://github.com/afiskon/pgscripts/blob/master/static-analysis.sh -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-14 Thread Aleksander Alekseev
emails. Sorry for the disturbance. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-13 Thread Aleksander Alekseev
t;. On the bright side while doing this I've noticed that many patches were already updated by their authors. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] WIP patch: distinguish selectivity of < from <= and > from >=

2017-09-13 Thread Aleksander Alekseev
r you submitted it. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] WIP patch: distinguish selectivity of < from <= and > from >=

2017-09-12 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed Also I didn't manage to find any typos or obvious mistakes

Re: [HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-12 Thread Aleksander Alekseev
Hi Andreas, On 09/12/2017 04:14 PM, Aleksander Alekseev wrote: > > Title: Foreign Key Arrays > > Author: Mark Rofail<markm.rof...@gmail.com> > > URL:https://commitfest.postgresql.org/14/1252/ > > I am currently reviewing this one and it applies, compiles, and pas

[HACKERS] Patches that don't apply or don't compile: 2017-09-12

2017-09-12 Thread Aleksander Alekseev
ge types Author: Anton Dignös <dign...@inf.unibz.it> URL: https://commitfest.postgresql.org/14/839/ Needs Review Total: 120 Failed Total: 32 (26.67 %) As always, any feedback is very welcomed! [1]: http://commitfest.cputube.org/ [2]: https://postgr.es/m/CAB7nPqSrHF%2BkNQ6Eq2uy91RcysoCzQr1AjOjkuCn9jvMdJZ6Fw%40mail.gmail.com [3]: https://github.com/afiskon/py-autoreviewer -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Automatic testing of patches in commit fest

2017-09-12 Thread Aleksander Alekseev
s up-to-date). I'm also going to write one more email with CC to the authors of these patches to let them know that the status of their patch has changed. [1]: https://github.com/afiskon/py-autoreviewer -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Automatic testing of patches in commit fest

2017-09-11 Thread Aleksander Alekseev
ication as is and provide corresponding checkboxes in the web interface of the "autoreviewer" application. Naturally every automatically generated code review will include a link that disables autotests for this particular commitfest entry. I hope this observation will change your mi

Re: [HACKERS] Automatic testing of patches in commit fest

2017-09-11 Thread Aleksander Alekseev
ns to give this idea a try I'm willing to write and host a corresponding script. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

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

2017-09-11 Thread Aleksander Alekseev
oon. When and if it will happen nothing prevents us from adding this code back. So it's +1. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] [PATCH] Improve geometric types

2017-09-05 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed LGTM. The new status of this patch is: Ready for Committer

Re: [HACKERS] [PATCH] Improve geometric types

2017-09-04 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: tested, failed Implements feature: not tested Spec compliant: not tested Documentation:not tested PostgreSQL fails with SIGSEGV during `make check-world`. Backtrace:

Re: [HACKERS] [PATCH] Improve geometric types

2017-09-01 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested Hi Emre, I'm afraid these patches conflict with current master branch. The

Re: [HACKERS] [PATCH] Off-by-one error in logical slot resource retention

2017-09-01 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested Hi Craig, I'm afraid patches 0002 and 0003 don't apply anymore. Could you

Re: [HACKERS] WIP Patch: Precalculate stable functions, infrastructure v1

2017-09-01 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested Hi Marina, I'm sorry to inform you that the v5 path set become a little

Re: [HACKERS] proposal: psql command \graw

2017-08-22 Thread Aleksander Alekseev
_gnuplot; select * from data \export_to_gnuplot | gnuplot ... -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] SCRAM salt length

2017-08-16 Thread Aleksander Alekseev
ut the required or recommended length of the salt. I personally believe that 2^96 of possible salts is consistent with both RFCs and should be enough in practice. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Regressions failures with libxml2 on ArchLinux

2017-08-14 Thread Aleksander Alekseev
e an > issue. > > [1]: https://bugs.archlinux.org/task/55134 TWIMC I've also described a workaround there. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Regressions failures with libxml2 on ArchLinux

2017-08-14 Thread Aleksander Alekseev
[1]: https://bugs.archlinux.org/task/55134 -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Funny WAL corruption issue

2017-08-10 Thread Aleksander Alekseev
1]: http://www.pgcon.org/2017/schedule/attachments/453_corruption-pgcon-2017.pdf -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Cache lookup errors with functions manipulation object addresses

2017-08-09 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed I believe this patch is "Ready for Committer". The new

Re: [HACKERS] Red-Black tree traversal tests

2017-08-03 Thread Aleksander Alekseev
Hi Victor, > I forgot to attach the patch. Sorry. > Here it is. I would say that this patch is in a pretty good shape now. And I see a 99% code coverage of rbtree.c. Let's see what committers think. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Red-Black tree traversal tests

2017-08-01 Thread Aleksander Alekseev
d your patch to the nearest commitfest [1]. Otherwise there is a good chance that everyone will forget about it quite soon. [1]: https://commitfest.postgresql.org/14/ -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Red-Black tree traversal tests

2017-08-01 Thread Aleksander Alekseev
ely and be sure that it actually works when someone will need the rest of its functionality? [1]: https://github.com/afiskon/pgscripts/blob/master/code-coverage.sh -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] A couple of postgresql.conf.sample discrepancies

2017-07-27 Thread Aleksander Alekseev
r similar reason I would advise to add this patch to the next commitfest. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Restrictions of logical replication

2017-06-16 Thread Aleksander Alekseev
trictions of > the logical replication? I knew about TRUNCATE and it most definitely should be documented if it's not yet. And what about large objects? -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] WIP: Data at rest encryption

2017-06-14 Thread Aleksander Alekseev
ed. In the same time implementing a plugable storage API and then implementing encrypted / compressed / whatever storage in a standalone extension using this API seems to be a reasonable thing to do. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] WIP: Data at rest encryption

2017-06-14 Thread Aleksander Alekseev
a colleague for assistance in case you don't have sufficient permissions to do something. And I got a strong feeling that solving bureaucracy issues of specific organizations by changing PostgreSQL core in very invasive way (keeping in mind testing, maintaining, etc) is misguided. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] WIP: Data at rest encryption

2017-06-14 Thread Aleksander Alekseev
ies that hired system administrators that are too lazy to read two or three man pages is not a reason to re-implement file system encryption (or compression, or mirroring if that matters) in any open source RDBMS. [1] http://eax.me/dm-crypt/ [2] http://eax.me/freebsd-geli/ -- Best regards,

Re: [HACKERS] WIP Patch: Precalculate stable functions, infrastructure v1

2017-05-30 Thread Aleksander Alekseev
Hi Marina, I still don't see anything particularly wrong with your patch. It applies, passes all test, it is well test-covered and even documented. Also I've run `make installcheck` under Valgrind and didn't find any memory-related errors. Is there anything that you would like to change before

Re: [HACKERS] Logical replication & corrupted pages recovery

2017-05-26 Thread Aleksander Alekseev
ho.com/riak/kv/2.2.3/learn/concepts/active-anti-entropy/ -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Fix performance of generic atomics

2017-05-25 Thread Aleksander Alekseev
ween > 83000tps and 86000tps is not so obvious in NUMA system). I don't see any patch in my email client or pgsql-hackers@ archive. I would also recommend to add your patch to the nearest commitfest [1]. [1] https://commitfest.postgresql.org/ -- Best regards, Aleksander Alekseev signature.as

Re: [HACKERS] WIP Patch: Precalculate stable functions, infrastructure v1

2017-05-10 Thread Aleksander Alekseev
that there is no obvious performance degradation on regular queries (according to pgbench). In short, it looks very promising. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Error message on missing SCRAM authentication with older clients

2017-05-05 Thread Aleksander Alekseev
Hi Heikki, > psql: SCRAM authentication requires libpq version 10 or above Sounds good. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Error message on missing SCRAM authentication with older clients

2017-05-03 Thread Aleksander Alekseev
g regular expressions or something like this. But I don't think it's something we should really bother about. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Error message on missing SCRAM authentication with older clients

2017-05-03 Thread Aleksander Alekseev
Hi Heikki, > psql: SCRAM authentication not supported by this version of libpq Maybe it would be better to specify a minimum required version? -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Reversed sync check in pg_receivewal

2017-04-11 Thread Aleksander Alekseev
Method could probably be improved. Currently there is none. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] GCC 7 warnings

2017-04-10 Thread Aleksander Alekseev
s idea I'm willing to write such a patch. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers

2017-04-10 Thread Aleksander Alekseev
Hi Yorick, > should do so on any standby servers first, before applying the changes to What you actually meant probably was "do so on ALL standby servers first", right? -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] [PATCH] Remove unused argument in btree_xlog_split

2017-04-09 Thread Aleksander Alekseev
Hi Robert, > Thanks. Please add this to the next CommitFest, as there seems to be > no urgency (and some risk) in committing it right before feature > freeze. Sure. Already done [1]. [1] https://commitfest.postgresql.org/14/1097/ -- Best regards, Aleksander Alekseev sign

Re: [HACKERS] [PATCH] Warn users about duplicate configuration parameters

2017-04-07 Thread Aleksander Alekseev
said. I see no problem here. After all, it's just warnings. We can even add a GUC that disables them specially for experienced users who knows what she or he is doing. And/or add special case for postgresql.auto.conf. -- Best regards, Aleksander Alekseev pgphtrO1vN7g6.pgp Description: OpenPGP digital signature

[HACKERS] [PATCH] Warn users about duplicate configuration parameters

2017-04-07 Thread Aleksander Alekseev
suggest to warn users about duplicated parameters. Here is a corresponding patch. Thoughts? -- Best regards, Aleksander Alekseev diff --git a/src/backend/utils/misc/guc-file.l b/src/backend/utils/misc/guc-file.l index f01b814..6aa60a4 100644 --- a/src/backend/utils/misc/guc-file.l +++ b/src/backend

Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers

2017-04-07 Thread Aleksander Alekseev
egards, Aleksander Alekseev pgpRyayBlz4tm.pgp Description: OpenPGP digital signature

Re: [HACKERS] [PATCH] Document the order of changing certain settings when using hot-standby servers

2017-04-07 Thread Aleksander Alekseev
ing wrong happened. -- Best regards, Aleksander Alekseev pgpqfeUI2TpqL.pgp Description: OpenPGP digital signature

Re: [HACKERS] [PATCH] Remove unused argument in btree_xlog_split

2017-04-06 Thread Aleksander Alekseev
ch should go > a little further and do all of that together. Thank you for sharing your thoughts on this patch. Here is a new version. -- Best regards, Aleksander Alekseev diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index 6dca8109fd..4de47de890 1

[HACKERS] [PATCH] Remove unused argument in btree_xlog_split

2017-03-31 Thread Aleksander Alekseev
Hi, Turned out that there is an unused argument `isroot` in `btree_xlog_split` procedure. Suggested patch fixes it. This issue was discovered by Anastasia Lubennikova, coding is done by me. -- Best regards, Aleksander Alekseev diff --git a/src/backend/access/nbtree/nbtxlog.c b/src/backend

Re: [HACKERS] Multiple false-positive warnings from Valgrind

2017-03-31 Thread Aleksander Alekseev
g. What about all these memory leak reports [1]? If I see them should I just ignore them or, if reports look false positive, suggest a patch that modifies a Valgrind suppression file? In other words what is current consensus in community regarding Valgrind and it's reports? [1] http://afiskon.r

Re: [HACKERS] WIP: Covering + unique indexes.

2017-03-30 Thread Aleksander Alekseev
afiskon.ru/s/88/93c544e6cf_test.sql -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] WIP: Covering + unique indexes.

2017-03-30 Thread Aleksander Alekseev
objection from reviewers to push both patches? These patches look OK. Definitely no objections from me. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of find_all_inheritors()

2017-03-28 Thread Aleksander Alekseev
; join_rel_list + join_rel_hash in PlannerInfo, ResourceArray in > resowner.c, etc). I've checked it [1]. Apparently in this particular case patches make code faster on small amount of partitions as well. [1] https://postgr.es/m/20170324132258.GB16830%40e733.localdomain -- Best regards, A

Re: [HACKERS] Re: Declarative partitioning optimization for large amount of partitions

2017-03-24 Thread Aleksander Alekseev
fixed. > > step1 Again, pgstat_report_stat(), all-zero entries aren't deleted from hash > > although they will be free from point of view of pgStatTabList. Good point! Fixed. -- Best regards, Aleksander Alekseev diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/p

Re: [HACKERS] Declarative partitioning optimization for large amount of partitions

2017-03-24 Thread Aleksander Alekseev
is anyone else who is already working on this optimization we would like to work on it together. Unfortunately there is no patch or design discussion of partition-pruning on this commitfest. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Re: Declarative partitioning optimization for large amount of partitions

2017-03-24 Thread Aleksander Alekseev
make things worse in any regard. Perf shows that both bottlenecks are gone. Before [1] and after [2]. [1] http://afiskon.ru/s/00/2008c4ae66_temp.png [2] http://afiskon.ru/s/a5/fd81628a3a_temp.png On Fri, Mar 24, 2017 at 03:17:44PM +0300, Aleksander Alekseev wrote: > Hi Anastasia, > > Tha

Re: [HACKERS] [PATCH] Suppress Clang 3.9 warnings

2017-03-24 Thread Aleksander Alekseev
line 22, ought to do the trick); whereas I do not think > we'd remember to de-kluge port.h if we kluge around it there. > > I'm fine with leaving it alone, too. > > regards, tom lane -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] WIP: Covering + unique indexes.

2017-03-24 Thread Aleksander Alekseev
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, passed This patch looks good to me. As I understand we have both a

Re: [HACKERS] Re: Declarative partitioning optimization for large amount of partitions

2017-03-24 Thread Aleksander Alekseev
; To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers -- Best regards, Aleksander Alekseev diff --git a/src/backend/postmaster/pgstat.c b/src/backend/postmaster/pgstat.c index 7cacb1e9b2..a22a5a37c8 100644 --- a/src/backend/postmaster/pgstat.c +++ b/src/backend/

[HACKERS] Multiple false-positive warnings from Valgrind

2017-03-21 Thread Aleksander Alekseev
.postgresql.org/wiki/Valgrind [2] http://afiskon.ru/s/8a/390698e914_valgrind.tgz [3] http://afiskon.ru/s/09/c4f6231679_pgvg.txt [4] https://github.com/afiskon/pgscripts/blob/master/quick-build.sh [5] https://github.com/afiskon/pgscripts/blob/master/valgrind.sh -- Best regards, Aleksander Alekseev signa

Re: [HACKERS] [PATCH] Suppress Clang 3.9 warnings

2017-03-15 Thread Aleksander Alekseev
what I would call a solution. For instance on FreeBSD Clang is a default compiler and many users build a software from source code (FreeBSD ports). For some reason I doubt that many of them know about these flags. On Wed, Mar 15, 2017 at 02:25:38AM +, Noah Misch wrote: > On Mon, Mar 13, 2017 a

Re: [HACKERS] [PATCH] Suppress Clang 3.9 warnings

2017-03-13 Thread Aleksander Alekseev
hecked by the compiler? I > > guess there would be some more changes (question is how much), but it > > would be cleaner. > > There's been no discussion or new patch on this thread recently. If you > are planning to address the issues raised please plan to do so by > Thurs

Re: [HACKERS] Declarative partitioning optimization for large amount of partitions

2017-03-10 Thread Aleksander Alekseev
d this in your patch: > > > * Add a corespinding entry to pgStatTabHash. > > "corresponding" > > Also a question: Some one-line comments are > > /* Comment. */ > > while others are > > /* > * Comment. > */ > > Why the difference? >

Re: [HACKERS] Declarative partitioning optimization for large amount of partitions

2017-03-09 Thread Aleksander Alekseev
be done here as well then. On Tue, Mar 07, 2017 at 10:55:12AM +0900, Amit Langote wrote: > Hi Aleksander, > > On 2017/03/07 0:22, Aleksander Alekseev wrote: > > Hello. > > > > OK, here is a patch. > > > > Benchmark, before: > > > > ``` > >

Re: [HACKERS] Declarative partitioning optimization for large amount of partitions

2017-03-09 Thread Aleksander Alekseev
Freund wrote: > Hi, > > This issue has bothered me in non-partitioned use-cases recently, so > thanks for taking it up. > > > On 2017-03-06 18:22:17 +0300, Aleksander Alekseev wrote: > > diff --git a/src/backend/postmaster/pgstat.c > > b/src/backend/postmast

Re: [HACKERS] Declarative partitioning optimization for large amount of partitions

2017-03-06 Thread Aleksander Alekseev
that this code is test covered. An exact script I'm using could be found here [1]. [1] https://github.com/afiskon/pgscripts/blob/master/code-coverage.sh On Wed, Mar 01, 2017 at 10:36:24AM +0900, Amit Langote wrote: > Hi, > > On 2017/02/28 23:25, Aleksander Alekseev wrote: > > He

Re: [HACKERS] [POC] hash partitioning

2017-03-01 Thread Aleksander Alekseev
ulation, though. But IMO it's not flexible > case. > > It would be a good thing if a regular table could be partitioned through > separate command. Then your idea would not be restrictive. > > > -- > Maksim Milyutin > Postgres Professional: http://www.postgre

Re: [HACKERS] [POC] hash partitioning

2017-03-01 Thread Aleksander Alekseev
on.ru/s/76/a4fb71739c_full-build.sh.txt On Wed, Mar 01, 2017 at 06:10:10PM +0900, Yugo Nagata wrote: > Hi Aleksander, > > On Tue, 28 Feb 2017 18:05:36 +0300 > Aleksander Alekseev <a.aleks...@postgrespro.ru> wrote: > > > Hi, Yugo. > > > > Looks like a great feat

Re: [HACKERS] [POC] hash partitioning

2017-02-28 Thread Aleksander Alekseev
in partattrs[] */ > #endif > + > + > } FormData_pg_partitioned_table; > > /* > @@ -62,13 +67,15 @@ typedef FormData_pg_partitioned_table > *Form_pg_partitioned_table; > * compiler constants for pg_partitioned_table > * > */ > -#define Natts_pg_partitioned_table 7 > +#define Natts_pg_partitioned_table 9 > #define Anum_pg_partitioned_table_partrelid 1 > #define Anum_pg_partitioned_table_partstrat 2 > #define Anum_pg_partitioned_table_partnatts 3 > -#define Anum_pg_partitioned_table_partattrs 4 > -#define Anum_pg_partitioned_table_partclass 5 > -#define Anum_pg_partitioned_table_partcollation 6 > -#define Anum_pg_partitioned_table_partexprs 7 > +#define Anum_pg_partitioned_table_partnparts 4 > +#define Anum_pg_partitioned_table_parthashfunc 5 > +#define Anum_pg_partitioned_table_partattrs 6 > +#define Anum_pg_partitioned_table_partclass 7 > +#define Anum_pg_partitioned_table_partcollation 8 > +#define Anum_pg_partitioned_table_partexprs 9 > > #endif /* PG_PARTITIONED_TABLE_H */ > diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h > index 5afc3eb..1c3474f 100644 > --- a/src/include/nodes/parsenodes.h > +++ b/src/include/nodes/parsenodes.h > @@ -730,11 +730,14 @@ typedef struct PartitionSpec > NodeTag type; > char *strategy; /* partitioning strategy ('list' or > 'range') */ > List *partParams; /* List of PartitionElems */ > + int partnparts; > + List *hashfunc; > int location; /* token location, or > -1 if unknown */ > } PartitionSpec; > > #define PARTITION_STRATEGY_LIST 'l' > #define PARTITION_STRATEGY_RANGE 'r' > +#define PARTITION_STRATEGY_HASH 'h' > > /* > * PartitionBoundSpec - a partition bound specification > diff --git a/src/include/parser/kwlist.h b/src/include/parser/kwlist.h > index 985d650..0597939 100644 > --- a/src/include/parser/kwlist.h > +++ b/src/include/parser/kwlist.h > @@ -180,6 +180,7 @@ PG_KEYWORD("greatest", GREATEST, COL_NAME_KEYWORD) > PG_KEYWORD("group", GROUP_P, RESERVED_KEYWORD) > PG_KEYWORD("grouping", GROUPING, COL_NAME_KEYWORD) > PG_KEYWORD("handler", HANDLER, UNRESERVED_KEYWORD) > +PG_KEYWORD("hash", HASH, UNRESERVED_KEYWORD) > PG_KEYWORD("having", HAVING, RESERVED_KEYWORD) > PG_KEYWORD("header", HEADER_P, UNRESERVED_KEYWORD) > PG_KEYWORD("hold", HOLD, UNRESERVED_KEYWORD) > @@ -291,6 +292,7 @@ PG_KEYWORD("parallel", PARALLEL, UNRESERVED_KEYWORD) > PG_KEYWORD("parser", PARSER, UNRESERVED_KEYWORD) > PG_KEYWORD("partial", PARTIAL, UNRESERVED_KEYWORD) > PG_KEYWORD("partition", PARTITION, UNRESERVED_KEYWORD) > +PG_KEYWORD("partitions", PARTITIONS, UNRESERVED_KEYWORD) > PG_KEYWORD("passing", PASSING, UNRESERVED_KEYWORD) > PG_KEYWORD("password", PASSWORD, UNRESERVED_KEYWORD) > PG_KEYWORD("placing", PLACING, RESERVED_KEYWORD) > diff --git a/src/include/utils/rel.h b/src/include/utils/rel.h > index a617a7c..660adfb 100644 > --- a/src/include/utils/rel.h > +++ b/src/include/utils/rel.h > @@ -62,6 +62,9 @@ typedef struct PartitionKeyData > Oid*partopcintype; /* OIDs of opclass declared > input data types */ > FmgrInfo *partsupfunc;/* lookup info for support funcs */ > > + int16 partnparts; /* number of hash partitions */ > + Oid parthashfunc; /* OID of hash function */ > + > /* Partitioning collation per attribute */ > Oid*partcollation; > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

[HACKERS] Declarative partitioning optimization for large amount of partitions

2017-02-28 Thread Aleksander Alekseev
[4] http://afiskon.ru/s/03/a7e685a4db_stack2.txt -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] [PATCH] Suppress Clang 3.9 warnings

2017-02-20 Thread Aleksander Alekseev
In theory - could we just always use our internal strl* implementations? On Mon, Feb 20, 2017 at 09:26:44AM -0500, Tom Lane wrote: > Aleksander Alekseev <a.aleks...@postgrespro.ru> writes: > > I've just tried to build PostgreSQL with Clang 3.9.1 (default version > > curren

[HACKERS] [PATCH] Suppress Clang 3.9 warnings

2017-02-20 Thread Aleksander Alekseev
with: ``` xloginsert.c:742:18: warning: implicit conversion from 'int' to 'char' changes value from 253 to -3 [-Wconstant-conversion] ``` Patch that fixes these warnings is attached to this email. [1] http://lists.llvm.org/pipermail/cfe-dev/2016-March/048126.html -- Best regards, Aleksander Alekseev diff --git

Re: [HACKERS] SCRAM authentication, take three

2017-02-20 Thread Aleksander Alekseev
strdup calls) * scram_Normalize doesn't check malloc return value Sorry for lots of emails. On Mon, Feb 20, 2017 at 03:15:14PM +0300, Aleksander Alekseev wrote: > Speaking about flaws, it looks like there is a memory leak in > array_to_utf procedure - result is allocated twice. > > On

Re: [HACKERS] SCRAM authentication, take three

2017-02-20 Thread Aleksander Alekseev
Speaking about flaws, it looks like there is a memory leak in array_to_utf procedure - result is allocated twice. On Mon, Feb 20, 2017 at 02:51:13PM +0300, Aleksander Alekseev wrote: > Hi! > > Currently I don't see any significant flaws in these patches. However I > would li

Re: [HACKERS] SCRAM authentication, take three

2017-02-20 Thread Aleksander Alekseev
e stabilized the beast after fixing some allocation > calculations when converting the decomposed pg_wchar array back to a > utf8 string. > -- > Michael -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] SCRAM authentication, take three

2017-02-06 Thread Aleksander Alekseev
No, I'm afraid `make distclean` doesn't help. I've re-checked twice. On Mon, Feb 06, 2017 at 12:52:11PM -0300, Alvaro Herrera wrote: > Aleksander Alekseev wrote: > > Hello. > > > > Good to know that the work on this great feature continues! > > > > However

Re: [HACKERS] SCRAM authentication, take three

2017-02-06 Thread Aleksander Alekseev
t, after these other patches have been > committed, so we can discuss that work separately. > > These are also available on Michael's github repository, at > https://github.com/michaelpq/postgres/tree/scram. > > - Heikki > -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] PATCH: recursive json_populate_record()

2016-12-27 Thread Aleksander Alekseev
rresponding assertion fails in the next test: > > > > [patched]=# select json_to_record('{"a": [1, 2, 3]}') as rec(a int[]); > > > > > > Should I submit these patches to commitfest? > > It seems to me that it would be a good idea to add them. > -- > Michael > > > -- > Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-hackers -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] [PATCH] Generic type subscription

2016-12-27 Thread Aleksander Alekseev
12:03, Haribabu Kommi <kommi.harib...@gmail.com> > wrote: > > > > Moved to next CF with "needs review" status. > > Looks like we stuck here little bit. Does anyone else have any > suggestions/improvements, or this patch is in good enough shape? -- Best

[HACKERS] [PATCH] Fix for documentation of timestamp type

2016-12-12 Thread Aleksander Alekseev
m number 534873794643886 like this: ``` >>> int(2000 + 534873794643886 / 1000 / 1000 / 60 / 60 / 24 / 365.2425) 2016 ``` I suggest to rewrite the documentation a bit to make it more clear that by default timestamp is stored in microseconds. Corresponding patch is attached. -- Best regards

Re: [HACKERS] [PATCH] Refactor "if(strspn(str, ...) == strlen(str)" code

2016-12-08 Thread Aleksander Alekseev
This is hardly the only > C idiom you need to be familiar with to read the PG code. Well, at least this v2 version of the patch removes second string scanning. And I still believe that this inlined strspn is not readable or obvious at all. -- Best regards, Aleksander Alekseev diff --git a/src/b

[HACKERS] [PATCH] Refactor "if(strspn(str, ...) == strlen(str)" code

2016-12-08 Thread Aleksander Alekseev
factoring makes code a little more readable. -- Best regards, Aleksander Alekseev diff --git a/src/backend/parser/parse_type.c b/src/backend/parser/parse_type.c index a8bb472..a1c5853 100644 --- a/src/backend/parser/parse_type.c +++ b/src/backend/parser/parse_type.c @@ -17,6 +17,7 @@ #include &q

[HACKERS] Re: [PATCH] PostgresNode.pm enhancements, pg_lsn helper, and some more recovery tests

2016-12-07 Thread Aleksander Alekseev
like this since it's a matter of taste. The bottom line --- this code looks good to me. If there is nothing you would like to change in the last moment I suggest to change the status to "Ready for committer". -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] Test "tablespace" fails during `make installcheck` on master-replica setup

2016-12-07 Thread Aleksander Alekseev
9PM +0300, Aleksander Alekseev wrote: > > I noticed, that `make installcheck` fails on my laptop with following > > errors: > > > > http://afiskon.ru/s/98/6f94ce2cfa_regression.out.txt > > http://afiskon.ru/s/b3/d0da05597e_regression.diffs.txt > > The interestin

[HACKERS] Test "tablespace" fails during `make installcheck` on master-replica setup

2016-12-07 Thread Aleksander Alekseev
GCC 6.2.1. Any ideas what can cause this issue? -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] [PATCH] Generic type subscription

2016-11-15 Thread Aleksander Alekseev
. [1] https://github.com/postgrespro/sr_plan -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

[HACKERS] File content logging during execution of COPY queries (was: Better logging of COPY queries if log_statement='all')

2016-10-20 Thread Aleksander Alekseev
tion here is how it should look like in > postgresql.conf. OK, how about introducing a new boolean parameter named log_copy? Corresponding patch is attached. -- Best regards, Aleksander Alekseev diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index 8c25b45..84a7542 100644 ---

Re: [HACKERS] [PATCH] Better logging of COPY queries if log_statement='all'

2016-10-18 Thread Aleksander Alekseev
ce, if DBMS is provided as a service. Currently PostgreSQL allows to record all workload _except_ COPY queries. Considering how easily it could be done I think it's wrong. Basically the only real question here is how it should look like in postgresql.conf. -- Best regards, Aleksander Alekseev signature.asc Description: PGP signature

Re: [HACKERS] [PATCH] Better logging of COPY queries if log_statement='all'

2016-10-17 Thread Aleksander Alekseev
es COPY and you don't have access to or something like this. It could also be useful in some other cases. This feature is very simple and easy to maintain. I'm sure we could find a solution that will make happy both developers and users. -- Best regards, Aleksander Alekseev signature.asc D

[HACKERS] [PATCH] Better logging of COPY queries if log_statement='all'

2016-10-17 Thread Aleksander Alekseev
``` -- Best regards, Aleksander Alekseev diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 5947e72..82b3a18 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -331,6 +331,38 @@ static bool CopyGetInt16(CopyState cstate, int16 *val

[HACKERS] [PATCH] pg_filedump is broken

2016-10-12 Thread Aleksander Alekseev
xes Makefile. On some systems (notably FreeBSD) there is no `gcc` by default. Using `cc` is a more crossplatform way to compile a project. -- Best regards, Aleksander Alekseev diff --git a/pg_filedump.c b/pg_filedump.c index 2f2cd53..ba55711 100644 --- a/pg_filedump.c +++ b/pg_filedump.c @@ -991,7 +99

[HACKERS] [PATCH] Refactoring: rename md5Salt to pwsalt

2016-09-30 Thread Aleksander Alekseev
authorization method was chosen. Suggested patch (first of many, I hope) renames `md5Salt` to more general `pwsalt`. Does it sound reasonable? -- Best regards, Aleksander Alekseev diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index 0ba8530..25bb4c2 100644 --- a/src/backend/li

Re: [HACKERS] [PATCH] Remove redundant if clause in standbydesc.c

2016-09-23 Thread Aleksander Alekseev
f (msg->id == SHAREDINVALRELMAP_ID) > appendStringInfo(buf, " relmap db %u", msg->rm.dbId); > > Looking at inval.c, dbId can be InvalidOid. Frankly I'm not very familiar with this part of code. InvalidOid is just zero. Does it create some problem in this case? -- Best regards, Aleksande

[HACKERS] [PATCH] Remove redundant if clause in standbydesc.c

2016-09-23 Thread Aleksander Alekseev
Hello. Very simple small patch - see attachment. -- Best regards, Aleksander Alekseev diff --git a/src/backend/access/rmgrdesc/standbydesc.c b/src/backend/access/rmgrdesc/standbydesc.c index 13797a3..77983e5 100644 --- a/src/backend/access/rmgrdesc/standbydesc.c +++ b/src/backend/access

Re: [HACKERS] [PATCH] get_home_path: use HOME

2016-09-21 Thread Aleksander Alekseev
environments, a not just a hack for single misconfigured system. -- Best regards, Aleksander Alekseev -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

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

2016-09-08 Thread Aleksander Alekseev
/temp/libpq-failover-8.patch:254: trailing whitespace. >*/ > /home/eax/temp/libpq-failover-8.patch:306: trailing whitespace. > appendPQExpBuffer(>errorMessage, > error: src/interfaces/libpq/t/001-multihost.pl: already exists in > working directory > > $ git diff &g

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

2016-09-08 Thread Aleksander Alekseev
appendPQExpBuffer(>errorMessage, error: src/interfaces/libpq/t/001-multihost.pl: already exists in working directory $ git diff ``` -- Best regards, Aleksander Alekseev -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

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

2016-09-07 Thread Aleksander Alekseev
that describes how this procedure works, what makes you think that it gives a good distribution in all possible cases (e.g. if there is more than 0x1 elements in a list - why not), etc. Right? :) -- Best regards, Aleksander Alekseev -- Sent via pgsql-hackers mailing list (pgsql-h

  1   2   3   >