Commit Graph

1568 Commits

Author SHA1 Message Date
Dimitri Fontaine
4ccf5c5ad0 Build the buildapp binary in build/bin. 2014-04-22 17:14:00 +02:00
Dimitri Fontaine
3a9bc9db0f Switch the default memory watch to on. 2014-04-22 17:13:36 +02:00
Dimitri Fontaine
9fa638e233 Handle NIL values in transform functions.
When declaring types of arguments (mainly done for hinting the Common
Lisp compiler into generating more efficient code), it's important to
account for the possibility of the arguments being NIL, of NULL type.

That's been made clear in the way the projection function is now
generated in src/sources/source.lisp in project-fields function, with
all the arguments now being &optional so that we are able to cope with
ragged CSV files.

The only expected change from this patch is missing warnings in some
test cases, such as test/reformat.load, test/fixed.load and
test/archive.load.
2014-04-18 22:51:30 +02:00
Dimitri Fontaine
1af517323c Attempt to fix the OpenSSL loading situation.
For the generated binary to be really portable, we need to be able to
open openssl 1.0.1 even when we've been built against openssl 1.0.0.

A way to achieve that with SBCL is by forcing the unloading of the lib
at image saving time and register a hook to load it again at image init
time. Using the proper API, CFFI will happily load the available file
for the lib rather than insisting on loading the exact same one than
found on the build machine.
2014-04-18 22:24:11 +02:00
Dimitri Fontaine
a39de0012e Simplify using the Makefile for non-CL-hackers.
Try harder not to mix Common Lisp Developers profiles with main pgloader
expected audience who will not have a Quicklisp system ready, by doing
our magic Quicklisp calls in a pgloader specific directory.

That might impact #45 badly as the homebrew formula should need to now
install its Quicklisp distributions elsewhere, but it should be easy
enough to fix.

Also, systematically `git pull` from the local-projects dependencies we
need to work with to avoid some bad surprises to our users.
2014-04-14 15:36:19 +02:00
Dimitri Fontaine
b1333c936c Merge pull request #45 from benesch/homebrew
Homebrew support
2014-04-07 12:29:38 +02:00
Nikhil Benesch
73299237fb Makefile: add standalone target that doesn't install quicklisp 2014-04-06 19:59:34 -04:00
Nikhil Benesch
7ec2ca30e8 pgloader.1: include compiled man page for packaging convenience
Allows packaging systems like Homebrew to install manual pages
automatically for users without introducing a dependency on the manual
page build system.
2014-04-06 19:59:31 -04:00
Nikhil Benesch
56fd8e3368 Makefile: use ronn to generate docs 2014-04-06 19:59:02 -04:00
Nikhil Benesch
f6b63ade0a pgloader.1.md: remove trailing whitespace 2014-04-06 19:59:02 -04:00
Nikhil Benesch
80f28f2477 pgloader.1.md: update formatting for ronn compatibility
Ronn is an alternative to pandoc for generating Groff man pages from
Markdown, and seems to produce better-looking man pages.
2014-04-06 19:58:59 -04:00
Dimitri Fontaine
e7d828e696 Get rid of special versions of postmodern and cl-csv, fix #44.
The patches we made against those systems made it to Quicklisp. Next on
the list is Qmynd, which should be ok to go at the next Quicklisp release.
2014-03-31 18:07:55 -04:00
Dimitri Fontaine
7ed5d4e777 Document --debug --verbose (client-min-messages data).
That should help fixing #48 where this level of information is required.
2014-03-28 09:39:38 +01:00
Dimitri Fontaine
9e3c6130ff Implement Google Analytics on pgloader.tapoueh.org 2014-03-25 21:19:00 +01:00
Dimitri Fontaine
114d2fedbc Another try at fixing #40.
The babel character-decoding-error condition is exposing both its
internal BUFFER and the current OCTETS, and it seems we should refer to
the BUFFER in our error reporting...
2014-03-04 15:54:31 +01:00
Dimitri Fontaine
654b3f5531 Fix the condition handler fix for #40.
Refrain from trying to display the character where we found a decoding
error when the error actually happens at end-of-input-in-character...
2014-03-04 14:20:27 +01:00
Dimitri Fontaine
56f3da28ed Fix #20 by skipping table and view missing from the catalogs. 2014-03-04 14:01:04 +01:00
Dimitri Fontaine
4d6def8105 Move some MySQL old import/export functions apart... 2014-03-04 13:52:48 +01:00
Dimitri Fontaine
46fd6632f2 Fix #40 by providing a per-table forced-encoding option.
This patch takes benefits from the recent patch
62fc85a1cf
so that you will need to freshen your local Qmynd copy if you want to
test from sources.
2014-03-03 23:39:22 +01:00
Dimitri Fontaine
1461cda1c0 Improve MySQL encoding errors handling.
When it's not possible to decode a MySQL value in the proper given
encoding, automatically replace the value with nil and be quite verbose
about it by logging an error.
2014-03-02 22:44:06 +01:00
Dimitri Fontaine
b033aed88b Some more testing. 2014-03-02 01:27:02 +01:00
Dimitri Fontaine
7befe27807 Add encoding errors to the csv-error.load test. 2014-03-02 01:27:02 +01:00
Dimitri Fontaine
42635c70bd Refrain from controling the encoding in pgloader, qmynd now handles it. 2014-03-02 01:27:02 +01:00
Dimitri Fontaine
f92817191e Merge pull request #41 from JimPanic/patch-2
Updated shebang line
2014-02-24 17:27:11 +01:00
Dimitri Fontaine
7fa95c1135 Fix bug #39 wherein unix domain sockets didn't make it properly to cl-postgres. 2014-02-24 17:23:17 +01:00
Alexander Pánek
cc2c21ae42 Updated shebang line
Not everyone has SBCL installed in /usr/bin/sbcl and sometimes one wants to test other versions of SBCL or just not install the official Debian/Ubuntu packages. I have tested this on Ubuntu precise and it worked for me.

