hexdump -C

os: centos 7.4.1708
db: postgresql 10.11

版本

# cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core) 
# 
# 
# yum list installed |grep -i postgresql
postgresql11.x86_64                11.8-1PGDG.rhel7                    @pgdg11  
postgresql11-contrib.x86_64        11.8-1PGDG.rhel7                    @pgdg11  
postgresql11-debuginfo.x86_64      11.5-1PGDG.rhel7                    @pgdg11  
postgresql11-devel.x86_64          11.8-1PGDG.rhel7                    @pgdg11  
postgresql11-docs.x86_64           11.8-1PGDG.rhel7                    @pgdg11  
postgresql11-libs.x86_64           11.8-1PGDG.rhel7                    @pgdg11  
postgresql11-llvmjit.x86_64        11.8-1PGDG.rhel7                    @pgdg11  
postgresql11-odbc.x86_64           12.01.0000-1PGDG.rhel7              @pgdg11  
postgresql11-plperl.x86_64         11.8-1PGDG.rhel7                    @pgdg11  
postgresql11-plpython.x86_64       11.8-1PGDG.rhel7                    @pgdg11  
postgresql11-pltcl.x86_64          11.8-1PGDG.rhel7                    @pgdg11  
postgresql11-server.x86_64         11.8-1PGDG.rhel7                    @pgdg11  
postgresql11-tcl.x86_64            2.4.0-2.rhel7.1                     @pgdg11  
postgresql11-test.x86_64           11.8-1PGDG.rhel7                    @pgdg11

# su - postgres
Last login: Wed Jan 15 18:34:12 CST 2020 on pts/0
$
$
$ psql -c "select version();"
                                                 version                                                 
---------------------------------------------------------------------------------------------------------
 PostgreSQL 11.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit
(1 row)

hexdump -C

# su - postgres
$ psql

postgres=# create table tmp_t0 (
 id int8,
 name varchar(100)
);

postgres=# insert into tmp_t0 select 1,'我';

postgres=# insert into tmp_t0 select 1,'a0';

postgres=# checkpoint;

postgres=# select * from tmp_t0;
 id | name 
----+------
  1 | 我
  1 | a0
(2 rows)

postgres=# select pg_relation_filepath('public.tmp_t0');
 pg_relation_filepath 
----------------------
 base/13808/309910
(1 row)

$ echo $PGDATA
/var/lib/pgsql/10/data

$ hexdump -C /var/lib/pgsql/10/data/base/13808/309910
00000000  0b 00 00 00 a0 8e 23 d2  00 00 00 00 20 00 b0 1f  |......#..... ...|
00000010  00 20 04 20 00 00 00 00  d8 9f 48 00 b0 9f 46 00  |. . ......H...F.|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00001fb0  d8 aa 0a 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00001fc0  02 00 02 00 02 08 18 00  01 00 00 00 00 00 00 00  |................|
00001fd0  07 61 30 00 00 00 00 00  d7 aa 0a 00 00 00 00 00  |.a0.............|
00001fe0  00 00 00 00 00 00 00 00  01 00 02 00 02 09 18 00  |................|
00001ff0  01 00 00 00 00 00 00 00  09 e6 88 91 00 00 00 00  |................|
00002000

茫然,這個怎麼看?只看到個 a0

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章