Headers dependencies cleanup

Поиск
Список
Период
Сортировка
От Zdenek Kotala
Тема Headers dependencies cleanup
Дата
Msg-id 47207BB3.5070706@sun.com
обсуждение исходный текст
Ответы Re: Headers dependencies cleanup  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-patches
During my work I found some header files, which include useless headers
and on other way there are some headers which silently assume that
requested header will be included by some other headers file.

This patch fixes these dependencies around bufpage.h, bufmgr.h


        Zdenek
Index: src/backend/access/transam/xlogutils.c
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/backend/access/transam/xlogutils.c,v
retrieving revision 1.50
diff -c -r1.50 xlogutils.c
*** src/backend/access/transam/xlogutils.c    2 May 2007 23:18:03 -0000    1.50
--- src/backend/access/transam/xlogutils.c    25 Oct 2007 09:16:59 -0000
***************
*** 18,23 ****
--- 18,24 ----
  #include "postgres.h"

  #include "access/xlogutils.h"
+ #include "storage/bufmgr.h"
  #include "storage/bufpage.h"
  #include "storage/smgr.h"
  #include "utils/hsearch.h"
Index: src/backend/nodes/print.c
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/backend/nodes/print.c,v
retrieving revision 1.85
diff -c -r1.85 print.c
*** src/backend/nodes/print.c    22 Feb 2007 22:00:23 -0000    1.85
--- src/backend/nodes/print.c    25 Oct 2007 09:16:59 -0000
***************
*** 24,30 ****
  #include "optimizer/clauses.h"
  #include "parser/parsetree.h"
  #include "utils/lsyscache.h"
