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: 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: 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: 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: 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: 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: 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: 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: 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-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: 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: 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: Extra quote_all_identifiers in _dumpOptions

2019-07-09 Thread Arthur Zakirov
; int use_setsessauth; Wow, good catch. I thought C compilers would have reported this issue, but obviously not. Patch applied to head. Thanks. Thank you, Bruce! -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Extra quote_all_identifiers in _dumpOptions

2019-06-27 Thread Arthur Zakirov
%40mail.gmail.com Initially the patch proposed to use quote_all_identifiers of _dumpOptions. But then everyone came to a decision to use global quote_all_identifiers from string_utils.c, because fmtId() uses it. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres

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

2019-06-07 Thread Arthur Zakirov
Hello Alexander, On Friday, June 7, 2019, Alexander Korotkov wrote: > BTW, does this patch checks that temporary table is really orphan? > AFAICS, user may define some temporary tables in single-user mode > before running VACUUM. As far as I remember, the patch checks it. -- Arthu

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

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

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: [PROPOSAL] Shared Ispell dictionaries

2019-02-25 Thread Arthur Zakirov
.c about mappings created via mmap() so that you don't leak mappings on an abort, but that's probably not a crazy difficult problem. 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

Re: shared-memory based stats collector

2019-02-25 Thread Arthur Zakirov
se pg_stat_tmp dir was removed from the `foreach my $dirname` loop. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: shared-memory based stats collector

2019-02-21 Thread Arthur Zakirov
27;dbentry' becomes invalid after calling pgstat_vacuum_stat(). -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2019-02-21 Thread Arthur Zakirov
On 21.02.2019 15:45, Robert Haas wrote: On Wed, Feb 20, 2019 at 9:33 AM Arthur Zakirov wrote: I'm working on the (b) approach. I thought about a priority queue structure. There no such ready structure within PostgreSQL sources except binaryheap.c, but it isn't for concurrent algor

Re: [PROPOSAL] Shared Ispell dictionaries

2019-02-20 Thread Arthur Zakirov
structure. There no such ready structure within PostgreSQL sources except binaryheap.c, but it isn't for concurrent algorithms. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company >From 3e220e259eebc6b9730c9500176015b04e588cae Mon Sep 17 00:00:00 2

Re: [PATCH] xlogreader: do not read a file block twice

2019-02-18 Thread Arthur Zakirov
On 18.02.2019 04:09, Michael Paquier wrote: And done, after doing and extra pass, doing more testing using by own plugins, pg_waldump and more fancy stuff with a primary/standby and pgbench. Thank you Michael. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian

Re: [PATCH] xlogreader: do not read a file block twice

2019-02-14 Thread Arthur Zakirov
s://github.com/postgrespro/pg_probackup/blob/c052651b8c8864733bcabbc2660c387b792229d8/src/parsexlog.c#L1046 -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PATCH] xlogreader: do not read a file block twice

2019-02-13 Thread Arthur Zakirov
's why `reqLen` is equal to XLOG_BLCKSZ). -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PATCH] xlogreader: do not read a file block twice

2019-02-12 Thread Arthur Zakirov
On 12.02.2019 07:23, Michael Paquier wrote: On 02/11/2019 07:25 PM, Arthur Zakirov wrote: Grigory noticed that one of our utilities has very slow performance when xlogreader reads zlib archives. We found out that xlogreader sometimes reads a WAL file block twice. What do you think? I think

[PATCH] xlogreader: do not read a file block twice

2019-02-11 Thread Arthur Zakirov
#x27;s buffer. What do you think? -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/src/backend/access/transam/xlogreader.c b/src/backend/access/transam/xlogreader.c index 69b6226f8f..cbc7e4e7ea 100644 --- a/src/backend/access/transam/xlogreade

Re: [PROPOSAL] Shared Ispell dictionaries

2019-02-01 Thread Arthur Zakirov
On 01.02.2019 12:09, Arthur Zakirov wrote: Thanks for sharing your ideas, Tomas. Unfortunately I won't manage to develop new version of the patch till the end of the commitfest due to lack of time. I'll think about the second approach. Tracking timestamp of the last time a dict was u

Re: [PROPOSAL] Shared Ispell dictionaries

