2ndQuadrant » PWN https://blog.2ndquadrant.it Il blog sui database di 2ndQuadrant Italia Thu, 25 Jan 2018 11:36:59 +0000 en-US hourly 1 http://wordpress.org/?v=4.3.15 Notiziario settimanale PostgreSQL – 8 luglio 2012 https://blog.2ndquadrant.it/notiziario-settimanale-postgresql-8-luglio-2012/ https://blog.2ndquadrant.it/notiziario-settimanale-postgresql-8-luglio-2012/#comments Mon, 09 Jul 2012 10:41:44 +0000 http://blog.2ndquadrant.it/?p=1194 Novità sul prodotto PostgreSQL

Barman 1.0.0, an administration tool for disaster recovery of PostgreSQL servers written in Python, is now available under the GPLv3. Per informazioni: http://www.pgbarman.org/

Offerte di lavoro per PostgreSQL nel mese di giugno

http://archives.postgresql.org/pgsql-jobs/2012-07/threads.php

Notizie locali su PostgreSQL

 “PostgreSQL Session” si terrà il 4 ottobre 2012 a Parigi, in Francia. Per informazioni: http://www.postgresql-sessions.org/en/4/
 La conferenza europea di PostgreSQL (PostgreSQL Conference Europe 2012) si terrà a Praga, in Repubblica Ceca, dal 23 al 26 ottobre 2012. La “call for sponsor” è aperta. Per informazioni: http://2012.pgconf.eu/.
La conferenza PostgreSQL Day Argentina si terrà il 13 novembre 2012 a Bernal (Buenos Aires), presso l’Università Nazionale di Quilmes. La conferenza coprirà argomenti adatti ad utenti, sviluppatori e collaboratori PostgreSQL, così come chi deve prendere decisioni e chi gestisce le politiche. Per maggiori informazioni sulla conferenza, si veda http://www.pgday.com.ar/quilmes2012?lang=en.

Rassegna stampa su PostgreSQL

Planet PostgreSQL: http://planet.postgresql.org/

Questo notiziario settimanale PostgreSQL è stato realizzato da David Fetter; traduzione parziale in lingua italiana a cura di Carlo Ascani.

 Notizie o annunci destinati a questo notiziario dovranno pervenire entro la mezzanotte di domenica (le 15 nel fuso orario della California). I comunicati in lingua italiana dovranno essere inviati a pwn@itpug.org; per le lingue inglese o tedesca, si scriva rispettivamente a david@fetter.org o a pwd@pgug.de. Per lo spagnolo a pwn@arpug.com.ar.

Patch applicate

Heikki Linnakangas pushed:

– Validate xlog record header before enlarging the work area to store
it. If the record header is garbled, we’re now quite likely to
notice it before we try to make a bogus memory allocation and run
out of memory. That can still happen, if the xlog record is split
across pages (we cannot verify the record header until reading the
next page in that scenario), but this reduces the chances. An
out-of-memory is treated as a corrupt record anyway, so this isn’t a
correctness issue, just a case of giving a better error message.
Per Amit Kapila’s suggestion.
http://git.postgresql.org/pg/commitdiff/567787f216da750b3805aea6fd8aef19e8b882a1

– Fix mapping of PostgreSQL encodings to Python encodings. Windows
encodings, “win1252” and so forth, are named differently in Python,
like “cp1252”. Also, if the PyUnicode_AsEncodedString() function
call fails for some reason, use a plain ereport(), not a PLy_elog(),
to report that error. That avoids recursion and crash, if PLy_elog()
tries to call PLyUnicode_Bytes() again. This fixes bug reported by
Asif Naeem. Backpatch down to 9.0, before that plpython didn’t even
try these conversions. Jan Urbański, with minor comment
improvements by me.
http://git.postgresql.org/pg/commitdiff/b66de4c6d7208d9ec420b912758377a3533c7a7d

– Revert part of the previous patch that avoided using PLy_elog().
That caused the plpython_unicode regression test to fail on
SQL_ASCII encoding, as evidenced by the buildfarm. The reason is
that with the patch, you don’t get the detail in the error message
that you got before. That detail is actually very informative, so
rather than just adjust the expected output, let’s revert that part
of the patch for now to make the buildfarm green again, and figure
out some other way to avoid the recursion of PLy_elog() that doesn’t
lose the detail.
http://git.postgresql.org/pg/commitdiff/de479e2ed28925ddd2907cad3e2d5dddd3b97199

Robert Haas pushed:

– Remove misleading hints about reducing the System V request size.
Since the request size will now be ~48 bytes regardless of how
shared_buffers et. al. are set, much of this advice is no longer
relevant.
http://git.postgresql.org/pg/commitdiff/6a77bff086b9bba94ab6cd6229a74f44d3ec266d

– Make oid2name, pgbench, and vacuumlo set fallback_application_name.
Amit Kapila, reviewed by Shigeru Hanada and Peter Eisentraut, with
some modifications by me.
http://git.postgresql.org/pg/commitdiff/17676c785a95b2598c5735c0025f7dc7727a96bc

– Increase the maximum initdb-configured value for shared_buffers to
128MB. The old value of 32MB has been around for a very long time,
and in the meantime typical system memories have become vastly
larger. Also, now that we no longer depend on being able to fit the
entirety of our shared memory segment into the system’s limit on
System V shared memory, there’s a much better chance of the higher
limit actually proving productive. Per recent discussion on
pgsql-hackers.
http://git.postgresql.org/pg/commitdiff/f358428280953643313ee7756e0a8b8ccfde7660

– Documentation cleanups for recent shared memory changes.
http://git.postgresql.org/pg/commitdiff/390bfc643de4faf6df8cb40e71b17791ce61a71e

– More doc cleanups for recent shared memory changes. Josh
Kupershmidt
http://git.postgresql.org/pg/commitdiff/248b5fce0643c5662c60ac7f8bfe4d68b7e96bb4

– Add wchar -> mb conversion routines. This is infrastructure for
Alexander Korotkov’s work on indexing regular expression searches.
Alexander Korotkov, with a bit of further hackery on the MULE
conversion by me
http://git.postgresql.org/pg/commitdiff/72dd6291f216440f6bb61a8733729a37c7e3b2d2

– Fix sample INSTR function to return 0 if third arg is 0. Laurenz
Albe, per a report by Greg Smith that our sample function doesn’t
quite match Oracle’s behavior.
http://git.postgresql.org/pg/commitdiff/0fc32c00d74404a9a535e0e1b8d9437dfd8075db

– Reduce messages about implicit indexes and sequences to DEBUG1. Per
recent discussion on pgsql-hackers, these messages are too chatty
for most users.
http://git.postgresql.org/pg/commitdiff/d7c734841b3e6cb44de363a8a3d83c35b75b30d9

– Fix failure of new wchar->mb functions to advance from pointer. Bug
spotted by Tom Lane.
http://git.postgresql.org/pg/commitdiff/f6a05fd973a102f7e66c491d3f854864b8d24844

Bruce Momjian pushed:

– Have copyright tool mention that certain files should be updated in
back branches.
http://git.postgresql.org/pg/commitdiff/b33385b89d30ad3daa63b398e56a5e3822fd59c6

– Have pg_dump in binary-upgrade mode properly drop user-created
extensions that might exist in the new empty cluster databases, like
plpgsql. Backpatch to 9.2.
http://git.postgresql.org/pg/commitdiff/3e00d332615be32d64bbb1f604a783fade3146c0

– Run newly-configured perltidy script on Perl files. Run on HEAD and
9.2.
http://git.postgresql.org/pg/commitdiff/042d9ffc282a8c796d2a5babc600c1a6db150dac

– Fix missing regex slash that caused perltidy to get confused on
copyright.pl. Backpatch to 9.2.
http://git.postgresql.org/pg/commitdiff/539d38757a4709b5039ed4318567349da06f0690

– Fix PGDATAOLD and PGDATANEW to properly set pgconfig location, per
report from Tom Lane. Backpatch to 9.2.
http://git.postgresql.org/pg/commitdiff/2eeb5eb23fa9ad1a2d636bbf2fd68e6709848d23

– Update pg_upgrade comments for recent configpath fix.
http://git.postgresql.org/pg/commitdiff/c742d1dbe759f4c1e3304e5fbca88e061f64978f

– Fix spacing in copyright.pl after being run with missing regex slash
(now added). Backpatch to 9.2.
http://git.postgresql.org/pg/commitdiff/b9eb808bf2e5f0ab5cfd1dc7410f3c457a18f6d1

– Fix copyright.pl to properly skip the .git directory by adding a
basename() qualification.
http://git.postgresql.org/pg/commitdiff/5198ae89924db730d7d3ec3ab7b14c17a22c7f82

– Modify copyright.pl so all lines are processed, not just the first
match, so files that contain embedded copyrights are updated, e.g.
pgsql/help.c. Backpatch to 9.2.
http://git.postgresql.org/pg/commitdiff/95203e0833664a1cb221e4f3ad766d167db893b8

– Have copyright.pl skip updating something that is just the current
year, to avoid producing dups, e.g. 2012-2012 Backpatch to 9.2.
http://git.postgresql.org/pg/commitdiff/d17c0135cdf6e478a29080f563da3d65cb441291

– Run updated copyright.pl on HEAD and 9.2 trees, updating the psql
\copyright output to 2012. Backpatch to 9.2.
http://git.postgresql.org/pg/commitdiff/3c9b406420760a8da4de8d0e2b6336f15caf3c9c

Alvaro Herrera pushed:

– Have REASSIGN OWNED work on extensions, too. Per bug #6593,
REASSIGN OWNED fails when the affected role has created an
extension. Even though the user related to the extension is not
nominally the owner, its OID appears on pg_shdepend and thus causes
problems when the user is to be dropped. This commit adds code to
change the “ownership” of the extension itself, not of the contained
objects. This is fine because it’s currently only called from
REASSIGN OWNED, which would also modify the ownership of the
contained objects. However, this is not sufficient for a working
ALTER OWNER implementation extension. Back-patch to 9.1, where
extensions were introduced. Bug #6593 reported by Emiliano
Leporati.
http://git.postgresql.org/pg/commitdiff/0c7b9dc7d037c4465227dc2300ff48019feeba37

– Forgot an #include in the previous patch :-(
http://git.postgresql.org/pg/commitdiff/47a2adc83c492aed92b6754fe40b485b9fe5929e

– pg_upgrade: abstract out copying of files from old cluster to new.
Currently only pg_clog is copied, but some other directories could
need the same treatment as well, so create a subroutine to do it.
Extracted from my (somewhat larger) FOR KEY SHARE patch.
http://git.postgresql.org/pg/commitdiff/666d494d19dbd5dc7a177709a2f7069913f8ab89

– Convert libpq regress script to Perl. This should ease its use on
the Windows build environment.
http://git.postgresql.org/pg/commitdiff/a184e4db83c80d28103774ced984c7790fbd44ba

– Update libpq test expected output. Commit 2b443063 changed wording
for some of the error messages, but neglected updating the regress
output to match.
http://git.postgresql.org/pg/commitdiff/adb9b7d53be5a3a0cae8b7a71c28a3e8c7628769

Tom Lane pushed:

– Improve documentation about MULE encoding. This commit improves the
comments in pg_wchar.h and creates #define symbols for some formerly
hard-coded values. No substantive code changes. Tatsuo Ishii and
Tom Lane
http://git.postgresql.org/pg/commitdiff/09022de1f55708bcfe8b2bf206d818055c34d49e

– Remove support for using wait3() in place of waitpid(). All
Unix-oid platforms that we currently support should have waitpid(),
since it’s in V2 of the Single Unix Spec. Our git history shows
that the wait3 code was added to support NextStep, which we
officially dropped support for as of 9.2. So get rid of the
configure test, and simplify the macro spaghetti in reaper(). Per
suggestion from Fujii Masao.
http://git.postgresql.org/pg/commitdiff/fc548b2296df3fe039bf68e196bfd883338e0faa

– Don’t try to trim “../” in join_path_components().
join_path_components() tried to remove leading “..” components from
its tail argument, but it was not nearly bright enough to do so
correctly unless the head argument was (a) absolute and (b)
canonicalized. Rather than try to fix that logic, let’s just get
rid of it: there is no correctness reason to remove “..”, and
cosmetic concerns can be taken care of by a subsequent
canonicalize_path() call. Per bug #6715 from Greg Davidson.
Back-patch to all supported branches. It appears that pre-9.2, this
function is only used with absolute paths as head arguments, which
is why we’d not noticed the breakage before. However, third-party
code might be expecting this function to work in more general cases,
so it seems wise to back-patch. In HEAD and 9.2, also make some
minor cosmetic improvements to callers.
http://git.postgresql.org/pg/commitdiff/85254199478bcf49d0ac83fdf22d6bcf35ceccb1

– Simplify and document regex library’s compact-NFA representation.
The previous coding abused the first element of a cNFA state’s arcs
list to hold a per-state flag bit, which was confusing,
undocumented, and not even particularly efficient. Get rid of that
in favor of a separate “stflags” vector. Since there’s only one bit
in use, I chose to allocate a char per state; we could possibly
replace this with a bitmap at some point, but that would make
accesses a little slower. It’s already about 8X smaller than
before, so let’s not get overly tense. Also document the
representation better than it was before, which is to say not at
all. This patch is a byproduct of investigations towards extracting
a “fixed prefix” string from the compact-NFA representation of regex
patterns. Might need to back-patch it if we decide to back-patch
that fix, but for now it’s just code cleanup so I’ll just put it in
HEAD.
http://git.postgresql.org/pg/commitdiff/c6aae3042be5249e672b731ebeb21875b5343010

– Fix planner to pass correct collation to operator selectivity
estimators. We can do this without creating an API break for
estimation functions by passing the collation using the existing
fmgr functionality for passing an input collation as a hidden
parameter. The need for this was foreseen at the outset, but we
didn’t get around to making it happen in 9.1 because of the decision
to sort all pg_statistic histograms according to the database’s
default collation. That meant that selectivity estimators generally
need to use the default collation too, even if they’re estimating
for an operator that will do something different. The reason it’s
suddenly become more interesting is that regexp interpretation also
uses a collation (for its LC_TYPE not LC_COLLATE property), and we
no longer want to use the wrong collation when examining regexps
during planning. It’s not that the selectivity estimate is likely
to change much from this; rather that we are thinking of caching
compiled regexps during planner estimation, and we won’t get the
intended benefit if we cache them with a different collation than
the executor will use. Back-patch to 9.1, both because the regexp
change is likely to get back-patched and because we might as well
get this right in all collation-supporting branches, in case any
third-party code wants to rely on getting the collation. The patch
turns out to be minuscule now that I’ve done it …
http://git.postgresql.org/pg/commitdiff/e7ef6d7e248cd39b8a4a7630776ec3924feeafa6

Magnus Hagander pushed:

– Remove references to PostgreSQL bundled on Solaris. Also remove
special references to downloads off pgfoundry since they are not
correct – downloads are done through the main website.
http://git.postgresql.org/pg/commitdiff/d80785e6ed872acfc4ec156e540e16db878a81d3

– Remove references to pgfoundry as recommended hosting platform.
pgfoundry is deprectaed and no longer accepting new projects, so we
really shouldn’t be directing people there.
http://git.postgresql.org/pg/commitdiff/51fc406819a06799e77ecfa751557318e16e4677

– Remove reference to default wal_buffers being 8. This hasn’t been
true since 9.1, when the default was changed to -1. Remove the
reference completely, keeping the discussion of the parameter and
it’s shared memory effects on the config page.
http://git.postgresql.org/pg/commitdiff/817d870cf990698cbc6672068e6af5405c2ae7a4

– Always treat a standby returning an an invalid flush location as
async. This ensures that a standby such as pg_receivexlog will not
be selected as sync standby – which would cause the master to block
waiting for a location that could never happen. Fujii Masao
http://git.postgresql.org/pg/commitdiff/0c4b468692804a232e324962d968e61c1837a13a

– Set the write location in the pg_receivexlog status messages. This
makes it possible for the master to track how much data has actually
been written my pg_receivexlog – and not just how much has been sent
towards it.
http://git.postgresql.org/pg/commitdiff/dbc6fcf35d4fa95ea2fd4d7bbd9e56be560c1ef9

– Remove duplicate, unnecessary, variable declaration
http://git.postgresql.org/pg/commitdiff/10e0dd8f91364635b73103c5e207b48b811da5b5

– Fix function argument tab completion for schema-qualified or quoted
function names. Dean Rasheed, reviewed by Josh Kupershmidt
http://git.postgresql.org/pg/commitdiff/3644a63984cbdba2c78c22fd9a0cdb0f4701b600

