Re: [Firebird-devel] UDR for reading server configuration for Firebird QA

2021-12-12 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 12.12.2021 18:52: If it does not return sensitive information, I see no problem in add it to examples UDR project. With a check for SYSDBA I see no security risk with this UDR Isn't GRANT EXECUTE to RDB$ADMIN enough? Or UDRs are not subject of SQL r

Re: [Firebird-devel] Firebird and DSQL Scrollable Cursors

2021-12-08 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 08.12.2021 10:54: For scrollable cursors, rows are prefetched and cached by the engine and thus the count can be easily returned. It has its cost, but generally it's unavoidable anyway for scrollable cursors. Storing of fetched rows is unavoidable indeed but prefetch?..

Re: [Firebird-devel] Maximum number of HashSlots

2021-12-06 Thread Dimitry Sibiryakov
Roman Simakov wrote 06.12.2021 18:50: It looks so and we've returned to my original question) Actually no. It is still unknown which version of Firebird 3.0 you watched and which hash was used. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lis

Re: [Firebird-devel] Maximum number of HashSlots

2021-12-06 Thread Dimitry Sibiryakov
Roman Simakov wrote 06.12.2021 13:16: Can you point me to the commit? I see no difference between 3 and 5 versions of InternalHash::hash implementation. It looks like using of CRC32C was backported into some 3.0.X. Original commit was https://github.com/FirebirdSQL/firebird/commit/a1d55c3e6

Re: [Firebird-devel] Maximum number of HashSlots

2021-12-06 Thread Dimitry Sibiryakov
Dimitry Sibiryakov wrote 06.12.2021 12:26: Hashing function has been changed to one with supposedly "more even" distribution of values. BTW a side effect of this change is that number of slots doesn't have to be prime anymore. -- WBR, SD. Firebird-Devel mailing list, w

Re: [Firebird-devel] Maximum number of HashSlots

2021-12-06 Thread Dimitry Sibiryakov
Roman Simakov wrote 06.12.2021 12:21: 3.0. Were there any changes in 4 or 5? Yes. Hashing function has been changed to one with supposedly "more even" distribution of values. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebir

Re: [Firebird-devel] Maximum number of HashSlots

2021-12-06 Thread Dimitry Sibiryakov
Roman Simakov wrote 06.12.2021 10:24: We can see: Hash slots: 65521, Hash lengths (min/avg/max):0/ 13/ 30 Under heavy load. On which version do you see it? As long as the first number is zero increasing number of slots won't help. -- WBR, SD. Firebird-Devel mailing list, web inte

Re: [Firebird-devel] Firebird and DSQL Scrollable Cursors

2021-12-01 Thread Dimitry Sibiryakov
Mark Rotteveel wrote 01.12.2021 18:02: You need to set the cursor name before you open it, IIRC. Actually it doesn't matter. It is enough to set cursor name any time before using of positional DML AFAIU. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourcefor

Re: [Firebird-devel] Firebird and DSQL Scrollable Cursors

2021-12-01 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 01.12.2021 16:06: And I see the same problem for setCursorName() which is available only through IStatement. An oversight? IAttachment::openCursor() has a parameter for cursor name. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.

Re: [Firebird-devel] Firebird and DSQL Scrollable Cursors

2021-12-01 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 01.12.2021 9:10: Given that any DSQL statement cannot have multiple result sets, I doubt IResultSet::getInfo() is really required, IStatement::getInfo() could be used instead. Or if we go for consistency, IResultSet::getInfo() could be added, but internally it calls IStatem

Re: [Firebird-devel] WNET future

2021-11-30 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 30.11.2021 18:06: Then reworking seems easy. Just preserve ISC_analyze_pclan() to extract the lanman hostname and then try connecting via TCP. The question is port number. It is changed more frequently than pipe name. -- WBR, SD. Firebird-Devel mailing list, web inte

Re: [Firebird-devel] WNET future

2021-11-30 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 30.11.2021 17:57: It can\t be reworked reliably - nobody can guarantee that DNS host name matches lanman name. Fortunately modern versions of gethostbyname() can resolve lanman names as well. is ability to mount network share on a letter still popular?

