Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7bd58b4

Browse files
committed
Fix initdb spaces problem.
1 parent1d2fea9 commit7bd58b4

File tree

3 files changed

+270
-11
lines changed

3 files changed

+270
-11
lines changed

‎doc/TODO.detail/replication

Lines changed: 66 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ From owner-pgsql-hackers@hub.org Fri Dec 24 10:01:18 1999
4343
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
4444
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id LAA11295
4545
for <pgman@candle.pha.pa.us>; Fri, 24 Dec 1999 11:01:17 -0500 (EST)
46-
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.3 $) with ESMTP id KAA20310 for <pgman@candle.pha.pa.us>; Fri, 24 Dec 1999 10:39:18 -0500 (EST)
46+
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.4 $) with ESMTP id KAA20310 for <pgman@candle.pha.pa.us>; Fri, 24 Dec 1999 10:39:18 -0500 (EST)
4747
Received: from localhost (majordom@localhost)
4848
by hub.org (8.9.3/8.9.3) with SMTP id KAA61760;
4949
Fri, 24 Dec 1999 10:31:13 -0500 (EST)
@@ -129,7 +129,7 @@ From owner-pgsql-hackers@hub.org Fri Dec 24 18:31:03 1999
129129
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
130130
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id TAA26244
131131
for <pgman@candle.pha.pa.us>; Fri, 24 Dec 1999 19:31:02 -0500 (EST)
132-
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.3 $) with ESMTP id TAA12730 for <pgman@candle.pha.pa.us>; Fri, 24 Dec 1999 19:30:05 -0500 (EST)
132+
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.4 $) with ESMTP id TAA12730 for <pgman@candle.pha.pa.us>; Fri, 24 Dec 1999 19:30:05 -0500 (EST)
133133
Received: from localhost (majordom@localhost)
134134
by hub.org (8.9.3/8.9.3) with SMTP id TAA57851;
135135
Fri, 24 Dec 1999 19:23:31 -0500 (EST)
@@ -212,7 +212,7 @@ From owner-pgsql-hackers@hub.org Fri Dec 24 21:31:10 1999
212212
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
213213
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id WAA02578
214214
for <pgman@candle.pha.pa.us>; Fri, 24 Dec 1999 22:31:09 -0500 (EST)
215-
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.3 $) with ESMTP id WAA16641 for <pgman@candle.pha.pa.us>; Fri, 24 Dec 1999 22:18:56 -0500 (EST)
215+
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.4 $) with ESMTP id WAA16641 for <pgman@candle.pha.pa.us>; Fri, 24 Dec 1999 22:18:56 -0500 (EST)
216216
Received: from localhost (majordom@localhost)
217217
by hub.org (8.9.3/8.9.3) with SMTP id WAA89135;
218218
Fri, 24 Dec 1999 22:11:12 -0500 (EST)
@@ -486,7 +486,7 @@ From owner-pgsql-hackers@hub.org Sun Dec 26 08:31:09 1999
486486
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
487487
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id JAA17976
488488
for <pgman@candle.pha.pa.us>; Sun, 26 Dec 1999 09:31:07 -0500 (EST)
489-
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.3 $) with ESMTP id JAA23337 for <pgman@candle.pha.pa.us>; Sun, 26 Dec 1999 09:28:36 -0500 (EST)
489+
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.4 $) with ESMTP id JAA23337 for <pgman@candle.pha.pa.us>; Sun, 26 Dec 1999 09:28:36 -0500 (EST)
490490
Received: from localhost (majordom@localhost)
491491
by hub.org (8.9.3/8.9.3) with SMTP id JAA90738;
492492
Sun, 26 Dec 1999 09:21:58 -0500 (EST)
@@ -909,7 +909,7 @@ From owner-pgsql-hackers@hub.org Thu Dec 30 08:01:09 1999
909909
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
910910
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id JAA10317
911911
for <pgman@candle.pha.pa.us>; Thu, 30 Dec 1999 09:01:08 -0500 (EST)
912-
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.3 $) with ESMTP id IAA02365 for <pgman@candle.pha.pa.us>; Thu, 30 Dec 1999 08:37:10 -0500 (EST)
912+
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.4 $) with ESMTP id IAA02365 for <pgman@candle.pha.pa.us>; Thu, 30 Dec 1999 08:37:10 -0500 (EST)
913913
Received: from localhost (majordom@localhost)
914914
by hub.org (8.9.3/8.9.3) with SMTP id IAA87902;
915915
Thu, 30 Dec 1999 08:34:22 -0500 (EST)
@@ -1006,7 +1006,7 @@ From owner-pgsql-patches@hub.org Sun Jan 2 23:01:38 2000
10061006
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
10071007
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id AAA16274
10081008
for <pgman@candle.pha.pa.us>; Mon, 3 Jan 2000 00:01:28 -0500 (EST)
1009-
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.3 $) with ESMTP id XAA02655 for <pgman@candle.pha.pa.us>; Sun, 2 Jan 2000 23:45:55 -0500 (EST)
1009+
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.4 $) with ESMTP id XAA02655 for <pgman@candle.pha.pa.us>; Sun, 2 Jan 2000 23:45:55 -0500 (EST)
10101010
Received: from hub.org (hub.org [216.126.84.1])
10111011
by hub.org (8.9.3/8.9.3) with ESMTP id XAA13828;
10121012
Sun, 2 Jan 2000 23:40:47 -0500 (EST)
@@ -1424,7 +1424,7 @@ From owner-pgsql-hackers@hub.org Tue Jan 4 10:31:01 2000
14241424
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
14251425
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id LAA17522
14261426
for <pgman@candle.pha.pa.us>; Tue, 4 Jan 2000 11:31:00 -0500 (EST)
1427-
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.3 $) with ESMTP id LAA01541 for <pgman@candle.pha.pa.us>; Tue, 4 Jan 2000 11:27:30 -0500 (EST)
1427+
Received: from hub.org (hub.org [216.126.84.1]) by renoir.op.net (o1/$Revision: 1.4 $) with ESMTP id LAA01541 for <pgman@candle.pha.pa.us>; Tue, 4 Jan 2000 11:27:30 -0500 (EST)
14281428
Received: from localhost (majordom@localhost)
14291429
by hub.org (8.9.3/8.9.3) with SMTP id LAA09992;
14301430
Tue, 4 Jan 2000 11:18:07 -0500 (EST)
@@ -1558,3 +1558,62 @@ Sorry, I not sure if I re-draw previous picture total good..
15581558