2019-02-01 Thread Arthur Zakirov
On 22.01.2019 22:17, Tomas Vondra wrote: On 1/22/19 7:36 PM, Arthur Zakirov wrote: max_shared_dictionaries_size can be renamed to shared_dictionaries_cleanup_threshold. That really depends on what exactly the threshold does. If it only triggers cleanup but does not enforce maximum amount of

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

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-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-17 Thread Arthur Zakirov
erData to > TsearchDictKey struct. I was wrong, DictInitData also needs DictPointerData. I didn't remove DictPointerData, I renamed it to DictEntryData. Hope that it is a more appropriate name. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company &

Re: [PROPOSAL] Shared Ispell dictionaries

2019-01-16 Thread Arthur Zakirov
g */ I think we don't need DictPointerData struct anymore, because only ts_dict_shmem_release function needs it (see comments above) and we only need it to hash search. I'll move all fields of DictPointerData to TsearchDictKey struct. > XXX "supported" is not the same as &

Re: PostgreSQL vs SQL/XML Standards

2019-01-10 Thread Arthur Zakirov
by Alvaro. Please see the changes in the patch. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 90d67f1acf..06f3f69073 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @

Re: [PROPOSAL] Shared Ispell dictionaries

2019-01-09 Thread Arthur Zakirov
On 01.10.2018 12:22, Arthur Zakirov wrote: On Thu, Jun 14, 2018 at 11:40:17AM +0300, Arthur Zakirov wrote: I attached new version of the patch. The patch still applies to HEAD. I moved it to the next commitfest. Here is the rebased patch. I also updated copyright in ts_shared.h and

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: 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: 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: 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: 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: 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: libpq host/hostaddr/conninfo inconsistencies

2018-10-03 Thread Arthur Zakirov
ve an hostaddr "127.0.0.1" This is the expected modified behavior: hostaddr can only be specified on a host when it is a name, which is not the case here. See the comment above about backward compatibility. psql without the patch can connect to an instance if I specify only hostaddr. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-10-01 Thread Arthur Zakirov
On Thu, Jun 14, 2018 at 11:40:17AM +0300, Arthur Zakirov wrote: > I attached new version of the patch. The patch still applies to HEAD. I moved it to the next commitfest. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: libpq host/hostaddr/conninfo inconsistencies

2018-09-29 Thread Arthur Zakirov
es are only accepted if the > corresponding host is a name. The user must use the "host=ip" syntax > to connect to an ip. Patch gives me an error if I specified only hostaddr: psql -d "hostaddr=127.0.0.1" psql: host "/tmp" cannot have an hostaddr "127.0.0.1" It is wrong, because I didn't specified host=/tmp. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: PATCH: Update snowball stemmers

2018-09-25 Thread Arthur Zakirov
an be run periodically. Is it suitable? Also it would be good to move missing stopwords from Stopwords ISO to snowball-website... 1 - https://github.com/snowballstem/snowball-website/tree/master/algorithms 2 - https://github.com/snowballstem/snowball-website/blob/master/algorithms/english/stop.

Re: [HACKERS] proposal: schema variables

2018-09-21 Thread Arthur Zakirov
is better to leave the syntax as is without changes for now. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] proposal: schema variables

2018-09-19 Thread Arthur Zakirov
you mean, thank you. I thought that { ON COMMIT DROP | ON TRANSACTION END RESET } parameters are used only for transactional variables in the first place. But is there any sense in using this parameters with non-transactional variables? That is when we create non-transactional variable we don

Re: [HACKERS] proposal: schema variables

2018-09-19 Thread Arthur Zakirov
P */ > } OnCommitAction; There is the extra comma here after ONCOMMIT_DROP. 1 - https://www.postgresql.org/docs/current/static/sql-createtable.html -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PATCH] Tab completion for ALTER DATABASE … SET TABLESPACE

2018-09-14 Thread Arthur Zakirov
The patch seems reasonable. It fixes the lack of tab completion for ALTER DATABASE ... SET TABLESPACE ... . There is no need to patch the documentation and regression tests. Marked as Ready for Commiter. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: PATCH: Update snowball stemmers

