472,780 Members | 1,126 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,780 software developers and data experts.

An idea for IPU ( We need another acronymn! )

IPU, in place updates.
--------------------------

1/ Put a version numbers on each record represented by a byte/word sized
number from a three version number list kept by the table header. This
would then only involve one more byte per record. This version number
list needs to be the VERY first item in the table header. The lowest
ordered byte of the first word of the version number list contains the
size of the words in bytes. The version number list's version number is
the second word in the structure. ( we shouldn't run out of 2^16, 2^32,
2^64, 2^128, or 2^256 versions list versions ).

2/
A/ Put a field in the table version number list showing status of
that version number:
No rows of this number.
Some rows of this number
All rows of this number.

B/ An additional field tags whiuch version number the table header
is at.

C/ The lowest version number is removed when it says it has no rows.
and the table header is at a higher number.

3/ Repeat the same for the indexes.

4/ The tables/indexes features can only be accessed by the version
marked as the table header.

5/ The read/write modules/objects for the backend is a DLL that is
changed dynamically some sort of flagging system. Any NEW backend
process gets the NEW DLL; Cuirrently executing ones keep the one they
started with.

6/ An additinonal two processes are always part of the backend:
A/ A scheduler for updates, which has programmable bandwidth
adjustment paramaters for what percentages of various resources are
given to do updates in place.
B/ The upate process itself. If all tables, indexes, and other
structures are updated, well, it's inactive.

7/ The same structure for the table and row versioning is used for the
database and table versioning, and the schema and database versioning.

8/ Once a new DLL is loaded that contains the necessary information to
read and write the old records, the uudate process starts automagically.

9/ For the listing/treeing structures changes on the
table/database/schema level, the same multiple version numbers are used
and another autonimous process slowly morphs that also. This is probably
more challenging, and might require a copy of both kinds of structures
in existence and the data slowly moving from one to the other. Until the
new structure is COMPLETELY built, the old structure contains pointers
to the locationi in the new structure if the item is there. When both
structures point completely to the new structure's contents, the old
structure's reading code is demoted and the new structure's takes over.

10/ Databases and Schemas do the same thing as 9.
anyway, some thoughts.
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 11 '05 #1
2 1800
On Friday 19 September 2003 15:03, Dennis Gearon wrote:
IPU, in place updates.
--------------------------

1/ Put a version numbers on each record represented by a byte/word sized
number from a three version number list kept by the table header. This
would then only involve one more byte per record. This version number
list needs to be the VERY first item in the table header. The lowest
ordered byte of the first word of the version number list contains the
size of the words in bytes. The version number list's version number is
the second word in the structure. ( we shouldn't run out of 2^16, 2^32,
2^64, 2^128, or 2^256 versions list versions ).


[snip consideration of the issues involved in migrating the on-disk formats]

Well, you could get away with one bit if you had to. You're only allowed two
versions - the old and the new. Saying that upgrading a half-upgraded
database is disallowed doesn't strike me as unreasonable.

But, the disk format is only the first step. If I'm upgrading in place then I
need to be sure that the behaviour of the system isn't going to change,
because I can't undo (otherwise, I'd just dump/restore).

So - let's say inheritence changes so that primary keys are inherited. You're
going to be in a situation where you need to manage both old and new
behaviour at the same time. In addition, you're going to need some
translation function that can update old schema details to match new schema
constraints.

OK - maybe we say changes like that can't be supported, in which case the
developers need to be careful about what changes are planned/implemented at
what points. Non-trivial stuff.

--
Richard Huxton
Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 11 '05 #2

Let's get no-disk-format upgrades working first.

---------------------------------------------------------------------------

Dennis Gearon wrote:
IPU, in place updates.
--------------------------

1/ Put a version numbers on each record represented by a byte/word sized
number from a three version number list kept by the table header. This
would then only involve one more byte per record. This version number
list needs to be the VERY first item in the table header. The lowest
ordered byte of the first word of the version number list contains the
size of the words in bytes. The version number list's version number is
the second word in the structure. ( we shouldn't run out of 2^16, 2^32,
2^64, 2^128, or 2^256 versions list versions ).

2/
A/ Put a field in the table version number list showing status of
that version number:
No rows of this number.
Some rows of this number
All rows of this number.

B/ An additional field tags whiuch version number the table header
is at.

C/ The lowest version number is removed when it says it has no rows.
and the table header is at a higher number.

3/ Repeat the same for the indexes.

4/ The tables/indexes features can only be accessed by the version
marked as the table header.

5/ The read/write modules/objects for the backend is a DLL that is
changed dynamically some sort of flagging system. Any NEW backend
process gets the NEW DLL; Cuirrently executing ones keep the one they
started with.

6/ An additinonal two processes are always part of the backend:
A/ A scheduler for updates, which has programmable bandwidth
adjustment paramaters for what percentages of various resources are
given to do updates in place.
B/ The upate process itself. If all tables, indexes, and other
structures are updated, well, it's inactive.

7/ The same structure for the table and row versioning is used for the
database and table versioning, and the schema and database versioning.

8/ Once a new DLL is loaded that contains the necessary information to
read and write the old records, the uudate process starts automagically.

9/ For the listing/treeing structures changes on the
table/database/schema level, the same multiple version numbers are used
and another autonimous process slowly morphs that also. This is probably
more challenging, and might require a copy of both kinds of structures
in existence and the data slowly moving from one to the other. Until the
new structure is COMPLETELY built, the old structure contains pointers
to the locationi in the new structure if the item is there. When both
structures point completely to the new structure's contents, the old
structure's reading code is demoted and the new structure's takes over.

10/ Databases and Schemas do the same thing as 9.
anyway, some thoughts.
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


--
Bruce Momjian | http://candle.pha.pa.us
pg***@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: R | last post by:
Hello everybody. I'm writing my own Content System in PHP5. I've written so far main classes for handling DB connections, XML, XForms and Sessions. But I've got problem with one thing - it's...
0
by: Chris McKeever | last post by:
I am trying to modify the Mailman Python code to stop mapping MIME-types and use the extension of the attachment instead. I am pretty much clueless as to what I need to do here, but I think I have...
40
by: Seth Brundle | last post by:
I am surprised that no one has yet developed an HTML variant which uses abbreviated tagging. Maybe they have, I dunno. HTML is very verbose - this was important to its adoption, as reading...
10
by: nimmi_srivastav | last post by:
Below you will see an example of a nested conditional expression that this colleague of mine loves. He claims that it is more efficient that a multi-level if-else-if structure. Moreover, our...
4
by: Mr Seth T | last post by:
I am supposed to implement a web app in C#/.NET and it needs to be installed on the customer's server and ran from anywhere. The problem is this software needs to be licensed by user (i.e. they...
32
by: Matias Jansson | last post by:
I come from a background of Java and C# where it is common practise to have one class per file in the file/project structure. As I have understood it, it is more common practice to have many...
13
by: anantnigam03 | last post by:
hI, Can any one give me some ideas for creating a finaly year project using C#.NET. The project should be bit complicated. I am not that experienced in C#.NET yet but i am learning every day. So a...
2
by: haytham2008 | last post by:
Hello ... Hi everybody i need an idea to make mobile application that do some thing i need only the idea to what that program to do i need it as final project in my study "im computer...
6
by: gw7rib | last post by:
I have a program that needs to do a small amount of relatively simple parsing. The routines I've written work fine, but the code using them is a bit long-winded. I therefore had the idea of...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.