Commit b06d8e5
committed
Accept "B" in all memory-unit GUCs, and improve error messages.
Commit 6e7baa3 added support for "B" unit, for specifying config options
in bytes. However, it was only accepted in GUC_UNIT_BYTE settings,
wal_segment_size and track_activity_query_size, and not e.g. in work_mem.
This patch makes it consistent, so that "B" accepted in all the same
contexts where "kB", "MB", and so forth are accepted.
Add "B" to the list of accepted units in the error hint, along with "kB",
"MB", etc.
Add an entry in the conversion table for "TB" to "B" conversion. A terabyte
is out of range for any GUC_UNIT_BYTE option, so you always get an "out of
range" error with that, but without it, you get a confusing error message
that claims that "TB" is not an accepted unit, with a hint that nevertheless
lists "TB" as an accepted unit.
Reviewed-by: Alexander Korotkov, Andres Freund
Discussion: https://www.postgresql.org/message-id/1bfe7f4a-7e22-aa6e-7b37-f4d222ed2d67@iki.fi1 parent e41c2b0 commit b06d8e5
1 file changed
+12
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
705 | 705 | | |
706 | 706 | | |
707 | 707 | | |
708 | | - | |
| 708 | + | |
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
| |||
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
721 | | - | |
| 721 | + | |
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
725 | 731 | | |
726 | 732 | | |
727 | 733 | | |
| |||
731 | 737 | | |
732 | 738 | | |
733 | 739 | | |
| 740 | + | |
734 | 741 | | |
735 | 742 | | |
736 | 743 | | |
737 | 744 | | |
738 | 745 | | |
| 746 | + | |
739 | 747 | | |
740 | 748 | | |
741 | 749 | | |
742 | 750 | | |
743 | 751 | | |
| 752 | + | |
744 | 753 | | |
745 | 754 | | |
746 | 755 | | |
747 | 756 | | |
748 | 757 | | |
| 758 | + | |
749 | 759 | | |
750 | 760 | | |
751 | 761 | | |
| |||
0 commit comments