15591559
************
15601560

1561+
From pgsql-hackers-owner+M3133@hub.org Fri Jun 9 15:02:25 2000
1562+
Received: from hub.org (root@hub.org [216.126.84.1])
1563+
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id PAA22319
1564+
for <pgman@candle.pha.pa.us>; Fri, 9 Jun 2000 15:02:24 -0400 (EDT)
1565+
Received: from hub.org (majordom@localhost [127.0.0.1])
1566+
by hub.org (8.10.1/8.10.1) with SMTP id e59IsET81137;
1567+
Fri, 9 Jun 2000 14:54:14 -0400 (EDT)
1568+
Received: from ultra2.quiknet.com (ultra2.quiknet.com [207.183.249.4])
1569+
by hub.org (8.10.1/8.10.1) with SMTP id e59IrQT80458
1570+
for <pgsql-hackers@postgresql.org>; Fri, 9 Jun 2000 14:53:26 -0400 (EDT)
1571+
Received: (qmail 13302 invoked from network); 9 Jun 2000 18:53:21 -0000
1572+
Received: from 18.67.tc1.oro.pmpool.quiknet.com (HELO quiknet.com) (pecondon@207.231.67.18)
1573+
by ultra2.quiknet.com with SMTP; 9 Jun 2000 18:53:21 -0000
1574+
Message-ID: <39413D08.A6BDC664@quiknet.com>
1575+
Date: Fri, 09 Jun 2000 11:52:57 -0700
1576+
From: Paul Condon <pecondon@quiknet.com>
1577+
X-Mailer: Mozilla 4.73 [en] (X11; U; Linux 2.2.14-5.0 i686)
1578+
X-Accept-Language: en
1579+
MIME-Version: 1.0
1580+
To: ohp@pyrenet.fr, pgsql-hackers@postgresql.org
1581+
Subject: [HACKERS] Re: Big project, please help
1582+
Content-Type: text/plain; charset=us-ascii
1583+
Content-Transfer-Encoding: 7bit
1584+
X-Mailing-List: pgsql-hackers@postgresql.org
1585+
Precedence: bulk
1586+
Sender: pgsql-hackers-owner@hub.org
1587+
Status: OR
1588+
1589+
Two way replication on a single "table" is availabe in Lotus Notes. In
1590+
Notes, every record has a time-stamp, which contains the time of the
1591+
last update. (It also has a creation timestamp.) During replication,
1592+
timestamps are compared at the row/record level, and compared with the
1593+
timestamp of the last replication. If, for corresponding rows in two
1594+
replicas, the timestamp of one row is newer than the last replication,
1595+
the contents of this newer row is copied to the other replica. But if
1596+
both of the corresponding rows have newer timestamps, there is a
1597+
problem. The Lotus Notes solution is to:
1598+
1. send a replication conflict message to the Notes Administrator,
1599+
which message contains full copies of both rows.
1600+
2. copy the newest row over the less new row in the replicas.
1601+
3. there is a mechanism for the Administrator to reverse the default
1602+
decision in 2, if the semantics of the message history, or off-line
1603+
investigation indicates that the wrong decision was made.
1604+
1605+
In practice, the Administrator is not overwhelmed with replication
1606+
conflict messages because updates usually only originate at the site
1607+
that originally created the row. Or updates fill only fields that were
1608+
originally 'TBD'. The full logic is perhaps more complicated than I have
1609+
described here, but it is already complicated enough to give you an idea
1610+
of what you're really being asked to do. I am not aware of a supplier of
1611+
relational database who really supports two way replication at the level
1612+
that Notes supports it, but Notes isn't a relational database.
1613+
1614+
The difficulty of the position that you appear to be in is that
1615+
management might believe that the full problem is solved in brand X
1616+
RDBMS, and you will have trouble convincing management that this is not
1617+
really true.
1618+
1619+

