2ndQuadrant » gianni.ciolli 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 PostgreSQL 9.1 a Codemotion https://blog.2ndquadrant.it/postgresql_91_a_codemotion/ https://blog.2ndquadrant.it/postgresql_91_a_codemotion/#comments Tue, 20 Mar 2012 20:45:02 +0000 http://2ndblog.dev.xcon.it/postgresql_91_a_codemotion/ Questo fine settimana parteciperò a Codemotion 2012, con un intervento su PostgreSQL 9.1, rappresentando l’Associazione ITPUG – Italian PostgreSQL User Group.

Per partecipare non occorrerà una preparazione specialistica. Esempio: chi usa già un database, magari di tipo diverso, e vorrebbe approfittare per conoscere meglio PostgreSQL. Oppure chi deve gestire un progetto e sta valutando le tecnologie da usare, incluso il tipo di database. Oppure chi conosce già PostgreSQL, però una versione precedente, e vuole un breve aggiornamento in 40 minuti…

Dal momento che il mio co-autore Gabriele Bartolini si trova in Australia, presenterò l’intervento da solo. L’appuntamento è per venerdì e sabato prossimi a Roma, presso la facoltà di Ingegneria della terza Università. Di PostgreSQL 9.1 parleremo poi alle 14:10 di sabato; altri soci di ITPUG hanno annunciato la loro presenza.

L’idea di proporre questa comunicazione era venuta in realtà a Gabriele, entusiasta partecipante alla scorsa edizione con un intervento sempre su PostgreSQL. Non corriamo tuttavia il rischio di sovrapposizioni: grazie allo sviluppo inarrestabile di PostgreSQL è possibile proporre un intervento analogo, però con contenuti largamente nuovi.

Infatti, rispetto a 12 mesi fa ora c’è una nuova release (la 9.1), e tutte le novità allora preannunciate sono adesso parte di numerosi sistemi live; potrò quindi passare in rassegna le novità della 9.2, sia quelle confermate (JSON nativo, backup dallo standby, scansioni index-only, COUNT(*) veloce, …) che quelle ancora in ballo (trigger sui comandi, chiavi esterne sugli array, controllo sintattico di funzioni, …). Credo quindi che un eventuale spettatore di Codemotion 2011 non potrà annoiarsi, se non per ragioni indipendenti dalla quantità di fatti nuovi riguardanti PostgreSQL.

Ulteriori informazioni dopo la conferenza conclusa; per adesso vi dò appuntamento per venerdì e sabato a Roma…

]]>
https://blog.2ndquadrant.it/postgresql_91_a_codemotion/feed/ 0
pgChess al PGDay di Roma https://blog.2ndquadrant.it/pgchess_al_pgday_di_roma/ https://blog.2ndquadrant.it/pgchess_al_pgday_di_roma/#comments Wed, 08 Dec 2010 14:00:00 +0000 http://2ndblog.dev.xcon.it/pgchess_al_pgday_di_roma/ Tra due giorni parteciperò al PGDay 2010, a Roma (zona Termini), presentando un software capace di giocare a scacchi e basato unicamente su PostgreSQL 9.0.

Le ultime novità sono che il software è stato presentato lunedì a Stoccarda in occasione del PGDay europeo, e la risposta del pubblico, indubbiamente positiva, mi ha indotto a pubblicare il codice su GitHub, con il nome di pgChess.

Il PGDay italiano 2010 è organizzato dall’Associazione ITPUG.

Il convegno sarà aperto dal keynote speech di Simon Riggs, seguito da un’ampia selezione di interventi di Gabriele Bartolini, Oleg Bartunov, Paolo Cavallini, Luca Ferrari, David Fetter, Jonathan S. Katz, Bruce Momjian, Enrico Pirozzi e Daniele Varrazzo.

Saranno illustrati casi d’uso di PostgreSQL da parte del CNR, del Comune di Prato e del Sistema Bibliotecario Vimercatese.

I partecipanti potranno inoltre partecipare a dei tutorial, compresi nella registrazione al convegno.

]]>
https://blog.2ndquadrant.it/pgchess_al_pgday_di_roma/feed/ 0
Alcune idee su come raggruppare le risorse a basso livello in un server PostgreSQL https://blog.2ndquadrant.it/alcune_idee_su_come_raggruppar/ https://blog.2ndquadrant.it/alcune_idee_su_come_raggruppar/#comments Tue, 06 Jul 2010 22:35:43 +0000 http://2ndblog.dev.xcon.it/alcune_idee_su_come_raggruppar/ Ho appena pubblicato sul blog centrale di 2ndQuadrant delle osservazioni tecniche maturate nell’ambito della conferenza CHAR(10).

]]>
https://blog.2ndquadrant.it/alcune_idee_su_come_raggruppar/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
Notiziario settimanale PostgreSQL – 7 giugno 2009 https://blog.2ndquadrant.it/notiziario_settimanale_postgre_25/ https://blog.2ndquadrant.it/notiziario_settimanale_postgre_25/#comments Mon, 15 Jun 2009 08:14:48 +0000 http://2ndblog.dev.xcon.it/notiziario_settimanale_postgre_25/ Notiziario settimanale PostgreSQL – 7 giugno 2009

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