2018-09-12 Thread Arthur Zakirov
mit/efc280b89b181657afe5412f398681b2c393a35c#diff-efde70a147d16a83b9b132b7f396ab6d 2 - https://github.com/postgresql-cfbot/postgresql/tree/commitfest/19/1697/src/backend/snowball/libstemmer 3 - https://github.com/postgresql-cfbot/postgresql/tree/commitfest/19/1697/src/include/snowball/libstemmer -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: simplify index tuple descriptor initialization

2018-09-12 Thread Arthur Zakirov
e is good and regression tests passed. There is no need to update the documentation. Marked as Ready for Commiter. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] Bug in to_timestamp().

2018-09-11 Thread Arthur Zakirov
h a separate patch anyway. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PATCH] Tab completion for ALTER DATABASE … SET TABLESPACE

2018-09-03 Thread Arthur Zakirov
ached. +1. Attached patch works nicely. It applies using "patch". -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] Bug in to_timestamp().

2018-08-15 Thread Arthur Zakirov
e passed. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

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

2018-08-10 Thread Arthur Zakirov
error() > > could be dangerous. I think "fmt" checking could be removed, or we may > > use Assert() > > I would like not to use Assert in this case because IIUC they are mostly > used for testing. I'd vote to remove this check at all. I don't see any

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

2018-08-10 Thread Arthur Zakirov
DEBUG... / LOG / INFO? +1 from me to keep initial name "pgbench_error". "pgbench_log" for new function looks nice to me. I think it is better than just "log", because "log" may conflict with natural logarithmic function (see "man 3 log"). > &g

Re: doc - add missing documentation for "acldefault"

2018-08-02 Thread Arthur Zakirov
and output functions respectively of the aclitem data type. I think they don't need to be documented and shouldn't have "pg_" prefix as they was created to maintenance aclitem data type. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] Bug in to_timestamp().

2018-08-02 Thread Arthur Zakirov
that > it's only worth to follow Oracle when it does reasonable things. I agree with you. I think it isn't worth to copy this behaviour. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [HACKERS] Bug in to_timestamp().

2018-08-01 Thread Arthur Zakirov
s now changes in the code and tests. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index edc9be92a6..db1da7bee7 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -6264

Re: adding tab completions

2018-07-30 Thread Arthur Zakirov
; Actually..another thought: since toast tables may be VACUUM-ed, should I > > > introduce Query_for_list_of_tpmt ? > > I didn't include this one yet though. > > Feel free to bump to next CF. I think it could be done by a separate patch. -- Arthur Zakirov Postgres Prof

Re: [HACKERS] Bug in to_timestamp().