Re: [Firebird-devel] WNET future

2021-11-30 Thread Dimitry Sibiryakov
Leyne, Sean wrote 30.11.2021 17:15: (We have 200+ servers deployed and none of them use (have never) WNET With dropping this option ability to open database file from mounted network drive also will be dropped (or at least must be heavily reworked). -- WBR, SD. Firebird-Devel mailing l

Re: [Firebird-devel] Firebird and DSQL Scrollable Cursors

2021-11-28 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 28.11.2021 12:51: 28.11.2021 14:47, Dimitry Sibiryakov wrote: RDB$DB_KEY for the current record as well. It's not a property of the cursor. Consider joins, unions, procedures, views, etc. It is a property of a current record the same as position. It is ok to r

Re: [Firebird-devel] Firebird and DSQL Scrollable Cursors

2021-11-28 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 28.11.2021 12:45: That would be useful in some cases. And if statements with "WHERE CURRENT OF" condition also were somehow marked client libraries could force cursor position synchronization before executing them. I'd expect FOR UPDATE to still disable batching even witho

Re: [Firebird-devel] Firebird and DSQL Scrollable Cursors

2021-11-28 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 28.11.2021 12:42: Then we may support both "current position" and "total row count" in getInfo(), RDB$DB_KEY for the current record as well. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] Firebird and DSQL Scrollable Cursors

2021-11-28 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 28.11.2021 12:22: Theoretically, we could extend IRecordSet with something similar (although it would also require a protocol change), but the question is whether it's really needed. Personally, I don't see it useful per se. It could be useful for client-side caching dat

Re: [Firebird-devel] Firebird and DSQL Scrollable Cursors

2021-11-27 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 27.11.2021 12:23: I would consider adding a NO_BATCH flag (which is currently triggered using FOR UPDATE syntax) to cursorFlags. That would be useful in some cases. And if statements with "WHERE CURRENT OF" condition also were somehow marked client libraries could force

Re: [Firebird-devel] Firebird 5 and Update...Returning

2021-11-26 Thread Dimitry Sibiryakov
Tony Whyman wrote 26.11.2021 18:01: Note that only if FGoToFirstRecordOnExecute is true will the returned values be available immediately. Which (accidentally) is default and has no sense to be changed ever. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourcef

Re: [Firebird-devel] Firebird 5 and Update...Returning

2021-11-26 Thread Dimitry Sibiryakov
Tony Whyman wrote 26.11.2021 17:13: Legacy code can often appear "insane" with the benefit of hindsight. The problem is that it exists and it is your starting point. You don't break it without good reason. Ok, here is legacy code from TIBSQL.ExecQuery: case FSQLType of SQLSelect:

Re: [Firebird-devel] Firebird 5 and Update...Returning

2021-11-26 Thread Dimitry Sibiryakov
Tony Whyman wrote 26.11.2021 16:32: What you appear to be saying is that you have changed/expanded the semantic of Update...Returning, changed the SQL Statement type returned and then not expected the change to break any existing code... Correction: any sane code. If a singleton row is expe

Re: [Firebird-devel] Firebird 5 and Update...Returning

2021-11-26 Thread Dimitry Sibiryakov
Dimitry Sibiryakov wrote 26.11.2021 16:01: 4. With reference to item 1 above, if "Update..Returning" returns a statement type of isc_info_sql_stmt_select then you _do_ have to also parse the statement in IBX so that you know its an UPDATE and IStatement.execute has to be called

Re: [Firebird-devel] Firebird 5 and Update...Returning

2021-11-26 Thread Dimitry Sibiryakov
Tony Whyman wrote 26.11.2021 15:28: 3. Prior to calling IStatement.Execute, the statement type is checked. The current (IBX) code raises an exception if the sql statement type is isc_info_sql_stmt_select in order to stop the wrong IStatement method being called. So it is actually the test su

Re: [Firebird-devel] Firebird 5 and Update...Returning

2021-11-26 Thread Dimitry Sibiryakov
Tony Whyman wrote 26.11.2021 15:10: This caused an error message to be generated because only a singleton row was expected and not a cursor. Well, all I can say is that "existing connectivity drivers do not support this feature automagically". Is it really then intended behaviour for Update..

