Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-25 Thread Arthur Zakirov
On Sat, Mar 24, 2018 at 04:56:36PM -0400, Tom Lane wrote: > Arthur Zakirov writes: > > [ v10 patch versions ] Thank you for the review, Tom! Tomas Vondra wrote: > Tom Lane wrote: >> * I cannot imagine a use-case for setting max_shared_dictionaries_size >> to anything

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-25 Thread Arthur Zakirov
listing leaked segments. I didn't find a way to list dshash entries. Now pg_ts_shared_dictionaries() scans pg_ts_dict table and gets a dshash item using dictId. In case of leaked dictionaries we don't know their identifiers. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-25 Thread Arthur Zakirov
after a dictionary reloading. on_shmem_exit() could help, but we need a leaked dictionaries list for that. P.S. I think it isn't right to release all dictionaries segment in InvalidateTSCacheCallBack(). Otherwise any DROP can release all segments. It would be worth to release a specific dic

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-25 Thread Arthur Zakirov
On Sun, Mar 25, 2018 at 02:28:29PM -0400, Tom Lane wrote: > Arthur Zakirov writes: > > If all dictionaries will be shareable then this view could be removed. > > Unfortunately I think it can't help with leaked segments, I didn't find > > a way to ite

Re: [FEATURE PATCH] pg_stat_statements with plans (v02)

2018-03-25 Thread Arthur Zakirov
ns. Indeed. I think those developments require cooperation. Also as you wrote an additional view can be added (pg_stat_statements_plans or pg_stat_plans). But I'm not sure about the name for now and its use cases. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-27 Thread Arthur Zakirov
On Mon, Mar 26, 2018 at 11:27:48AM -0400, Tom Lane wrote: > Arthur Zakirov writes: > > I'm not sure that I understood the second case correclty. Can cache > > invalidation help in this case? I don't have confident knowledge of cache > > invalidation. It seems to me

Re: Ensure that maxlen is an integer value in dict_int configuration

2018-03-27 Thread Arthur Zakirov
an integer value It is because all options are stored as string: =# select dictinitoption from pg_ts_dict where dictname = 'intdict'; dictinitoption --- maxlen = '5', rejectlong = 'true' So the right fix could be as it

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-28 Thread Arthur Zakirov
, you could spend a bit more effort on > the commentary in ts_public.h in 0002, because that commentary is as > close to an API spec as we've got. I improved a little bit the commentary in ts_public.h. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Pos

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-28 Thread Arthur Zakirov
entries. I added xmax in DictPointerData. It is used as a lookup key now too. It helps to reload a dictionary after roll back DROP command. There was a bug in ts_dict_shmem_location(), I fixed it. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a

Typo in shared_record_table_compare() commentary

2018-03-29 Thread Arthur Zakirov
Hello hackers, During studying dshash I've found a little typo. There is no SharedRecordTableKey struct in the code, I think the commentary refers to SharedRecordTableKey struct. The patch is attached. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Co

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-31 Thread Arthur Zakirov
n. I think it makes text search API more transparent. I'll update the existing documentation. And I think I can add text search API documentation in the 2018-09 commitfest, as Tom noticed that it doesn't exist. Any thoughts? -- Arthur Zakirov Postgres Professional: http://www.pos

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-31 Thread Arthur Zakirov
Tomas Vondra wrote: > > On 03/31/2018 12:42 PM, Arthur Zakirov wrote: > > Hello all, > > > > I'd like to add new optional function to text search template named fini > > in addition to init() and lexize(). It will be called by > > RemoveTSDictionaryByI

Re: json(b)_to_tsvector with numeric values

2018-04-01 Thread Arthur Zakirov
Hello Dmitry, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > Any opinions about this suggestion? Can it be considered as a bug fix and > included into this release? > I think there is no chance to include it into v11. You can add the patch to the 2018-09 commitfest.

Re: json(b)_to_tsvector with numeric values

2018-04-02 Thread Arthur Zakirov
On Mon, Apr 02, 2018 at 11:41:12AM +0300, Oleg Bartunov wrote: > On Mon, Apr 2, 2018 at 9:45 AM, Arthur Zakirov > wrote: > I found this bug, when working on presentation about FTS and it looked > annoying, since it validates > the consistency of FTS.I think this is a bug, which ne

Re: [PROPOSAL] Shared Ispell dictionaries

2018-04-03 Thread Arthur Zakirov
On Thu, Mar 29, 2018 at 02:03:07AM +0300, Arthur Zakirov wrote: > Here is the new version of the patch. Please find the attached new version of the patch. I removed refcnt because it is useless, it doesn't guarantee that a hash table entry will be removed. I fixed a bug, dsm_unpin_segme

Re: [HACKERS] proposal: schema variables

2018-04-17 Thread Arthur Zakirov
not needed for relations, you can easily add them to pg_variable What do you think? -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] proposal: schema variables

2018-04-18 Thread Arthur Zakirov
tialized variable 'j' in pg_dump.c:15422 - in tab-complete.c:1268 initialization needs extra NULL before &Query_for_list_of_variables Also I think makeRangeVarForTargetOfSchemaVariable() has non friendly argument names 'field1', 'field2', 'field2'. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: query logging of prepared statements

2019-03-04 Thread Arthur Zakirov
log_statement='none' and log_min_duration_statement='0' I get: =# execute test_ins(3); LOG: duration: 8.439 ms statement: execute test_ins(3); DETAIL: prepare: prepare test_ins (int) as insert into test values ($1); Is it intended? In the second result I got the query details.

Re: query logging of prepared statements

2019-03-05 Thread Arthur Zakirov
configuring visibility of prepared statement body in logs, because it sets more general behavior. Maybe it would be better to introduce some new GUC variable if the community don't mind. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

[PROPOSAL] Drop orphan temp tables in single-mode

2019-03-07 Thread Arthur Zakirov
neral (I'm not sure that orphan temp tables were cause here though): https://www.postgresql.org/message-id/CADU5SwN6u4radqQgUY2VjEyqXF0KJ6A09PYuJjT%3Do9d7vzM%3DCg%40mail.gmail.com If the patch is interesting I'll add it to the next commitfest and label it as 'v13'. -

Re: [PROPOSAL] Drop orphan temp tables in single-mode

2019-03-07 Thread Arthur Zakirov
to the point where we currently force a shutdown, we > ought to just give up on vacuum cost delay, either all at once or > perhaps incrementally, when we see that we're getting into trouble. > But all of that is work for another time. I think it would be very neat feature! -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: Adding a TAP test checking data consistency on standby with minRecoveryPoint

2019-03-12 Thread Arthur Zakirov
needed components are installed. On my environment installcheck passes as well as check. Also I ran tests with reverted c186ba13, 016_min_consistency.pl doesn't pass as expected. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: Unified logging system for command-line programs

2019-03-13 Thread Arthur Zakirov
test" does not exist It is becase psql appends its own level and appends the message from a server (including servers log level). I don't think that it is nasty, but it may confuse someone. Notice that without the patch the output is: $ psql test psql: FATAL: database "test

Re: [PROPOSAL] Shared Ispell dictionaries

2019-04-01 Thread Arthur Zakirov
On 25.02.2019 14:33, Arthur Zakirov wrote: It seems to me Tom and Andres also vote for the mmap() approach. I think I need to look closely at the mmap(). I've labeled the patch as 'v13'. Unfortunately I didn't come up with a new patch yet. So I marked the entry as "Re

Re: query1 followed by query2 at maximum distance vs current fixed distance

2019-07-29 Thread Arthur Zakirov
you can search only using a fixed distance currently. websearch_to_tsquery() can't help here. It just transforms search pattern with OR, AND statements into tsquery syntax. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-01-07 Thread Arthur Zakirov
On Sun, Dec 31, 2017 at 06:28:13PM +0300, Arthur Zakirov wrote: > > There are issues to do: > - add the GUC-variable for hash table limit > - fix bugs > - improve comments > - performance testing > Here is the second version of the patch. 0002-Retreive-shmem-locatio

Re: [PROPOSAL] Shared Ispell dictionaries

2018-01-09 Thread Arthur Zakirov
#x27;m happy you're > making improvements in that direction. I'll take a look at your patch > shortly. > There is the second version of the patch. But I've noticed a performance regression in ts_lexize() and I will try to find where the overhead hides. -- Arthur Zakir

Re: to_typemod(type_name) information function

2018-01-09 Thread Arthur Zakirov
: $ cd src/include/catalog $ ./unused_oids -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] PoC: custom signal handler for extensions

