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

Commit91595f9

Browse files
committed
Drop the vestigial "smgr" type.
Before commit3fa2bb3 this type appeared in the catalogs toselect which of several block storage mechanisms each relationused.New features under development propose to revive the concept ofdifferent block storage managers for new kinds of data accessedvia bufmgr.c, but don't need to put references to them in thecatalogs. So, avoid useless maintenance work on this type bydropping it. Update some regression tests that were referencingit where any type would do.Discussion:https://postgr.es/m/CA%2BhUKG%2BDE0mmiBZMtZyvwWtgv1sZCniSVhXYsXkvJ_Wo%2B83vvw%40mail.gmail.com
1 parent277cb78 commit91595f9

File tree

9 files changed

+17
-124
lines changed

9 files changed

+17
-124
lines changed

‎src/backend/storage/smgr/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ subdir = src/backend/storage/smgr
1212
top_builddir = ../../../..
1313
include$(top_builddir)/src/Makefile.global
1414

15-
OBJS = md.o smgr.o smgrtype.o
15+
OBJS = md.o smgr.o
1616

1717
include$(top_srcdir)/src/backend/common.mk

‎src/backend/storage/smgr/README

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ The files in this directory, and their contents, are
3131
md.cThe "magnetic disk" storage manager, which is really just
3232
an interface to the kernel's filesystem operations.
3333

34-
smgrtype.cStorage manager type -- maps string names to storage manager
35-
IDs and provides simple comparison operators. This is the
36-
regproc support for type "smgr" in the system catalogs.
37-
(This is vestigial since no columns of type smgr exist
38-
in the catalogs anymore.)
39-
4034
Note that md.c in turn relies on src/backend/storage/file/fd.c.
4135

4236

‎src/backend/storage/smgr/smgrtype.c

Lines changed: 0 additions & 80 deletions
This file was deleted.

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO201903062
56+
#defineCATALOG_VERSION_NO201903063
5757

5858
#endif

‎src/include/catalog/pg_proc.dat

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,19 +1591,6 @@
15911591
proargtypes => 'internal oid internal int2 internal',
15921592
prosrc => 'arraycontjoinsel' },
15931593

1594-
{ oid => '760', descr => 'I/O',
1595-
proname => 'smgrin', provolatile => 's', prorettype => 'smgr',
1596-
proargtypes => 'cstring', prosrc => 'smgrin' },
1597-
{ oid => '761', descr => 'I/O',
1598-
proname => 'smgrout', provolatile => 's', prorettype => 'cstring',
1599-
proargtypes => 'smgr', prosrc => 'smgrout' },
1600-
{ oid => '762', descr => 'storage manager',
1601-
proname => 'smgreq', prorettype => 'bool', proargtypes => 'smgr smgr',
1602-
prosrc => 'smgreq' },
1603-
{ oid => '763', descr => 'storage manager',
1604-
proname => 'smgrne', prorettype => 'bool', proargtypes => 'smgr smgr',
1605-
prosrc => 'smgrne' },
1606-
16071594
{ oid => '764', descr => 'large object import',
16081595
proname => 'lo_import', provolatile => 'v', proparallel => 'u',
16091596
prorettype => 'oid', proargtypes => 'text', prosrc => 'be_lo_import' },

‎src/include/catalog/pg_type.dat

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,6 @@
172172
typoutput => 'pg_ddl_command_out', typreceive => 'pg_ddl_command_recv',
173173
typsend => 'pg_ddl_command_send', typalign => 'ALIGNOF_POINTER' },
174174

175-
# OIDS 200 - 299
176-
177-
{ oid => '210', descr => 'storage manager',
178-
typname => 'smgr', typlen => '2', typbyval => 't', typcategory => 'U',
179-
typinput => 'smgrin', typoutput => 'smgrout', typreceive => '-',
180-
typsend => '-', typalign => 's' },
181-
182175
# OIDS 600 - 699
183176