Il CfP per PGCon Brazil è aperto! http://pgcon.postgresql.org.br/2009/chamadas.en.php

ITPUG sarà alla Conferenza Italiana per il Software Libero (ConfSL) che si terrà a Bologna il 12 e 13 giugno. Gabriele Bartolini presenterà "Studenti e Open-source: il caso di PostgreSQL" alle 10:35 di sabato 13 giugno. http://www.confsl.org/

Novità sul prodotto PostgreSQL

Rilasciato pgtheme, sviluppato specificamente per il sistema di temi di Drupal 6.x . http://drupal.org/project/pgtheme

La novità della settimana di PostgreSQL 8.4

quote_nullable: come quote_literal, eccetto che restituisce la stringa NULL se l’argomento è null.

Il suggerimento della settimana

Il modulo contrib "ltree" è una implementazione di alberi con etichette, dotata di indici; può essere usato ad esempio per rappresentare nel vostro database un filesystem, o una gerarchia di tipo simile.

Notizie locali su PostgreSQL

Il pgday di San Jose (USA) si terrà domenica 19 luglio 2009, dando il via ad OSCON. Inviate la vostra proposta entro l’8 giugno 2009 a conference-sf-speakers AT pgfoundry DOT org, e scoprirete entro il 20 giugno 2009 se è stata accettata. http://www.postgresql.org/about/news.1082

Il 23 e 24 ottobre 2009 si svolgerà PGCon Brazil, presso Unicamp, nella città di Campinas, stato di San Paolo.

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:

  • Fix DecodeInterval to report an error for multiple occurrences of DAY, WEEK, YEAR, DECADE, CENTURY, or MILLENIUM fields, just as it always has done for other types of fields. The previous behavior seems to have been a hack to avoid defining bit-positions for all these field types in DTK_M() masks, rather than something that was really considered to be desired behavior. But there is room in the masks for these, and we really need to tighten up at least the behavior of DAY and YEAR fields to avoid unexpected behavior associated with the 8.4 changes to interpret ambiguous fields based on the interval qualifier (typmod) value. Per my example and proposed patch.

  • Change AdjustIntervalForTypmod to not discard higher-order field values on the grounds that they don’t fit into the specified interval qualifier (typmod). This behavior, while of long standing, is clearly wrong per spec — for example the value INTERVAL ‘999’ SECOND means 999 seconds and should not be reduced to less than 60 seconds. In some cases there could be grounds to raise an error if higher-order field values are not given as zero; for example ‘1 year 1 month’::INTERVAL MONTH should arguably be taken as an error rather than equivalent to 13 months. However our internal representation doesn’t allow us to do that in a fashion that would consistently reject all and only the cases that a strict reading of the spec would suggest. Also, seeing that for example INTERVAL ’13’ MONTH will print out as ‘1 year 1 mon’, we have to be careful not to create a situation where valid data will fail to dump and reload. The present patch therefore takes the attitude of not throwing an error in any such case. We might want to revisit that in future but it would take more redesign than seems prudent in late beta. Per a complaint from Sebastien Flaesch and subsequent discussion. While at other times we might have just postponed such an issue to the next development cycle, 8.4 already has changed the parsing of interval literals quite a bit in an effort to accept all spec-compliant cases correctly. This seems like a change that should be part of that rather than coming along later.

  • In pgsql/doc/src/sgml/config.sgml, Remove the old advice to keep from_collapse_limit less than geqo_threshold, instead just pointing out that a larger value may trigger use of GEQO. Per Robert Haas. In passing, do a bit of wordsmithing on the Genetic Query Optimizer section.

  • In pgsql/src/backend/commands/copy.c, improve comment about ‘if (1)’ hack in copy.c macros.

  • In pgsql/src/bin/initdb/initdb.c, change rather bizarre code ordering in get_id(). This isn’t strictly cosmetic — I’m wondering if geteuid could have side effects on errno, thus possibly resulting in a misleading error message after failure of getpwuid.

  • In pgsql/src/backend/tsearch/ts_selfuncs.c, fix tsquerysel() to not fail on an empty TSQuery. Per report from Tatsuo Ishii.

  • Clean up ecpg’s use of mmerror(): const-ify the format argument, add an __attribute__() marker so that gcc can validate the format string against the actual arguments, get rid of overcomplicated and unsafe usage in base_yyerror().

  • Improve the recently-added support for properly pluralized error messages by extending the ereport() API to cater for pluralization directly. This is better than the original method of calling ngettext outside the elog.c code because (1) it avoids double translation, which wastes cycles and in the worst case could give a wrong result; and (2) it avoids having to use a different coding method in PL code than in the core backend. The client-side uses of ngettext are not touched since neither of these concerns is very pressing in the client environment. Per my proposal of yesterday.

  • Remove a couple of debugging messages that have been #ifdef’d out for ages. Seems silly to ask translators to expend work on these, especially in pluralized variants.

  • Trivial code style cleanup around a couple of ngettext calls.

  • GIN’s ItemPointerIsMin, ItemPointerIsMax, and ItemPointerIsLossyPage macros should use GinItemPointerGetBlockNumber/ GinItemPointerGetOffsetNumber, not ItemPointerGetBlockNumber/ ItemPointerGetOffsetNumber, because the latter will Assert() on ip_posid == 0, ie a "Min" pointer. (Thus, ItemPointerIsMin has never worked at all, but it seems unused at present.) I’m not certain that the case can occur in normal functioning, but it’s blowing up on me while investigating Tatsuo-san’s data corruption problem. In any case it seems like a problem waiting to bite someone. Back-patch just in case this really is a problem for somebody in the field.

  • Fix a serious bug introduced into GIN in 8.4: now that MergeItemPointers() is supposed to remove duplicate heap TIDs, we have to be sure to reduce the tuple size and posting-item count accordingly in addItemPointersToTuple(). Failing to do so resulted in the effective injection of garbage TIDs into the index contents, ie, whatever happened to be in the memory palloc’d for the new tuple. I’m not sure that this fully explains the index corruption reported by Tatsuo Ishii, but the test case I’m using no longer fails.

  • In pgsql/src/pl/plperl/plperl.c, move variable declaration to avoid ‘unused variable’ warning when the ifdef doesn’t trigger. Not worth back-patching. Per buildfarm reports.

  • Improve the IndexVacuumInfo/IndexBulkDeleteResult API to allow somewhat sane behavior in cases where we don’t know the heap tuple count accurately; in particular partial vacuum, but this also makes the API a bit more useful for ANALYZE. This patch adds "estimated_count" flags to both structs so that an approximate count can be flagged as such, and adjusts the logic so that approximate counts are not used for updating pg_class.reltuples. This fixes my previous complaint that VACUUM was putting ridiculous values into pg_class.reltuples for indexes. The actual impact of that bug is limited, because the planner only pays attention to reltuples for an index if the index is partial; which probably explains why beta testers hadn’t noticed a degradation in plan quality from it. But it needs to be fixed. The whole thing is a bit messy and should be redesigned in future, because reltuples now has the potential to drift quite far away from reality when a long period elapses with no non-partial vacuums. But this is as good as it’s going to get for 8.4.

  • Revert my patch of 2009-04-04 that removed contrib/intarray’s definitions of the <@ and @> operators. These are not in fact equivalent to the built-in anyarray operators of the same names, because they have different behavior for empty arrays, namely they don’t think empty arrays are contained in anything. That is mathematically wrong, no doubt, but until we can persuade GIN indexes to implement the mathematical definition we should probably not change this. Another reason for not changing it now is that we can’t yet ensure the opclasses will be updated correctly in a dump-and-reload upgrade. Per recent discussions.

