473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 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 1831
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.