2018-01-11 Thread Arthur Zakirov
will be checked in runtime. But it is fine for this assert within CustomSignalInterrupt(). -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] Bug in to_timestamp().

2018-01-12 Thread Arthur Zakirov
given value did not match any of the allowed values for this field. Other queries mentioned in the thread work as before. Any thoughts? If someone has better approach, feel free to share it. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff

Re: [PROPOSAL] Shared Ispell dictionaries

2018-01-13 Thread Arthur Zakirov
chemas. I think your proposals may be implemented in several patches, so they can be applyed independently but consistently. I suppose I will prepare new version of the patch with fixes and with initial design of new functions and commands soon. 1 - https://www.postgresql.org/docs/current/static/sql-createtstemplate.html -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-01-15 Thread Arthur Zakirov
When the dictionary is loaded the counter increases. If all record of loaded dictionary is dropped it will be unloaded. 3 - Or reference counters without cross-db sharing to avoid possible confusing. Here dictfile, afffile and database Oid will be used as the key. -- Arthur Zakirov Postgres Profess

Re: [PROPOSAL] Shared Ispell dictionaries

2018-01-24 Thread Arthur Zakirov
On Sat, Jan 13, 2018 at 06:22:41PM +0300, Arthur Zakirov wrote: > I think your proposals may be implemented in several patches, so they can > be applyed independently but consistently. I suppose I will prepare new > version of the patch with fixes and with initial design of new functi

Re: [PROPOSAL] Shared Ispell dictionaries

2018-01-24 Thread Arthur Zakirov
now. > Implementing it seems straight-forward (particularly when we already > have the stuff implemented as functions), and some of the other open > questions seem more important to tackle now. > I understood your opinion. I haven't strong opinion on the subject yet. And I agree that the

Re: [PROPOSAL] Shared Ispell dictionaries

2018-01-25 Thread Arthur Zakirov
areable=true doesn't guarantee that a dictionary will be allocated in shared memory due to max_shared_dictionaries_size GUC. Attached new version of the patch. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/src/backend/tsearch/

Re: [HACKERS] PoC: custom signal handler for extensions

2018-01-27 Thread Arthur Zakirov
d, for actual unergistering we need to call it everywhere, if I'm not mistaken. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: A Generic Question about Generic type subscripting

2018-01-29 Thread Arthur Zakirov
xample we have: CREATE TYPE intkey_and_jsonvalue as (key int, value jsonb); CREATE TYPE intkey_and_textvalue as (key int, value text); What should return the next query? select jsonb1[int1]; -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] [PATCH] Generic type subscripting

2018-01-29 Thread Arthur Zakirov
outines sound better and it is consistent with other structures. 0005-Subscripting-documentation-v6.patch: > +class="parameter">type_modifier_output_function, > + analyze_function, > +class="parameter">subscripting_handler_function, >are optional. Generally these functions have to be coded in C Extra comma here. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: Transform for pl/perl

2018-01-31 Thread Arthur Zakirov
sonb LANGUAGE plperl TRANSFORM FOR TYPE jsonb AS $$ return $_->{"1"}; $$; =# SELECT testSVToJsonb3('{"1":{"2":[3,4,5]},"2":3}'); testsvtojsonb3 (null) But my perl isn't good, so the example maybe isn't good too. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] Bug in to_timestamp().