Patch rifiutate (per adesso)

Nessuno è stato scontetao questa settimana. :-)

Patch in attesa

Alvaro Herrera and Zoltan Boszormenyi traded patches for the timeout
framework and lock_timeout, which depends on same.

Kyotaro HORIGUCHI sent in two different revisions of a patch to fix
an infelicity in PL/Perl’s handling of UTF-8 in SQL_ASCII-encoded
databases.

Hans-Juergen Schoenig sent in a rebased patch to add Bloom filters.

Dimitri Fontaine and Robert Haas exchanged a flurry of patches
implementing event triggers.

Joel Jacobson sent in three revisions of a patch to output overloaded
functions in deterministic order in pg_dump.

Pavel Stehule and Peter Geoghegan traded patches to enhance error
fields.

Alvaro Herrera sent in another revision of the patch to implement
foreign key locks.

Fujii Masao sent in a patch which removes support for using wait3() in
place of waitpid(). No currently used system needs it.

Peter Eisentraut sent in another revision of the patch to implement
TRANSFORMs.

Pavel Stehule sent in two more revisions of the code to allow using
parameters in PL/pgsql DO blocks.

Satoshi Nagayasu sent in two revisions of a patch to add functions to
get and reset statistics of WAL buffer writes (flushes) caused by the
WAL buffer’s becoming full.

Tom Lane sent in a patch to fix the issues in regex_fixed_prefix() by
compiling the regex using the regex library and then looking at the
compiled NFA representation to see if there must be a fixed prefix.

]]>
https://blog.2ndquadrant.it/notiziario-settimanale-postgresql-8-luglio-2012/feed/ 0
Notiziario settimanale PostgreSQL – 24 giugno 2012 https://blog.2ndquadrant.it/notiziario-settimanale-postgresql-24-giugno-2012/ https://blog.2ndquadrant.it/notiziario-settimanale-postgresql-24-giugno-2012/#comments Mon, 02 Jul 2012 08:24:00 +0000 http://blog.2ndquadrant.it/?p=1186 La Commitfest continua. Puoi dare una mano! Per informazioni: https://commitfest.postgresql.org/action/commitfest_view?id=14

Offerte di lavoro per PostgreSQL nel mese di giugno

Per informazioni: http://archives.postgresql.org/pgsql-jobs/2012-06/threads.php

Notizie locali su PostgreSQL

La Call For Paper per Postgres Open 2012 che si terrà dal 17 al 19 a Chicago è aperta. Le proposte dovranno pervenire entro il 26 Giugno 2012, alle ore 11:59. Per informazioni: http://postgresopen.org/2012/speaker/

“PostgreSQL Session” si terrà il 4 ottobre 2012 a Parigi, in Francia. Per informazioni: http://www.postgresql-sessions.org/en/4/

La conferenza europea di PostgreSQL (PostgreSQL Conference Europe 2012) si terrà a Praga, in Repubblica Ceca, dal 23 al 26 ottobre 2012. La “call for sponsor” è aperta. Per informazioni: http://2012.pgconf.eu/.

La conferenza PostgreSQL Day Argentina si terrà il 13 novembre 2012 a Bernal (Buenos Aires), presso l’Università Nazionale di Quilmes. La conferenza coprirà argomenti adatti ad utenti, sviluppatori e collaboratori PostgreSQL, così come chi deve prendere decisioni e chi gestisce le politiche. Per maggiori informazioni sulla conferenza, si veda http://www.pgday.com.ar/quilmes2012?lang=en.

Rassegna stampa su PostgreSQL

 Planet PostgreSQL: http://planet.postgresql.org/

Questo notiziario settimanale PostgreSQL è stato realizzato da David Fetter; traduzione parziale in lingua italiana a cura di Carlo Ascani.

 Notizie o annunci destinati a questo notiziario dovranno pervenire entro la mezzanotte di domenica (le 15 nel fuso orario della California). I comunicati in lingua italiana dovranno essere inviati a pwn@itpug.org; per le lingue inglese o tedesca, si scriva rispettivamente a david@fetter.org o a pwd@pgug.de. Per lo spagnolo a pwn@arpug.com.ar.

Patch applicate

Tom Lane pushed:

– Change ON UPDATE SET NULL/SET DEFAULT referential actions to meet
SQL spec. Previously, when executing an ON UPDATE SET NULL or SET
DEFAULT action for a multicolumn MATCH SIMPLE foreign key
constraint, we would set only those referencing columns
corresponding to referenced columns that were changed. This is what
the SQL92 standard said to do — but more recent versions of the
standard say that all referencing columns should be set to null or
their default values, no matter exactly which referenced columns
changed. At least for SET DEFAULT, that is clearly saner behavior.
It’s somewhat debatable whether it’s an improvement for SET NULL,
but it appears that other RDBMS systems read the spec this way. So
let’s do it like that. This is a release-notable behavioral change,
although considering that our documentation already implied it was
done this way, the lack of complaints suggests few people use such
cases.
http://git.postgresql.org/pg/commitdiff/c75be2ad6013684f2c118eea3ad8498f8d129c59

– Update SQL spec references in ri_triggers code to match SQL:2008.
Now that what we’re implementing isn’t SQL92, we probably shouldn’t
cite chapter and verse in that spec anymore. Also fix some comments
that talked about MATCH FULL but in fact were in code that’s also
used for MATCH SIMPLE. No code changes in this commit, just
comments.
http://git.postgresql.org/pg/commitdiff/f9429746c970b5e46a843a5cd0387fb0081b8f55

– Remove derived fields from RI_QueryKey, and do a bit of other
cleanup. We really only need the foreign key constraint’s OID and
the query type code to uniquely identify each plan we are caching
for FK checks. The other stuff that was in the struct had no
business being used as part of a hash key, and was all just being
copied from struct RI_ConstraintInfo anyway. Get rid of the
unnecessary fields, and readjust various function APIs to make them
use RI_ConstraintInfo not RI_QueryKey as info source. I’d be
surprised if this makes any measurable performance difference, but
it certainly feels cleaner.
http://git.postgresql.org/pg/commitdiff/03a5ba24b096a9acbbc9682adc0a27d1db31c570

– Allow ON UPDATE/DELETE SET DEFAULT plans to be cached. Once upon a
time, somebody was worried that cached RI plans wouldn’t get remade
with new default values after ALTER TABLE … SET DEFAULT, so they
didn’t allow caching of plans for ON UPDATE/DELETE SET DEFAULT
actions. That time is long gone, though (and even at the time I
doubt this was the greatest hazard posed by ALTER TABLE…). So
allow these triggers to cache their plans just like the others. The
cache_plan argument to ri_PlanCheck is now vestigial, since there
are no callers that don’t pass “true”; but I left it alone in case
there is any future need for it.
http://git.postgresql.org/pg/commitdiff/e8c9fd5fdf768323911f7088e8287f63b513c3c6

– Improve comments about why SET DEFAULT triggers must recheck for
matches. I was confused about this, so try to make it clearer for
the next person. (This seems like a fairly inefficient way of
dealing with a corner case, but I don’t have a better idea offhand.
Maybe if there were a way to turn off the RI_FKey_keyequal_upd_fk
event filter temporarily?)
http://git.postgresql.org/pg/commitdiff/48756be9cf31c37a936eecff051bf143d5866551

– Share RI trigger code between NO ACTION and RESTRICT cases. These
triggers are identical except for whether ri_Check_Pk_Match is to be
called, so factor out the common code to save a couple hundred
lines. Also, eliminate null-column checks in ri_Check_Pk_Match,
since they’re duplicate with the calling functions and require
unnecessary complication in its API statement. Simplify the way
code is shared between RI_FKey_check_ins and RI_FKey_check_upd, too.
http://git.postgresql.org/pg/commitdiff/fe3db740025d80f70ceccb33b2bf3c085a2fca80

– Add pgbench option to add foreign key constraints to the standard
scenario. The option –foreign-keys, used at initialization time,
will create foreign key constraints for the columns that represent
references to other tables’ primary keys. This can help in
benchmarking FK performance. Jeff Janes
http://git.postgresql.org/pg/commitdiff/afe1c51c9d65c67c7474c60d64bceefe9953dde6

– Improve tests for whether we can skip queueing RI enforcement
triggers. During an update of a PK row, we can skip firing the RI
trigger if any old key value is NULL, because then the row could not
have had any matching rows in the FK table. Conversely, during an
update of an FK row, the outcome is determined if any new key value
is NULL. In either case it becomes unnecessary to compare
individual key values. This patch was inspired by discussion of Vik
Reykja’s patch to use IS NOT DISTINCT semantics for the key
comparisons. In the event there is no need for that and so this
patch looks nothing like his, but he should still get credit for
having re-opened consideration of the trigger skip logic.
http://git.postgresql.org/pg/commitdiff/cfa0f4255bb0f5550d37a01c4d8fe2966d20040c

– Cache the results of ri_FetchConstraintInfo in a backend-local
cache. Extracting data from pg_constraint turned out to take as
much as 10% of the runtime in a bulk-update case where the foreign
key column wasn’t changing, because we did it over again for each
tuple. Fix that by maintaining a backend-local cache of the
results. This is really a pretty small patch, but converting the
trigger functions to work with pointers rather than local struct
variables requires a lot of mechanical changes.
http://git.postgresql.org/pg/commitdiff/45ba424f332a7eaa685a4e23f142a43114c65811

– Increase MAX_SYSCACHE_CALLBACKS from 20 to 32. By my count there
are 18 callers of CacheRegisterSyscacheCallback in the core code in
HEAD, so we are potentially leaving as few as 2 slots for any add-on
code to use (though possibly not all these callers would actually
activate in any particular session). That doesn’t seem like a lot
of headroom, so let’s pump it up a little.
http://git.postgresql.org/pg/commitdiff/0ce4459a366def5173a59a74ba1b81e8449b8df1

– Remove incomplete/incorrect support for zero-column foreign keys.
The original coding in ri_triggers.c had partial support for the
concept of zero-column foreign key constraints. But this is not
defined in the SQL standard, nor was it ever allowed by any other
part of Postgres, nor was it very fully implemented even here (eg
there was no support for preventing PK-table deletions that would
violate the constraint). Doesn’t seem very useful to carry 100-plus
lines of code for a corner case that no one is interested in making
work. Instead, just add a check that the column list read from
pg_constraint is non-empty.
http://git.postgresql.org/pg/commitdiff/dfd9c116cc3ebaf42f895b9b16a9ff69bb21664b

– Fix memory leak in ARRAY(SELECT …) subqueries. Repeated execution
of an uncorrelated ARRAY_SUBLINK sub-select (which I think can only
happen if the sub-select is embedded in a larger, correlated
subquery) would leak memory for the duration of the query, due to
not reclaiming the array generated in the previous execution. Per
bug #6698 from Armando Miraglia. Diagnosis and fix idea by Heikki,
patch itself by me. This has been like this all along, so
back-patch to all supported versions.
http://git.postgresql.org/pg/commitdiff/d14241c2cf72966c09c1acece5cb44b5c84204b4

Peter Eisentraut pushed:

– Remove confusing half sentence from legal notice. Pointed out by
Stefan Kaltenbrunner
http://git.postgresql.org/pg/commitdiff/c521665bd725448a333e1b2c693f460c63789f5c

– Make placeholders in SQL command help more consistent and precise.
To avoid divergent names on related pages, avoid ambiguities, and
reduce translation work a little.
http://git.postgresql.org/pg/commitdiff/6753ced3104046340659db15626580bc49df617d

– Replace int2/int4 in C code with int16/int32. The latter was
already the dominant use, and it’s preferable because in C the
convention is that intXX means XX bits. Therefore, allowing mixed
use of int2, int4, int8, int16, int32 is obviously confusing.
Remove the typedefs for int2 and int4 for now. They don’t seem to
be widely used outside of the PostgreSQL source tree, and the few
uses can probably be cleaned up by the time this ships.
http://git.postgresql.org/pg/commitdiff/b8b2e3b2deeaab19715af063fc009b7c230b2336
– Update copyright year in forgotten places. Found by Stefan
Kaltenbrunner
http://git.postgresql.org/pg/commitdiff/d117d23b1ac25dd2d5663f7e5682a61dbd36de8f

– pg_dump: Add missing newlines at end of messages
http://git.postgresql.org/pg/commitdiff/e1e97e93134a8b52861ae801117f94a15da410a4

Alvaro Herrera pushed:

– pg_dump: Fix verbosity level in LO progress messages. In passing,
reword another instance of the same message that was gratuitously
different. Author: Josh Kupershmidt after a bug report by Bosco
Rama
http://git.postgresql.org/pg/commitdiff/11b335ac4cc895db8c1b27455281fa36f97c53ff

– Repair comment mangled by a pgindent run long ago.
http://git.postgresql.org/pg/commitdiff/68d0e3cbf9c4b5981679668ebb554a4ec050fc72

Heikki Linnakangas pushed:

– Add a small cache of locks owned by a resource owner in
ResourceOwner. This speeds up reassigning locks to the parent
owner, when the transaction holds a lot of locks, but only a few of
them belong to the current resource owner. This is particularly
helps pg_dump when dumping a large number of objects. The cache can
hold up to 15 locks in each resource owner. After that, the cache is
marked as overflowed, and we fall back to the old method of scanning
the whole local lock table. The tradeoff here is that the cache has
to be scanned whenever a lock is released, so if the cache is too
large, lock release becomes more expensive. 15 seems enough to cover
pg_dump, and doesn’t have much impact on lock release. Jeff Janes,
reviewed by Amit Kapila and Heikki Linnakangas.
http://git.postgresql.org/pg/commitdiff/eeb6f37d89fc60c6449ca12ef9e91491069369cb

– Move WAL continuation record information to WAL page header. The
continuation record only contained one field, xl_rem_len, so it
makes things simpler to just include it in the WAL page header. This
wastes four bytes on pages that don’t begin with a continuation from
previos page, plus four bytes on every page, because of padding.
The motivation of this is to make it easier to calculate how much
space a WAL record needs. Before this patch, it depended on how many
page boundaries the record crosses. The motivation of that, in turn,
is to separate the allocation of space in the WAL from the copying
of the record data to the allocated space. Keeping the calculation
of space required simple helps to keep the critical section of
allocating the space from WAL short. But that’s not included in this
patch yet. Bump WAL version number again, as this is an
incompatible change.
http://git.postgresql.org/pg/commitdiff/20ba5ca64c7c858400f845f8ded330604e2c8d61

– Don’t waste the last segment of each 4GB logical log file. The
comments claimed that wasting the last segment made it easier to do
calculations with XLogRecPtrs, because you don’t have problems
representing last-byte-position-plus-1 that way. In my experience,
however, it only made things more complicated, because the there was
two ways to represent the boundary at the beginning of a logical log
file: logid = n+1 and xrecoff = 0, or as xlogid = n and xrecoff =
4GB – XLOG_SEG_SIZE. Some functions were picky about which
representation was used. Also, use a 64-bit segment number instead
of the log/seg combination, to point to a certain WAL segment. We
assume that all platforms have a working 64-bit integer type
nowadays. This is an incompatible change in WAL format, so bumping
WAL version number.
http://git.postgresql.org/pg/commitdiff/dfda6ebaec6763090fb78b458a979b558c50b39b

– Replace XLogRecPtr struct with a 64-bit integer. This simplifies
code that needs to do arithmetic on XLogRecPtrs. To avoid changing
on-disk format of data pages, the LSN on data pages is still stored
in the old format. That should keep pg_upgrade happy. However, we
have XLogRecPtrs embedded in the control file, and in the structs
that are sent over the replication protocol, so this changes breaks
compatibility of pg_basebackup and server. I didn’t do anything
about this in this patch, per discussion on -hackers, the right
thing to do would to be to change the replication protocol to be
architecture-independent, so that you could use a newer version of
pg_receivexlog, for example, against an older server version.
http://git.postgresql.org/pg/commitdiff/0ab9d1c4b31622e9176472b4276f3e9831e3d6ba

– Allow WAL record header to be split across pages. This saves a few
bytes of WAL space, but the real motivation is to make it
predictable how much WAL space a record requires, as it no longer
depends on whether we need to waste the last few bytes at end of WAL
page because the header doesn’t fit. The total length field of WAL
record, xl_tot_len, is moved to the beginning of the WAL record
header, so that it is still always found on the first page where a
WAL record begins. Bump WAL version number again as this is an
incompatible change.
http://git.postgresql.org/pg/commitdiff/061e7efb1b4c5b8a5d02122b7780531b8d5bf23d