Re: [Firebird-devel] Square brackets in plugin config

2021-11-23 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 23.11.2021 18:09:   Yes, there is no special processing of them (so I can use them freely) and my question is if it will be this way in the future. No such plans but if you wan't better guarantees suggest to use double brackets, i.e. [[ ]] Double br

Re: [Firebird-devel] Square brackets in plugin config

2021-11-23 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 23.11.2021 17:45: square brackets? This one: [ ] ? I do not remember and do not see in a code any special processing for them. Yes, there is no special processing of them (so I can use them freely) and my question is if it will be this way in the future

[Firebird-devel] Square brackets in plugin config

2021-11-23 Thread Dimitry Sibiryakov
Hello All. Currently Firebird config file parser accept a string in square brackets and consider it to be a parameter without value. May I rely on this behavior? -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] Is it necessary that gbak uses read-write transaction?

2021-11-22 Thread Dimitry Sibiryakov
Ivan Přenosil wrote 22.11.2021 12:21: Thanks for you answers, but you are answering question I did not ask :) In this case you should ask questions with a little more details. The answer "everything is possible in soft world, it is just a matter of time and price" isn't useful enough to be

Re: [Firebird-devel] Is it necessary that gbak uses read-write transaction?

2021-11-21 Thread Dimitry Sibiryakov
Ivan Přenosil wrote 21.11.2021 14:22: or could it be changed to read-only in FB4? It is meaningless. Read-write transaction has no differences from read-only until it perform an actual write. And no, it cannot be "read-only read committed" for the consistency sake. -- WBR, SD. Firebi

Re: [Firebird-devel] ODP: SQL profiler

2021-11-09 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 09.11.2021 12:30: Please note I'm refactoring the profiler branch, making it via a plugin. Why? Do you expect anybody to write a custom profiler? -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/fir

Re: [Firebird-devel] Request IDs, MON$STATEMENTS and MON$STATEMENT_ID

2021-11-08 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 08.11.2021 17:54: The solution does not work for the profiler then. Why? Isn't the profiler supposed to help detect cases when fast (by itself) statement is executed enormous number of times degrading overall application performance?.. -- WBR, SD. Fi

Re: [Firebird-devel] Request IDs, MON$STATEMENTS and MON$STATEMENT_ID

2021-11-08 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 08.11.2021 15:28: Is it an important design of MON$STATEMENTS that this (subsequent execution of a request maintain its ID) happens? Nope, I believe the new ID must be generated also by findRequest() if the clone was found in the cache. Will it make impossible to det

Re: [Firebird-devel] ODP: RFC: Fix for issue 6915

2021-11-06 Thread Dimitry Sibiryakov
Omacht András wrote 06.11.2021 14:08: Maybe if you find double letters you handled them together when you sort and you handled them separated when you search. Unfortunately comparison is used for sorting and sorting is used for indexes and indexes are used for search so they cannot have dif

Re: [Firebird-devel] ODP: RFC: Fix for issue 6915

2021-11-06 Thread Dimitry Sibiryakov
Omacht András wrote 06.11.2021 12:35: However, I am not sure whether it is not a better result for the average user today, (e.g. in a quick search) if all appear after typing C... AFAIU only "dictionary collations" are using contractions so developers of applications for average users can u

Re: [Firebird-devel] ODP: RFC: Fix for issue 6915

2021-11-06 Thread Dimitry Sibiryakov
Gabor Boros wrote 05.11.2021 16:39: 2021.11.05. 12:36 keltezéssel, Pavel Cisar írta: However, the Czech language defines only one contraction (CH), but there are other languages that have many such as Hungarian. Yes: cs, dz, gy, ly, ny, sz, ty, zs and dzs. Sorry. :-) Is it ok from the lan

Re: [Firebird-devel] Cascade replication

2021-11-03 Thread Dimitry Sibiryakov
Pro Turm wrote 01.11.2021 15:21: My goal is indeed replication without a single point of failure. It the above would have been possible (replication from two masters), than the following would also have been possible : H would be a replica in the case when nothing else works anymore, A,B,D have

Re: [Firebird-devel] Cascade replication