2018-02-01 Thread Arthur Zakirov
> difference is quite subtle, but I think a bit of context would never hurt. I fixed those messages, but in a different manner. I think that an unexpected character is unknown and neither space nor separator. And better to say that was expected space/separator character. Attached fixed patch. --

Re: [HACKERS] Bug in to_timestamp().

2018-02-06 Thread Arthur Zakirov
lso 'patch -p1': $ patch -p1 < 0001-to-timestamp-format-checking-v10.patch 1 - https://www.postgresql.org/message-id/20180112125848.GA32559@zakirov.localdomain 2 - https://www.postgresql.org/message-id/20180201102449.GA29082@zakirov.localdomain 3 - http://commitfest.cputube.

Re: [PROPOSAL] Shared Ispell dictionaries

2018-02-07 Thread Arthur Zakirov
On Thu, Jan 25, 2018 at 07:51:58PM +0300, Arthur Zakirov wrote: > Attached new version of the patch. Here is rebased version of the patch due to changes into dict_ispell.c. The patch itself wasn't changed. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian

Re: [HACKERS] Bug in to_timestamp().

2018-02-12 Thread Arthur Zakirov
ation, but then I'm confused - > all > functions except `isdigit`/`isxdigit` are locale-dependent, including > `isspace`, which is also in use. I returned is_separator_char() function for now. 1 - https://www.postgresql.org/message-id/20180112125848.GA32559%40zakirov.localdomain --

Re: CREATE TEXT SEARCH DICTIONARY segfaulting on 9.6+