!

  /*
   * print
--- 24,30 ----
  #include "optimizer/clauses.h"
  #include "parser/parsetree.h"
  #include "utils/lsyscache.h"
! #include "lib/stringinfo.h"

  /*
   * print
Index: src/backend/nodes/tidbitmap.c
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/backend/nodes/tidbitmap.c,v
retrieving revision 1.13
diff -c -r1.13 tidbitmap.c
*** src/backend/nodes/tidbitmap.c    20 Sep 2007 17:56:31 -0000    1.13
--- src/backend/nodes/tidbitmap.c    25 Oct 2007 09:16:59 -0000
***************
*** 36,41 ****
--- 36,42 ----
  #include "nodes/tidbitmap.h"
  #include "storage/bufpage.h"
  #include "utils/hsearch.h"
+ #include "nodes/nodes.h"

  /*
   * The maximum number of tuples per page is not large (typically 256 with
Index: src/backend/postmaster/postmaster.c
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/backend/postmaster/postmaster.c,v
retrieving revision 1.542
diff -c -r1.542 postmaster.c
*** src/backend/postmaster/postmaster.c    26 Sep 2007 22:36:30 -0000    1.542
--- src/backend/postmaster/postmaster.c    25 Oct 2007 09:16:59 -0000
***************
*** 93,98 ****
--- 93,99 ----
  #endif

  #include "access/transam.h"
+ #include "access/xlog.h"
  #include "bootstrap/bootstrap.h"
  #include "catalog/pg_control.h"
  #include "lib/dllist.h"
Index: src/backend/storage/buffer/bufmgr.c
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v
retrieving revision 1.226
diff -c -r1.226 bufmgr.c
*** src/backend/storage/buffer/bufmgr.c    25 Sep 2007 22:11:48 -0000    1.226
--- src/backend/storage/buffer/bufmgr.c    25 Oct 2007 09:16:59 -0000
***************
*** 37,42 ****
--- 37,43 ----
  #include "postmaster/bgwriter.h"
  #include "storage/buf_internals.h"
  #include "storage/bufpage.h"
+ #include "storage/bufmgr.h"
  #include "storage/ipc.h"
  #include "storage/proc.h"
  #include "storage/smgr.h"
Index: src/backend/utils/adt/domains.c
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/backend/utils/adt/domains.c,v
retrieving revision 1.5
diff -c -r1.5 domains.c
*** src/backend/utils/adt/domains.c    5 Jan 2007 22:19:40 -0000    1.5
--- src/backend/utils/adt/domains.c    25 Oct 2007 09:16:59 -0000
***************
*** 35,40 ****
--- 35,41 ----
  #include "executor/executor.h"
  #include "utils/builtins.h"
  #include "utils/lsyscache.h"
+ #include "lib/stringinfo.h"


  /*
Index: src/include/access/heapam.h
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/include/access/heapam.h,v
retrieving revision 1.127
diff -c -r1.127 heapam.h
*** src/include/access/heapam.h    20 Sep 2007 17:56:32 -0000    1.127
--- src/include/access/heapam.h    25 Oct 2007 11:09:29 -0000
***************
*** 18,27 ****
--- 18,29 ----
  #include "access/relscan.h"
  #include "access/sdir.h"
  #include "access/tupmacs.h"
+ #include "access/xlog.h"
  #include "access/xlogutils.h"
  #include "nodes/primnodes.h"
  #include "storage/block.h"
  #include "storage/lmgr.h"
+ #include "storage/bufpage.h"
  #include "utils/rel.h"
  #include "utils/tqual.h"

Index: src/include/access/htup.h
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/include/access/htup.h,v
retrieving revision 1.94
diff -c -r1.94 htup.h
*** src/include/access/htup.h    20 Sep 2007 17:56:32 -0000    1.94
--- src/include/access/htup.h    25 Oct 2007 10:04:04 -0000
***************
*** 16,21 ****
--- 16,22 ----

  #include "storage/itemptr.h"
  #include "storage/relfilenode.h"
+ #include "storage/bufpage.h"

  /*
   * MaxTupleAttributeNumber limits the number of (user) columns in a tuple.
Index: src/include/access/relscan.h
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/include/access/relscan.h,v
retrieving revision 1.57
diff -c -r1.57 relscan.h
*** src/include/access/relscan.h    20 Sep 2007 17:56:32 -0000    1.57
--- src/include/access/relscan.h    25 Oct 2007 10:02:57 -0000
***************
*** 15,21 ****
  #define RELSCAN_H

  #include "access/skey.h"
! #include "storage/bufpage.h"
  #include "utils/tqual.h"


--- 15,22 ----
  #define RELSCAN_H

  #include "access/skey.h"
! #include "access/htup.h"
! #include "storage/bufmgr.h"
  #include "utils/tqual.h"


Index: src/include/access/tuptoaster.h
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/include/access/tuptoaster.h,v
retrieving revision 1.35
diff -c -r1.35 tuptoaster.h
*** src/include/access/tuptoaster.h    6 Apr 2007 04:21:43 -0000    1.35
--- src/include/access/tuptoaster.h    25 Oct 2007 09:16:59 -0000
***************
*** 15,20 ****
--- 15,21 ----

  #include "access/htup.h"
  #include "storage/bufpage.h"
+ #include "utils/rel.h"

  /*
   * This enables de-toasting of index entries.  Needed until VACUUM is
Index: src/include/storage/bufpage.h
===================================================================
RCS file: /zfs_data/cvs_pgsql/cvsroot/pgsql/src/include/storage/bufpage.h,v
retrieving revision 1.75
diff -c -r1.75 bufpage.h
*** src/include/storage/bufpage.h    21 Sep 2007 21:25:42 -0000    1.75
--- src/include/storage/bufpage.h    25 Oct 2007 09:17:19 -0000
***************
*** 14,20 ****
  #ifndef BUFPAGE_H
  #define BUFPAGE_H

- #include "storage/bufmgr.h"
  #include "storage/item.h"
  #include "storage/off.h"
  #include "access/xlog.h"
--- 14,19 ----

В списке pgsql-patches по дате отправления:

Предыдущее
От: Zdenek Kotala
Дата:
Сообщение: two new chklocale aliases
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: two new chklocale aliases