184177
{ oid => '600', array_type_oid => '1017',

‎src/test/regress/expected/alter_table.out

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ALTER TABLE attmp ADD COLUMN l tid;
2929
ALTER TABLE attmp ADD COLUMN m xid;
3030
ALTER TABLE attmp ADD COLUMN n oidvector;
3131
--ALTER TABLE attmp ADD COLUMN o lock;
32-
ALTER TABLE attmp ADD COLUMN psmgr;
32+
ALTER TABLE attmp ADD COLUMN pboolean;
3333
ALTER TABLE attmp ADD COLUMN q point;
3434
ALTER TABLE attmp ADD COLUMN r lseg;
3535
ALTER TABLE attmp ADD COLUMN s path;
@@ -44,13 +44,13 @@ INSERT INTO attmp (a, b, c, d, e, f, g, i, k, l, m, n, p, q, r, s, t,
4444
VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)',
4545
'c',
4646
314159, '(1,1)', '512',
47-
'1 2 3 4 5 6 7 8','magnetic disk', '(1.1,1.1)', '(4.1,4.1,3.1,3.1)',
47+
'1 2 3 4 5 6 7 8',true, '(1.1,1.1)', '(4.1,4.1,3.1,3.1)',
4848
'(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)',
4949
'epoch', '01:00:10', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}');
5050
SELECT * FROM attmp;
51-
initial | a | b | c | d | e | f | g | i | k | l | m | n | p | q | r | s | t | v | w | x | y | z
52-
---------+---+------+------+-----+-----+---+-----------------------+---+--------+-------+-----+-----------------+---------------+-----------+-----------------------+-----------------------------+---------------------+--------------------------+------------------+-----------+-----------+-----------
53-
| 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | c | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 |magnetic disk | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | ((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | Thu Jan 01 00:00:00 1970 | @ 1 hour 10 secs | {1,2,3,4} | {1,2,3,4} | {1,2,3,4}
51+
initial | a | b | c | d | e | f | g | i | k | l | m | n |p | q | r | s | t | v | w | x | y | z
52+
---------+---+------+------+-----+-----+---+-----------------------+---+--------+-------+-----+-----------------+---+-----------+-----------------------+-----------------------------+---------------------+--------------------------+------------------+-----------+-----------+-----------
53+
| 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | c | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 |t | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | ((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | Thu Jan 01 00:00:00 1970 | @ 1 hour 10 secs | {1,2,3,4} | {1,2,3,4} | {1,2,3,4}
5454
(1 row)
5555

5656
DROP TABLE attmp;
@@ -71,7 +71,7 @@ ALTER TABLE attmp ADD COLUMN l tid;
7171
ALTER TABLE attmp ADD COLUMN m xid;
7272
ALTER TABLE attmp ADD COLUMN n oidvector;
7373
--ALTER TABLE attmp ADD COLUMN o lock;
74-
ALTER TABLE attmp ADD COLUMN psmgr;
74+
ALTER TABLE attmp ADD COLUMN pboolean;
7575
ALTER TABLE attmp ADD COLUMN q point;
7676
ALTER TABLE attmp ADD COLUMN r lseg;
7777
ALTER TABLE attmp ADD COLUMN s path;
@@ -86,13 +86,13 @@ INSERT INTO attmp (a, b, c, d, e, f, g, i, k, l, m, n, p, q, r, s, t,
8686
VALUES (4, 'name', 'text', 4.1, 4.1, 2, '(4.1,4.1,3.1,3.1)',
8787
'c',
8888
314159, '(1,1)', '512',
89-
'1 2 3 4 5 6 7 8','magnetic disk', '(1.1,1.1)', '(4.1,4.1,3.1,3.1)',
89+
'1 2 3 4 5 6 7 8',true, '(1.1,1.1)', '(4.1,4.1,3.1,3.1)',
9090
'(0,2,4.1,4.1,3.1,3.1)', '(4.1,4.1,3.1,3.1)',
9191
'epoch', '01:00:10', '{1.0,2.0,3.0,4.0}', '{1.0,2.0,3.0,4.0}', '{1,2,3,4}');
9292
SELECT * FROM attmp;
93-
initial | a | b | c | d | e | f | g | i | k | l | m | n | p | q | r | s | t | v | w | x | y | z
94-
---------+---+------+------+-----+-----+---+-----------------------+---+--------+-------+-----+-----------------+---------------+-----------+-----------------------+-----------------------------+---------------------+--------------------------+------------------+-----------+-----------+-----------
95-
| 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | c | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 |magnetic disk | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | ((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | Thu Jan 01 00:00:00 1970 | @ 1 hour 10 secs | {1,2,3,4} | {1,2,3,4} | {1,2,3,4}
93+
initial | a | b | c | d | e | f | g | i | k | l | m | n |p | q | r | s | t | v | w | x | y | z
94+
---------+---+------+------+-----+-----+---+-----------------------+---+--------+-------+-----+-----------------+---+-----------+-----------------------+-----------------------------+---------------------+--------------------------+------------------+-----------+-----------+-----------
95+
| 4 | name | text | 4.1 | 4.1 | 2 | ((4.1,4.1),(3.1,3.1)) | c | 314159 | (1,1) | 512 | 1 2 3 4 5 6 7 8 |t | (1.1,1.1) | [(4.1,4.1),(3.1,3.1)] | ((0,2),(4.1,4.1),(3.1,3.1)) | (4.1,4.1),(3.1,3.1) | Thu Jan 01 00:00:00 1970 | @ 1 hour 10 secs | {1,2,3,4} | {1,2,3,4} | {1,2,3,4}
9696
(1 row)
9797

9898
CREATE INDEX attmp_idx ON attmp (a, (d + e), b);

‎src/test/regress/expected/type_sanity.out

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@ WHERE p1.typtype not in ('c','d','p') AND p1.typname NOT LIKE E'\\_%'
7272
194 | pg_node_tree
7373
3361 | pg_ndistinct
7474
3402 | pg_dependencies
75-
210 | smgr
76-
(4 rows)
75+
(3 rows)
7776

7877
-- Make sure typarray points to a varlena array type of our own base
7978
SELECT p1.oid, p1.typname as basetype, p2.typname as arraytype,

‎src/test/regress/sql/alter_table.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ALTER TABLE attmp ADD COLUMN m xid;
4646
ALTERTABLE attmp ADD COLUMN n oidvector;
4747

4848
--ALTER TABLE attmp ADD COLUMN o lock;
49-
ALTERTABLE attmp ADD COLUMN psmgr;
49+
ALTERTABLE attmp ADD COLUMN pboolean;
5050

5151
ALTERTABLE attmp ADD COLUMN qpoint;
5252

@@ -71,7 +71,7 @@ INSERT INTO attmp (a, b, c, d, e, f, g, i, k, l, m, n, p, q, r, s, t,
7171
VALUES (4,'name','text',4.1,4.1,2,'(4.1,4.1,3.1,3.1)',
7272
'c',
7373
314159,'(1,1)','512',
74-
'1 2 3 4 5 6 7 8','magnetic disk','(1.1,1.1)','(4.1,4.1,3.1,3.1)',
74+
'1 2 3 4 5 6 7 8',true,'(1.1,1.1)','(4.1,4.1,3.1,3.1)',
7575
'(0,2,4.1,4.1,3.1,3.1)','(4.1,4.1,3.1,3.1)',
7676
'epoch','01:00:10','{1.0,2.0,3.0,4.0}','{1.0,2.0,3.0,4.0}','{1,2,3,4}');
7777

@@ -109,7 +109,7 @@ ALTER TABLE attmp ADD COLUMN m xid;
109109
ALTERTABLE attmp ADD COLUMN n oidvector;
110110

111111
--ALTER TABLE attmp ADD COLUMN o lock;
112-
ALTERTABLE attmp ADD COLUMN psmgr;
112+
ALTERTABLE attmp ADD COLUMN pboolean;
113113

114114
ALTERTABLE attmp ADD COLUMN qpoint;
115115

@@ -134,7 +134,7 @@ INSERT INTO attmp (a, b, c, d, e, f, g, i, k, l, m, n, p, q, r, s, t,
134134
VALUES (4,'name','text',4.1,4.1,2,'(4.1,4.1,3.1,3.1)',
135135
'c',
136136
314159,'(1,1)','512',
137-
'1 2 3 4 5 6 7 8','magnetic disk','(1.1,1.1)','(4.1,4.1,3.1,3.1)',
137+
'1 2 3 4 5 6 7 8',true,'(1.1,1.1)','(4.1,4.1,3.1,3.1)',
138138
'(0,2,4.1,4.1,3.1,3.1)','(4.1,4.1,3.1,3.1)',
139139
'epoch','01:00:10','{1.0,2.0,3.0,4.0}','{1.0,2.0,3.0,4.0}','{1,2,3,4}');
140140

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp