pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Disallow setting fillfactor for TOAST tables.
2+ messages / 2 participants
[nested] [flat]

* pgsql: Disallow setting fillfactor for TOAST tables.
@ 2009-04-04 00:45  Alvaro Herrera <alvherre@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: alvherre@postgresql.org @ 2009-04-04 00:45 UTC (permalink / raw)
  To: pgsql-committers

Log Message:
-----------
Disallow setting fillfactor for TOAST tables.

To implement this without almost duplicating the reloption table, treat
relopt_kind as a bitmask instead of an integer value.  This decreases the
range of allowed values, but it's not clear that there's need for that much
values anyway.

This patch also makes heap_reloptions explicitly a no-op for relation kinds
other than heap and TOAST tables.

Patch by ITAGAKI Takahiro with minor edits from me.  (In particular I removed
the bit about adding relation kind to an error message, which I intend to
commit separately.)

Modified Files:
--------------
    pgsql/src/backend/access/common:
        reloptions.c (r1.24 -> r1.25)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/common/reloptions.c?r1=1.24&r2...)
    pgsql/src/include/access:
        reloptions.h (r1.13 -> r1.14)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/reloptions.h?r1=1.13&r2=1.14)




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Fix potential integer handling issue in radixtree.h.
@ 2024-03-25 03:10  Masahiko Sawada <msawada@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Masahiko Sawada @ 2024-03-25 03:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix potential integer handling issue in radixtree.h.

Coverity complained about the integer handling issue; if we start with
an arbitrary non-negative shift value, the loop may decrement it down
to something less than zero before exiting. This commit adds an
assertion to make sure the 'shift' is always 0 after the loop, and
uses 0 as the shift to get the key chunk in the following operation.

Introduced by ee1b30f12.

Reported-by: Tom Lane as per coverity
Reviewed-by: Tom Lane
Discussion: https://postgr.es/m/2089517.1711299216%40sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/80d5d4937c168af46c976feebe24765ad76eb540

Modified Files
--------------
src/include/lib/radixtree.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2024-03-25 03:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-04-04 00:45 pgsql: Disallow setting fillfactor for TOAST tables. Alvaro Herrera <alvherre@postgresql.org>
2024-03-25 03:10 pgsql: Fix potential integer handling issue in radixtree.h. Masahiko Sawada <msawada@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox