Re: estimating # of distinct values - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: estimating # of distinct values
Date
Msg-id E59E6F6D-7B6B-4149-BB32-C713A14D0652@nasby.net
Whole thread Raw
In response to Re: estimating # of distinct values  (Tomas Vondra <tv@fuzzy.cz>)
Responses Re: estimating # of distinct values  (Tomas Vondra <tv@fuzzy.cz>)
List pgsql-hackers
> A resource fork? Not sure what you mean, could you describe it in more
> detail?

Ooops, resource forks are a filesystem thing; we call them relation forks. From src/backend/storage/smgr/README:

Relation Forks
==============

Since 8.4, a single smgr relation can be comprised of multiple physical
files, called relation forks. This allows storing additional metadata like
Free Space information in additional forks, which can be grown and truncated
independently of the main data file, while still treating it all as a single
physical relation in system catalogs.

It is assumed that the main fork, fork number 0 or MAIN_FORKNUM, always
exists. Fork numbers are assigned in src/include/storage/relfilenode.h.
Functions in smgr.c and md.c take an extra fork number argument, in addition
to relfilenode and block number, to identify which relation fork you want to
access. Since most code wants to access the main fork, a shortcut version of
ReadBuffer that accesses MAIN_FORKNUM is provided in the buffer manager for
convenience.
--
Jim C. Nasby, Database Architect                   jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net




pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: system views for walsender activity
Next
From: Cédric Villemain
Date:
Subject: Re: Streaming base backups