Skip to content

Commit

Permalink
Support extra flags/options within scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
petergeoghegan committed Sep 28, 2018
1 parent 67e2ea7 commit 0119c9a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
3 changes: 2 additions & 1 deletion __open_relation
Expand Up @@ -92,7 +92,8 @@ else
fi

# Generate tags at a path that we know wxHexEditor will look for them:
if ! ./pg_hexedit -D "$ATTRLIST" -z -R "$MIN_BLOCK_TAGS" "$MAX_BLOCK_TAGS" "$FULLPATH" > "$FULLPATH.tags"
# shellcheck disable=SC2086
if ! ./pg_hexedit $EXTRAFLAGS -D "$ATTRLIST" -z -R "$MIN_BLOCK_TAGS" "$MAX_BLOCK_TAGS" "$FULLPATH" > "$FULLPATH.tags"
then
echo "Error encountered by pg_hexedit. Could not generate all tags."
echo "You may still wish to run: $HEXEDITOR $FULLPATH"
Expand Down
24 changes: 23 additions & 1 deletion hexedit.cfg
Expand Up @@ -6,7 +6,9 @@
export HEXEDITOR="../wxHexEditor/wxHexEditor"

# Only blocks in the range $MIN_BLOCK_TAGS - $MAX_BLOCK_TAGS receive tags:
# (Note that setting MIN_BLOCK_TAGS>0 will disable fallback download of files.)
# (Note that setting MIN_BLOCK_TAGS to anything other than 0 will prevent the
# psql remote download fallback from being used. This is due to an
# implementation restriction that may be lifted in the future.)
export MIN_BLOCK_TAGS=0
export MAX_BLOCK_TAGS=200

Expand All @@ -21,4 +23,24 @@ export FONTSIZE=10
#export PGDATABASE="regression"
#export PGUSER="postgres"
#export PGPASSWORD="password"
#export PGHOST=localhost
#export PGPORT=5432

# Templates for using pg_hexedit options to limit annotation overhead follow

# Only emit whole-page annotations for leaf pages.
#
# Leaf pages are typically the great majority within nbtree, GiST, GIN, or
# SP-GiST index relations. This option is useful with larger indexes in cases
# where only the root and other internal pages are of interest.

#export EXTRAFLAGS="-l"

# Don't emit annotations for pages where the page header LSN is before
# argument.
#
# Tip: The latest checkpoint's REDO location can be a helpful generic cutoff
# point. Run pg_controldata to get this information. Be sure to do so before
# a convenience script issues its own CHECKPOINT.

#export EXTRAFLAGS="-x 0/167F070"

0 comments on commit 0119c9a

Please sign in to comment.