2021-11-01 Thread Dimitry Sibiryakov
Pro Turm wrote 01.11.2021 11:47: Thanks. Could you please give some more words about this case? Is the following constellation also possible? A--\  /--E B---D-F C--/  \--G That is that D replicates A,B,C (which share the same content e.g. A-B-C) and simultaneo

Re: [Firebird-devel] Cascade replication

2021-11-01 Thread Dimitry Sibiryakov
Pro Turm wrote 01.11.2021 10:54:    Drop database C, recreate replica from scratch. could you please say what the recreation from scratch would look like according to your understanding ? Quoting README.replication: ## Creating the replica database In the Beta 1 release, any physica

Re: [Firebird-devel] Cascade replication

2021-10-27 Thread Dimitry Sibiryakov
Pro Turm wrote 27.10.2021 14:46: And how about the following constellation: The same. You still create a single failure point at B. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] Cascade replication

2021-10-27 Thread Dimitry Sibiryakov
Pro Turm wrote 27.10.2021 14:39: Which means cascading could be quite vulnerable. What is then the quickest possible way to connect A to C in the above case? Drop database C, recreate replica from scratch. > Restarting the servers: are there some performance issues expected due to >

Re: [Firebird-devel] Cascade replication

2021-10-27 Thread Dimitry Sibiryakov
Pro Turm wrote 27.10.2021 14:26: How about the case A->B->C, and B fails?  Will A be replicating directly to C ? No.  What does a switch from primary <-> replica mean? Only changing the configuration files? No, it is invoking "gfix" command with appropriate switches as described in RE

Re: [Firebird-devel] Cascade replication

2021-10-27 Thread Dimitry Sibiryakov
Pro Turm wrote 27.10.2021 13:52: Is it possible and how does a replica become primary at some point? As usual, changing of the replica mode of the database (if necessary at all). Read readme.replication.txt in doc folder. e.g. in A->B->C, when A fails to become B->C ? It is already B-

Re: [Firebird-devel] Cascade replication

2021-10-27 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 27.10.2021 9:18: Nope, it's configured on the replica side and allows the received changes to be propagated further (if replica is also configured as a primary, i.e. A->B->C). ...and must be disabled for replication A->B->A i.e. bidirectional to prevent infinite data bou

Re: [Firebird-devel] Firebird and DSQL Scrollable Cursors

2021-10-23 Thread Dimitry Sibiryakov
Mark Rotteveel wrote 23.10.2021 14:31: I'm not sure why not. Because of record buffering it is too hard for a feature with so little usage. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] Firebird and DSQL Scrollable Cursors

2021-10-23 Thread Dimitry Sibiryakov
Tony Whyman wrote 23.10.2021 14:04: Is this true? Yes. This feature is not implemented in standard network plugin and so far nobody created a custom one. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] Curly brackets in config files

2021-10-14 Thread Dimitry Sibiryakov
Vlad Khorsun wrote 14.10.2021 18:07: # To enter curvy brackets { } somewhere in a configuration dup them: {{ }}. Hope it helps Yes, it did. Thanks. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

[Firebird-devel] Curly brackets in config files

2021-10-14 Thread Dimitry Sibiryakov
Hello All, Is there a way to workaround "illegal line" error if curly brackets are part of database GUID used as a key name: {F5B90BDE-6DA3-4095-A9E1-6D26AE34519F} = target.fdb -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/fire

Re: [Firebird-devel] Creating tables and using them in pre-existing transactions

2021-10-14 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 14.10.2021 15:23: This happens because transaction 3 will fill the metadata caches. Can we consider this trick safe? Even if it is safe, it is a violation of "snapshot TIL" contract IMHO and must be fixed. I do want to use it in this situation: Profile

Re: [Firebird-devel] Tablespaces proposal

2021-10-13 Thread Dimitry Sibiryakov
Vlad Khorsun wrote 13.10.2021 14:39: Due to this, I see no reason to replicate physical layout of master database to the replica. I.e. TABLESPACE-related statements should not be replicated at all, IMO. Other opinions ? I fully agree with not replicated "CREATE/ALTER/DROP TABLESPACE" but what