‎doc/TODO.detail/tablespaces

Lines changed: 202 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ From pgsql-hackers-owner+M174@hub.org Sun Mar 12 22:31:11 2000
22
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
33
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id XAA25886
44
for <pgman@candle.pha.pa.us>; Sun, 12 Mar 2000 23:31:10 -0500 (EST)
5-
Received: from news.tht.net (news.hub.org [216.126.91.242]) by renoir.op.net (o1/$Revision: 1.1 $) with ESMTP id XAA04589 for <pgman@candle.pha.pa.us>; Sun, 12 Mar 2000 23:19:33 -0500 (EST)
5+
Received: from news.tht.net (news.hub.org [216.126.91.242]) by renoir.op.net (o1/$Revision: 1.2 $) with ESMTP id XAA04589 for <pgman@candle.pha.pa.us>; Sun, 12 Mar 2000 23:19:33 -0500 (EST)
66
Received: from hub.org (hub.org [216.126.84.1])
77
by news.tht.net (8.9.3/8.9.3) with SMTP id XAA42854;
88
Sun, 12 Mar 2000 23:05:05 -0500 (EST)
@@ -480,7 +480,7 @@ From Inoue@tpf.co.jp Wed Mar 15 02:00:58 2000
480480
Received: from renoir.op.net (root@renoir.op.net [207.29.195.4])
481481
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id DAA17887
482482
for <pgman@candle.pha.pa.us>; Wed, 15 Mar 2000 03:00:57 -0500 (EST)
483-
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by renoir.op.net (o1/$Revision: 1.1 $) with ESMTP id CAA02974 for <pgman@candle.pha.pa.us>; Wed, 15 Mar 2000 02:54:44 -0500 (EST)
483+
Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by renoir.op.net (o1/$Revision: 1.2 $) with ESMTP id CAA02974 for <pgman@candle.pha.pa.us>; Wed, 15 Mar 2000 02:54:44 -0500 (EST)
484484
Received: from cadzone ([126.0.1.40] (may be forged))
485485
by sd.tpf.co.jp (2.5 Build 2640 (Berkeley 8.8.6)/8.8.4) with SMTP
486486
id QAA00734; Wed, 15 Mar 2000 16:53:56 +0900
@@ -539,3 +539,203 @@ Hiroshi Inoue
539539
Inoue@tpf.co.jp
540540