– Use LL suffix for 64-bit constants. Per warning from buildfarm
member ‘locust’. At least I think this what’s making it upset.
http://git.postgresql.org/pg/commitdiff/96ff85e2dd64e7987ee6d69f306e3b8f54cc72c0

– Oops. Remove stray paren. I didn’t notice this on my laptop as I
don’t HAVE_FSYNC_WRITETHROUGH.
http://git.postgresql.org/pg/commitdiff/a218e23a08519d525d09565bbeddbf682f76d4dd

– Use UINT64CONST for 64-bit integer constants. Peter Eisentraut
advised me that UINT64CONST is the proper way to do that, not LL
suffix.
http://git.postgresql.org/pg/commitdiff/0687a26002c86e3115783d75f212358ef348525f

– I missed some references to xlogid/xrecoff in Win32-only code. Fix.
http://git.postgresql.org/pg/commitdiff/7eb8c7851458eb88def80c290a4b5bc37cc321f3

Robert Haas pushed:

– Document that && can be used to search arrays. Also, add some
cross-links to the indexing documentation, so it’s easier to notice
that && and other array operators have index support. Ryan Kelly,
edited by me.
http://git.postgresql.org/pg/commitdiff/6ef5baf8b1cb609218b2fafb378b3f190a6f90f9

– Make pgbench -i emit only one-tenth as many status messages. These
days, even a wimpy system can insert 10000 tuples in the blink of an
eye, so there’s no real need for this much verbosity. Per complaint
from Tatsuo Ishii.
http://git.postgresql.org/pg/commitdiff/47c7365e794a0a57382efefbf1f2b062c7a3e3d3

Patch rifiutate (per adesso)

Nessuno è stato scontetao questa settimana. :-)

Patch in attesa

Joachim Wieland sent in another revision of the patch to implement
parallel pg_dump.

Robert Haas sent in another revision of the patch to avoid heavyweight
locking on hash metapages.

Kyotaro HORIGUCHI sent in another revision of the patch to skip
checkpoint on promoting from streaming replication.

Jeff Davis sent in two more revisions of the patch to fix fsync
behavior on initdb.

Alexander Korotkov sent in a patch to reduce gistchoose index bloat.

Zoltan Boszormenyi sent in four more revisions of the patch to
implement lock_timeout and SIGALARM framework.

Peter Eisentraut sent in another revision of the patch to prevent
sub-main functions in the backend from returning anything.

Honza Horak sent in another revision of the patch to allow PostgreSQL
to answer on more than one Unix socket.

Alvaro Herrera and Kyotaro HORIGUCHI traded patches to fix PL/Perl in
SQL_ASCII-encoded databases.

Greg Smith sent in a patch to try to avoid running with a full fsync
request queue.

Robert Haas sent in a patch to make pgbench less yappy.

Peter Eisentraut sent in a patch to revive AC_PROG_INSTALL.

John Lumby sent in a patch intended to enable using INSERT …
RETURNING in a RULE on a partitioned table.

Alexander Korotkov sent in a patch to fix an issue with GiST indexing
on points.

Alexander Korotkov sent in another revision of the patch for SP-GiST
for ranges, this time using a k-d tree instead of quad-tree.

Kevin Grittner and Alvaro Herrera traded patches to implement foreign
key locks.

Tom Lane sent in another revision of the patch to fix pg_dump
dependencies in the –section case.

Dimitri Fontaine sent in another revision of the event trigger patch.

David Kerr sent in a patch to allow using an empty backup_label in
streaming replication.

]]>
https://blog.2ndquadrant.it/notiziario-settimanale-postgresql-24-giugno-2012/feed/ 0
Notiziario settimanale PostgreSQL – 10 giugno 2012 https://blog.2ndquadrant.it/notiziario-settimanale-postgresql-10-giugno-2012/ https://blog.2ndquadrant.it/notiziario-settimanale-postgresql-10-giugno-2012/#comments Thu, 14 Jun 2012 07:57:40 +0000 http://blog.2ndquadrant.it/?p=1177 Rilasciati aggiornamenti di sicurezza per le versioni 9.1.4, 9.0.8, 8.4.12 e 8.3.19. Aggiornate ASAP! Per informazioni: http://www.postgresql.org/about/news/1398/

Congratulazioni a Kevin Grittner, il più recente “committer” di PostgreSQL. Per informazioni: http://archives.postgresql.org/pgsql-hackers/2012-06/msg00268.php

“PostgreSQL Session” si terrà il 4 ottobre 2012 a Parigi, in Francia. La “call for paper” è aperta. Per informazioni: http://www.postgresql-sessions.org/en/4/

Novità sul prodotto PostgreSQL

 Rilasciate le applicazioni di utilità GUI PaGoDump & PaGoRestore (Windows) per PG 9.1. Per informazioni: http://microolap.com/products/database/pagodump/download/

Rilasciato pgAdmin 1.14.3, uno strumento di amministrazione GUI stand-alone. Per informazioni: http://www.pgadmin.org/development/changelog.php

Rilasciato Postgres-XC 1.0.0, un cluster simmetrico multi-master scalabile in scrittura. Perinformazioni: http://postgres-xc.sourceforge.net/docs/1_0/

Offerte di lavoro per PostgreSQL nel mese di giugno

Per informazioni: http://archives.postgresql.org/pgsql-jobs/2012-06/threads.php

Notizie locali su PostgreSQL

La conferenza cinese su PostgreSQL si terrà dal 14 al 17 giugno 2012, a Pechino. Per informazioni: http://wiki.postgresql.org/wiki/Pgconfchina2012.

“PostgreSQL Session” si terrà il 4 ottobre 2012 a Parigi, in Francia. Per informazioni: http://www.postgresql-sessions.org/en/4/

La conferenza europea di PostgreSQL (PostgreSQL Conference Europe 2012) si terrà a Praga, in Repubblica Ceca, dal 23 al 26 ottobre 2012. La “call for sponsor” è aperta. Per informazioni: http://2012.pgconf.eu/.

La conferenza PostgreSQL Day Argentina si terrà il 13 novembre 2012 a Bernal (Buenos Aires), presso l’Università Nazionale di Quilmes. La conferenza coprirà argomenti adatti ad utenti, sviluppatori e collaboratori PostgreSQL, così come chi deve prendere decisioni e chi gestisce le politiche. Per maggiori informazioni sulla conferenza, si veda http://www.pgday.com.ar/quilmes2012?lang=en.

Rassegna stampa su PostgreSQL

 Planet PostgreSQL: http://planet.postgresql.org/

Questo notiziario settimanale PostgreSQL è stato realizzato da David Fetter; traduzione parziale in lingua italiana a cura di Carlo Ascani.

 Notizie o annunci destinati a questo notiziario dovranno pervenire entro la mezzanotte di domenica (le 15 nel fuso orario della California). I comunicati in lingua italiana dovranno essere inviati a pwn@itpug.org; per le lingue inglese o tedesca, si scriva rispettivamente a david@fetter.org o a pwd@pgug.de. Per lo spagnolo a pwn@arpug.com.ar.

Patch applicate

 Tom Lane pushed:

– Fix some more bugs in contrib/xml2’s xslt_process(). It failed to
check for error return from xsltApplyStylesheet(), as reported by
Peter Gagarinov. (So far as I can tell, libxslt provides no
convenient way to get a useful error message in failure cases.
There might be some inconvenient way, but considering that this code
is deprecated it’s hard to get enthusiastic about putting lots of
work into it. So I just made it say “failed to apply stylesheet”,
in line with the existing error checks.) While looking at the code I
also noticed that the string returned by xsltSaveResultToString was
never freed, resulting in a session-lifespan memory leak.
Back-patch to all supported versions.
http://git.postgresql.org/pg/commitdiff/d9b31e4859df5325b7d3d2cc94b0e907f1cf1d3e

– Fix bogus handling of control characters in json_lex_string(). The
original coding misbehaved if “char” is signed, and also made the
extremely poor decision to print control characters literally when
trying to complain about them. Report and patch by Shigeru Hanada.
In passing, also fix core dump risk in report_parse_error() should
the parse state be something other than what it expects.
http://git.postgresql.org/pg/commitdiff/3dd8e596812e3adb72aecafb23fbb6a30836c475

– Do unlocked prechecks in bufmgr.c loops that scan the whole buffer
pool. DropRelFileNodeBuffers, DropDatabaseBuffers,
FlushRelationBuffers, and FlushDatabaseBuffers have to scan the
whole shared_buffers pool because we have no index structure that
would find the target buffers any more efficiently than that. This
gets expensive with large NBuffers. We can shave some cycles from
these loops by prechecking to see if the current buffer is
interesting before we acquire the buffer header lock. Ordinarily
such a test would be unsafe, but in these cases it should be safe
because we are already assuming that the caller holds a lock that
prevents any new target pages from being loaded into the buffer pool
concurrently. Therefore, no buffer tag should be changing to a
value of interest, only away from a value of interest. So a false
negative match is impossible, while a false positive is safe because
we’ll recheck after acquiring the buffer lock. Initial testing says
that this speeds these loops by a factor of 2X to 3X on common Intel
hardware. Patch for DropRelFileNodeBuffers by Jeff Janes (based on
an idea of Heikki’s); extended to the remaining sequential scans by
Tom Lane
http://git.postgresql.org/pg/commitdiff/e8d029a30b5a5fb74b848a8697b1dfa3f66d9697

– Scan the buffer pool just once, not once per fork, during relation
drop. This provides a speedup of about 4X when NBuffers is large
enough. There is also a useful reduction in sinval traffic, since
we only do CacheInvalidateSmgr() once not once per fork. Simon
Riggs, reviewed and somewhat revised by Tom Lane
http://git.postgresql.org/pg/commitdiff/ece01aae479227d9836294b287d872c5a6146a11

Magnus Hagander pushed:

– Backpatch error message fix from 81f6bbe8ade8c90f23f9286ca9ca726d3e0e310f.
Without this, pg_basebackup doesn’t tell you why it failed when for
example there is a file in the data directory that the backend
doesn’t have permissions to read.
http://git.postgresql.org/pg/commitdiff/5c3532876f8360df10692baf77a0b79c41ee001e

– Add example of archive_command to use with pg_receivexlog
http://git.postgresql.org/pg/commitdiff/778201200b4a5b287fe931e20ae804e8398d4872

– Fix typo. Noted by Erik Rijkers
http://git.postgresql.org/pg/commitdiff/1e57c2c5b2e8fdd1e233454b21c60e1600464728

– Use strerror(errno) instead of %m. Found by Fujii Masao
http://git.postgresql.org/pg/commitdiff/92135ea0ed8f75daa86cd94301cedc7f5b714e3c

– Error message capitalization fix
http://git.postgresql.org/pg/commitdiff/7c1abc00fa1f469a2805e88abac0fa8b094b4427

– Fix pg_basebackup/pg_receivexlog for floating point timestamps.
Since the replication protocol deals with TimestampTz, we need to
care for the floating point case as well in the frontend tools.
Fujii Masao, with changes from Magnus Hagander
http://git.postgresql.org/pg/commitdiff/a0b4c5a20a5e5076225ba440a921f4b46f1159ee

Robert Haas pushed:

– Fix more crash-safe visibility map bugs, and improve comments. In
lazy_scan_heap, we could issue bogus warnings about incorrect
information in the visibility map, because we checked the visibility
map bit before locking the heap page, creating a race condition.
Fix by rechecking the visibility map bit before we complain.
Rejigger some related logic so that we rely on the possibly-outdated
all_visible_according_to_vm value as little as possible. In
heap_multi_insert, it’s not safe to clear the visibility map bit
before beginning the critical section. The visibility map is not
crash-safe unless we treat clearing the bit as a critical operation.
Specifically, if the transaction were to error out after we set the
bit and before entering the critical section, we could end up
writing the heap page to disk (with the bit cleared) and crashing
before the visibility map page made it to disk. That would be bad.
heap_insert has this correct, but somehow the order of operations
got rearranged when heap_multi_insert was added. Also, add some
more comments to visibilitymap_test, lazy_scan_heap, and
IndexOnlyNext, expounding on concurrency issues. Per extensive code
review by Andres Freund, and further review by Tom Lane, who also
made the original report about the bogus warnings.
http://git.postgresql.org/pg/commitdiff/b50991eedb458a81d875d049f48fb62ab1685c0d

– When using libpq URI syntax, error out on invalid parameter names.
Dan Farina
http://git.postgresql.org/pg/commitdiff/3b5548a3d524e3b37d49f79f707d2119ecdfa303

Simon Riggs pushed:

– Wake WALSender to reduce data loss at failover for async commit.
WALSender now woken up after each background flush by WALwriter,
avoiding multi-second replication delay for an all-async commit
workload. Replication delay reduced from 7s with default settings
to 200ms and often much less, allowing significantly reduced data
loss at failover. Andres Freund and Simon Riggs
http://git.postgresql.org/pg/commitdiff/2c8a4e9be2730342cbca85150a2a9d876aa77ff6

– Fix bug in early startup of Hot Standby with subtransactions. When
HS startup is deferred because of overflowed subtransactions, ensure
that we re-initialize KnownAssignedXids for when both existing and
incoming snapshots have non-zero qualifying xids. Fixes bug #6661
reported by Valentine Gogichashvili. Analysis and fix by Andres
Freund
http://git.postgresql.org/pg/commitdiff/37255705399b57b2e413814799f0bc9b94fda14a

– Add ERROR msg for GLOBAL/LOCAL TEMP is not yet implemented
http://git.postgresql.org/pg/commitdiff/72335a20156b19be3a53ef686e0b31140c6f38e5

– Revert error message on GLOBAL/LOCAL pending further discussion
http://git.postgresql.org/pg/commitdiff/28ac7972873bd314d4837807396fe44571b5cb50

Peter Eisentraut pushed:

– Message style improvements
http://git.postgresql.org/pg/commitdiff/5d0109bd2776ce918821f360e951270caa96ba8a

– Documentation spell and markup checking
http://git.postgresql.org/pg/commitdiff/5baf6da71701abcb76487d9de68f7d7dc6c365e9

– Documentation style improvements
http://git.postgresql.org/pg/commitdiff/f1438cf5c6f54d0a887c7fbef91163efda5daa0f

– Make include files work without having to include other ones first
http://git.postgresql.org/pg/commitdiff/8570114dc1a7a655043d94a6eb1ebf295f1d3647

Bruce Momjian pushed:

– Update pgindent install instructions and update typedef list.
http://git.postgresql.org/pg/commitdiff/60801944fa105252b48ea5688d47dfc05c695042

– Run pgindent on 9.2 source tree in preparation for first 9.3
commit-fest.
http://git.postgresql.org/pg/commitdiff/927d61eeff78363ea3938c818d07e511ebaf75cf

Patch rifiutate (per adesso)

Nessuno è stato scontetao questa settimana. :-)

Patch in attesa

 Fujii Masao sent in another revision of the patch to fix incorrect

handling of the timeout in pg_receivexlog.

Ants Aasma sent in another revision of the lockfree getbuffer patch.

Robert Haas sent in a patch to remove the heap check when creating
objects in pg_catalog.

Kyotaro HORIGUCHI sent in a patch to add a new WalRcvStarted()
function to check whether streaming replication is on and to determine
whether to delay checkpoints using GetLogReplayRecPtr() when
WalRcvStarted() it returns true.

Robert Haas sent in two revisions of a patch to add a
log_newpage_buffer() function and reshuffle responsibility for using
it.

Kyotaro HORIGUCHI sent in a patch to skip checkpoint on promoting from
streaming replication.

Amit Kapila sent in a WIP patch to provide a fallback_application_name
in pgbench.

Dean Rasheed sent in a patch to improve the error hint from DROP
FUNCTION in the case of a conflicting function by including the
command which would allow dropping the old function in same.

Noah Misch sent in a patch which does the unlink() for DROP after
releasing existing locks.

Jeff Janes sent in a patch to fix cases of quadratic behavior in
pg_dump on a large number of objects.

]]>
https://blog.2ndquadrant.it/notiziario-settimanale-postgresql-10-giugno-2012/feed/ 0
Notiziario settimanale PostgreSQL – 6 maggio 2012 https://blog.2ndquadrant.it/notiziario-settimanale-postgresql-06-maggio-2012/ https://blog.2ndquadrant.it/notiziario-settimanale-postgresql-06-maggio-2012/#comments Mon, 07 May 2012 10:29:27 +0000 http://blog.2ndquadrant.it/?p=1138 La conferenza “PostgreSQL Cina 2012” si terrà il 14 Giugno 2012 a Pechino. Per informazioni: http://wiki.postgresql.org/wiki/Pgconfchina2012

È disponibile il numero #01 di Postgresql Magazine. Per informazioni: http://pgmag.org/01

Il gruppo di utenti PostgreSQL turco (PostgreSQL Turkey User Group) sta organizzando la seconda edizione della conferenza turca su PostgreSQL ad Istanbul, il 12 maggio 2012. Magnus Hagander terrà il discorso di apertura. La registrazione è gratuita. Per informazioni: http://pgday.PostgreSQL.org.tr/2012/

 

Novità sul prodotto PostgreSQL

ODB 2.0.0,  un ORM per C++, supporta PostgreSQL.

Per informazioni: http://www.codesynthesis.com/pipermail/odb-announcements/2012/000013.html

Per il download: http://www.codesynthesis.com/products/odb/download.xhtml

 

Offerte di lavoro per PostgreSQL nel mese di maggio

Per informazioni: http://archives.postgresql.org/pgsql-jobs/2012-05/threads.php

Notizie locali su PostgreSQL

PGCon 2012 si terrà nei giorni 17 e 18 maggio 2012 ad Ottawa, Canada, presso l’Università di Ottawa. Sarà preceduto da due giorni di tutorial dal 15 al 16 maggio. Per informazioni: http://www.pgcon.org/2012/

PGDay France si terrà a Lione il 7 giugno 2012. Per informazioni: http://www.pgday.fr

La conferenza europea di PostgreSQL (PostgreSQL Conference Europe 2012) si terrà a Praga, in Repubblica Ceca, dal 23 al 26 ottobre 2012. La “call for sponsor” è aperta. Per informazioni: http://2012.pgconf.eu/.

Rassegna stampa su PostgreSQL

Planet PostgreSQL: http://planet.postgresql.org/

Questo notiziario settimanale PostgreSQL è stato realizzato da David Fetter; traduzione parziale in lingua italiana a cura di Carlo Ascani.

Notizie o annunci destinati a questo notiziario dovranno pervenire entro la mezzanotte di domenica (le 15 nel fuso orario della California). I comunicati in lingua italiana dovranno essere inviati a pwn@itpug.org; per le lingue inglese o tedesca, si scriva rispettivamente a david@fetter.org o a pwd@pgug.de. Per lo spagnolo a pwn@arpug.com.ar.

Patch applicate

Bruce Momjian pushed:

– Add comments suggesting usage of git_changelog to generate release
notes.
http://git.postgresql.org/pg/commitdiff/f33fe47a9169eec692b80c17ea47bd2f9c261aaf

– Mark git_changelog examples with the proper executable names.
http://git.postgresql.org/pg/commitdiff/7490c48f1e2c51dce77d33f7fd464e72713679a5

– Remove BSD/OS (BSDi) port. There are no known users upgrading to
Postgres 9.2, and perhaps no existing users either.
http://git.postgresql.org/pg/commitdiff/ebcaa5fcde8411786e3765414465174e6d31c8e6

– Fix psql doc typo.
http://git.postgresql.org/pg/commitdiff/768c3affd44d1dcb4e43e2e006c642524714c2a4

– Revert typo fix 768c3affd44d1dcb4e43e2e006c642524714c2a4; I was
wrong.
http://git.postgresql.org/pg/commitdiff/0a3a674b98ebb47e2f4b539a0e284744a7871987

– Document that it is the pgsql version we are matching for psqlrc
version-specific files, not the server version.
http://git.postgresql.org/pg/commitdiff/65b110703b798cdbfa568aa3583caba0ed51b33a

Robert Haas pushed:

– Remove duplicate word in comment. Noted by Peter Geoghegan.
http://git.postgresql.org/pg/commitdiff/0d2235a25bc71848c18f551f992b3eed8cec2399

– Tweak psql to print row counts when \x auto chooses non-expanded
output. Noah Misch
http://git.postgresql.org/pg/commitdiff/9b7a84f2a45322b21b86eb180a869d1ed2937b85

– More duplicate word removal.
http://git.postgresql.org/pg/commitdiff/e01e66f808fbd161b2714eab34bb9e9d0db0db53

– Further corrections from the department of redundancy department.
Thom Brown
http://git.postgresql.org/pg/commitdiff/1b4998fd44bad9f8ab90e741cadd6519f6c94a44

– Avoid repeated CLOG access from heap_hot_search_buffer. At the time
we check whether the tuple is dead to all running transactions,
we’ve already verified that it isn’t visible to our scan, setting
hint bits if appropriate. So there’s no need to recheck CLOG for
the all-dead test we do just a moment later. So, add
HeapTupleIsSurelyDead() to test the appropriate condition under the
assumption that all relevant hit bits are already set. Review by
Tom Lane.
http://git.postgresql.org/pg/commitdiff/003811042139790a5a479c8264271a3248eda36f

– Add missing parenthesis in comment.
http://git.postgresql.org/pg/commitdiff/8e0c5195dff70ffc9c132716d0cf7f3eff45e302

Peter Eisentraut pushed:

– Mark ReThrowError() with attribute noreturn. All related functions
were already so marked.
http://git.postgresql.org/pg/commitdiff/26471a51fc833e2ce58a2f16f891256d57dd28c6

– Improve markup of cmdsynopsis elements. Add more markup in
particular so that the command options appear consistently in
monospace in the HTML output. On the vacuumdb reference page,
remove listing all the possible options in the synopsis. They have
become too many now; we have the detailed options list for that.
http://git.postgresql.org/pg/commitdiff/4266509c577b089627930af39f1dcd2d06b493e9

– Fix display of <command> elements on man pages. We had changed this
from the default bold to monospace for all output formats, but for
man pages, this creates visual inconsistencies, so revert to the
default for man pages.
http://git.postgresql.org/pg/commitdiff/61c84b47619c11e74089cb3160813a4b3c98e6d7

– Remove dead ports. Remove the following ports: dgux, nextstep,
sunos4, svr4, ultrix4, and univel. These are obsolete and not worth
rescuing. In most cases, there is circumstantial evidence that they
wouldn’t work anymore anyway.
http://git.postgresql.org/pg/commitdiff/f2f9439fbfba378cb64cd6e5a046e0184cd542c6

– Even more duplicate word removal, in the spirit of the season
http://git.postgresql.org/pg/commitdiff/e9605a039b60350003daf8a5b3c0c10993994b60

– PL/Python: Fix crash in functions returning SETOF and using SPI.
Allocate PLyResultObject.tupdesc in TopMemoryContext, because its
lifetime is the lifetime of the Python object and it shouldn’t be
freed by some other memory context, such as one controlled by SPI.
We trust that the Python object will clean up its own memory.
Before, this would crash the included regression test case by trying
to use memory that was already freed. reported by Asif Naeem,
analysis by Tom Lane
http://git.postgresql.org/pg/commitdiff/52aa334fcd5a9d230be7e8fb964d94c6c4e63dc7

– doc: Fix for too many brackets in command synopses on man pages.
The default for the choice attribute of the <arg> element is “opt”,
which would normally put the argument inside brackets. But the
DSSSL stylesheets contain a hack that treats <arg> directly inside
<group> specially, so that <group><arg>-x</arg><arg>-y</arg></group>
comes out as [ -x | -y ] rather than [ [-x] | [-y] ], which it would
technically be. But when building man pages, this doesn’t work, and
so the command synopses on the man pages contain lots of extra
brackets. By putting choice=”opt” or choice=”plain” explicitly on
every <arg> and <group> element, we avoid any toolchain dependencies
like that, and it also makes it clearer in the source code what is
meant. In passing, make some small corrections in the documentation
about which arguments are really optional or not.
http://git.postgresql.org/pg/commitdiff/1715ff112809bca5218ddb6eccfda2c20dc420b5

– PL/Python: Improve test coverage. Add test cases for inline handler
of plython2u (when using that language name), and for result object
element assignment. There is now at least one test case for every
top-level functionality, except plpy.Fatal (annoying to use in
regression tests) and result object slice retrieval and slice
assignment (which are somewhat broken).
http://git.postgresql.org/pg/commitdiff/e6c2e8cb87846161033e1f215876c4b95f631df0

Tom Lane pushed:

– Converge all SQL-level statistics timing values to float8
milliseconds. This patch adjusts the core statistics views to match
the decision already taken for pg_stat_statements, that values
representing elapsed time should be represented as float8 and
measured in milliseconds. By using float8, we are no longer tied to
a specific maximum precision of timing data. (Internally, it’s
still microseconds, but we could now change that without needing
changes at the SQL level.) The columns affected are
pg_stat_bgwriter.checkpoint_write_time,
pg_stat_bgwriter.checkpoint_sync_time,
pg_stat_database.blk_read_time, pg_stat_database.blk_write_time,
pg_stat_user_functions.total_time, pg_stat_user_functions.self_time,
pg_stat_xact_user_functions.total_time, and
pg_stat_xact_user_functions.self_time. The first four of these are
new in 9.2, so there is no compatibility issue from changing them.
The others require a release note comment that they are now double
precision (and can show a fractional part) rather than bigint as
before; also their underlying statistics functions now match the
column definitions, instead of returning bigint microseconds.
http://git.postgresql.org/pg/commitdiff/809e7e21af8cd24855f1802524a13bbaa823f929

– Kill some remaining references to SVR4 and univel. Both terms still
appear in a few places, but I thought it best to leave those alone
in context.
http://git.postgresql.org/pg/commitdiff/50c2d6a1a63f04fd8c4553fc696c2c9e235b1a25

– Overdue code review for transaction-level advisory locks patch.
Commit 62c7bd31c8878dd45c9b9b2429ab7a12103f3590 had assorted
problems, most visibly that it broke PREPARE TRANSACTION in the
presence of session-level advisory locks (which should be ignored by
PREPARE), as per a recent complaint from Stephen Rees. More
abstractly, the patch made the LockMethodData.transactional flag not
merely useless but outright dangerous, because in point of fact that
flag no longer tells you anything at all about whether a lock is
held transactionally. This fix therefore removes that flag
altogether. We now rely entirely on the convention already in use
in lock.c that transactional lock holds must be owned by some
ResourceOwner, while session holds are never so owned. Setting the
locallock struct’s owner link to NULL thus denotes a session hold,
and there is no redundant marker for that. PREPARE TRANSACTION now
works again when there are session-level advisory locks, and it is
also able to transfer transactional advisory locks to the prepared
transaction, but for implementation reasons it throws an error if we
hold both types of lock on a single lockable object. Perhaps it
will be worth improving that someday. Assorted other minor cleanup
and documentation editing, as well. Back-patch to 9.1, except that
in the 9.1 branch I did not remove the LockMethodData.transactional
flag for fear of causing an ABI break for any external code that
might be examining those structs.
http://git.postgresql.org/pg/commitdiff/71b9549d053b2f0a9e76e829c917385841f84bee

Heikki Linnakangas pushed:

– Remove duplicate words in comments. Found these with grep -r “for
for “.
http://git.postgresql.org/pg/commitdiff/f291ccd43e06fdd7c55102975a0b2f38bc140b90

Magnus Hagander pushed:

– Remove link to ODBCng project from the docs. This backatches
Heikki’s patch in 140a4fbf1a87891a79a2c61a08416828d39f286a to make
sure the documentation on the website gets updated, since we’re
regularly receiving complains about this link.
http://git.postgresql.org/pg/commitdiff/6d362ec209f0174f36a78936c5269f8d5f2cd26e

Patch rifiutate (per adesso)

Nessuno è stato scontentato questa settimana. :-)

Patch in attesa

 Ryan Kelly sent in another revision of the patch to allow breaking out

of hung connection attempts in libpq.

Noah Misch sent in a patch to prevent a theoretical torn page hazard
in ginRedoUpdateMetapage().

Pavel Stehule sent in a patch to add new error fields to PL/pgsql.

Laurenz Albe sent in another revision of the patch to analyze foreign
tables which gets the FDW to show that a value was non-NULL but
removed due to excess width by returning a value of length
WIDTH_THRESHOLD+1.

Peter Geoghegan sent in two revisions of a patch to latch up the WAL
Writer, reducing wake-ups and thus saving electricity in a way that is
more-or-less analogous to his previous work on the BGWriter.

Magnus Hagander sent in a patch to reduce the number of “Unexpected EOF
on client connection” messages clogging people’s logs.

Jan Urbanski sent in a patch to fix an issue with PL/PythonU where
result set slicing was broken in the Python3 case.

]]>
https://blog.2ndquadrant.it/notiziario-settimanale-postgresql-06-maggio-2012/feed/ 0
Notiziario settimanale PostgreSQL – 19 luglio 2009 https://blog.2ndquadrant.it/notiziario_settimanale_postgre_32/ https://blog.2ndquadrant.it/notiziario_settimanale_postgre_32/#comments Mon, 20 Jul 2009 23:39:49 +0000 http://2ndblog.dev.xcon.it/notiziario_settimanale_postgre_32/ (Traduzione parziale in lingua italiana delle PostgreSQL Weekly News a cura di Gianni Ciolli gianni.ciolli@2ndquadrant.it)

È iniziata la prima Commitfest del ciclo di sviluppo per la 8.5! http://commitfest.postgresql.org/

L’associazione ITPUG – Italian PostgreSQL Users Group si è unita al progetto di traduzione di PostgreSQL. Un gruppo di lavoro di 10 persone ha dato inizio all’impresa di "rendere più verde" la colonna di babel.postgresql.org dedicata alla lingua italiana. Ulteriori informazioni in italiano a http://traduzioni.itpug.org/

Novità sul prodotto PostgreSQL

Rilasciata la versione 3.1.2 di Archiveopteryx, un sistema di gestione per la posta elettronica basato su PostgreSQL. http://www.archiveopteryx.org/3.1.2

Rilasciata la versione 2.9 di Benetl, uno strumento ETL per files che usa PostgreSQL. http://www.benetl.net

Rilasciata la versione 2.0.6 di Npgsql2, un provider di dati .NET per PostgreSQL. http://www.npgsql.org

Rilasciata la versione 2.5.2 di PostgreDAC. http://microolap.com/products/connectivity/postgresdac/download/

Offerte di lavoro su PostgreSQL per luglio 2009

http://archives.postgresql.org/pgsql-jobs/2009-07/threads.php

Notizie locali su PostgreSQL

Nei giorni 22 e 23 agosto 2009, a St. Augustin, in Germania, vicino a Bonn e Colonia, si terrà OpenSQL Camp. La scadenza per presentare comunicazioni è il 19 luglio 2009. Inviate le vostre proposte! http://opensqlcamp.org/Events/2009/Call_for_Participation

Domenica 23 agosto 2009 il PostgreSQL User Group tedesco avrà una dev room a FrOSCon. È aperto il Call for Papers: http://andreas.scherbaum.la/blog/archives/573-Call-for-Papers-fuer-den-PostgreSQL-Devroom-auf-der-FrOSCon-2009.html

PyCon Argentina si terrà in Buenos Aires nei giorni 4 e 5 settembre 2009. http://ar.pycon.org/2009/rfp/

Andreas (ads) Scherbaum terrà un corso "PostgreSQL for Corporate Use" al centro di formazione per adulti in Magdeburgo, Germania, dal 7 all’11 settembre 2009. Trovate i dettagli qua: http://andreas.scherbaum.la/blog/archives/574-PostgreSQL-als-Bildungsurlaub.html

Si terrà una conferenza in Athens, Georgia, USA il 19 settembre 2009. È aperto il CfP. http://www.postgresqlconference.org/2009/pgday/athens

Si terrà una conferenza a Seattle, Washington, USA nei giorni 16-18 ottobre 2009. È aperto il CfP. http://www.postgresqlconference.org/2009/west

È aperto il CfP per PGCon Brazil, che si svolgerà Il 23 e 24 ottobre 2009 presso Unicamp, nella città di Campinas, stato di San Paolo. http://pgcon.postgresql.org.br/2009/chamadas.en.php

Il PGDay.EU 2009 si terrà a Telecom ParisTech in Parigi nei giorni 6 e 7 novembre 2009. http://www.pgday.eu/

Gli organizzatori della conferenza per il decimo anniversario di JPUG stanno accettando proposte. La conferenza si terrà i giorni 20 e 21 novembre 2009 a Tokio. http://archives.postgresql.org/pgsql-announce/2009-05/msg00018.php

Rassegna stampa su PostgreSQL

Planet PostgreSQL: http://planet.postgresql.org/

Questo notiziario settimanale PostgreSQL è stato realizzato da David Fetter e Josh Berkus; traduzione parziale in lingua italiana a cura di Gianni Ciolli.

Notizie o annunci destinati a questo notiziario dovranno pervenire entro la mezzanotte di domenica (le 15 nel fuso orario della California). I comunicati in lingua italiana dovranno essere inviati a pwn@itpug.org; per le lingue inglese o tedesca, si scriva rispettivamente a david@fetter.org o a pwd@pgug.de.

