Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Omacht András
Hi Roman! First of all, thanks for the development and offering it to Firebird. Do you plan to partition the data depending on field value? Oracle range partitioning example: CREATE TABLE sales_range (salesman_id NUMBER(5), salesman_name VARCHAR2(30), sales_amount NUMBER(10), sales_date

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Roman Simakov
ср, 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_page. Maybe because I haven't made a

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 Roman Simakov
> >ID is not referenced anywhere and seems to have no purpose at all. > > Probably it could be removed and pagespace IDs will be generated internally. Sorry I was wrong. TABLESPACE_ID is used as pagespace ID internally but this id presents at index root page for example. Now I'm not sure if it

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Roman Simakov
ср, 6 окт. 2021 г. в 22:17, 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. ok A new table RDB$TABLESPACES # keeps metadata of tablespaces. RDB$TABLESPACE_ID - SMALLINT # intern

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Roman Simakov
ср, 6 окт. 2021 г. в 22:48, 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 in

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Roman Simakov
ср, 6 окт. 2021 г. в 22:01, Adriano dos Santos Fernandes : > > On 06/10/2021 15:43, Roman Simakov wrote: > > > >>> RDB$POINTER_PAGE - INTEGER > >>> RDB$ROOT_PAGE - INTEGER > >> > >>What these are for? > > > > These fields are necessary for reliable implementation of moving data > > pages to

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 Roman Simakov
ср, 6 окт. 2021 г. в 19:29, Alex Peshkoff via Firebird-devel : > > On 10/6/21 6:32 PM, Roman Simakov wrote: > > > 4. CREATE TABLE … > > TABLESPACE > > Given syntax does not let specify tablespace for constraints-related > indexes and separate fields. That's serious limitation. At least for > blobs

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Roman Simakov
ср, 6 окт. 2021 г. в 19:29, Adriano dos Santos Fernandes : > > On 06/10/2021 13:12, Mark Rotteveel wrote: > >> > >> Logical restore > >> > >> gbak -c -TABLESPACE_MAP(PING_FILE) /path/to/file/map/tablespaces > >> > >> The option TABLESPACE_MAP(PING_FILE) specifies a path to the

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Roman Simakov
ср, 6 окт. 2021 г. в 19:13, Mark Rotteveel : > > On 06-10-2021 17:32, Roman Simakov wrote: > > 3. DROP TABLESPACE [INCLUDING CONTENTS] > > I think using {CASCADE | RESTRICT} instead of [INCLUDING CONTENTS] would > be better, as that fits with similar definitions in the SQL standard > (e.g. 11.2 ,

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 Adriano dos Santos Fernandes
On 06/10/2021 15:43, Roman Simakov wrote: > >>> RDB$POINTER_PAGE - INTEGER >>> RDB$ROOT_PAGE - INTEGER >> >>What these are for? > > These fields are necessary for reliable implementation of moving data > pages to another tablespace. You'll be able to understand their > meaning in code. >

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Roman Simakov
ср, 6 окт. 2021 г. в 18:56, 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

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Alex Peshkoff via Firebird-devel
On 10/6/21 6:32 PM, Roman Simakov wrote: 4. CREATE TABLE … TABLESPACE Given syntax does not let specify tablespace for constraints-related indexes and separate fields. That's serious limitation. At least for blobs that's IMHO needed. Firebird-Devel mailing list, web interface at https

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Adriano dos Santos Fernandes
On 06/10/2021 13:12, Mark Rotteveel wrote: >> >> Logical restore >> >> gbak -c -TABLESPACE_MAP(PING_FILE) /path/to/file/map/tablespaces >> >> The option TABLESPACE_MAP(PING_FILE) specifies a path to the file >> which maps tablespace names on file names. For example, >> TS1

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Mark Rotteveel
On 06-10-2021 17:55, Dimitry Sibiryakov wrote: Roman Simakov wrote 06.10.2021 17:32: New fields in RDB$RELATIONS:   RDB$TABLESPACE_NAME - CHAR (63)   Cannot RDB$EXTERNAL_FILE be reused? I'd prefer consistent and separate naming for this, and not overload a field of a different feature to

Re: [Firebird-devel] Tablespaces proposal

2021-10-06 Thread Mark Rotteveel
On 06-10-2021 17:32, Roman Simakov wrote: 3. DROP TABLESPACE [INCLUDING CONTENTS] I think using {CASCADE | RESTRICT} instead of [INCLUDING CONTENTS] would be better, as that fits with similar definitions in the SQL standard (e.g. 11.2 , and Feature F032 "CASCADE drop behaviour"). That is,

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

[Firebird-devel] Tablespaces proposal

2021-10-06 Thread Roman Simakov
Hello, team! As you might know Red Soft has implemented Tablespace support for RedDatabase 4 which is based on Firebird 4 code base. I hope we start working on a merge request for Firebird 5 or later but previously I would like to get agreement about basic user visible things like the syntax and O