From: | Charles Gomes <charlesrg(at)outlook(dot)com> |
---|---|
To: | Ali Pouya <alipouya2(at)gmail(dot)com> |
Cc: | "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Performance on Bulk Insert to Partitioned Table |
Date: | 2013-01-17 15:01:31 |
Message-ID: | BLU002-W214AA4F5BA6A4A3C8FB1DF6AB130@phx.gbl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
________________________________
> Date: Thu, 17 Jan 2013 15:38:14 +0100
> Subject: Re: [PERFORM] Performance on Bulk Insert to Partitioned Table
> From: alipouya2(at)gmail(dot)com
> To: charlesrg(at)outlook(dot)com
> CC: pgsql-performance(at)postgresql(dot)org
>
>
> 2012/12/27 Charles Gomes
> <charlesrg(at)outlook(dot)com<mailto:charlesrg(at)outlook(dot)com>>
> So far that's what I got http://www.widesol.com/~charles/pgsql/partition.c
> I had some issues as He uses HeapTuples and on 9.2 I see a Slot.
>
> Hi Charles,
> I copied your C code partition.c and am trying to test it.
>
> For compiling you suggest :
>
> ...
> gcc -I "./" -fpic -c trigger.c
> ...
>
> Where comes the file trigger.c from ? Is that the one you find in the
> source directory
> ./src/backend/commands/ ?
>
> Thanks a lot
> Best regards
> Ali
>
>
>
Ali,
You can save the source as partition.c and use:
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fpic -DREFINT_VERBOSE -I. -I. -I"/usr/pgsql-9.2/include/server/" -D_GNU_SOURCE -c -o partition.o partition.c
gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fpic -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags -L/usr/pgsql-9.2/lib -lpgport -shared -o /usr/pgsql-9.2/lib/partition.so
To Compile you must have postgresql-devel packages.
I've added everything to github:
https://github.com/charlesrg/pgsql_partition/blob/master/partition.c
For more info check
http://www.charlesrg.com/linux/71-postgresql-partitioning-the-database-the-fastest-way
From | Date | Subject | |
---|---|---|---|
Next Message | Ali Pouya | 2013-01-17 16:03:50 | Re: Performance on Bulk Insert to Partitioned Table |
Previous Message | Ali Pouya | 2013-01-17 14:38:14 | Re: Performance on Bulk Insert to Partitioned Table |