541541

542+
From pgsql-hackers-owner+M196@hub.org Thu Mar 16 03:02:35 2000
543+
Received: from hub.org (hub.org [216.126.84.1])
544+
by candle.pha.pa.us (8.9.0/8.9.0) with ESMTP id EAA05789
545+
for <pgman@candle.pha.pa.us>; Thu, 16 Mar 2000 04:02:29 -0500 (EST)
546+
Received: from hub.org (hub.org [216.126.84.1])
547+
by hub.org (8.9.3/8.9.3) with SMTP id CAA27302;
548+
Thu, 16 Mar 2000 02:58:55 -0500 (EST)
549+
(envelope-from pgsql-hackers-owner+M196@hub.org)
550+
Received: from downtown.oche.de (root@downtown.oche.de [194.94.253.3])
551+
by hub.org (8.9.3/8.9.3) with ESMTP id CAA23907
552+
for <pgsql-hackers@postgresql.org>; Thu, 16 Mar 2000 02:37:54 -0500 (EST)
553+
(envelope-from mne@darwin.oche.de)
554+
Received: from darwin.oche.de (uucp@localhost)
555+
by downtown.oche.de (8.9.3/8.9.3/Debian/GNU) with SMTP id IAA30654
556+
for <pgsql-hackers@postgresql.org>; Thu, 16 Mar 2000 08:40:04 +0100
557+
Received: from mne by darwin.oche.de with local (Exim 3.12 #1 (Debian))
558+
id 12VUhX-0003Vz-00
559+
for <pgsql-hackers@postgreSQL.org>; Thu, 16 Mar 2000 08:28:11 +0100
560+
Date: Thu, 16 Mar 2000 08:28:11 +0100 (CET)
561+
From: Martin Neumann <mne@mne.de>
562+
Subject: [HACKERS] RfD: Design of tablespaces
563+
To: pgsql-hackers@postgresql.org
564+
MIME-Version: 1.0
565+
Content-Type: TEXT/plain; CHARSET=US-ASCII
566+
Message-Id: <E12VUhX-0003Vz-00@darwin.oche.de>
567+
Precedence: bulk
568+
Sender: pgsql-hackers-owner@hub.org
569+
Status: OR
570+
571+
572+
I have written some thoughts on the concept of tablespace
573+
down. I would be happy to get some comments on it.
574+
575+
-----------------------------------------------------------------
576+
Implementation of tablespaces within PostgreSQL
577+
- a brainstorming paper designed for general discussion -
578+
579+
by Martin Neumann, 2000/3/15
580+
581+
582+
1. What are tablespaces?
583+
-------------------------
584+
585+
Tablespaces make it possible to distribute storage objects
586+
over multiple points of storage (POS). Therefor one could
587+
say a tablespace can be a POS.
588+
589+
Example:
590+
591+
tablespace_a -----> /mnt/raid/arena0/
592+
tablespace_b -----> /mnt/raid/emc0/
593+
594+
Tablespaces can also store their data on other tablespaces:
595+
596+
tablespace_c -----> tablespace_b
597+
598+
This is quite interessting for administration purposes.
599+
600+
601+
2. What are its advantages?
602+
----------------------------
603+
604+
As you can choose a different tablespace for every storage
605+
object (table, index etc.) it is easy to improve the following
606+
aspects of your system:
607+
608+
- Reliability
609+
610+
You can put storage objects (mostly tables) you strongly depend
611+
on onto a more reliable tablespace (mirrored RAID or perhaps
612+
simply a directory which gets backuped more often than others).
613+
614+
- Speed
615+
616+
You can put storage objects you rarely need onto a rather slow
617+
tablespace and keep your quick tablespaces clean from this.
618+
619+
A fast, but more expensive RAID-Stripeset can be used more
620+
efficiently as it doesn't get filled with non-performance
621+
sensitive data.
622+
623+
But also distributing storage objects which have equal needs
624+
in sense of speed onto different tablespaces makes sense as
625+
you gain more speed by distributing data over more than one
626+
harddisk spindle.
627+
628+
- Manageability
629+
630+
You can grant and revoke rights on base of a tablespace.
631+
632+
As every storage object belongs to exactly one tablespace,
633+
you can easily group storage objects using a tablespace.
634+
635+
636+
3. What about disk I/O?
637+
------------------------
638+
639+
Tablespaces tell the storage manager only where to store
640+
the data, not how. This is the reasonable way.
641+
642+
643+
4. Usage
644+
---------
645+
646+
CREATE TABLESPACE tsname TYPE storage_type storage_options
647+
648+
Examples:
649+
650+
CREATE TABLESPACE tsemc0
651+
TYPE classic DIRECTORY /mnt/raid/emc0 NOFSYNC
652+
653+
CREATE TABLESPACE tsarena0 TYPE raw DEVICE /dev/araid/0
654+
MINSIZE 128 MAXSIZE 4096 GROW 4 32 SHRINK 2 32
655+
BLOCKSIZE 16384
656+
657+
CREATE TABLESPACE quick0 TYPE link TABLESPACE tsarena0;
658+
659+
--
660+
661+
CREATE TABLE tbname ( ... ) TABLESPACE tsname;
662+
663+
Examples:
664+
665+
CREATE TABLE foo (
666+
id int4 NOT NULL UNIQUE,
667+
name text NOT NULL
668+
) TABLESPACE tsemc0;
669+
670+
CREATE TABLE bar (
671+
id int4 NOT NULL UNIQUE,
672+
name text NOT NULL
673+
) TABLESPACE default;
674+
675+
If the tablespace isn't given, the storage objects gets created
676+
in the "default" tablespace.
677+
678+
"default" is the PostgreSQL's default tablespace and the only one
679+
which has to exist on each system.
680+
681+
--
682+
683+
ALTER TABLESPACE tsname tssettings
684+
685+
Examples:
686+
687+
ALTER TABLESPACE tsemc0 DIRECTORY /mnt/raid/emc1
688+
689+
690+
NOTE: altering tablespaces without recreating the contained
691+
storage objects introduces many problems.
692+
Realisation is difficult and won't be my first goal.
693+
694+
--
695+
696+
DROP TABLESPACE tsname [FORCE]
697+
698+
Examples:
699+
700+
DROP TABLESPACE tsarena0
701+
702+
This will immediately remove the tablespace tsarena0
703+
if it contains no storage objects.
704+
705+
If it still contains some the tablespace is marked for
706+
deletion.
707+
708+
This means:
709+
1. you can't create new storage objects in the tablespace
710+
2. if the last storage object inside gets dropped, the
711+
tablespace will be removed.
712+
713+
714+
DROP TABLESPACE tsarena0 FORCE
715+
716+
This will remove the tablespace including all contained
717+
storage objects immediately.
718+
719+
--
720+
721+
VACUUM tsname
722+
723+
Example:
724+
725+
VACUUM tsemc1
726+
727+
This will vacuum a single tablespace with all contained
728+
storage objects.
729+
-----------------------------------------------------------------
730+
731+
--
732+
Martin Neumann, Welkenrather Str. 118c, 52074 Aachen, Germany
733+
mne@mne.de - http://www.mne.de/mne/ - sms@mne.de [eMail2SMS]
734+
Tel. 0241 / 8876-080 - Mobil: 0173 / 27 69 632
735+
..------.---------------------------------------------------------
736+
| at | Inform GmbH - Abteilung Airport Logistics
737+
| work | Pascalstr. 23 - 52076 Aachen - Tel. 02408 / 9456-0
738+
|______| martin.neumann@inform-ac.com - http://www.inform-ac.com
739+
740+
741+

‎src/bin/initdb/initdb.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#
2727
#
2828
# IDENTIFICATION
29-
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.94 2000/06/0915:50:49 momjian Exp $
29+
# $Header: /cvsroot/pgsql/src/bin/initdb/Attic/initdb.sh,v 1.95 2000/06/0923:50:24 momjian Exp $
3030
#
3131
#-------------------------------------------------------------------------
3232

@@ -523,7 +523,7 @@ echo "CREATE VIEW pg_user AS \
523523
usename,\
524524
usesysid,\
525525
usecreatedb,\
526-
usecreatetable, \
526+
usecreatetable,\
527527
uselocktable,\
528528
usetrace,\
529529
usesuper,\

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp