Re: [HACKERS] pl/python tracebacks

2011-02-24 Thread Peter Eisentraut
On lör, 2011-02-12 at 02:00 -0700, Alex Hunsaker wrote: PyString_AsString is used all over the place without any pfrees. But I have no Idea how that pstrdup() is getting freed if at all. pstrdup() like palloc() allocates memory from the current memory context, which is freed automatically at

Re: [HACKERS] Invitation to Cluster Hackers meeting at pgCon

2011-02-24 Thread Tatsuo Ishii
Hi, I will be there. -- Tatsuo Ishii SRA OSS, Inc. Japan English: http://www.sraoss.co.jp/index_en.php Japanese: http://www.sraoss.co.jp All, This year we will be having a Cluster Hackers summit at pgCon. You are invited if you are currently working on any PostgreSQL replication or

Re: [HACKERS] pl/python tracebacks

2011-02-24 Thread Peter Eisentraut
On lör, 2011-02-12 at 10:07 +0100, Jan Urbański wrote: PLyUnicode_AsString(PyObject *unicode) { PyObject *o = PLyUnicode_Bytes(unicode); char *rv = pstrdup(PyBytes_AsString(o)); Py_XDECREF(o); return rv; } PyString_AsString is used all over the place

Re: [HACKERS] Sync Rep v17