I got the info this would work from here:
https://bugs.launchpad.net/sbcl/+bug/1284148
2014-02-24 16:34:19 +01:00
Dimitri Fontaine
14a588cb9f Merge pull request #36 from chanmix51/master
Updated README with build informations
2014-02-17 16:41:23 +01:00
Dimitri Fontaine
241e6e4da1 Merge pull request #37 from JimPanic/patch-1
Removed tinyint cast rule
2014-02-17 16:36:49 +01:00
Alexander Pánek
97109153f4 Removed tinyint cast rule
This rule has overridden the default rule for `tinyint(1)` and instead of placing `boolean`, it kept the typemod and placed `boolean(1)` into the resulting query.
2014-02-17 16:14:27 +01:00
Grégoire HUBERT
5ff2b9c4b3 Added minimum SBCL version to compile 2014-02-17 14:18:16 +01:00
Grégoire HUBERT
3f3e4b0a25 Updated compile dependency list
To compile pgloader on a freshly bootstraped VM, it is necessary
        to provide the exhaustive list of Debian packages to install.
2014-02-17 11:10:08 +01:00
Dimitri Fontaine
643875a266 Improve CSV error handling, thanks to cl-csv continue restart. 2014-02-08 17:51:15 +01:00
Dimitri Fontaine
8f6915d626 Fix issur #29, using proper quoting.
The patch from pull request #30 was hard-coding the PostgreSQL side quoting,
we are using the quote_ident() function instead, as it's now available in
every PostgreSQL production release (8.4 included).
2014-02-08 17:31:59 +01:00
Dimitri Fontaine
a6e2c6364f Cleanup: the MySQL list-transform function is not used anymore. 2014-02-08 17:28:04 +01:00
Dimitri Fontaine
dbfd8cf06c Implement new CSV option "lines terminated by", fixes #23. 2014-02-04 20:58:46 +01:00
Dimitri Fontaine
01c67f7625 Merge pull request #28 from fpauser/fpauser_typo_fixes
Fixed some typos
2014-02-04 01:00:59 -08:00
Falk Pauser
219aedd4de Fixed some typos 2014-02-04 00:30:48 +01:00
Dimitri Fontaine
8100b2b985 Typo fix in the Install docs. 2014-02-03 21:26:33 +01:00
Dimitri Fontaine
ee20bdd0b5 Document the "fields not enclosed" option... 2014-01-29 17:26:32 +01:00
Dimitri Fontaine
1844f40ad1 Fix map-push-queue to ensure we send an :end-of-data message no matter what. 2014-01-28 21:05:37 +01:00
Dimitri Fontaine
a8b0f91f37 Allow optional control of batch memory footprint, see #16 and #22.
With the new internal setting *copy-batch-size* it's now possible to
instruct pgloader to close batches early (before *copy-batch-rows* limit)
when crossing the byte count threshold.

When set to 20 MB it allows the new test case (exhausted) to pass under SBCL
and CCL, and there's no measurable cost when *copy-batch-size* is set to
nil (its default value) in the testing done.

This patch is published without any way to tune the values from the command
language yet, that's the next step once its been proven effective.
2014-01-26 23:22:18 +01:00
Dimitri Fontaine
ceec4780f2 Improve log message pointing to the log file (use the true name). 2014-01-26 21:25:27 +01:00
Dimitri Fontaine
ca0d25d3b2 Provide a new log level, :data, activated when both --debug and --verbose are used. 2014-01-26 17:49:20 +01:00
Dimitri Fontaine
b60f40a5fa Fix transform function date-with-no-separator. 2014-01-26 17:48:45 +01:00
Dimitri Fontaine
db947e1467 Rework reader and writer data exchange.
With this patch, the whole data massaging and final formating into the
PostgreSQL COPY TEXT format is done by the reader thread, which publishes a
batch at a time in the communication channel: a lparallel.queue object.

Before that, the raw vectors where pushed directly in the queue, offering
more flexibility to adjust to the reader and writer IO rates and
capabilities, but impeding the ability of the Garbage Collector: data still
in the queue was not collected even if not needed anymore.

The new model also uses less memory, and allows a better control over what
amount of data stays in memory. The new *concurrent-batches* parameter
should be key to being able to process huge rows.

The intent is to offering a way for the users to tune *concurrent-batches*
down to 1 for sources with massive per-row memory footprint. Even better
would be to find a way to automatically adjust the setting without spending
too much time counting the bytes we're batching.

Preliminary tests show no sensible impact on performances from this patch,
even some improvements in cases.
2014-01-25 23:54:49 +01:00
Dimitri Fontaine
41add15397 In passing indentation change only. 2014-01-25 23:41:10 +01:00
Dimitri Fontaine
8ac2cc4930 Skip empty lines when reading from files. 2014-01-24 15:11:15 +01:00
Dimitri Fontaine
e92f085b04 Convert --root-dir to its truename before processing it, and manage errors to do so. 2014-01-24 15:10:45 +01:00
Dimitri Fontaine
c50164e53d Manage the whole class of "integrity errors" also when retrying a batch... 2014-01-24 15:10:03 +01:00
Dimitri Fontaine
69b550a46e Make use of the new usage function... 2014-01-24 10:14:51 +01:00