Skip to content

Commit

Permalink
postgres: add btree, pg_control to how_to.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Safonov committed Oct 10, 2022
1 parent 2423f86 commit 1aa08e3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions format/postgres/testdata/how_to.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,29 @@ scp user@192.168.0.100:~/24599 .
```shell
head -c 16384 ./245991 > ./24599_2pages
```

### 8) Locate pg_control file
`global/pg_control` inside PGDATA

### 9) Locate btree index
Get info about index:
```psql
\d pgbench_accounts
Table "public.pgbench_accounts"
Column | Type | Collation | Nullable | Default
----------+---------------+-----------+----------+---------
aid | integer | | not null |
bid | integer | | |
abalance | integer | | |
filler | character(84) | | |
Indexes:
"pgbench_accounts_pkey" PRIMARY KEY, btree (aid)
```
Then get path of pgbench_accounts_pkey:
```psql
select pg_relation_filepath('pgbench_accounts_pkey');
pg_relation_filepath
----------------------
base/13746/24596
```
`base/13746/24596` - is a path inside PGDATA of btree index pgbench_accounts_pkey.

0 comments on commit 1aa08e3

Please sign in to comment.