Re: [Firebird-devel] Tablespaces proposal

2021-10-13 Thread Dimitry Sibiryakov
Roman Simakov wrote 13.10.2021 14:20: I suppose you mean async replication. I guess like other errors, no? No, I meant exactly synch replication. "Other errors" in such cases leads to transaction rollback on both sides. Can tablespace moving to be rolled back? -- WBR, SD. Firebird-Deve

Re: [Firebird-devel] Tablespaces proposal

2021-10-13 Thread Dimitry Sibiryakov
About moving of tablespaces and objects between tablespaces: on primary site it succeeded, on synchronous replica it failed (and vice versa). How such situation is going to be handled? -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/

Re: [Firebird-devel] Tablespaces proposal

2021-10-13 Thread Dimitry Sibiryakov
Roman Simakov wrote 12.10.2021 16:30: It allows you to restore tablespace contents to new places. If the option is not specified gbak will use old locations for every tablespace. I still think this should be an explicit option as well, otherwise surprising things - for the user - can happen when

Re: [Firebird-devel] Tablespaces proposal

2021-10-12 Thread Dimitry Sibiryakov
Roman Simakov wrote 12.10.2021 17:51:> More details you will find in PR and then we will be able to discuss it. Actually we don't discuss. I just beg you for explanation why it was done this way, which alternatives were considered and why they were found unacceptable or worse. Such explana

Re: [Firebird-devel] Tablespaces proposal

2021-10-12 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 12.10.2021 17:34: They're modified in user transaction(s). Nevertheless users have no right for direct modifications so they cannot mess with the page number value. If we exclude the field from the query inside of AlterXXX methods it should to be safe, right? -- WBR

Re: [Firebird-devel] Tablespaces proposal

2021-10-12 Thread Dimitry Sibiryakov
Roman Simakov wrote 12.10.2021 17:16: I'm not sure that keeping page numbers in a transactional relation is a really excellent idea. But you added it into RDB$RELATIONS table, no?.. System tables are operated in system transaction which effectively uses TIL dirty read so there is no real v

Re: [Firebird-devel] Partitioning

2021-10-12 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 12.10.2021 16:59: Slightly faster inserts into indices. If local indexes are used, yes. But such indexes require partitioning key in queries. What will be effect for global indexes? Reference to the partition for a record has to be in index node, no? But it may be

Re: [Firebird-devel] Tablespaces proposal

2021-10-12 Thread Dimitry Sibiryakov
Roman Simakov wrote 12.10.2021 16:55: If this field is needed at all. Still there is no answer why tablespace cannot be identified by name only except "it was done this way 40 years ago". Why not to suggest PR for this refactoring? I understand that you insist on merging your existing co

Re: [Firebird-devel] Partitioning (was: Tablespaces proposal)

2021-10-12 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 12.10.2021 15:02: Partition is a page set. Different page sets may be surely stored inside a single database file, but they may also be stored in different files. It makes a lot of sense to nbackup only some partition(s), or store them on slow drives, etc -- the same as for

Re: [Firebird-devel] Tablespaces proposal

2021-10-12 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 12.10.2021 14:19: There's also 4th goal: provide internal infrastructure (splitting page spaces into multiple files) to support partitioning later. I expect these two features to share a lot. In this case your vision of partitioning is quite special because in others' i

Re: [Firebird-devel] Tablespaces proposal

2021-10-12 Thread Dimitry Sibiryakov
Roman Simakov wrote 11.10.2021 14:17: GOALS == 1) Extend the current limits on database size Current limit is 16 TB and can be extended without explicit tablespace managing by something similar to OS memory mapping technique effectively adding some external-sourced bits to current 32 bi

Re: [Firebird-devel] Tablespaces proposal

2021-10-12 Thread Dimitry Sibiryakov
Vlad Khorsun wrote 12.10.2021 12:10: I see no problem with increasing the limit. I see problems with reducing it (someone may use them). So let's start from a small number 63. When we implement partitions we increase it more consciously.   I speak about data type used in ODS for tablespace ID

Re: [Firebird-devel] Tablespaces proposal

2021-10-12 Thread Dimitry Sibiryakov
Mark Rotteveel wrote 12.10.2021 10:55: It allows you to restore tablespace contents to new places. If the option is not specified gbak will use old locations for every tablespace. I still think this should be an explicit option as well, otherwise surprising things - for the user - can happen w

Re: [Firebird-devel] Tablespaces proposal

2021-10-11 Thread Dimitry Sibiryakov
Roman Simakov wrote 11.10.2021 20:23: > pag_header in every tablespace is reserved and may be replaced by a > new page type.    You mean page zero, which is currently always pag_header. I see no reason to change this, so far. Header page uses to describe properties of databas

Re: [Firebird-devel] Tablespaces proposal

2021-10-11 Thread Dimitry Sibiryakov
Roman Simakov wrote 11.10.2021 20:23: > Note: *MAIN* - is a name of the basic database file.    Please, use *DEFAULT* for default (main) tablespace at "main" database file. It is much more consistent with SQL and allows to avoid new unnecessary keyword. I'd be happy to agree. A

Re: [Firebird-devel] Tablespaces proposal

2021-10-11 Thread Dimitry Sibiryakov
Dmitry Yemanov wrote 11.10.2021 18:24: It's possible to create up to 253 tablespaces.    Two ID's is reserved for DEFAULT and TEMPORARY tablespaces, correct ? I would reserve some more ID's for future system usage. I don't see it as limitation for end users. For regular tablespaces (created e

[Firebird-devel] Charset of replicated SQL

2021-10-11 Thread Dimitry Sibiryakov
Hello All. In which case charset received by IReplTransaction::executeSqlIntl() can be different from charset of attachment received by IReplicatedSession::init()? I can imagine only the case of cascade replication when the Applier hacks replicator's connection charset. -- WBR, SD.

Re: [Firebird-devel] Tablespaces proposal

2021-10-11 Thread Dimitry Sibiryakov
Roman Simakov wrote 11.10.2021 15:23: Cannot be tablespace identification loaded from RDB$INDEXES? Adding it into irp will increase size of irt_repeat by 1/3 decreasing limit of indexes per table, no? I'm sure the answer is the same as why the root page cannot be loaded from RDB$INDEXES

Re: [Firebird-devel] Tablespaces proposal

2021-10-11 Thread Dimitry Sibiryakov
Roman Simakov wrote 11.10.2021 14:52: Add page space id to page number in ods.h:index_root_page. pag_root is located in the tablespace where a table is located Why is this difference? What does prevent you from putting irp into the tablespace where index is located? IRP describes every inde

Re: [Firebird-devel] Tablespaces proposal

2021-10-11 Thread Dimitry Sibiryakov
Dimitry Sibiryakov wrote 11.10.2021 14:26:   What's the point of using "MAIN" here? Nevemind, I've found the answer. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] Tablespaces proposal

2021-10-11 Thread Dimitry Sibiryakov
Roman Simakov wrote 11.10.2021 14:17: FIELD TYPE CONSTRAINT ... USING INDEX ... TABLESPACE { | MAIN} -- field constraint tablespace What's the point of using "MAIN" here? Whole TABLESPACE clause cannot be omitted? Add page space id to page number in ods.h:index_root_page. pag_root is

Re: [Firebird-devel] [FB3] result type of negate operation

2021-10-10 Thread Dimitry Sibiryakov
Mark Rotteveel wrote 10.10.2021 18:08: Yes, this is normal. The range of a smallint is from -32768 to 32767, so you can't negate -32768 as it will overflow back to -32768, hence it will raise the integer overflow error. The question is whether result of negation should keep the type of sourc

Re: [Firebird-devel] SRP Is Now Deprecated

2021-10-10 Thread Dimitry Sibiryakov
Mark Rotteveel wrote 10.10.2021 16:03: Could you please stop posting random links without further context. And as far as I can tell that blogger is just a random person which has no authority to 'declare' SRP deprecated. Besides, Firebird uses SRP for authentication, not just key exchange.

[Firebird-devel] Plugins and symlinks

2021-10-08 Thread Dimitry Sibiryakov
Hello All. Currently Firebird is unable to load plugins via symlinks. Is it intentional? -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] Tablespaces proposal