Patch applicate

Peter Eisentraut committed:

  • Update information schema to SQL:2008: Add yes_or_no domain for "boolean" data. Add new columns for VIEWS view. Slight section renumbering.

  • Rearrangement of the HTML docs build rules. Set up proper makefile dependencies in the documentation build rules, especially around the HTML/index build. The problem we’ve had with all previous solutions is that we have used the same file name, such as HTML.index or bookindex.sgml, to mean different things at different stages of the build, and make can’t distinguish that. The solution here is that the first jade run produces HTML.index, but does not require bookindex.sgml at all, and produces no other html output (the latter an idea from Alvaro). The second jade run includes bookindex.sgml, but does not recreate HTML.index. That way, when you change an sgml file, jade is run twice and at the end all dependencies are satisfied. Omitting the html output in the first stage also makes the full build a lot faster. When you run one of the print format targets, only the first jade run is run, then the print target-specific commands. If an HTML build has completed previously, the first jade run is skipped because the dependencies have already been satisfied. The draft and check targets for quick builds and syntax verification are still there.

  • Make backend header files C++ safe. This alters various incidental uses of C++ key words to use other similar identifiers, so that a C++ compiler won’t choke outright. You still (probably) need extern "C" { }; around the inclusion of backend headers. Based on a patch by Kurt Harriman. Also add a script cpluspluscheck to check for C++ compatibility in the future. As of right now, this passes without error for me.

Bruce Momjian committed:

  • In pgsql/contrib/vacuumlo/vacuumlo.c, vacuumlo query cleanups. No need for VACUUM ANAYZE of newly created/populated temp table, just use analyze. No need to apologize for using subquery in DELETE anymore.

Tom Lane committed:

  • In pgsql/src/backend/utils/cache/plancache.c, do a conditional SPI_push/SPI_pop when replanning a query in RevalidateCachedPlan. This is to avoid a "SPI_ERROR_CONNECT" failure when the planner calls a SPI-using function and we are already inside one. The alternative fix is to expect callers of RevalidateCachedPlan to do this, which seems likely to result in additional hard-to-detect bugs of omission. Per reports from Frank van Vugt and Marek Lewczuk. Back-patch to 8.3. It’s much harder to trigger the bug in 8.3, due to a smaller set of cases in which plans can be invalidated, but it could happen. (I think perhaps only a SI reset event could make 8.3 fail here, but that’s certainly within the realm of possibility.)

  • Tweak the core scanner so that it can be used by plpgsql too. Changes: Pass in the keyword lookup array instead of having it be hardwired. (This incidentally allows elimination of some duplicate coding in ecpg.) Re-order the token declarations in gram.y so that non-keyword tokens have numbers that won’t change when keywords are added or removed. Add ".." and ":=" to the set of tokens recognized by scan.l. (Since these combinations are nowhere legal in core SQL, this does not change anything except the precise wording of the error you get when you write this.)

  • In pgsql/src/interfaces/ecpg/preproc/ecpg.tokens, remove duplicate definition of TYPECAST token. (Apparently, some but not all versions of Bison will warn about this.)

  • Add erand48() to the set of functions supported by our src/port/ library, and extend configure to test for it properly instead of hard-wiring an assumption that everybody but Windows has the rand48 functions. (We do cheat to the extent of assuming that probing for erand48 will do for the entire rand48 family.) erand48() is unused as of this commit, but a followon patch will cause GEQO to depend on it. Andres Freund, additional hacking by Tom Lane.

  • Make GEQO’s planning deterministic by having it start from a predictable random number seed each time. This is how it used to work years ago, but we got rid of the seed reset because it was resetting the main random() sequence and thus having undesirable effects on the rest of the system. To fix, establish a private random number state for each execution of geqo(), and initialize the state using the new GUC variable geqo_seed. People who want to experiment with different random searches can do so by changing geqo_seed, but you’ll always get the same plan for the same value of geqo_seed (if holding all other planner inputs constant, of course). The new state is kept in PlannerInfo by adding a "void *" field reserved for use by join_search hooks. Most of the rather bulky code changes in this commit are just arranging to pass PlannerInfo around to all the GEQO functions (many of which formerly didn’t receive it). Andres Freund, with some editorialization by Tom Lane.

  • Repair bug #4926 "too few pathkeys for mergeclauses". This example shows that the sanity checking I added to create_mergejoin_plan() in 8.3 was a few bricks shy of a load: the mergeclauses could reference pathkeys in a noncanonical order such as x,y,x, not only cases like x,x,y which is all that the code had allowed for. The odd cases only turn up when using redundant clauses in an outer join condition, which is why no one had noticed before.

  • Fix error cleanup failure caused by 8.4 changes in plpgsql to try to avoid memory leakage in error recovery. We were calling FreeExprContext, and therefore invoking ExprContextCallback callbacks, in both normal and error exits from subtransactions. However this isn’t very safe, as shown in recent trouble report from Frank van Vugt, in which releasing a tupledesc refcount failed. It’s also unnecessary, since the resources that callbacks might wish to release should be cleaned up by other error recovery mechanisms (ie the resource owners). We only really want FreeExprContext to release memory attached to the exprcontext in the error-exit case. So, add a bool parameter to FreeExprContext to tell it not to call the callbacks. A more general solution would be to pass the isCommit bool parameter on to the callbacks, so they could do only safe things during error exit. But that would make the patch significantly more invasive and possibly break third-party code that registers ExprContextCallback callbacks. We might want to do that later in HEAD, but for now I’ll just do what seems reasonable to back-patch.

  • Fix a thinko in join_is_legal: when we decide we can implement a semijoin by unique-ifying the RHS and then inner-joining to some other relation, that is not grounds for violating the RHS of some other outer join. Noticed while regression-testing new GEQO code, which will blindly follow any path that join_is_legal says is legal, and then complain later if that leads to a dead end. I’m not certain that this can result in any visible failure in 8.4: the mistake may always be masked by the fact that subsequent attempts to join the rest of the RHS of the other join will fail. But I’m not certain it can’t, either, and it’s definitely not operating as intended. So back-patch. The added regression test depends on the new no-failures-allowed logic that I’m about to commit in GEQO, so no point back-patching that.

  • Rewrite GEQO’s gimme_tree function so that it always finds a legal join sequence, even when the input "tour" doesn’t lead directly to such a sequence. The stack logic that was added in 2004 only supported cases where relations that had to be joined to each other (due to join order restrictions) were adjacent in the tour. However, relying on a random search to figure that out is tremendously inefficient in large join problems, and could even fail completely (leading to "failed to make a valid plan" errors) if random_init_pool ran out of patience. It seems better to make the tour-to-plan transformation a little bit fuzzier so that every tour can form a legal plan, even though this means that apparently different tours will sometimes yield the same plan. In the same vein, get rid of the logic that knew that tours (a,b,c,d,…) are the same as tours (b,a,c,d,…), and therefore insisted the latter are invalid. The chance of generating two tours that differ only in this way isn’t that high, and throwing out 50% of possible tours to avoid such duplication seems more likely to waste valuable genetic- refinement generations than to do anything useful. This leaves us with no cases in which geqo_eval will deem a tour invalid, so get rid of assorted kluges that tried to deal with such cases, in particular the undocumented assumption that DBL_MAX is an impossible plan cost. This is all per testing of Robert Haas’ lets-remove-the-collapse-limits patch. That idea has crashed and burned, at least for now, but we still got something useful out of it. It’s possible we should back-patch this change, since the "failed to make a valid plan" error can happen in existing releases; but I’d rather not until it has gotten more testing.

  • Teach simplify_boolean_equality to simplify the forms foo <> true and foo <> false, along with its previous duties of simplifying foo = true and foo = false. (All of these are equivalent to just foo or NOT foo as the case may be.) It’s not clear how often this is really useful; but it costs almost nothing to do, and it seems some people think we should be smart about such cases. Per recent bug report.

  • In pgsql/src/bin/psql/describe.c, remove unnecessary and version-sensitive dependence on the exact set of column names to be found in a sequence. Per gripe from Bruce Momjian.

Heikki Linnakangas committed:

  • In pgsql/contrib/pg_standby/Makefile, pg_standby doesn’t need to be linked with libpq. Fujii Masao.

Andrew Dunstan committed:

  • DROP IF EXISTS for columns and constraints. Andres Freund.

Patch rifiutate (per adesso)

No one was disappointed this week :-)

Patch in coda

Heikki Linnakangas sent in two revisions of a patch which helps set up index-only scans.

Robert Haas sent in an updated patch for Hot Standby.

Petr (PJMODOS) Jelinek sent in three revisions of a patch to add DefaultACLs http://wiki.postgresql.org/wiki/DefaultACL

ITAGAKI Takahiro sent in two revisions of a patch to add FORCE QUOTE to COPY…CSV.

KaiGai Kohei sent in three more revisions of his SE-PostgreSQL patch.

Jeff Davis sent in another revision of his patch to make more generalized constraints.

Andres Freund sent in a patch to refactor *_collapse_limit and geqo_threshold.

Jaime Casanova sent in a revision of Taro (higepon) Minowa’s patch to allow pg_dump* to dump comments on commposite-type and index columns.

ITAGAKI Takahiro sent in an update for the sampling profiler patch.

Tsutomu Yamada sent in two revisions of a patch to fix the ""could not reattach to shared memory" bug on Windows.

Fujii Masao sent in two more revisions of the Synchronous Replication patch.

Oleg Bartunov sent in a patch which adds prefix support for synonym dictionaries in full-text search.

Oleg Bartunov sent in a patch to add filtering dictionaries and a new contrib module, unaccent, which removes accents, using same.

Sergey V. Karpov sent in a patch which extends the functionality of dict_xsyn extended synonym dictionary.

Fernando Ike de Oliveira sent in two revisions of a patch to add dL for PL languages to psql.

Zoltan Boszormenyi sent in another revision of his patch set to improve ECPG’s Informix compatibility layer.

Tom Lane sent in a WIP patch to make PL/pgsql use the core lexer.

Caleb Welton sent in another revision of his patch to add bytea to PL/PythonU.

Andrew (RhodiumToad) Gierth sent in another revision of the hstore patch with fixes and new tests for some edge case bugs.

Kevin Grittner sent in a patch to revise parallel pg_restore’s scheduling heuristic.

Steve Prentice sent in another revision of the patch to make PL/pgsql treat any word following AS as a label.

Petr (PJMODOS) Jelinek sent in two revisions of a patch to implement GRANT ON ALL IN schema.

Richard Huxton sent in a patch to create a navigation menu for the documentation.

Fujii Masao sent in another revision of the patch to multiplex SIGUSR1, which is infrastructure for the Synchronous Replication feature.

Zoltan Boszormenyi sent in a patch to add struct support for SELECT INTO to ECPG.

Peter Eisentraut sent in a patch to make PL/Python use errcontext() instead of passing the function names around to use in error messages.

Alan Li sent in a patch to optimize MIN and MAX queries on partitioned tables.

Andreas Wenk sent in a patch to include the du+ option in ? output in psql.

Bernd Helmle sent in a revision of Pavel Stehule’s patch to allow mixed and named notation support for PL/pgsql functions.

Dean Rasheed sent in another revision of the deferrable UNIQUE constraints patch.

Jeremy Kerr sent in another revision of the patch to avoid manual shift-and-test logic in AllocSetFreeIndex.

Andreas Freund sent in another revision of his patch to allow machine-readable EXPLAIN output.

Andreas Freund sent in two more revisions of his generic EXPLAIN options patch.

]]>
https://blog.2ndquadrant.it/notiziario_settimanale_postgre_32/feed/ 0
Notiziario settimanale PostgreSQL – 12 luglio 2009 https://blog.2ndquadrant.it/notiziario_settimanale_postgre_31/ https://blog.2ndquadrant.it/notiziario_settimanale_postgre_31/#comments Mon, 20 Jul 2009 23:38:36 +0000 http://2ndblog.dev.xcon.it/notiziario_settimanale_postgre_31/ (Traduzione parziale in lingua italiana delle PostgreSQL Weekly News a cura di Gianni Ciolli gianni.ciolli@2ndquadrant.it)

Ci sono ancora dei posti per il PgDay San Jose che si terrà domenica 19 luglio. Registratevi! http://wiki.postgresql.org/wiki/PgDaySanJose2009

Grazie a Robert Haas, Brendan Jurd, et al. adesso c’è un nuovo strumento per le commitfest. http://commitfest.postgresql.org/

Novità sul prodotto PostgreSQL

Rilasciata la versione 2.9.2 di check_postgres, un plugin Nagios per il monitoraggio di PostgreSQL. http://bucardo.org/check_postgres/

Il PostgreSQL RPM Building Project ha rilasciato il PostgreSQL 8.4 Live CD: http://www.pglivecd.org

Rilasciata la versione 1.3.1 di pgbouncer, un pooler di connessioni per PostgreSQL. http://pgfoundry.org/projects/pgbouncer/

Offerte di lavoro su PostgreSQL per luglio 2009

http://archives.postgresql.org/pgsql-jobs/2009-07/threads.php

Notizie locali su PostgreSQL

Il pgDay di San Jose (USA) si terrà domenica 19 luglio 2009, dando il via ad OSCON. Iscrivetevi qui: http://postgresql.meetup.com/1/calendar/10626647

Nei giorni 22 e 23 agosto 2009, a St. Augustin, in Germania, vicino a Bonn e Colonia, si terrà OpenSQL Camp. La scadenza per presentare comunicazioni è il 19 luglio 2009. Inviate le vostre proposte! http://opensqlcamp.org/Events/2009/Call_for_Participation

Domenica 23 agosto 2009 il PostgreSQL User Group tedesco avrà una dev room a FrOSCon. È aperto il Call for Papers: http://andreas.scherbaum.la/blog/archives/573-Call-for-Papers-fuer-den-PostgreSQL-Devroom-auf-der-FrOSCon-2009.html

PyCon Argentina si terrà in Buenos Aires nei giorni 4 e 5 settembre 2009. http://ar.pycon.org/2009/rfp/

Andreas (ads) Scherbaum terrà un corso "PostgreSQL for Corporate Use" al centro di formazione per adulti in Magdeburgo, Germania, dal 7 all’11 settembre 2009. Trovate i dettagli qua: http://andreas.scherbaum.la/blog/archives/574-PostgreSQL-als-Bildungsurlaub.html

Si terrà una conferenza in Athens, Georgia, USA il 19 settembre 2009. È aperto il CfP. http://www.postgresqlconference.org/2009/pgday/athens

Si terrà una conferenza a Seattle, Washington, USA nei giorni 16-18 ottobre 2009. È aperto il CfP. http://www.postgresqlconference.org/2009/west

È aperto il CfP per PGCon Brazil, che si svolgerà Il 23 e 24 ottobre 2009 presso Unicamp, nella città di Campinas, stato di San Paolo. http://pgcon.postgresql.org.br/2009/chamadas.en.php

Il PGDay.EU 2009 si terrà a Telecom ParisTech in Parigi nei giorni 6 e 7 novembre 2009. http://www.pgday.eu/

Gli organizzatori della conferenza per il decimo anniversario di JPUG stanno accettando proposte. La conferenza si terrà i giorni 20 e 21 novembre 2009 a Tokio. http://archives.postgresql.org/pgsql-announce/2009-05/msg00018.php

Rassegna stampa su PostgreSQL

Planet PostgreSQL: http://planet.postgresql.org/

Questo notiziario settimanale PostgreSQL è stato realizzato da David Fetter, Josh Berkus e Devrim GUNDUZ; traduzione parziale in lingua italiana a cura di Gianni Ciolli.

Notizie o annunci destinati a questo notiziario dovranno pervenire entro la mezzanotte di domenica (le 15 nel fuso orario della California). I comunicati in lingua italiana dovranno essere inviati a pwn@itpug.org; per le lingue inglese o tedesca, si scriva rispettivamente a david@fetter.org o a pwd@pgug.de.

Patch applicate