2019-10-27 Thread Arthur Zakirov
Hello Tomas, On 2019/10/13 10:26, Tomas Vondra wrote: over in pgsql-bugs [1] we got a report about CREATE TEXT SEARCH DICTIONARY causing segfaults on 12.0. Simply running    CREATE TEXT SEARCH DICTIONARY hunspell_num (Template=ispell,    DictFile=hunspell_sample_num, AffFile=hunspell_sample_l

Re: pg_upgrade fails with non-standard ACL

2019-12-03 Thread Arthur Zakirov
On 2019/12/01 23:58, Grigory Smolkin wrote: On 11/29/19 11:07 AM, Artur Zakirov wrote: New version of the patch differs from the previous: - it doesn't generate script to revoke conflicting permissions (but the patch can be fixed easily) - generates file incompatible_objects_for_acl.txt to repo

Re: pg_upgrade fails with non-standard ACL

2019-12-04 Thread Arthur Zakirov
On 2019/12/04 17:15, Michael Paquier wrote: On Wed, Dec 04, 2019 at 12:17:25PM +0900, Arthur Zakirov wrote: I updated the patch. It generates "revoke_objects.sql" (similar to v3 patch) now and doesn't rely on --check option. It also logs still FATAL message because it seems pg

Re: pg_upgrade fails with non-standard ACL

2019-12-17 Thread Arthur Zakirov
Hello, On 2019/12/05 11:31, Michael Paquier wrote: On Wed, Dec 04, 2019 at 06:15:52PM +0900, Arthur Zakirov wrote: Ah, I thought that pg_identify_object() gives properly quoted identity, and it could be used to make SQL script. It depends on the object type. For columns I can see in your

Re: Setting min/max TLS protocol in clientside libpq

2019-12-18 Thread Arthur Zakirov
Hello, On 2019/12/04 2:37, Daniel Gustafsson wrote: The attached patch implements two new connection string variables for minimum and maximum TLS protocol version, mimicking how it's done in the backend. This does duplicate a bit of code from be-secure-openssl.c to cope with older versions of O

Re: PATCH: Add uri percent-encoding for binary data

2019-12-19 Thread Arthur Zakirov
Hello, On 2019/10/07 16:14, Anders Åstrand wrote: Hello Attached is a patch for adding uri as an encoding option for encode/decode. It uses what's called "percent-encoding" in rfc3986 (https://tools.ietf.org/html/rfc3986#section-2.1). Thank you for the patch. I'm not very familiar with rfc398

Re: Add pg_file_sync() to adminpack

2020-01-05 Thread Arthur Zakirov
Hello, On 2019/12/25 23:12, Julien Rouhaud wrote: On Wed, Dec 25, 2019 at 2:01 PM Fujii Masao wrote: Hi, I'd like to propose to add pg_file_sync() function into contrib/adminpack. This function fsyncs the specified file or directory named by its argument. IMO this is useful, for example, whe

Re: Allow to_date() and to_timestamp() to accept localized names

2020-01-15 Thread Arthur Zakirov
Hello! On 2020/01/13 21:04, Juan José Santamaría Flecha wrote: Please, find attached a version addressing the above mentioned. I have some couple picky notes. + if (name_len != norm_len) + pfree(norm_name); I'm not sure here. Is it save to assume that if it was allocate

Re: Allow to_date() and to_timestamp() to accept localized names

2020-01-22 Thread Arthur Zakirov
On 2020/01/23 7:11, Tom Lane wrote: Closer examination shows that the "max" argument is pretty bogus as well. It doesn't do anything except confuse the reader, because there are no cases where the value passed is less than the maximum array entry length, so it never acts to change seq_search's b

Re: Add pg_file_sync() to adminpack

2020-01-23 Thread Arthur Zakirov
On 2020/01/17 16:05, Fujii Masao wrote: On 2020/01/17 13:36, Michael Paquier wrote: Yeah, that should be either ERROR and return a void result, or issue a WARNING/ERROR (depending on the code path, maybe PANIC?) with a boolean status returned if there is a WARNING.  Mixing both concepts with an

Re: Add pg_file_sync() to adminpack

2020-01-23 Thread Arthur Zakirov
On 2020/01/24 14:56, Michael Paquier wrote: On Fri, Jan 24, 2020 at 01:28:29PM +0900, Arthur Zakirov wrote: It is compiled and passes the tests. There is the documentation and it is built too without an error. It seems that consensus about the returned type was reached and I marked the patch

Re: [PROPOSAL] Shared Ispell dictionaries

2019-04-05 Thread Arthur Zakirov
On Fri, Apr 5, 2019 at 8:41 PM Alvaro Herrera wrote: > > Is 0001 a bugfix? Yep, it is rather a bugfix and can be applied independently. The fix allocates temporary strings using temporary context Conf->buildCxt. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.co

Re: block-level incremental backup

2019-04-09 Thread Arthur Zakirov
oints. In pg_probackup we have remote restore via SSH in the beta state. But SSH isn't an option for in-core approach I think. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PATCH v4] Add \warn to psql

2019-05-01 Thread Arthur Zakirov
der::Level = $Test::Builder::Level + 1; my ($opts, $stat, $in, $out, $err, $name) = @_; - my @cmd = ('psql', split /\s+/, $opts); + my @cmd = ('psql', '-X', split /\s+/, $opts); $node->command_checks_all(\@cmd, $stat, $out, $err, $name, $in); r

Re: to_timestamp docs

2019-05-01 Thread Arthur Zakirov
ntation: "FX must be specified as the first item in the template." It works globally (but only for remaining string if you don't put it at the beginning) and you can set it only once. For example: =# SELECT to_timestamp('JUL JUL JUL','FXMON_MON_MON'); ERROR: invalid value " J" for "MON" DETAIL: The given value did not match any of the allowed values for this field. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: to_timestamp docs

2019-05-01 Thread Arthur Zakirov
ccurrence, and then disabled for the portion following its second, and then reenabled for the portion following its third, and so on." In PostgreSQL one cannot disable exact mode using second FX. I think we shouldn't add some restriction for FX. Instead PostgreSQL's documentation can

Re: to_timestamp docs

2019-05-04 Thread Arthur Zakirov
On Thu, May 2, 2019 at 1:03 AM Arthur Zakirov wrote: > On Thu, May 2, 2019 at 12:49 AM Alexander Korotkov > wrote: > > Actually, FX takes effect on subsequent format patterns. This is not > > documented, but it copycats Oracle behavior. Sure, normally FX should > > b

Re: Segfault when creating partition with a primary key and sql_drop trigger exists

2018-10-08 Thread Arthur Zakirov
Assert(currentEventTriggerState->currentCommand); -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: fix psql \conninfo & \connect when using hostaddr

2018-11-07 Thread Arthur Zakirov
is is true for both patches. /* set connip */ if (conn->connip != NULL) { free(conn->connip); conn->connip = NULL; } { charhost_addr[NI_MAXHOST]; getHostaddr(conn, host_addr); if (strcmp(host_addr, "???") != 0) conn-

Re: fix psql \conninfo & \connect when using hostaddr

2018-11-08 Thread Arthur Zakirov
On 07.11.2018 20:11, Pavel Stehule wrote: st 7. 11. 2018 v 15:11 odesílatel Arthur Zakirov mailto:a.zaki...@postgrespro.ru>> napsal: > I think there is lack of necessary braces here for first if and second > else branches. This is true for both patches. ? I just meant so

Re: Psql patch to show access methods info

2018-11-20 Thread Arthur Zakirov
n't exist in servers 9.5 and below. What do you think? -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: Add extension options to control TAP and isolation tests

2018-11-23 Thread Arthur Zakirov
rtunately I didn't find the way to run it, maybe I miss something. It can be fixed by an additional patch I attached. I think I can create an entry in the future commitfest or it can be joined into your patch. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Post

Re: Add extension options to control TAP and isolation tests

2018-11-30 Thread Arthur Zakirov
is to get $(PORTNAME). It is defined in Makefile.global, which is included below defining TAP_TESTS variable. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] Bug in to_timestamp().

2018-02-17 Thread Arthur Zakirov
interested to handle > it. I think it could be fixed by another patch. But I'm not sure that it will be accepted as well as this patch :). -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/f

Re: Prefix operator for text and spgist support

2018-02-19 Thread Arthur Zakirov
ix processing into pattern_fixed_prefix() as another case entry. Secondly, it is worth to fix the documentation. At least here [1]. Maybe there are another places where documentation should be fixed. 1 - https://www.postgresql.org/docs/current/static/spgist-builtin-opclasses.html -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

[PROPOSAL] Nepali Snowball dictionary

2018-02-19 Thread Arthur Zakirov
add new snowball dictionaries? I'm not sure about policy of including new snowball dictionaries. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index 610b7bf033..c9c7de

Re: [PROPOSAL] Nepali Snowball dictionary

2018-02-19 Thread Arthur Zakirov
:-( I think I will try to sync snowball dictionaries with snowballstem.org algorithms, it may be useful. Or maybe it is better to sync with the github repository. I don't aware how they differ yet, though. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

2018-02-20 Thread Arthur Zakirov
ms'::regproc); ERROR: unrecognized configuration parameter "plpgsql.extra_errors" -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Nepali Snowball dictionary

2018-02-28 Thread Arthur Zakirov
On Tue, Feb 20, 2018 at 12:01:30AM +0300, Arthur Zakirov wrote: > > As best I know, the original list > > http://lists.tartarus.org/mailman/listinfo/snowball-discuss > > is moribund, but there's a fork at > > http://snowballstem.org > > that has at least some ac

Re: [HACKERS] Bug in to_timestamp().

2018-03-02 Thread Arthur Zakirov
On Fri, Mar 02, 2018 at 12:58:57AM +0100, Dmitry Dolgov wrote: > > On 18 February 2018 at 18:49, Dmitry Dolgov <9erthali...@gmail.com> wrote: > > > On 17 February 2018 at 10:02, Arthur Zakirov > wrote: > > > ... > > > I think it could be fixed by another

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-02 Thread Arthur Zakirov
Hello, Thank you for your comments. On Thu, Mar 01, 2018 at 08:31:49PM -0800, Andres Freund wrote: > Hi, > > On 2018-02-07 19:28:29 +0300, Arthur Zakirov wrote: > > + { > > + {"max_shared_dictionaries_size", PGC_POSTMASTER, RESOURCES_MEM, > > +

Re: [HACKERS] Bug in to_timestamp().

2018-03-02 Thread Arthur Zakirov
On Fri, Mar 02, 2018 at 01:44:53PM +0100, Dmitry Dolgov wrote: > Well, I'm not sure that it's completely unrelated, but I see your point - it > makes sense to discuss this and move forward in small steps. So, if there are > no objections I'll mark this patch as ready.

Re: [PROPOSAL] Nepali Snowball dictionary

2018-03-02 Thread Arthur Zakirov
I think > this should be marked as 'returned with feedback'. I understand the point. I marked the patch as 'Returned with feedback' by myself. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2018-03-03 Thread Arthur Zakirov
ation fixes and additional regression tests. Unfortunately the patch is outdated and it needs rebasing. Outdated files are regression tests files. After rebasing regression tests they pass. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

2018-03-03 Thread Arthur Zakirov
hem: - https://github.com/ohmu/pgmemcache - https://github.com/marconeperes/pgBRTypes And some not very fresh: - https://github.com/witblitz/pldotnet - https://github.com/ohmu/pgloggingfilter - https://github.com/wangyuehong/pggearman - https://github.com/siavashg/pgredis -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2018-03-05 Thread Arthur Zakirov
You already noted it in the thread. I think it could confuse someone who not very familiar how RETURNING is related with WITH CHECK OPTION. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] Another oddity in handling of WCO constraints in postgres_fdw

2018-03-06 Thread Arthur Zakirov
8679.horiguchi.kyotaro%40lab.ntt.co.jp -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-06 Thread Arthur Zakirov
On Wed, Feb 07, 2018 at 07:28:29PM +0300, Arthur Zakirov wrote: > Here is rebased version of the patch due to changes into dict_ispell.c. > The patch itself wasn't changed. Here is rebased version of the patch due to changes within pg_proc.h. I haven't implemented a mmap proto

Re: Prefix operator for text and spgist support

2018-03-06 Thread Arthur Zakirov
not sure, but I think used for operators, keywords, etc. I haven't found a manual which describes how to use tags, but after looking at the documentation where is used, I think that for function should be used. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-07 Thread Arthur Zakirov
orate on using mmap()? The DSM approach looks like more simple and requires less code. Also DSM may use mmap() if I'm not mistaken. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-07 Thread Arthur Zakirov
On Wed, Mar 07, 2018 at 10:55:29AM +0100, Tomas Vondra wrote: > On 03/07/2018 09:55 AM, Arthur Zakirov wrote: > > Hello Andres, > > > > On Thu, Mar 01, 2018 at 08:31:49PM -0800, Andres Freund wrote: > >> Is there any chance we can instead can convert dictionaries int

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-07 Thread Arthur Zakirov
x and .dict files was changed? IMHO we can store last modification timestamp of them in a preprocessed file, and then we can rebuild the dictionary if files was changed. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-07 Thread Arthur Zakirov
ack files modification time too. Because now, without the patch, users don't have to call additional commands to refresh their dictionaries, so without such tracking we'll made dictionaries maintenance harder. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-07 Thread Arthur Zakirov
On Wed, Mar 07, 2018 at 02:12:32PM +0100, Pavel Stehule wrote: > 2018-03-07 14:10 GMT+01:00 Pavel Stehule : > > 2018-03-07 13:58 GMT+01:00 Arthur Zakirov : > >> Oh understood. Tomas suggested those commands too earlier. I'll > >> implement them. But I think it is be

Re: [HACKERS] [FEATURE PATCH] pg_stat_statements with plans (v02)

2018-03-09 Thread Arthur Zakirov
s. For example: const char *good_plan_str; const char *bad_plan_str; ... good_plan_str = ""; ... bad_plan_str = ""; + interquartile_dist = 2.0*(0.6745 * sqrt(e->counters.sum_var_time / e->counters.calls)); It is worth to check e->counters.calls for zero here. Because the entry can be sticky. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] [FEATURE PATCH] pg_stat_statements with plans (v02)

2018-03-13 Thread Arthur Zakirov
nters.calls)); I think it would be better to have defines for 2.0 and 0.6745 values for the sake of readability. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

2018-03-15 Thread Arthur Zakirov
en nothing stops from that. In this case values in proconfigislist won't be valide anymore. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: pg_get_functiondef forgets about most GUC_LIST_INPUT GUCs

2018-03-16 Thread Arthur Zakirov
On Fri, Mar 16, 2018 at 10:21:39AM +0900, Michael Paquier wrote: > On Thu, Mar 15, 2018 at 01:33:51PM +0300, Arthur Zakirov wrote: > > I think your approach has a vulnerability too. I believe that a > > non GUC_LIST_INPUT extension GUC which was used to create a function

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-16 Thread Arthur Zakirov
t need to process a dictionary after server restart. I'd vote for dsm-based approach. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-19 Thread Arthur Zakirov
Arthur Zakirov wrote: > I've planned only to improve the documentation a little. Also it seems I > should change 0004 part, I found that extension upgrade scripts may be made > in wrong way. I've attached new version of the patch. In this version I removed 0004-Update-tmplinit

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-19 Thread Arthur Zakirov
rder - I'll give you that. But then again, I'm not > sure the mmap approach is really what we want here - it seems better to > evict the whole dictionary, than some random pages from many of them. Agree. mmap approach requires same code plus code to handle cache files, which will

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-20 Thread Arthur Zakirov
rt, it also takes into account -1 value. > 4) I took the liberty of rewording some of the docs/comments. See the > attached diffs, that should apply on top of 0003 and 0004 patches. > Please, treat those as mere suggestions. I applied your diffs and added changes to max_shared_dictionar

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-21 Thread Arthur Zakirov
On Tue, Mar 20, 2018 at 09:30:15PM +0100, Tomas Vondra wrote: > On 03/20/2018 02:11 PM, Arthur Zakirov wrote: > > max_shared_dictionaries_size is defined as PGC_SIGHUP now. Added check > > of a new value to disallow to set zero if there are loaded dictionaries > > and to dec