Joe Conway committed:

  • In pgsql/contrib/dblink/dblink.c, fix dblink_get_result() as reported by Oleksiy Shchukin. Refactor a bit while we’re at it per request by Tom Lane. Specifically, don’t try to perform dblink_send_query() via dblink_record_internal() — it was inappropriate and ugly.

  • Add support for using SQL/MED compliant FOREIGN DATA WRAPPER, SERVER, and USER MAPPING as method to supply dblink connect parameters. Per mailing list and PGCon discussions.

Heikki Linnakangas committed:

  • In pgsql/src/backend/access/transam/xlog.c, only recycle normal files in pg_xlog as WAL segments. pg_standby creates symbolic links with the -l option, and as Fujii Masao pointed out we ended up overwriting files in the archive directory before this patch. Patch by Aidan Van Dyk, Fujii Masao and me.

Bruce Momjian committed:

  • In pgsql/doc/src/sgml/config.sgml, add example of how to generate the session identifier from pg_stat_activity.

  • In pgsql/src/backend/commands/copy.c, add comment about why "((void) 0)" is used in copy macros.

  • Wording improvement for recent sesssion identifier SQL query.

  • In pgsql/doc/src/sgml/config.sgml, wording improvement for recent sesssion identifier SQL query.

  • In pgsql/doc/src/sgml/backup.sgml, remove sleep() from backup script example; not needed anymore. Fujii Masao.

Andrew Dunstan committed:

  • Initialise perl library as documented in perl API. Backpatch to release 7.4.

  • Search for versioned perl library instead of using hardcoded name on Windows. Backpatch to release 8.3

  • Adjust recent PERL_SYS_INIT3 call to avoid platforms where it might fail, and to remove compilation warning. Backpatch the release 7.4.

Patch rifiutate (per adesso)

No one was disappointed this week :-)

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