2021-10-07 Thread Dimitry Sibiryakov
Mark Rotteveel wrote 07.10.2021 16:11: Backing up only one tablespace could lead to inconsistent restores though. From practical POV it is not different from current partial backup including only subset of tables. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists

Re: [Firebird-devel] Tablespaces proposal

2021-10-07 Thread Dimitry Sibiryakov
Roman Simakov wrote 07.10.2021 16:08: Let's eat an elephant one bite at a time Yes, that's exactly my point: no need to reserve fields if implementation that use them is not clear yet and better no feature than provisory hack. -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] Tablespaces proposal

2021-10-07 Thread Dimitry Sibiryakov
Molnár Attila wrote 07.10.2021 10:56: It might not be about read performance, but e.g. logical data serparation, backup speedup, etc... Logical data separation is task for namespaces, not tablespaces. Physical backup of single tablespace is pointless because it has no TIP so without main

Re: [Firebird-devel] Tablespaces proposal

2021-10-07 Thread Dimitry Sibiryakov
Roman Simakov wrote 06.10.2021 21:49: How are data moved? Under transaction control? In background (and interruptible) like db crypt? it's a dfw operation with EX database lock. I hope to relax this limitation later. So there are no concurrent changes. 1) copy all data pages 2) switch RDB$POIN

Re: [Firebird-devel] Tablespaces proposal

2021-10-07 Thread Dimitry Sibiryakov
Roman Simakov wrote 07.10.2021 8:14: ср, 6 окт. 2021 г. в 23:57, Dimitry Sibiryakov: Roman Simakov wrote 06.10.2021 22:44: Sorry I was wrong. TABLESPACE_ID is used as pagespace ID internally but this id presents at index root page for example. I don't see it in ods.h:index_root

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Dimitry Sibiryakov
Roman Simakov wrote 06.10.2021 22:44: Sorry I was wrong. TABLESPACE_ID is used as pagespace ID internally but this id presents at index root page for example. I don't see it in ods.h:index_root_page. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Dimitry Sibiryakov
Roman Simakov wrote 06.10.2021 21:27: So am I. Currently tablespace headers are just not used. In this case how do you determine page size inside of tablespace file? Having it different from main one is an essential feature for indexes. -- WBR, SD. Firebird-Devel mailing list, web inte

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Dimitry Sibiryakov
Roman Simakov wrote 06.10.2021 20:43: Let me not describe every field. I hope most of them are obvious. No, they aren't. ID is not referenced anywhere and seems to have no purpose at all. TABLESPACE_NAME being CHAR is pointless. CHAR was used in ancient times but new fields should prefer

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Dimitry Sibiryakov
Roman Simakov wrote 06.10.2021 17:32: A new table RDB$TABLESPACES: RDB$TABLESPACE_ID - SMALLINT RDB$TABLESPACE_NAME - CHAR (63) RDB$SECURITY_CLASS - CHAR (63) RDB$SYSTEM_FLAG - SMALLINT RDB$DESCRIPTION - BLOB SUBTYPE TEXT SEGMENT SIZE 80 RDB$OWNER_NAME - CHAR (63) RDB$FILE_NAME - V

Re: [Firebird-devel] Firebird 4 Replicaton - INET/inet_error: read errno during replicaton