Re: [PROPOSAL] Shared Ispell dictionaries

2018-03-22 Thread Arthur Zakirov
On Wed, Mar 21, 2018 at 12:00:52PM +0300, Arthur Zakirov wrote: > On Tue, Mar 20, 2018 at 09:30:15PM +0100, Tomas Vondra wrote: > > I wonder if these restrictions needed? I mean, why not to allow setting > > max_shared_dictionaries_size below the size of loaded dictionaries? > &g

Re: [PROPOSAL] Shared Ispell dictionaries

2019-01-21 Thread Arthur Zakirov
uld be a column which shows is a dictionary loaded. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2019-01-21 Thread Arthur Zakirov
On 21.01.2019 17:56, Tomas Vondra wrote: On 1/21/19 12:51 PM, Arthur Zakirov wrote: I'll try to implement the syntax, you suggested earlier: ALTER TEXT SEARCH DICTIONARY x UNLOAD/RELOAD The main point here is that UNLOAD/RELOAD can't release the memory immediately, because some oth

Re: [PROPOSAL] Shared Ispell dictionaries

2019-01-22 Thread Arthur Zakirov
пн, 21 янв. 2019 г. в 19:42, Arthur Zakirov : > > On 21.01.2019 17:56, Tomas Vondra wrote: > > I wonder if we could devise some simple cache eviction policy. We don't > > have any memory limit GUC anymore, but maybe we could use unload > > dictionaries that were un

  1   2   >