Peter Eisentraut committed:

  • In pgsql/src/bin/psql/describe.c, show definition of index columns in d on index. This adds a column called "Definition" to the output of psql d on an index, which shows the full expression behind the index column. For indexes on plain columns, this is redundant, but for expression indexes, this reveals the real expression. Author: Khee Chin.

  • More sensible character_octet_length. For character types with typmod, character_octet_length columns in the information schema now show the maximum character length times the maximum length of a character in the server encoding, instead of some huge value as before.

  • In pgsql/src/bin/psql/describe.c, sort child tables by name instead of OID in d+ display. This was an oversight in the recent patch. Found by Tom Lane.

  • In pgsql/src/bin/psql/describe.c, psql backward compatibility fix. For servers older than 8.3, sort display of child tables by relname instead of oid::regclass::text, because the cast from regclass to text did not work back then. The older display may be slightly worse when different schemas are involved, but that should be rare enough.

  • In pgsql/src/makefiles/pgxs.mk, when calling unsupported "make check" with a pgxs module, return a nonzero exit code.

  • In pgsql/doc/src/sgml/acronyms.sgml, correct what ISO stands for.

  • Alter some gratuitous uses of "ANSI" when "SQL standard" might have been meant or the reference to a standard was unnecessary.

Tom Lane committed:

  • Fix set_append_rel_pathlist() to deal intelligently with cases where substituting a child rel’s output expressions into the appendrel’s restriction clauses yields a pseudoconstant restriction. We might be able to skip scanning that child rel entirely (if we get constant FALSE), or generate a one-time filter. 8.3 more or less accidentally generated plans that weren’t completely stupid in these cases, but that was only because an extra recursive level of subquery_planner() always occurred and allowed const-simplification to happen. 8.4’s ability to pull up appendrel members with non-Var outputs exposes the fact that we need to work harder here. Per gripe from Sergey Burladyan.

  • In pgsql/src/backend/utils/adt/timestamp.c, use floor() not rint() when reducing precision of fractional seconds in timestamp_trunc, timestamptz_trunc, and interval_trunc(). This change only affects the float-datetime case; the integer-datetime case already behaved like truncation instead of rounding. Per gripe from Mario Splivalo. This is a pre-existing issue but I’m choosing not to backpatch, because it’s such a corner case and there have not been prior complaints. The issue is largely moot anyway given the trend towards integer datetimes.

  • In pgsql/src/bin/psql/describe.c, code review for patch to show definition of index columns in d on index. Safely schema-qualify the pg_get_indexdef call, make the query a bit prettier in -E mode, remove useless join to pg_index, make it more obvious that the header[] array is not overrun.

  • In pgsql/src/include/catalog/pg_proc.h, fix typo in comment.

  • In pgsql/src/backend/catalog/information_schema.sql, query in SQL function still not schema-safe; add a couple more pg_catalog. qualifications.

  • In pgsql/src/backend/utils/mb/mbutils.c, don’t use ‘return’ where you should use ‘PG_RETURN_xxx’.

  • In pgsql/src/bin/psql/describe.c, just a little more schema-qualification …

  • In pgsql/doc/src/sgml/datatype.sgml, add missing HOUR TO SECOND option to list of possible INTERVAL field sets, as noted by Sebastien Flaesch. Also update the claim that we simply throw away fields outside this set — that got changed later to only discard less-significant fields.

  • In pgsql/src/backend/postmaster/postmaster.c, remove no-longer-necessary transmission of postmaster’s LC_COLLATE and LC_CTYPE settings to children via BackendParameters. Per discussion, the postmaster is now just using system defaults anyway, so we might as well save a few cycles during backend startup.

  • In pgsql/contrib/xml2/xslt_proc.c, fix xslt_process() to ensure that it inserts a NULL terminator after the last pair of parameter name/value strings, even when there are MAXPARAMS of them. Aboriginal bug in contrib/xml2, noted while studying bug #4912 (though I’m not sure whether there’s something else involved in that report). This might be thought a security issue, since it’s a potential backend crash; but considering that untrustworthy users shouldn’t be allowed to get their hands on xslt_process() anyway, it’s probably not worth getting excited about.

  • In pgsql/src/backend/optimizer/path/costsize.c, fix set_rel_width() to do something reasonable with non-Var items in a RelOptInfo targetlist. It used to be that the only possibility other than a Var was a RowExpr representing a whole-row child Var, but as of 8.4’s expanded ability to flatten appendrel members, we can get arbitrary expressions in there. Use the expression’s type info and get_typavgwidth() to produce an at-least-marginally-sane result. Note that get_typavgwidth()’s fallback estimate (32 bytes) is the same as what was here before, so there will be no behavioral change for RowExprs. Noted while looking at recent gripe about constant quals pushed down to FunctionScan appendrel members … not only were we failing to recognize the constant qual, we were getting the width estimate wrong :-(

  • Move some declarations in the raw-parser header files to create a clearer distinction between the external API (parser.h) and declarations that only need to be visible within the raw parser code (gramparse.h, which now is only included by parser.c, gram.y, scan.l, and keywords.c). This is in preparation for the upcoming change to a reentrant lexer, which will require referencing YYSTYPE in the declarations of base_yylex and filtered_base_yylex, hence gram.h will have to be included by gramparse.h. We don’t want any more files than absolutely necessary to depend on gram.h, so some cleanup is called for.

  • Fix up PGDLLIMPORT marking for standard_conforming_strings. Moving it into a header file that plpgsql’s scan.l can see broke the previous kluge. Per buildfarm results.

  • Advance the minimum required version of "flex" from 2.5.4 to 2.5.31, and update documentation accordingly. This is required in order to have support for a reentrant scanner. I’m committing this bit separately in order to have an easy reference if we later decide to make the minimum something different (like 2.5.33).

  • Convert the core lexer and parser into fully reentrant code, by making use of features added to flex and bison since this code was originally written. This change doesn’t in itself offer any new capability, but it’s needed infrastructure for planned improvements in plpgsql. Another feature now available in flex is the ability to make it use palloc instead of malloc, so do that to avoid possible memory leaks. (We should at some point change the other lexers likewise, but this commit doesn’t touch them.)

  • In pgsql/src/backend/parser/scan.l, although the flex documentation avers that yyalloc and yyrealloc take size_t arguments, the emitted scanner actually prototypes them with type yy_size_t, which is sometimes not the same thing depending on flex version and platform. Easiest fix seems to be to use yy_size_t. Per buildfarm results.

  • Make the configure messages rejecting old bison and flex versions include the full path and version of the program being rejected.

Heikki Linnakangas committed:

  • In pgsql/src/backend/utils/adt/formatting.c, fix ancient bug in handling of to_char modifier ‘TH’, when used with Hitoshi Harada. In what seems like an oversight, we used to treat ‘TH’ the same as lowercase ‘th’, but only with HH/HH12.

  • In pgsql/src/backend/utils/init/postinit.c, need to use pg_perm_setlocale when setting LC_CTYPE and LC_COLLATE at startup. Otherwise, the LC_CTYPE/COLLATE setting gets reverted when using plperl, which leads to incorrect query results and index corruption. This was accidentally broken in the per-database locale patch in 8.4. Pointed out by Andrew (RhodiumToad) Gierth.

Bruce Momjian committed:

  • Stamp minor library version numbers for 8.5; sorry for the delay.

Patch rifiutate (per adesso)

No one was disappointed this week :-)

Patch in coda

Fujii Masao sent a WIP patch to introduce a new value, sync_file_range, to wal_sync_method.

Heikki Linnakangas sent in a WIP patch to set client_encoding automatically from locale in libpq.

Pavel Stehule sent in a patch to fix BUG #4907: stored procedures and changed tables.

ITAGAKI Takahiro sent in two patches to parallelize pgbench.

Robert Haas sent in three patches to help fix the issue around the *_collapse_limit GUC parameters.

Josh Tolley sent in a patch against the Commitfest code to keep Perl::Critic quiet.

Peter Eisentraut sent in two revisions of a patch to allow byteas to be escaped for input and output as hex.

KaiGai Kohei sent in another revision of his SE-PostgreSQL patches.

Brendan Jurd sent in another revision of the patch to add scientific notation to to_char().

Bernd Helmle sent in another revision of a patch to allow for dropping columns and constraints conditionally.

Tom Lane sent in a patch to increase the minimum flex version in order to enable a reentrant parser.

Dean Rasheed sent in two WIP patches to allow deferrable unique constraints.

Marko (johto) Tiikkaja sent in a patch to allow INSERT…RETURNING inside a CTE.

Andrew (RhodiumToad) Gierth sent in a patch to update hstore to CVS TIP.

Teodor Sigaev sent in a patch to fix wrong algorithms for "contains" and "overlaps" operations over polygons, including regression tests for same.

Jaime Casanova sent in an update to Mark Kirkwood’s patch which adds lock wait statistics to the pg_catalog, including a new view.

]]>
https://blog.2ndquadrant.it/notiziario_settimanale_postgre_31/feed/ 0
Notiziario settimanale PostgreSQL – 5 luglio 2009 https://blog.2ndquadrant.it/notiziario_settimanale_postgre_30/ https://blog.2ndquadrant.it/notiziario_settimanale_postgre_30/#comments Mon, 20 Jul 2009 23:36:31 +0000 http://2ndblog.dev.xcon.it/notiziario_settimanale_postgre_30/ (Traduzione parziale in lingua italiana delle PostgreSQL Weekly News a cura di Gianni Ciolli gianni.ciolli@2ndquadrant.it)

È uscita la versione 8.4.0 di PostgreSQL. http://www.postgresql.org/about/press/features84.html

Servono al più presto dei Round-Robin Reviewers! I volontari scrivano a robertmhaas AT gmail DOT com. http://wiki.postgresql.org/wiki/Reviewing_a_Patch

Novità sul prodotto PostgreSQL

Rilasciata la versione 8.3-1.8 Beta 6 di PostgreSQL + Replication, noto in precedenza come Mammoth Replicator. https://projects.commandprompt.com/public/replicator

Rilasciata la versione 1.10 di pgAdmin, uno strumento GUI per la gestione di PostgreSQL. http://www.pgadmin.org/

Rilasciata la versione 2.3.2 di pgloader, un bulk loader per PostgreSQL. http://pgfoundry.org/projects/pgloader/

Rilasciata la versione 1.1.0 di pgSphere, un modulo per lavorare con le coordinate sferiche. http://pgfoundry.org/projects/pgsphere/

Offerte di lavoro su PostgreSQL per luglio 2009

http://archives.postgresql.org/pgsql-jobs/2009-07/threads.php

Notizie locali su PostgreSQL

Il pgDay di San Jose (USA) si terrà domenica 19 luglio 2009, dando il via ad OSCON. Iscrivetevi qui: http://postgresql.meetup.com/1/calendar/10626647

Nei giorni 22 e 23 agosto 2009, a St. Augustin, in Germania, vicino a Bonn e Colonia, si terrà OpenSQL Camp. La scadenza per presentare comunicazioni è il 19 luglio 2009. Inviate le vostre proposte! http://opensqlcamp.org/Events/2009/Call_for_Participation

Domenica 23 agosto 2009 il PostgreSQL User Group tedesco avrà una dev room a FrOSCon. È aperto il Call for Papers: http://andreas.scherbaum.la/blog/archives/573-Call-for-Papers-fuer-den-PostgreSQL-Devroom-auf-der-FrOSCon-2009.html

PyCon Argentina si terrà in Buenos Aires nei giorni 4 e 5 settembre 2009. http://ar.pycon.org/2009/rfp/

Andreas (ads) Scherbaum terrà un corso "PostgreSQL for Corporate Use" al centro di formazione per adulti in Magdeburgo, Germania, dal 7 all’11 settembre 2009. Trovate i dettagli qua: http://andreas.scherbaum.la/blog/archives/574-PostgreSQL-als-Bildungsurlaub.html

Si terrà una conferenza in Athens, Georgia, USA il 19 settembre 2009. È aperto il CfP. http://www.postgresqlconference.org/2009/pgday/athens

Si terrà una conferenza a Seattle, Washington, USA nei giorni 16-18 ottobre 2009. È aperto il CfP. http://www.postgresqlconference.org/2009/west

È aperto il CfP per PGCon Brazil, che si svolgerà Il 23 e 24 ottobre 2009 presso Unicamp, nella città di Campinas, stato di San Paolo. http://pgcon.postgresql.org.br/2009/chamadas.en.php

Il PGDay.EU 2009 si terrà a Telecom ParisTech in Parigi nei giorni 6 e 7 novembre 2009. http://www.pgday.eu/

Gli organizzatori della conferenza per il decimo anniversario di JPUG stanno accettando proposte. La conferenza si terrà i giorni 20 e 21 novembre 2009 a Tokio. http://archives.postgresql.org/pgsql-announce/2009-05/msg00018.php

Rassegna stampa su PostgreSQL

Planet PostgreSQL: http://planet.postgresql.org/

Questo notiziario settimanale PostgreSQL è stato realizzato da David Fetter, Josh Berkus e Devrim GUNDUZ; traduzione parziale in lingua italiana a cura di Gianni Ciolli.

Notizie o annunci destinati a questo notiziario dovranno pervenire entro la mezzanotte di domenica (le 15 nel fuso orario della California). I comunicati in lingua italiana dovranno essere inviati a pwn@itpug.org; per le lingue inglese o tedesca, si scriva rispettivamente a david@fetter.org o a pwd@pgug.de.

Patch applicate

Tom Lane committed:

  • In pgsql/src/include/Makefile, add missed src/include/foreign subdirectory to the set installed into INSTALLDIR/include/server/. Itagaki Takahiro

  • Stamp HEAD as 8.5devel.

  • Remove useless References column for pg_listener catalog description. Per Shigehiro Honda.

  • In pgsql/src/bin/pg_dump/pg_dump.c, fix up pg_dump’s –binary-upgrade option so that it behaves properly with inherited columns and check constraints. Per my recent trouble report.

  • Fix handling of changed-Param signaling for CteScan plan nodes. We were using the "cteParam" as a proxy for the possibility that the underlying CTE plan depends on outer-level variables or Params, but that doesn’t work very well because it sometimes causes calling subqueries to be treated as SubPlans when they could be InitPlans. This is inefficient and also causes the outright failure exhibited in bug #4902. Instead, leave the cteParam out of it and copy the underlying CTE plan’s extParams directly. Per bug #4902 from Marko (johto) Tiikkaja.

  • In pgsql/src/backend/parser/gram.y, per SQL spec (in particular, the grammar in SQL:2008 7.13) we should allow parentheses around the that follows a WITH clause, eg with cte(foo) as ( values(0) ) ((select foo from cte)); This seems to be just an oversight/thinko in gram.y. Noted while experimenting with bug #4902.

Peter Eisentraut committed:

  • Regression test for XML mapping functionality. I wrote this one while chasing down some bugs in the closing days of 8.4. It could be useful in the long run. This area of the code had no test coverage at all before.

  • Upgrade to Autoconf 2.63. This upgrades the configure infrastructure to the latest Autoconf version. Some notable news are: the workaround for the broken fseeko() test is gone, checking for unknown options is now provided by Autoconf itself, and fixes for Mac OS X.

  • In pgsql/src/bin/psql/describe.c, have d show child tables that inherit from the specified parent. As per discussion, d shows only the number of child tables, because that could be hundreds, when used for partitioning. d+ shows the actual list. Damien Clochard

  • Add log_line_prefix placeholder %e to contain the current SQL state. Guillaume Smet

Patch rifiutate (per adesso)

No one was disappointed this week :-)

Patch in coda

Lars Kanis sent in a patch to extend user mappings in pg_ident.conf.

Robert Haas sent in another revision of his generated header file handling patch.

Jeremy Kerr sent in three revisions of a patch to avoid manual shift-and-test logic in AllocSetFreeIndex.

Robert Haas sent in a patch to autogenerate headers and bki.

KaiGai Kohei sent in another revision of his SE-PostgreSQL patches.

Hans-Juergen Schoenig sent in a patch to transform a tsvector to table format.

Petr (PJMODOS) Jelinek sent in another revision of his GRANT ON ALL IN SCHEMA patch.

Fujii Masao sent in a patch to provide support for multiplexing the SIGUSR1 signal.

Fujii Masao sent in a patch to provide support for non-blocking communication between a frontend and a backend.

Zoltan Boszormenyi sent in two revisions of a patch to add a "string" pseudo-type to ECPG.

Gregory Stark sent in a WIP patch to add a Merge Append node, part of querying partitioned tables more efficiently.

Jeff Davis sent in a WIP patch to allow generalized UNIQUE constraints such as "doesn’t overlap."

Dimitri Fontaine sent in a patch to allow people to run process_local_preload_libraries from within a transaction.

]]>
https://blog.2ndquadrant.it/notiziario_settimanale_postgre_30/feed/ 0
Notiziario settimanale PostgreSQL – 28 giugno 2009 https://blog.2ndquadrant.it/notiziario_settimanale_postgre_28/ https://blog.2ndquadrant.it/notiziario_settimanale_postgre_28/#comments Mon, 20 Jul 2009 23:35:09 +0000 http://2ndblog.dev.xcon.it/notiziario_settimanale_postgre_28/ (Traduzione parziale in lingua italiana delle PostgreSQL Weekly News a cura di Gianni Ciolli gianni.ciolli@2ndquadrant.it)