2018-07-23 Thread Arthur Zakirov
On Mon, Jul 23, 2018 at 04:30:43PM +0300, Arthur Zakirov wrote: > I looked for some tradeoffs of the patch. I think it could be parsing > strings like the following input strings: > > SELECT TO_TIMESTAMP('2011年5月1日', '-MM-DD'); > SELECT TO_TIMESTAMP(&#

Re: [HACKERS] Bug in to_timestamp().

2018-07-23 Thread Arthur Zakirov
d day from the string. But patched to_timestamp() raises an error. Someone could rely on such behaviour. The patch divides separator characters from letters and digits. And '年' or 'y' are letters here. And so the format string doesn't match the input string. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: Let's remove DSM_IMPL_NONE.

2018-07-09 Thread Arthur Zakirov
e removing a mention to an > already-committed patch. > > - (and rebased) Just a little note. In parallel.sgml it is still mentioned that dynamic_shared_memory_type accepts 'none' value: > must be set to a > value other than none. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: PATCH: Update snowball stemmers

2018-07-06 Thread Arthur Zakirov
ome current tests to use default configuration or to add specific tests for locale testing? -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: adding tab completions

2018-06-28 Thread Arthur Zakirov
about toast tables and I'm not aware about policy of completion toast tables. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c index e913b83091..1d235a3987 100644 --- a

Re: ALTER TABLE does not check for column existence before starting operations

2018-06-26 Thread Arthur Zakirov
type. AT_PASS_ADD_COL subcommands are executed before AT_PASS_ADD_INDEX, AT_PASS_ADD_CONSTR and AT_PASS_MISC. I'm not sure how important it is. But I think it could break backward compatibility. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Nepali Snowball dictionary

2018-06-26 Thread Arthur Zakirov
Hello all, On Wed, Feb 28, 2018 at 11:16:24AM +0300, Arthur Zakirov wrote: > I've sent a pull request with nepali snowball algorithm into > https://github.com/snowballstem [1]. They aren't againts the patch. > > They haven't merged it yet, though. There are some

Re: phraseto_tsquery design

2018-06-21 Thread Arthur Zakirov
the heap - recheck all got items and exclude those of them which don't satisfy the phrase query Last two point is additional work. We have our index as an extension. It is changed GIN index and can store lexemes and their positions. And therefore phrase queries are faster. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PATCH] Find additional connection service files in pg_service.conf.d directory

2018-06-18 Thread Arthur Zakirov
n of service \"%s\" not found" will be raised, because group_found is false. It may confuse as it hides a real error. For example, if permission is denied to open the directory. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-06-14 Thread Arthur Zakirov
On Wed, May 16, 2018 at 02:36:33PM +0300, Arthur Zakirov wrote: > ... I attached the rebased patch. I attached new version of the patch. I found a bug when CompoundAffix, SuffixNodes, PrefixNodes, DictNodes of IspellDictData structure are empty. Now they have terminating entry and therefore t

Re: adding tab completions

2018-06-11 Thread Arthur Zakirov
just reject VACUUM VERBOSE ANALYZE > VERBOSE, but I tentatively assume it's intentional). Right. Understood. > > I'm not sure how this patch should be commited. Can it be commited > > outside the commitfest? Otherwise add it to the next commitfest please > > in order not to forget it. > > I've done https://commitfest.postgresql.org/18/1661/ Thank you! -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: adding tab completions

2018-06-05 Thread Arthur Zakirov
;)) It looks better to me. Such condition is used for other commands and works the same way. The last point I've noticed, there is no VERBOSE entry after VACUUM FULL ANALYZE command anymore. I'm not sure how this patch should be commited. Can it be commited outside the commitfest? Otherwise add it to the next commitfest please in order not to forget it. Thoughts? -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: adding tab completions

2018-05-29 Thread Arthur Zakirov
UM (ANALYZE) measurement (,". The following with whitespace after column works well: VACUUM (ANALYZE) measurement (city_id and gives: "VACUUM (ANALYZE) measurement (city_id ,". Also I think it could be good to list column names after parentheses, but I'm not sure if it easy to

Re: [PROPOSAL] Shared Ispell dictionaries

2018-05-18 Thread Arthur Zakirov
pinned segments won't be unpinned. But I'm not sure is this real case. Text search configuration changes should be very infrequent (as it is written on in the InvalidateTSCacheCallBack commentary). -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-05-18 Thread Arthur Zakirov
d more connections. Maybe it would be useful to make such tests. I did it manually but it is better to have a script. -- Arthur Zakirov Postgres Professional: http://www.postgrespro.com Russian Postgres Company

Re: [PROPOSAL] Shared Ispell dictionaries

2018-05-17 Thread Arthur Zakirov
e occured in various events. So I think I should check the current approach too using CLOBBER_CACHE_ALWAYS. It could show some problems in the current patch. Then if everything is OK I think I'll check another approach (unmapping in TS syscache callback) using CLOBBER_CACHE_ALWAYS. -- Arthur

Re: [PROPOSAL] Shared Ispell dictionaries

2018-05-16 Thread Arthur Zakirov
lies some kernel calls, which could > fail. We can't afford to inject steps that might fail into post-commit > cleanup (because it's too late to recover by failing the transaction). > It'd be better to do cleanup while searching for a dictionary to use. But it is possib

Re: [PROPOSAL] Shared Ispell dictionaries

2018-05-16 Thread Arthur Zakirov
Hello, On Tue, May 15, 2018 at 05:02:43PM -0400, Robert Haas wrote: > On Tue, Mar 27, 2018 at 8:19 AM, Arthur Zakirov > wrote: > > Yes, there is dsm_pin_mapping() for this. But it is necessary to keep a > > segment even if there are no attached processes. From 0003: > &g

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

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

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

  1   2   >