Обсуждение: pgsql: Split the shared-memory array of PGPROC pointers out of the

Поиск
Список
Период
Сортировка

pgsql: Split the shared-memory array of PGPROC pointers out of the

От
tgl@svr1.postgresql.org (Tom Lane)
Дата:
Log Message:
-----------
Split the shared-memory array of PGPROC pointers out of the sinval
communication structure, and make it its own module with its own lock.
This should reduce contention at least a little, and it definitely makes
the code seem cleaner.  Per my recent proposal.

Modified Files:
--------------
    pgsql/src/backend/access/heap:
        heapam.c (r1.190 -> r1.191)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/heap/heapam.c.diff?r1=1.190&r2=1.191)
    pgsql/src/backend/access/transam:
        README (r1.2 -> r1.3)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/README.diff?r1=1.2&r2=1.3)
        multixact.c (r1.3 -> r1.4)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/multixact.c.diff?r1=1.3&r2=1.4)
        subtrans.c (r1.7 -> r1.8)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/subtrans.c.diff?r1=1.7&r2=1.8)
        varsup.c (r1.63 -> r1.64)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/varsup.c.diff?r1=1.63&r2=1.64)
        xact.c (r1.200 -> r1.201)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xact.c.diff?r1=1.200&r2=1.201)
        xlog.c (r1.191 -> r1.192)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c.diff?r1=1.191&r2=1.192)
    pgsql/src/backend/catalog:
        index.c (r1.255 -> r1.256)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/index.c.diff?r1=1.255&r2=1.256)
    pgsql/src/backend/commands:
        dbcommands.c (r1.156 -> r1.157)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/dbcommands.c.diff?r1=1.156&r2=1.157)
        vacuum.c (r1.308 -> r1.309)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuum.c.diff?r1=1.308&r2=1.309)
        vacuumlazy.c (r1.53 -> r1.54)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/vacuumlazy.c.diff?r1=1.53&r2=1.54)
    pgsql/src/backend/storage/buffer:
        buf_init.c (r1.72 -> r1.73)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/buffer/buf_init.c.diff?r1=1.72&r2=1.73)
        bufmgr.c (r1.188 -> r1.189)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/buffer/bufmgr.c.diff?r1=1.188&r2=1.189)
    pgsql/src/backend/storage/ipc:
        Makefile (r1.18 -> r1.19)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/Makefile.diff?r1=1.18&r2=1.19)
        ipci.c (r1.75 -> r1.76)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/ipci.c.diff?r1=1.75&r2=1.76)
        sinval.c (r1.75 -> r1.76)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/sinval.c.diff?r1=1.75&r2=1.76)
        sinvaladt.c (r1.58 -> r1.59)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/sinvaladt.c.diff?r1=1.58&r2=1.59)
    pgsql/src/backend/storage/lmgr:
        lmgr.c (r1.73 -> r1.74)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/lmgr.c.diff?r1=1.73&r2=1.74)
        proc.c (r1.157 -> r1.158)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/proc.c.diff?r1=1.157&r2=1.158)
    pgsql/src/backend/utils/adt:
        misc.c (r1.42 -> r1.43)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/misc.c.diff?r1=1.42&r2=1.43)
    pgsql/src/backend/utils/init:
        postinit.c (r1.146 -> r1.147)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/postinit.c.diff?r1=1.146&r2=1.147)
    pgsql/src/backend/utils/time:
        tqual.c (r1.88 -> r1.89)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/time/tqual.c.diff?r1=1.88&r2=1.89)
    pgsql/src/include/storage:
        buf_internals.h (r1.77 -> r1.78)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/buf_internals.h.diff?r1=1.77&r2=1.78)
        lwlock.h (r1.18 -> r1.19)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/lwlock.h.diff?r1=1.18&r2=1.19)
        proc.h (r1.77 -> r1.78)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/proc.h.diff?r1=1.77&r2=1.78)
        sinval.h (r1.40 -> r1.41)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/sinval.h.diff?r1=1.40&r2=1.41)
        sinvaladt.h (r1.37 -> r1.38)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/sinvaladt.h.diff?r1=1.37&r2=1.38)
    pgsql/src/include/utils:
        tqual.h (r1.56 -> r1.57)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/tqual.h.diff?r1=1.56&r2=1.57)

Added Files:
-----------
    pgsql/src/backend/storage/ipc:
        procarray.c (r1.1)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/procarray.c?rev=1.1&content-type=text/x-cvsweb-markup)
    pgsql/src/include/storage:
        procarray.h (r1.1)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/procarray.h?rev=1.1&content-type=text/x-cvsweb-markup)

Re: pgsql: Split the shared-memory array of PGPROC pointers out of the

От
Alvaro Herrera
Дата:
On Thu, May 19, 2005 at 06:35:48PM -0300, Tom Lane wrote:
> Log Message:
> -----------
> Split the shared-memory array of PGPROC pointers out of the sinval
> communication structure, and make it its own module with its own lock.
> This should reduce contention at least a little, and it definitely makes
> the code seem cleaner.  Per my recent proposal.

Excellent.  May I suggest the following so pgindent does not mess up
this comment:

--
Alvaro Herrera (<alvherre[a]surnet.cl>)
"El realista sabe lo que quiere; el idealista quiere lo que sabe" (Anónimo)

Вложения

Re: pgsql: Split the shared-memory array of PGPROC pointers out of the

От
Tom Lane
Дата:
Alvaro Herrera <alvherre@surnet.cl> writes:
> Excellent.  May I suggest the following so pgindent does not mess up
> this comment:

Done, although I think it may not be necessary anymore.  pgindent seems
less eager to reformat comments than it once was.  (Bruce, any info
on that?)

            regards, tom lane

Re: pgsql: Split the shared-memory array of PGPROC pointers

От
Bruce Momjian
Дата:
Tom Lane wrote:
> Alvaro Herrera <alvherre@surnet.cl> writes:
> > Excellent.  May I suggest the following so pgindent does not mess up
> > this comment:
>
> Done, although I think it may not be necessary anymore.  pgindent seems
> less eager to reformat comments than it once was.  (Bruce, any info
> on that?)

I don't see any CVS commit that indicates a change.  What does happen is
that comments that start in the first column are not wrapped, but others
are unless the dashes are added like Alvaro suggested.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: pgsql: Split the shared-memory array of PGPROC pointers out of the

От
Tom Lane
Дата:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I don't see any CVS commit that indicates a change.  What does happen is
> that comments that start in the first column are not wrapped, but others
> are unless the dashes are added like Alvaro suggested.

Ah.  I did not know there was a dependency on indentation.

            regards, tom lane

Re: pgsql: Split the shared-memory array of PGPROC pointers

От
Bruce Momjian
Дата:
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > I don't see any CVS commit that indicates a change.  What does happen is
> > that comments that start in the first column are not wrapped, but others
> > are unless the dashes are added like Alvaro suggested.
>
> Ah.  I did not know there was a dependency on indentation.

Yea, I looked in the BSD indent manual and then ran tests to see the
behavior.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073