2011-02-24 Thread Fujii Masao
On Tue, Feb 22, 2011 at 2:38 PM, Fujii Masao masao.fu...@gmail.com wrote: I've read about two-tenths of the patch, so I'll submit another comments about the rest later. Sorry for the slow reviewing... Here are another comments: + {synchronous_standby_names, PGC_SIGHUP,

Re: [HACKERS] pl/python tracebacks

2011-02-24 Thread Peter Eisentraut
On tor, 2010-12-23 at 14:56 +0100, Jan Urbański wrote: For errors originating from Python exceptions add the traceback as the message detail. The patch tries to mimick Python's traceback.py module behaviour as close as possible, icluding interleaving stack frames with source code lines in the

Re: [HACKERS] pl/python tracebacks

2011-02-24 Thread Jan Urbański
On 24/02/11 14:10, Peter Eisentraut wrote: On tor, 2010-12-23 at 14:56 +0100, Jan Urbański wrote: For errors originating from Python exceptions add the traceback as the message detail. The patch tries to mimick Python's traceback.py module behaviour as close as possible, icluding interleaving

Re: [HACKERS] PostgreSQL FDW update

2011-02-24 Thread Robert Haas
On Thu, Feb 24, 2011 at 8:13 AM, Shigeru HANADA han...@metrosystems.co.jp wrote: On Wed, 23 Feb 2011 20:30:05 +0900 Shigeru HANADA han...@metrosystems.co.jp wrote: On Tue, 22 Feb 2011 11:33:25 -0500 Robert Haas robertmh...@gmail.com wrote: Is anyone actually working on a new version of

Re: [HACKERS] Binary in/out for aclitem

2011-02-24 Thread Merlin Moncure
On Wed, Feb 23, 2011 at 3:30 PM, Tom Lane t...@sss.pgh.pa.us wrote: =?utf-8?q?Rados=C5=82aw_Smogura?= rsmog...@softperience.eu writes: Here is extended version, has version field (N_ACL_RIGHTS*2) and reserved mask, as well definition is more general then def of PGSQL. In any way it require

Re: [HACKERS] Binary in/out for aclitem

2011-02-24 Thread rsmogura
On Thu, 24 Feb 2011 08:38:35 -0600, Merlin Moncure wrote: On Wed, Feb 23, 2011 at 3:30 PM, Tom Lane t...@sss.pgh.pa.us wrote: =?utf-8?q?Rados=C5=82aw_Smogura?= rsmog...@softperience.eu writes: Here is extended version, has version field (N_ACL_RIGHTS*2) and reserved mask, as well definition is

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-24 Thread Alvaro Herrera
Excerpts from Alvaro Herrera's message of mié feb 23 21:35:13 -0300 2011: Excerpts from Tom Lane's message of mié feb 23 19:39:23 -0300 2011: My recollection is that this was pretty tightly coupled to the wCTE patch. I had been intending to review them together, and have just now come up

Re: [HACKERS] WIP: cross column correlation ...

2011-02-24 Thread Bruce Momjian
Robert Haas wrote: On Wed, Feb 23, 2011 at 10:30 PM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: If you want to take the above as in any way an exhaustive survey of the landscape (which it isn't), C seems like a standout, maybe augmented by the making the planner able to

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-24 Thread Tom Lane
Marko Tiikkaja marko.tiikk...@cs.helsinki.fi writes: On 2011-02-24 2:31 AM, Tom Lane wrote: The connection is the question of where to do CommandCounterIncrement between successive DML WITH operations in a single command. .. what? We decided *not* to do any CommandCounterIncrements between

Re: [HACKERS] Named restore points

2011-02-24 Thread Euler Taveira de Oliveira
Em 08-02-2011 17:35, Thom Brown escreveu: This could do with a bit more documentation about usage. Below the Backup Control Functions table (http://developer.postgresql.org/pgdocs/postgres/functions-admin.html#FUNCTIONS-ADMIN-BACKUP-TABLE), each function has a paragraph detailing what it does.

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-24 Thread Marko Tiikkaja
On 2011-02-24 5:21 PM, Tom Lane wrote: Oh, did we decide to do it that way? OK with me, but the submitted docs are woefully inadequate on the point. This behavior is going to have to be explained extremely clearly (and even so, I bet we'll get bug reports about it :-(). I'm ready to put more

Re: [HACKERS] Review: Fix snapshot taking inconsistencies

2011-02-24 Thread Tom Lane
Marko Tiikkaja marko.tiikk...@cs.helsinki.fi writes: On 2011-02-24 5:21 PM, Tom Lane wrote: Oh, did we decide to do it that way? OK with me, but the submitted docs are woefully inadequate on the point. This behavior is going to have to be explained extremely clearly (and even so, I bet we'll

[HACKERS] wCTE: about the name of the feature

2011-02-24 Thread Tom Lane
The wCTE patch refers to the feature it's adding as DML WITH. I'm still pretty unhappy with that terminology. In my view of the world, DML includes SELECT as well as INSERT/UPDATE/DELETE. The wikipedia entry about the term http://en.wikipedia.org/wiki/Data_Manipulation_Language agrees that

Re: [HACKERS] wCTE: about the name of the feature

2011-02-24 Thread Marko Tiikkaja
On 2011-02-24 6:20 PM +0200, Tom Lane wrote: The wCTE patch refers to the feature it's adding as DML WITH. I'm still pretty unhappy with that terminology. In my view of the world, DML includes SELECT as well as INSERT/UPDATE/DELETE. The wikipedia entry about the term

Re: [HACKERS] Possible substitute for PostmasterIsAlive polling loops

2011-02-24 Thread Florian Pflug
On Feb24, 2011, at 04:14 , Robert Haas wrote: On Wed, Feb 23, 2011 at 4:54 PM, Tom Lane t...@sss.pgh.pa.us wrote: IOW, at least on Linux, you *can* arrange to get a signal when your parent process dies. That's pretty cool. Not sure how ugly it'd be to use this call when available and a

Re: [HACKERS] wCTE: about the name of the feature

2011-02-24 Thread Tom Lane
Marko Tiikkaja marko.tiikk...@cs.helsinki.fi writes: On 2011-02-24 6:20 PM +0200, Tom Lane wrote: The best idea I have at the moment is to spell out data modifying command (or statement) rather than relying on the acronym. In the code, we could change hasDmlWith to hasModifyingWith, for

Re: [HACKERS] wCTE: about the name of the feature

2011-02-24 Thread Marko Tiikkaja
On 2011-02-24 6:37 PM +0200, Tom Lane wrote: OK, I will make those adjustments. Are you going to do more work on the documentation part of the patch? I can stick to working on the code part meanwhile, if you are. I am planning on working on the documentation this weekend. Regards, Marko

Re: [HACKERS] wCTE: about the name of the feature

2011-02-24 Thread Andrew Dunstan
On 02/24/2011 11:20 AM, Tom Lane wrote: The wCTE patch refers to the feature it's adding as DML WITH. I'm still pretty unhappy with that terminology. In my view of the world, DML includes SELECT as well as INSERT/UPDATE/DELETE. The wikipedia entry about the term

Re: [HACKERS] SSI bug?

2011-02-24 Thread Heikki Linnakangas
On 23.02.2011 07:20, Kevin Grittner wrote: Dan Ports wrote: The obvious solution to me is to just keep the lock on both the old and new page. That's the creative thinking I was failing to do. Keeping the old lock will generate some false positives, but it will be rare and those don't

Re: [HACKERS] pg_basebackup and wal streaming

2011-02-24 Thread Yeb Havinga
On 2011-02-20 21:37, Dimitri Fontaine wrote: Hi, Magnus Hagandermag...@hagander.net writes: Better late than never (or?), here's the final cleanup of pg_streamrecv for moving into the main distribution, per discussion back in late dec or early jan. It also includes the stream logs in parallel

Re: [HACKERS] SSI bug?

2011-02-24 Thread Kevin Grittner
Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 23.02.2011 07:20, Kevin Grittner wrote: Dan Ports wrote: The obvious solution to me is to just keep the lock on both the old and new page. That's the creative thinking I was failing to do. Keeping the old lock will generate

Re: [HACKERS] wCTE: about the name of the feature

2011-02-24 Thread Robert Haas
On Thu, Feb 24, 2011 at 11:20 AM, Tom Lane t...@sss.pgh.pa.us wrote: The wCTE patch refers to the feature it's adding as DML WITH.  I'm still pretty unhappy with that terminology.  In my view of the world, DML includes SELECT as well as INSERT/UPDATE/DELETE.  The wikipedia entry about the term

Re: [HACKERS] wCTE: about the name of the feature

2011-02-24 Thread David E. Wheeler
On Feb 24, 2011, at 10:43 AM, Robert Haas wrote: The best idea I have at the moment is to spell out data modifying command (or statement) rather than relying on the acronym. In the code, we could change hasDmlWith to hasModifyingWith, for example. The error messages could read like

Re: [HACKERS] Binary in/out for aclitem

2011-02-24 Thread Radosław Smogura
Tom Lane t...@sss.pgh.pa.us Wednesday 23 February 2011 22:30:04 =?utf-8?q?Rados=C5=82aw_Smogura?= rsmog...@softperience.eu writes: Here is extended version, has version field (N_ACL_RIGHTS*2) and reserved mask, as well definition is more general then def of PGSQL. In any way it require that

Re: [HACKERS] WIP: cross column correlation ...

2011-02-24 Thread Josh Berkus
On 2/23/11 7:10 AM, Robert Haas wrote: IME, most bad query plans are caused by either incorrect estimates of selectivity, or wrongheaded notions about what's likely to be cached. If we could find a way, automated or manual, of providing the planner some better information about the facts of

[HACKERS] Fwd: psql include file using relative path

2011-02-24 Thread Gurjeet Singh
psql has the ability to execute commands from a file, but if one wishes to develop and provide a modularized set of sql files, then psql is not very helpful because the \i command can open file paths either if they are absolute paths or if they are palced correctly relative to psql's current

Re: [HACKERS] wCTE behaviour

2011-02-24 Thread Tom Lane
Marko Tiikkaja marko.tiikk...@cs.helsinki.fi writes: I fixed an issue with the portal logic, and now we use PORTAL_ONE_RETURNING for wCTE queries, even if the main query is not a DML or does not have RETURNING. This also means that we materialize the results of the main query sometimes

Re: [HACKERS] Named restore points

2011-02-24 Thread Robert Haas
On Thu, Feb 24, 2011 at 10:28 AM, Euler Taveira de Oliveira eu...@timbira.com wrote: The following patch implements the Thom's suggestions. [1] http://archives.postgresql.org/message-id/4d48209c.7050...@timbira.com Committed with some additional wordsmithing. -- Robert Haas EnterpriseDB:

Re: [HACKERS] wCTE behaviour

2011-02-24 Thread Marko Tiikkaja
On 2011-02-25 1:36 AM, Tom Lane wrote: Marko Tiikkajamarko.tiikk...@cs.helsinki.fi writes: I fixed an issue with the portal logic, and now we use PORTAL_ONE_RETURNING for wCTE queries, even if the main query is not a DML or does not have RETURNING. This also means that we materialize the

Re: [HACKERS] WIP: collect frequency statistics for arrays

2011-02-24 Thread Robert Haas
On Wed, Feb 23, 2011 at 10:00 AM, Alexander Korotkov aekorot...@gmail.com wrote: WIP patch of statistics collection for arrays is attached. Please add this patch to the currently open CommitFest at https://commitfest.postgresql.org/action/commitfest_view/open -- Robert Haas EnterpriseDB:

Re: [HACKERS] Allow pg_archivecleanup to ignore extensions

2011-02-24 Thread Robert Haas
On Tue, Feb 8, 2011 at 2:57 AM, Greg Smith g...@2ndquadrant.com wrote: One bit of feedback I keep getting from people who archive their WAL files is that the fairly new pg_archivecleanup utility doesn't handle the case where those archives are compressed.  As the sort of users who are concerned

Re: [HACKERS] Fwd: psql include file using relative path

2011-02-24 Thread Robert Haas
On Thu, Feb 24, 2011 at 6:21 PM, Gurjeet Singh singh.gurj...@gmail.com wrote:     psql has the ability to execute commands from a file, but if one wishes to develop and provide a modularized set of sql files, then psql is not very helpful because the \i command can open file paths either if

Re: [HACKERS] Sync Rep v17

2011-02-24 Thread Daniel Farina
On Tue, Feb 22, 2011 at 11:43 AM, Jaime Casanova ja...@2ndquadrant.com wrote: On Sat, Feb 19, 2011 at 11:26 PM, Robert Haas robertmh...@gmail.com wrote: DEBUG:  write 0/3027BC8 flush 0/3014690 apply 0/3014690 DEBUG:  released 0 procs up to 0/3014690 DEBUG:  write 0/3027BC8 flush 0/3027BC8

Re: [HACKERS] Sync Rep v17

2011-02-24 Thread Daniel Farina
With some more fooling around, I have also managed to get this elog(WARNING) if (proc-lwWaitLink == NULL) elog(WARNING, could not locate ourselves on wait queue); -- fdr -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Sync Rep v17

2011-02-24 Thread Jaime Casanova
On Mon, Feb 21, 2011 at 4:06 AM, Fujii Masao masao.fu...@gmail.com wrote: PREPARE TRANSACTION and ROLLBACK PREPARED should wait for replication as well as COMMIT PREPARED? maybe ROLLBACK PREPARED but i'm not sure... i'm pretty sure we don't need to wait for PREPARE TRANSACTION, but i could be

Re: [HACKERS] WIP: cross column correlation ...

2011-02-24 Thread Bruce Momjian
Josh Berkus wrote: On 2/23/11 7:10 AM, Robert Haas wrote: IME, most bad query plans are caused by either incorrect estimates of selectivity, or wrongheaded notions about what's likely to be cached. If we could find a way, automated or manual, of providing the planner some better