Presto uscirà la 8.4.0. Nel mentre, continuate con i test! http://www.postgresql.org/developer/beta

Si terrà una conferenza in Athens, Georgia, USA il 19 settembre 2009. È aperto il CfP. http://www.postgresqlconference.org/2009/pgday/athens

Lo stand PostgreSQL a FISL in Porto Alegre, Brazil era molto affollato. Le foto sono disponibili qua: http://picasaweb.google.com/diogob/FISL2009?feat=directlink

Domenica 23 agosto 2009 il PostgreSQL User Group tedesco avrà una dev room a FrOSCon. È aperto il Call for Papers: http://andreas.scherbaum.la/blog/archives/573-Call-for-Papers-fuer-den-PostgreSQL-Devroom-auf-der-FrOSCon-2009.html

Si terrà una conferenza a Seattle, Washington, USA nei giorni 16-18 ottobre 2009. È aperto il CfP. http://www.postgresqlconference.org/2009/west

Novità sul prodotto PostgreSQL

Andreas (ads) Scherbaum terrà un corso "PostgreSQL for Corporate Use" al centro di formazione per adulti in Magdeburgo, Germania, dal 7 all’11 settembre 2009. Trovate i dettagli qua: http://andreas.scherbaum.la/blog/archives/574-PostgreSQL-als-Bildungsurlaub.html

Rilasciata la versione 3.03 di MyJSQLView, un front-end Java UI per l’editing dei dati. http://myjsqlview.org/projects/MyJSQLView/index.html

Rilasciate le versioni 0.9.0 e 0.8.2 di py-postgresql, un client (driver) per PostgreSQL e un toolkit generico per lavorare con PostgreSQL in Python. http://python.projects.postgresql.org/?utm_source=release&utm_medium=email&utm_campaign=py-postgresql-0.9.0

Il suggerimento della settimana

Dovete inviare dati a MS Excel? "COPY … WITH CSV HEADERS"

Offerte di lavoro su PostgreSQL per giugno 2009

http://archives.postgresql.org/pgsql-jobs/2009-06/threads.php

Notizie locali su PostgreSQL

Il pgDay di San Jose (USA) si terrà domenica 19 luglio 2009, dando il via ad OSCON. Iscrivetevi qui: http://postgresql.meetup.com/1/calendar/10626647

Nei giorni 22 e 23 agosto 2009, a St. Augustin, in Germania, vicino a Bonn e Colonia, si terrà OpenSQL Camp. La scadenza per presentare comunicazioni è il 19 luglio 2009. Inviate le vostre proposte! http://opensqlcamp.org/Events/2009/Call_for_Participation

Il CfP per PyCon Argentina è aperto fino al 29 giugno 2009, 23:59 ART. La conferenza si terrà in Buenos Aires nei giorni 4 e 5 settembre 2009. http://ar.pycon.org/2009/rfp/

È aperto il CfP per PGCon Brazil, che si svolgerà Il 23 e 24 ottobre 2009 presso Unicamp, nella città di Campinas, stato di San Paolo. http://pgcon.postgresql.org.br/2009/chamadas.en.php

Dal primo ottobre, 2ndQuadrant offrirà supporto gratuito agli studenti dell’Università dell’Aquila, per un periodo di 15 mesi. Per ulteriori informazioni: /2ndquadrant-universita-aquila.html

Il PGDay.EU 2009 si terrà a Telecom ParisTech in Parigi nei giorni 6 e 7 novembre 2009. http://www.pgday.eu/

Gli organizzatori della conferenza per il decimo anniversario di JPUG stanno accettando proposte. La conferenza si terrà i giorni 20 e 21 novembre 2009 a Tokio. http://archives.postgresql.org/pgsql-announce/2009-05/msg00018.php

Rassegna stampa su PostgreSQL

Planet PostgreSQL: http://planet.postgresql.org/

Questo notiziario settimanale PostgreSQL è stato realizzato da David Fetter e Josh Berkus; traduzione parziale in lingua italiana a cura di Gianni Ciolli.

Notizie o annunci destinati a questo notiziario dovranno pervenire entro la mezzanotte di domenica (le 15 nel fuso orario della California). I comunicati in lingua italiana dovranno essere inviati a pwn@itpug.org; per le lingue inglese o tedesca, si scriva rispettivamente a david@fetter.org o a pwd@pgug.de.

Patch applicate

Tom Lane committed:

  • In pgsql/src/backend/utils/adt/arrayfuncs.c, revert dubious message wording change.

  • Make to_timestamp and friends skip leading spaces before an integer field, even when not in Fujii Masao mode. This improves compatibility with Oracle and with our pre-8.4 behavior, as per bug #4862. Add a couple of regression test cases for this. In passing, get rid of the labeling of the individual test cases; doesn’t seem to be good for anything except causing extra work when inserting a test… Brendan Jurd and Tom Lane

  • For bulk write operations (eg COPY IN), use a ring buffer of 16MB instead of the 256KB limit originally enforced by a patch committed 2008-11-06. Per recent test results, the smaller size resulted in an undesirable decrease in bulk data loading speed, due to COPY processing frequently getting blocked for WAL flushing. This area might need more tweaking later, but this setting seems to be good enough for 8.4.

  • Fix the makefiles to fail cleanly if Perl is needed but not present. This used to work as intended, but got broken some time ago (a quoted empty string is not an empty string), and got broken some more by the changes to generate ecpg’s preproc.y automatically. Given all the unprotected uses of $(PERL) elsewhere, it seems best to make use of the $(missing) script rather than trying to ensure each such use is protected individually. Also fix various bits of documentation that omitted to mention Perl as a requirement for building from a CVS pull. Per a complaint from Robert Haas.

  • In pgsql/src/backend/utils/adt/geo_ops.c, fix an ancient error in dist_ps (distance from point to line segment), which a number of other geometric operators also depend on. It miscalculated the slope of the perpendicular to the given line segment anytime that slope was other than 0, infinite, or +/-1. In some cases the error would be masked because the true closest point on the line segment was one of its endpoints rather than the intersection point, but in other cases it could give an arbitrarily bad answer. Per bug #4872 from Nick Roosevelt. Bug goes clear back to Berkeley days, so patch all supported branches. Make a couple of cosmetic adjustments while at it.

  • In pgsql/doc/src/sgml/dml.sgml, provide a link to the UPDATE reference page in the ‘Updating Data’ section of the docs. Per suggestion from Brad Bowman.

  • In pgsql/contrib/pg_standby/pg_standby.c, make prior patch pgindent-safe.

  • In pgsql/src/backend/utils/error/elog.c, add _``_attribute_``_((format_arg(1))) to the declaration of err_gettext(), to restore gcc’s ability to crosscheck format arguments within elog.c. Noted in a test compilation with -Wformat-nonliteral enabled.

  • Cleanup and code review for the patch that made bgwriter active during archive recovery. Invent a separate state variable and inquiry function for XLogInsertAllowed() to clarify some tests and make the management of writing the end-of-recovery checkpoint less klugy. Fix several places that were incorrectly testing InRecovery when they should be looking at RecoveryInProgress or XLogInsertAllowed (because they will now be executed in the bgwriter not startup process). Clarify handling of bad LSNs passed to XLogFlush during recovery. Use a spinlock for setting/testing SharedRecoveryInProgress. Improve quite a lot of comments. Heikki Linnakangas and Tom Lane.

  • In pgsql/doc/src/sgml/backup.sgml, marginal improvement of description of recovery_end_command.

  • In pgsql/doc/src/sgml/monitoring.sgml, add a note about SystemTap vs DTrace spelling of probe names.

  • In pgsql/doc/src/sgml/release-8.4.sgml, update release notes in final preparation for 8.4.0.

  • In pgsql/doc/Makefile, revert addition of "o" to tar options. This was intended to fix bug #4883, but the cure appears to be worse than the disease. It turns out that GNU tar versions 1.14.x misinterpret -o as –same-owner, not –no-same-owner, leading to exactly the wrong behavior for both root and nonroot users. While that bug has been fixed for nearly five years, these tar versions are still found in the wild, notably in OS X 10.4. Given that #4883 was the first complaint we’d heard, it’s definitely not worth fixing at the risk of breaking things for other users. Perhaps revisit at a later date when we’re not up against a release deadline.

Peter Eisentraut committed:

  • In pgsql/doc/src/sgml/ref/move.sgml, add more explicit note that the parameters of MOVE are identical to FETCH. Per David Wheeler.

  • In pgsql/src/backend/access/gist/gistsplit.c, correct grammar in picksplit debug messages

  • In pgsql/doc/src/sgml/Makefile, man pages back to lowercase names, with additional fixup to make the .so links work.

  • In pgsql/doc/Makefile, use $(TAR) instead of tar in makefiles.

  • In pgsql/doc/Makefile, extract tarballs with "o" option (tar xof), to behave reasonably when run as root, as would usually be the case during make install. Per bug #4883.

  • Translation updates for 8.4 release. File that are translated less than 80% have been removed, as per new translation team policy.

Marc Fournier committed:

  • Bundle RC2.

  • Bundle v8.4.0.

Magnus Hagander committed:

  • Properly initialize SSL engines when used from libpq. This is required for most external engines. Per report and initial code from Lars Kanis.

  • In pgsql/src/backend/libpq/hba.c, parse_ident_usermap() should use ereport(LOG) and not ERROR, and put the return value in the *error_p variable. Noted by Tom Lane.

  • In pgsql/doc/src/sgml/client-auth.sgml, fix incorrect LDAP example, noted by Tom Lane.

  • In pgsql/src/backend/libpq/auth.c, disallow empty passwords in LDAP authentication, the same way we already do it for PAM.

Heikki Linnakangas committed:

  • Disable pg_standby -l option because the backend doesn’t expect the recovered file to be a symlink. We tried to fix this issue with an earlier server-side patch, but it didn’t fix the whole issue. The same bug is present in older releases as well, but the 8.4 train is about to leave the station, and I’m not sure if have consensus on whether we can remove the -l option in back-branches or do we need to attempt a server-side fix to make symlinking safe. Patch by Simon Riggs, per discussion on bug identified by Fujii Masao.

  • In pgsql/src/backend/access/transam/twophase.c, the code to unlink dropped relations in FinishPreparedTransaction() was acting like runs inside WAL recovery, but it doesn’t. I must’ve copy-pasted this from a redo-function in the relation forks patch. Noticed by Tom Lane while he was looking through callers of smgrdounlink().

  • Fix some serious bugs in archive recovery, now that bgwriter is active during it: When bgwriter is active, the startup process can’t perform mdsync() correctly because it won’t see the fsync requests accumulated in bgwriter’s private pendingOpsTable. Therefore make bgwriter responsible for the end-of-recovery checkpoint as well, when it’s active. When bgwriter is active (= archive recovery), the startup process must not accumulate fsync requests to its own pendingOpsTable, since bgwriter won’t see them there when it performs restartpoints. Make startup process drop its pendingOpsTable when bgwriter is launched to avoid that. Update minimum recovery point one last time when leaving archive recovery. It won’t be updated by the end-of-recovery checkpoint because XLogFlush() sees us as out of recovery already. This fixes bug #4879 reported by Fujii Masao.

Patch rifiutate (per adesso)

No one was disappointed this week :-)

Patch in coda

ITAGAKI Takahiro sent in a patch to add missing_ok to GetUserMapping() and makes dblink use it.

Robert Haas sent in a patch to make pg_listener.h conform better to PostgreSQL coding standards.

Zoltan Boszormenyi sent in a patch to add dynamic cursors and SQLDA to ECPG.

Fujii Masao and Magnus Hagander traded patches to remove pg_standby’s dependency on libpq.so.5.

KaiGai Kohei sent in a patch to add DAC security checks on large objects.

Scara Maccai sent in a patch to add a query progress indicator.

Tsutomu Yamada sent in a patch to make PostgreSQL more portable to 64-bit platforms.

Nedyalko Borisov sent in a JOIN optimization for partitioned tables.

Robert Haas sent in a patch to make generated header files work better with building subsystems.

]]>
https://blog.2ndquadrant.it/notiziario_settimanale_postgre_28/feed/ 0
Notiziario settimanale PostgreSQL – 21 giugno 2009 https://blog.2ndquadrant.it/notiziario_settimanale_postgre_27/ https://blog.2ndquadrant.it/notiziario_settimanale_postgre_27/#comments Mon, 20 Jul 2009 10:22:02 +0000 http://2ndblog.dev.xcon.it/notiziario_settimanale_postgre_27/ (Traduzione parziale in lingua italiana delle PostgreSQL Weekly News a cura di Gianni Ciolli gianni.ciolli@2ndquadrant.it)

È aperto il Call for Papers per il PGDay europeo. Fatevi avanti! http://2009.pgday.eu/

Dal primo ottobre, 2ndQuadrant offrirà supporto gratuito agli studenti dell’Università dell’Aquila, per un periodo di 15 mesi. Per ulteriori informazioni: /2ndquadrant-universita-aquila.html

Nei giorni 22 e 23 agosto 2009, a St. Augustin, in Germania, vicino a Bonn e Colonia, si terrà OpenSQL Camp. La scadenza per presentare comunicazioni è il 19 luglio 2009. Inviate le vostre proposte! http://opensqlcamp.org/Events/2009/Call_for_Participation

Il CfP per PyCon Argentina è aperto fino al 29 giugno 2009, 23:59 ART. La conferenza si terrà in Buenos Aires nei giorni 4 e 5 settembre 2009. http://ar.pycon.org/2009/rfp/

Novità sul prodotto PostgreSQL

Rilasciata la versione 2.8 di Benetl, uno strumento ETL per file che usa postgreSQL. http://www.benetl.net

Rilasciata la versione 1.2.8 di MicroOLAP Database Designer per PostgreSQL. http://microolap.com/products/database/postgresql-designer/

Rilasciata la versione 1.4.0 beta 1 di PostGIS, un sistema informativo geografico per PostgreSQL. http://postgis.refractions.net/

Rilasciata la versione 1.0.3 di rubyrep, un sistema di replica asincrona master-master. http://www.rubyrep.org

La novità della settimana di PostgreSQL 8.4

EXPLAIN ANALYZE mostra l’uso della memoria per sort e hash.

Il suggerimento della settimana

Quei GUC (impostazioni di sistema) di competenza dell’utente, come work_mem e constraint_exclusion, possono essere impostati come proprietà di un ruolo o di una funzione.

Offerte di lavoro su PostgreSQL per giugno 2009

http://archives.postgresql.org/pgsql-jobs/2009-06/threads.php

Notizie locali su PostgreSQL

Il pgDay di San Jose (USA) si terrà domenica 19 luglio 2009, dando il via ad OSCON. Iscrivetevi qui: http://postgresql.meetup.com/1/calendar/10626647

È aperto il CfP per PGCon Brazil, che si svolgerà Il 23 e 24 ottobre 2009 presso Unicamp, nella città di Campinas, stato di San Paolo. http://pgcon.postgresql.org.br/2009/chamadas.en.php

Il PGDay.EU 2009 si terrà a Telecom ParisTech in Parigi nei giorni 6 e 7 novembre 2009. http://www.pgday.eu/

Gli organizzatori della conferenza per il decimo anniversario di JPUG stanno accettando proposte. La conferenza si terrà i giorni 20 e 21 novembre 2009 a Tokio. http://archives.postgresql.org/pgsql-announce/2009-05/msg00018.php

Rassegna stampa su PostgreSQL

Planet PostgreSQL: http://planet.postgresql.org/

Questo notiziario settimanale PostgreSQL è stato realizzato da David Fetter e Josh Berkus; traduzione parziale in lingua italiana a cura di Gianni Ciolli.

Notizie o annunci destinati a questo notiziario dovranno pervenire entro la mezzanotte di domenica (le 15 nel fuso orario della California). I comunicati in lingua italiana dovranno essere inviati a pwn@itpug.org; per le lingue inglese o tedesca, si scriva rispettivamente a david@fetter.org o a pwd@pgug.de.

Patch applicate

Peter Eisentraut committed:

  • In pgsql/src/pl/plpgsql/src/pl_exec.c, fix typo in error message: tgargv -> tg_argv

  • In pgsql/doc/src/sgml/maintenance.sgml, add another link of a GUC variable to where it is explained.

  • Refine the use of terminology around bound and unbound cursors and cursor variables. Remove the confusing term "reference cursor".

  • Add some more documentation and cross-links on using dblink with SQL/MED.

  • In pgsql/doc/Makefile, don’t attempt to "rm" directories on uninstall.

  • Add manvolnum, so that man pages are generated.

  • In pgsql/doc/src/sgml/Makefile, don’t convert the man page names to lower case, so that the .so links work. This is pretty much a workaround for incomplete tools, but having the man page names in upper case looks more natural anyway.

  • In pgsql/doc/Makefile, extend man page installation hackery so that the man page section is also fixed up in the .so links.

  • Message fixes.