2021-10-04 Thread Dimitry Sibiryakov
Nils Bödeker wrote 04.10.2021 13:30: Possible Cause - I inserting an Record in the table BINARYDATA an BEFORE_INSERT Trigger Insert an additional Record in the table OBJECTS. If i disable this Trigger the Error don't happen. DML triggers don't fire during replication. Fir

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-21 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 21.09.2021 15:06: Valgring makes execution many times slower (that's from my own experience). Does it really matter if test suite isn't run in production anyway?.. Can you check that for performance? No. They are not available for Windows as well a

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-21 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 21.09.2021 14:51: That's why this solution is usable only if we can't do something else. https://github.com/google/sanitizers can detect much wider set of problems that our pools. Its support is built into GCC. -- WBR, SD. Firebird-Devel mailing l

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-21 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 21.09.2021 14:24: Though we will lose way to monitor leaks. Valgrind, drMemory and sanitizers will work in this case. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-21 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 21.09.2021 13:50: We may split that global default pool in two, so we'll have another default pool for external (not controlled by us) libraries. All memory allocated directly with "operator new" (not FB_NEW) will go to external pool. Wouldn't it be simpler

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-17 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 17.09.2021 17:03: as an additional cherry on a cake we have very fast, efficient and (last but not least) familiar for developers support of hunting for memory leaks. Is it more familiar than DrMemory and valgrind? Former is currently useless because of

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-17 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 17.09.2021 16:13: First of all dynamically loaded libraries are unloaded in reverse order, next invoken executable dtors/atexits, and only after it - dtors of linked libraries. Ah, ok. But returning to the topic: which library must provide pooled memory

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-17 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 17.09.2021 9:08: Is it about a library dynamically (dlopen, LoadLibrary) loaded or linked to the exacutable? Both. The library tree is the same (at least on Linux). -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sourceforge

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 16.09.2021 21:43: And it should happen if you called it before de constructors. Or it was not done in this way? I didn't call it at all. Firebird engine did it for me. Are there any published test? Did it was compiled with c++11? Look at whole thread:

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 16.09.2021 20:39: I wanted to control the order of constructors mostly to control the order of destructors (which should be inverse). KISS. Just gather them all into single CPP file. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lis

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 16.09.2021 21:08: And this has 0 importance for the matter, considering that tools vendors implement what the standard describes. We already had a discussion here that shown that atexit (and called from it PluginModule::doCleanup()) is fired after global de

Re: [Firebird-devel] Memory manager cleanup / external libraries

2021-09-16 Thread Dimitry Sibiryakov
Adriano dos Santos Fernandes wrote 16.09.2021 20:39: It looks like there is another way to make that. std::atexit (https://en.cppreference.com/w/cpp/utility/program/atexit) docs says: No matter what docs say, std::atexit is just a synonym for atexit. -- WBR, SD. Firebird-Devel mailing

Re: [Firebird-devel] MessageBuffer vs C struct alignment

2021-09-16 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 16.09.2021 12:21: In new version we can easily change MessageBuffer format. Or we can return XSQLDA to OO API and deprecate MessageBuffer repeating evolution of ISC API. -- WBR, SD. Firebird-Devel mailing list, web interface at https://lists.sour

Re: [Firebird-devel] MessageBuffer vs C struct alignment

2021-09-16 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 16.09.2021 12:21: In new version we can easily change MessageBuffer format. The main issue is old user's binaries - probably to support them we will need some tricks in remote redirector & copy/in/out in dsql.cpp. This trick could be "use offsets from p

Re: [Firebird-devel] MessageBuffer vs C struct alignment

2021-09-16 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 16.09.2021 11:52: First of all it's good to know what places are affected. Do not want to try to guess them. ODS and MessageBuffer at least. Record is an internal thing and can be ignored. -- WBR, SD. Firebird-Devel mailing list, web interface at

Re: [Firebird-devel] MessageBuffer vs C struct alignment

2021-09-16 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 13.09.2021 9:39: Yes, that should be fixed. If one builds FB with native __int128 it fails on unaligned data access. But changing alignment requirement to 16 bytes is not enough - appears some buffers are not aligned at 16-bit cause FB fails exactly in t

Re: [Firebird-devel] Firebird 4 - MON$ / Trace API changes?

2021-09-13 Thread Dimitry Sibiryakov
Maya Opperman wrote 13.09.2021 15:59: Does this need to be done within every transaction that is started, or per connection/session, or once off per database? Quoting the readme: Implements capability to setup columns coercion rules *in current session*. -- WBR, SD. Firebird-Devel

Re: [Firebird-devel] MessageBuffer vs C struct alignment

2021-09-12 Thread Dimitry Sibiryakov
Alex Peshkoff via Firebird-devel wrote 15.05.2018 12:13: On 05/15/18 13:06, Dimitry Sibiryakov wrote: 15.05.2018 11:58, Alex Peshkoff via Firebird-devel wrote:   Do alignment of fields in C struct matches alignment of the same fields in MessageBuffer?   If at compile/preprocess time construct

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