Tom Lane committed:

  • In pgsql/src/backend/executor/nodeAgg.c, ExecAgg() failed to finish running out set-returning functions in the last aggregated tuple of a run. Per report from Laurenz Albe. This is a new bug in 8.4, but only because prior versions rejected SRFs in an Agg plan node altogether.

  • Proofreading for Bruce Momjian’s recent round of documentation proofreading. Most of those changes were good, but some not so good…

  • Fix the just-reported problem that you can’t specify all four trigger event types in CREATE TRIGGER. While at it, clean up the amazingly tedious and inextensible way that the trigger event type list was handled. Per report from Greg Sabino Mullane.

  • Fix things so that array_agg_finalfn does not modify or free its input ArrayBuildState, per trouble report from Merlin Moncure. By adopting this fix, we are essentially deciding that aggregate final-functions should not modify their inputs ever. Adjust documentation and comments to match that conclusion.

Heikki Linnakangas committed:

  • Fix a few errors in comments. Patch by Fujii Masao, plus the one in visibilitymap.c by me.

Patch rifiutate (per adesso)

No one was disappointed this week :-)

Patch in coda

Gurjeet Singh sent in a Perl program called neurodiff which allows comparing both regular expression matches and result sets independent of order.

Robert Haas sent in a patch to change do_tup_output to take Datum arguments rather than cstring.

Kevin Grittner sent in another version of his toast-main-out-of-line-reluctantly patch.

Jeremy Kerr sent in another revision of his patch to compare word-at-a-time in src/backend/utils/adt/varchar.c’s bcTruelen.

Fujii Masao sent in another revision of the sync rep patch.

Petr (PJMODOS) Jelinek sent in a patch which allows per-schema GRANT and REVOKE on database objects.

Robert Haas sent in another revision of his "generic options for explain" patch.

Robert Haas sent in another revision of his machine-readable explain output patch.

]]>
https://blog.2ndquadrant.it/notiziario_settimanale_postgre_27/feed/ 0
Notiziario settimanale PostgreSQL – 14 giugno 2009 https://blog.2ndquadrant.it/notiziario_settimanale_postgre_26/ https://blog.2ndquadrant.it/notiziario_settimanale_postgre_26/#comments Mon, 15 Jun 2009 08:16:09 +0000 http://2ndblog.dev.xcon.it/notiziario_settimanale_postgre_26/ Notiziario settimanale PostgreSQL – 14 giugno 2009

(Traduzione parziale in lingua italiana delle PostgreSQL Weekly News a cura di Gianni Ciolli gianni.ciolli@2ndquadrant.it)

Presto uscirà PostgreSQL 8.4 RC1. Provatela! http://www.postgresql.org/developer/beta

Nuovo sondaggio: qual è la tua massima priorità riguardo allo sviluppo di PostgreSQL? http://www.postgresql.org/community

Il progetto TikiWiki ha bisogno di aiuto Postgres! TikiWiki ha bisogno di un nuovo maintainer della compatibilità PostgreSQL, in mancanza del quale dovranno abbandonare il supporto PostgreSQL. Se usi TikiWiki e puoi essere d’aiuto, allora sei pregato di metterti in contatto con marclaporte AT tikiwiki DOT org.

Novità sul prodotto PostgreSQL

Rilasciata la versione 1.7-SNAPSHOT di Mogwai ER-DesignerNG, uno strumento ERD basato su Java. http://mogwai.sourceforge.net/

Rilasciata la versione 1.1.4 di Slony1-ctl, un insieme di script per la gestione di Slony. http://pgfoundry.org/projects/slony1-ctl/

La novità della settimana di PostgreSQL 8.4

Il modulo aggiuntivo (contrib) pg_stat_statements permette di tracciare le statistiche di esecuzione a livello di server. Capacity planners, gioite!

Il suggerimento della settimana

La parte referente ("figlio") delle chiavi esterne dovrebbe di solito avere un indice, a meno che il valore abbia una cardinalità molto bassa. Questo aspetto non è gestito automaticamente da PostgreSQL.

Offerte di lavoro su PostgreSQL per giugno 2009

http://archives.postgresql.org/pgsql-jobs/2009-06/threads.php

Notizie locali su PostgreSQL

Il pgDay di San Jose (USA) si terrà domenica 19 luglio 2009, dando il via ad OSCON. Iscrivetevi qui: http://postgresql.meetup.com/1/calendar/10626647

È aperto il CfP per PGCon Brazil, che si svolgerà Il 23 e 24 ottobre 2009 presso Unicamp, nella città di Campinas, stato di San Paolo. http://pgcon.postgresql.org.br/2009/chamadas.en.php

Il PGDay.EU 2009 si terrà a Telecom ParisTech in Parigi nei giorni 6 e 7 novembre 2009. http://www.pgday.eu/

Gli organizzatori della conferenza per il decimo anniversario di JPUG stanno accettando proposte. La conferenza si terrà i giorni 20 e 21 novembre 2009 a Tokio. http://archives.postgresql.org/pgsql-announce/2009-05/msg00018.php

Rassegna stampa su PostgreSQL

Planet PostgreSQL: http://planet.postgresql.org/

Questo notiziario settimanale PostgreSQL è stato realizzato da David Fetter e Josh Berkus; traduzione parziale in lingua italiana a cura di Gianni Ciolli.

Notizie o annunci destinati a questo notiziario dovranno pervenire entro la mezzanotte di domenica (le 15 nel fuso orario della California). I comunicati in lingua italiana dovranno essere inviati a pwn@itpug.org; per le lingue inglese o tedesca, si scriva rispettivamente a david@fetter.org o a pwd@pgug.de.

Patch applicate

Tom Lane committed:

  • In pgsql/doc/src/sgml/release-8.4.sgml, be a bit more verbose about the effects of string literal processing changes in plpgsql. Per bug #4843.

  • Fix contrib/pageinspect to not create an ABI breakage between 8.3 and 8.4. The original implementation of the 3-argument form of get_raw_page() risked core dumps if the 8.3 SQL function definition was mistakenly used with the 8.4 module, which is entirely likely after a dump-and-reload upgrade. To protect 8.4 beta testers against upgrade problems, add a check on PG_NARGS. In passing, fix missed additions to the uninstall script, and polish the docs a trifle.

  • In pgsql/src/backend/utils/adt/ruleutils.c, fix failure to double-quote function argument names when needed, in pg_get_function_arguments() and related functions. Per report from Andreas Nolte.

  • Restore dblink_current_query() to being a C-language function, so as to not create an ABI break between 8.3 and 8.4. It is still just a wrapper around the built-in current_query() function, but at a different implementation level. Per my proposal. Note: this change doesn’t break 8.4beta installations, since their SQL-language definition of the function still works fine.

  • In pgsql/src/backend/utils/adt/array_userfuncs.c, switch order of tests to avoid possible Assert failure for "array_agg_finalfn(null)". We should modify pg_proc entries to prevent this query from being accepted, but let’s just make the function itself secure too. Per my note of today.

  • In pgsql/src/include/catalog/pg_proc.h, mark internal_in as not strict, so that the construct "null::internal" will throw an error, rather than possibly allowing someone to synthesize a manual call to an internal-accepting function. As of CVS HEAD and existing releases, all such functions are either STRICT or careful about null inputs, so there is no current security issue here. But it seems like a good idea to lock this down to protect against future mistakes. In passing, similarly lock down trigger_in, language_handler_in, opaque_in, and shell_in. These are not believed to present any security risk, but there’s still no good reason to allow nulls of these types to be created. I left the polymorphic pseudotypes (anyelement etc) alone, since a null of one of those types doesn’t seem to be a problem — the worst you can say about it is that it doesn’t have an underlying non-polymorphic type. If we were to make this change during normal development, we’d just automatically bump catversion for a pg_proc.h change. But since this doesn’t create a compatibility risk and isn’t believed to be fixing a live bug, it seems better not to force a catversion bump in late beta.

  • In pgsql/src/backend/utils/adt/xml.c, ensure xmlFree(NULL) is a no-op instead of a core dump. Per report from Sergey Burladyan, there are at least some dank corners of libxml2 that assume this behavior, even though their published documentation suggests they shouldn’t. This is only really a live problem in 8.3, but the code is still there for possible debugging use in HEAD, so patch both branches.

  • Make handling of INTERVAL DAY TO MINUTE and INTERVAL DAY TO SECOND input more consistent with other cases, by having an unlabeled integer field be treated as a number of minutes or seconds respectively. These cases are outside the spec (which insists on full "dd hh:mm" or "dd hh:mm:ss" input respectively), so it’s not much help to us in deciding what to do. But with this change, it’s uniformly the case that an unlabeled integer will be considered as being a number of the interval’s rightmost field. The change also takes us back to the 8.3 behavior of throwing error for certain ambiguous inputs such as INTERVAL ‘1 2’ DAY TO MINUTE. Per recent discussion.

  • In pgsql/src/backend/utils/adt/cash.c, fix cash_in() to behave properly in locales where frac_digits is zero, eg Japan. Report and fix by Itagaki Takahiro. Also fix CASHDEBUG printout format for branches with 64-bit money type, and some minor comment cleanup. Back-patch to 7.4, because it’s broken all the way back.

  • In pgsql/src/backend/access/heap/heapam.c, keep rs_startblock the same during heap_rescan, so that a rescan of a SeqScan node starts from the same place as the first scan did. This avoids surprising behavior of scrollable and WITH HOLD cursors, as seen in Mark Kirkwood’s bug report of yesterday. It’s not entirely clear whether a rescan should be forced to drop out of the syncscan mode, but for the moment I left the code behaving the same on that point. Any change there would only be a performance and not a correctness issue, anyway. Back-patch to 8.3, since the unstable behavior was created by the syncscan patch.

  • In pgsql/doc/src/sgml/ref/declare.sgml, add a warning about possible strange behavior of volatile functions in cursors. This has always been the case, but given the lack of user complaints about it, I’m not going to bother back-patching this.

  • In pgsql/doc/src/sgml/datatype.sgml, add warning that xpath() doesn’t work with non-UTF8 data.

  • Support Kerberos on platforms where libcom_err depends on OpenSSL, as reportedly is true on OpenBSD. Also support OpenBSD’s spelling of -Wl,–as-needed. Per Simon Bertrang.

  • Properly mark pg_freespace() function as strict. Also update uninstall script to match reality.

  • Fix ill-advised whitespace prettification, per buildfarm.

  • In pgsql/src/backend/foreign/foreign.c, somebody seems to have thought they could get away without checking for rsinfo->expectedDesc == NULL in deflist_to_tuplestore(), but that doesn’t look very safe to me. Noted in passing while studying problem report from Greg Davidson.

  • Fix things so that you can still do "select foo()" where foo is a SQL function returning setof record. This used to work, more or less accidentally, but I had broken it while extending the code to allow materialize-mode functions to be called in select lists. Add a regression test case so it doesn’t get broken again. Per gripe from Greg Davidson.

  • Update time zone data files to tzdata release 2009i: DST law changes in Bangladesh, Egypt, Jordan, Pakistan.

  • Mark contrib’s GiST and GIN opclass support functions as STRICT, for safety. (Note: GiST penalty functions could possibly be non-strict, but none are at present.)

  • Remove our inadequate kluge that tried to get AIX’s various broken versions of getaddrinfo() to work. Instead, recommend updating the OS to get a working version of getaddrinfo. Per recent discussions.

  • Revisit AlterTableCreateToastTable’s API once again, hoping to make it what pg_migrator actually needs and not just a partial solution. We have to be able to specify the OID that the new toast table should be created with.

  • In pgsql/doc/src/sgml/release-8.4.sgml, update release notes to today.

  • In pgsql/doc/src/sgml/installation.sgml, add info about minimum recommended AIX fix levels, per Laurenz Albe.

  • Fix several places where a function was declared static and then defined without static. Per testing with a compiler that complains about this.

  • In pgsql/doc/src/sgml/gist.sgml, improve documentation about GiST opclass support functions. Dimitri Fontaine.

  • In pgsql/src/backend/parser/parse_oper.c, fix get_sort_group_operators() so that it doesn’t think arrays can be grouped via hashing. Eventually we ought to make that possible, but it won’t happen for 8.4. Per yesterday’s report from Robert Haas.

  • Change test tables in copy2 regression test to be temporary tables. This prevents autovacuum from reclaiming free space in them and causing the test’s output row order to change, which is causing intermittent bogus failure reports in the buildfarm. Backpatch to 8.3. The issue exists further back, but since autovacuum was not on by default before 8.3, it’s not a problem for buildfarm testing.

Peter Eisentraut committed:

  • In pgsql/src/backend/utils/adt/xml.c, fix map_sql_table_to_xmlschema() with dropped attributes. Also backpatched to 8.3.

  • Fix xmlattribute escaping XML special characters twice (bug #4822). ITAGAKI Takahiro.

  • Correct/improve the datetime_precision field in the information schema. In particular, always show 0 for the date type instead of null, and show 6 (the default) for time, timestamp, and interval without a declared precision. This is now in fuller conformance with the SQL standard. Also clarify the documentation about this. Discovered and analyzed by Konstantin Izmailov and Tom Lane

  • In pgsql/src/backend/access/gist/gist.c, improve capitalization and punctuation in recently added GiST message.

  • In pgsql/src/bin/psql/describe.c, clarify error message.

  • In pgsql/src/pl/plpgsql/src/scan.l, clarify to the translator that plpgsql_yyerror() deals with the translation of "syntax error", not the literal string. This same change was made in the backend a while ago; but it applies to plpgsql as well.

  • In ecpg, arrange that the string "syntax error" generated by bison is translated.

  • Translation updates.

  • In pgsql/src/bin/psql/describe.c, tweak the display of incoming foreign-key constraints in d, per discussion on hackers. Also, take that string out of the translation roster, since it’s now entirely pseudo-SQL.

Joe Conway committed:

  • In pgsql/contrib/dblink/dblink.c, default client encoding to server encoding for dblink connections. Addresses issue raised by Ruzsinszky Attila and confirmed by others.

Alvaro Herrera committed:

  • In pgsql/src/backend/postmaster/autovacuum.c, dynamically set a lower bound on autovacuum nap time so that we don’t rebuild the database list too often. Per bug report from Lukasz Jagiello and ensuing discussion on pgsql-performance.

  • In pgsql/src/backend/postmaster/autovacuum.c, fix typo, per Tom Lane.

Bruce Momjian committed:

  • In pgsql/src/tools/pgindent/README, document new location for typedef list.

  • In pgsql/src/tools/pgindent/README, update pgindent instructions.

  • In pgsql/src/tools/find_typedef, fix BSD find_typedef logic.

  • In pgsql/src/tools/find_typedef, fix Linux typedef code.

  • In pgsql/src/tools/find_typedef, add FreeBSD support for find_typedef, per request from Andrew Dunstan.

  • 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list provided by Andrew Dunstan.

  • In pgsql/src/tools/pgindent/pgindent, document struct/union problem with pgindent.

  • In pgsql/src/tools/find_typedef, mention BSD/OS find_typedef behavior.

  • In pgsql/src/tools/find_typedef, tighten typedef check for Linux.

Marc Fournier committed:

  • Time to tag rc1 …

Patch rifiutate (per adesso)

No one was disappointed this week :-)

Patch in coda

Kedar Potdar sent in a patch targeted for 8.5 to allow automated range- and hash-based partitioning.

KaiGai Kohei sent in another revision of his SE-PostgreSQL patches.

Jeremy Kerr sent in three versions of a patch to refactor the sigpipe-masking code in libpq from macros to private structs.

Kevin Grittner sent in a patch to make TOAST happen with less enthusiasm.

Robert Haas sent in another revision of his patch refactoring EXPLAIN for more generic output.

Robert Haas sent in another revision of his "generic options for explain" patch.

Robert Haas sent in a patch to allow EXPLAIN to output in XML and JSON. It depends on the two patches above.

Robert Haas sent in a patch to have do_tup_output() take Datums. This is in aid of the EXPLAIN outputs above.

David Fetter and Petr Jelinek sent in patches to allow RETURNING in CTEs.

]]>
https://blog.2ndquadrant.it/notiziario_settimanale_postgre_26/feed/ 0