Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Simon Riggs
On Wed, Apr 25, 2012 at 4:55 AM, Noah Misch n...@leadboat.com wrote: 1. High catalog turnover in rapid create/drop workloads.  Heavy temporary   table users often need to REINDEX relation-oriented catalogs.  Hot standby   cannot assign OIDs or modify system catalogs at all. 4. sinval traffic

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Simon Riggs
On Wed, Apr 25, 2012 at 4:55 AM, Noah Misch n...@leadboat.com wrote: A third patch will permit the following commands in read-only transactions, where they will throw an error if the subject is not a temporary table: ... VACUUM (including VACUUM FULL) CLUSTER (without USING clause) REINDEX

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Nicolas Barbier
2012/4/25 Simon Riggs si...@2ndquadrant.com: On Wed, Apr 25, 2012 at 4:55 AM, Noah Misch n...@leadboat.com wrote: I do not see a clean behind-the-scenes fix for points 1, 4 and 5.  We can resolve those by adding a new variety of temporary table, one coincidentally matching the SQL standard's

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Simon Riggs
On Wed, Apr 25, 2012 at 9:37 AM, Nicolas Barbier nicolas.barb...@gmail.com wrote: The declarative creation of an “standard-like” temporary table only happens once (it is part of the schema). Using (e.g. putting stuff in and executing queries on) such tables can happen on the standby without

[v9.3] Extra Daemons (Re: [HACKERS] elegant and effective way for running jobs inside a database)

2012-04-25 Thread Kohei KaiGai
2012/3/10 Simon Riggs si...@2ndquadrant.com: On Fri, Mar 9, 2012 at 6:51 PM, Andrew Dunstan and...@dunslane.net wrote: On 03/09/2012 01:40 PM, Robert Haas wrote: On Fri, Mar 9, 2012 at 12:02 PM, David E. Wheelerda...@justatheory.com  wrote: On Mar 9, 2012, at 7:55 AM, Merlin Moncure

Re: [v9.3] Extra Daemons (Re: [HACKERS] elegant and effective way for running jobs inside a database)

2012-04-25 Thread Simon Riggs
On Wed, Apr 25, 2012 at 10:40 AM, Kohei KaiGai kai...@kaigai.gr.jp wrote: I tried to implement a patch according to the idea. It allows extensions to register an entry point of the self-managed daemon processes, then postmaster start and stop them according to the normal manner. I've got a

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Nicolas Barbier
2012/4/25 Simon Riggs si...@2ndquadrant.com: So you are saying it is OK to not be able to *create* them on HS, just *use* pre-defined tables? That's almost useless IMHO. Applications expect to be able to do this all in the same transaction on one session CREATE TEMP TABLE x;  ...DML

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Nicolas Barbier
2012/4/25 Nicolas Barbier nicolas.barb...@gmail.com: is the reason of existence for the PG-like temporary transactions. s/transactions/tables/ Nicolas -- A. Because it breaks the logical sequence of discussion. Q. Why is top posting bad? -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Simon Riggs
On Wed, Apr 25, 2012 at 11:08 AM, Nicolas Barbier nicolas.barb...@gmail.com wrote: 2012/4/25 Simon Riggs si...@2ndquadrant.com: So you are saying it is OK to not be able to *create* them on HS, just *use* pre-defined tables? That's almost useless IMHO. Applications expect to be able to do

Re: [HACKERS] 9.3: summary of corruption detection / checksums / CRCs discussion

2012-04-25 Thread Merlin Moncure
On Tue, Apr 24, 2012 at 3:40 PM, Robert Haas robertmh...@gmail.com wrote: On Sat, Apr 21, 2012 at 7:08 PM, Greg Stark st...@mit.edu wrote: The earlier consensus was to move all the hint bits to a dedicated area and exclude them from the checksum. I think double-write buffers seem to have

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Robert Haas
On Tue, Apr 24, 2012 at 11:55 PM, Noah Misch n...@leadboat.com wrote: A key barrier to migrations from trigger-based replication to WAL-based replication is the lack of temporary tables under hot standby.  I'd like to close that gap; the changes needed will also reduce the master-side cost of

Re: [HACKERS] 9.3: summary of corruption detection / checksums / CRCs discussion

2012-04-25 Thread Robert Haas
On Tue, Apr 24, 2012 at 8:52 PM, Greg Stark st...@mit.edu wrote: On Tue, Apr 24, 2012 at 9:40 PM, Robert Haas robertmh...@gmail.com wrote:  For three things, index pages have hint-type changes that are not single-bit changes. ? Just how big are these? Part of the reason hint bit updates are

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Simon Riggs
On Wed, Apr 25, 2012 at 4:49 PM, Robert Haas robertmh...@gmail.com wrote: How important is support for VACUUM on these tables under hot standby?  The alternative is to fail when a session retains a temporary table across 2B local transactions.  I do not currently see any challenges sufficient

Re: [HACKERS] remove dead ports?

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 12:06 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: I have no position on whether those operating systems are dead enough to warrant removing support, but on a related point, I would like it if we could get rid of as many spinlock

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 12:08 PM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Apr 25, 2012 at 4:49 PM, Robert Haas robertmh...@gmail.com wrote: How important is support for VACUUM on these tables under hot standby?  The alternative is to fail when a session retains a temporary table across

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 12:18 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Apr 25, 2012 at 12:08 PM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Apr 25, 2012 at 4:49 PM, Robert Haas robertmh...@gmail.com wrote: How important is support for VACUUM on these tables under hot standby?  

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Simon Riggs
On Wed, Apr 25, 2012 at 5:19 PM, Robert Haas robertmh...@gmail.com wrote: Oh, we're talking about different things, and I'm slightly confused. Yes, we need to support ANALYZE; what we might not need to support, at least initially, is every user of a global temp table having their own

Re: [HACKERS] remove dead ports?

2012-04-25 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: ... I don't feel super-strongly about it, but OTOH I see little reason to keep the Univel spinlock implementation if we're removing the Univel port. No, I have no objection to that. I was just questioning the wisdom of removing CPU-specific s_lock

Re: [HACKERS] Patch: add timing of buffer I/O requests

2012-04-25 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Sat, Apr 14, 2012 at 10:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: There's no particular reason to think that Moore's Law is going to result in an increase in the fractional precision of timing data. It hasn't done so in the past, for sure.

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 12:30 PM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Apr 25, 2012 at 5:19 PM, Robert Haas robertmh...@gmail.com wrote: Oh, we're talking about different things, and I'm slightly confused. Yes, we need to support ANALYZE; what we might not need to support, at

Re: [HACKERS] Patch: add timing of buffer I/O requests

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 12:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Sat, Apr 14, 2012 at 10:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: There's no particular reason to think that Moore's Law is going to result in an increase in the fractional

Re: [HACKERS] Patch: add timing of buffer I/O requests

2012-04-25 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Apr 25, 2012 at 12:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: However, the main thing here is that we need to do *something* here... Agreed, this has got to be pushed forward. In the interest of

Re: [HACKERS] Patch: add timing of buffer I/O requests

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 1:12 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Wed, Apr 25, 2012 at 12:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: However, the main thing here is that we need to do *something* here...

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Simon Riggs
On Wed, Apr 25, 2012 at 5:53 PM, Robert Haas robertmh...@gmail.com wrote: Yes, we are. Global Temp Tables won't solve the Works on HS problem, so we'd better decide fairly quickly which use case we are addressing, and why. ISTM Global Temp Tables is more an Oracle compatibility issue than a

[HACKERS] proposal - urlencode, urldecode support

2012-04-25 Thread Pavel Stehule
Hello what do you think about enhancing encode, decode functions for support of mentioned code? Regards Pavel Stehule -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Patch: add timing of buffer I/O requests

2012-04-25 Thread Greg Stark
On Wed, Apr 25, 2012 at 5:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Also, as was pointed out upthread, the underlying data in shared memory is almost certainly never going to be infinite-precision; so using numeric in the API seems to me to be more likely to convey a false impression of

Re: [HACKERS] Patch: add timing of buffer I/O requests

2012-04-25 Thread Tom Lane
Greg Stark st...@mit.edu writes: On Wed, Apr 25, 2012 at 5:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Also, as was pointed out upthread, the underlying data in shared memory is almost certainly never going to be infinite-precision; so using numeric in the API seems to me to be more likely to

Re: [HACKERS] proposal - urlencode, urldecode support

2012-04-25 Thread Michael Glaesemann
On Apr 25, 2012, at 13:54, Pavel Stehule wrote: what do you think about enhancing encode, decode functions for support of mentioned code? Sounds like a great idea for a PGXN module. Michael Glaesemann grzm seespotcode net -- Sent via pgsql-hackers mailing list

Re: [HACKERS] proposal - urlencode, urldecode support

2012-04-25 Thread Pavel Stehule
2012/4/25 Michael Glaesemann g...@seespotcode.net: On Apr 25, 2012, at 13:54, Pavel Stehule wrote: what do you think about enhancing encode, decode functions for support of mentioned code? Sounds like a great idea for a PGXN module. it is one variant - but with support some web

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 1:31 PM, Simon Riggs si...@2ndquadrant.com wrote: However, it is a fallacy that this is a good solution for using temp tables on HS. I think the wish to enhance Oracle compatibility is making some wishful thinking happen with regard to how useful this is going to be. We

Re: [HACKERS] Patch: add timing of buffer I/O requests

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 1:58 PM, Greg Stark st...@mit.edu wrote: On Wed, Apr 25, 2012 at 5:47 PM, Tom Lane t...@sss.pgh.pa.us wrote: Also, as was pointed out upthread, the underlying data in shared memory is almost certainly never going to be infinite-precision; so using numeric in the API

Re: [HACKERS] 9.2 release notes, beta time?

2012-04-25 Thread Bruce Momjian
On Fri, Apr 13, 2012 at 01:29:38PM -0400, Bruce Momjian wrote: On Fri, Apr 13, 2012 at 12:40:09PM -0400, Robert Haas wrote: On Fri, Apr 13, 2012 at 11:23 AM, Bruce Momjian br...@momjian.us wrote: I just talked to Tom about the 9.2 release notes.  Do people want me to write the 9.2 release

Re: [HACKERS] proposal - urlencode, urldecode support

2012-04-25 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: 2012/4/25 Michael Glaesemann g...@seespotcode.net: Sounds like a great idea for a PGXN module. it is one variant - but with support some web technologies - XML, JSON, I prefer this in core. Urlcode is one the most used code on world now -

Re: [HACKERS] 9.2 release notes, beta time?

2012-04-25 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: I had hoped to complete the release notes by March 30, but travel and catching up on old stuff has delayed that. I will start working on them now and have them ready before we start beta. If that is a problem, please let me know. Well, we aren't ready

Re: [HACKERS] 9.2 release notes, beta time?

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 2:48 PM, Tom Lane t...@sss.pgh.pa.us wrote: Bruce Momjian br...@momjian.us writes: I had hoped to complete the release notes by March 30, but travel and catching up on old stuff has delayed that.  I will start working on them now and have them ready before we start

Re: [HACKERS] 9.2 release notes, beta time?

2012-04-25 Thread Dave Page
On Wed, Apr 25, 2012 at 7:48 PM, Tom Lane t...@sss.pgh.pa.us wrote: Bruce Momjian br...@momjian.us writes: I had hoped to complete the release notes by March 30, but travel and catching up on old stuff has delayed that.  I will start working on them now and have them ready before we start

Re: [HACKERS] proposal - urlencode, urldecode support

2012-04-25 Thread Garick Hamlin
On Wed, Apr 25, 2012 at 02:41:19PM -0400, Tom Lane wrote: Pavel Stehule pavel.steh...@gmail.com writes: 2012/4/25 Michael Glaesemann g...@seespotcode.net: Sounds like a great idea for a PGXN module. it is one variant - but with support some web technologies - XML, JSON, I prefer this in

Re: [HACKERS] proposal - urlencode, urldecode support

2012-04-25 Thread Pavel Stehule
2012/4/25 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: 2012/4/25 Michael Glaesemann g...@seespotcode.net: Sounds like a great idea for a PGXN module. it is one variant - but with support some web technologies - XML, JSON, I prefer this in core. Urlcode is one

Re: [HACKERS] 9.2 release notes, beta time?

2012-04-25 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Apr 25, 2012 at 2:48 PM, Tom Lane t...@sss.pgh.pa.us wrote: Would it be reasonable to shoot for wrapping 9.2beta1 next week? I suspect that's a bit aggressive. We have a couple of issues that I think we should fix before beta1: - the

Re: [HACKERS] 9.2 release notes, beta time?

2012-04-25 Thread Tom Lane
Dave Page dp...@pgadmin.org writes: On Wed, Apr 25, 2012 at 7:48 PM, Tom Lane t...@sss.pgh.pa.us wrote: Would it be reasonable to shoot for wrapping 9.2beta1 next week? (That would mean a wrap on Thursday May 3, if we follow the usual type of release schedule.) I doubt we'll be able to

Re: [HACKERS] 9.2 release notes, beta time?

2012-04-25 Thread Dave Page
On Wed, Apr 25, 2012 at 8:29 PM, Tom Lane t...@sss.pgh.pa.us wrote: Dave Page dp...@pgadmin.org writes: On Wed, Apr 25, 2012 at 7:48 PM, Tom Lane t...@sss.pgh.pa.us wrote: Would it be reasonable to shoot for wrapping 9.2beta1 next week? (That would mean a wrap on Thursday May 3, if we follow

[HACKERS] Request to add options to tools/git_changelog

2012-04-25 Thread Bruce Momjian
I am again requesting the addition of options to tools/git_changelog so I can more easily produce the release notes. I asked for this during 9.1 development and it was rejected. I am currently using my own custom version of the tool, but have to merge community improvements into the tool every

[HACKERS] Regression tests for preload extension

2012-04-25 Thread Kevin Grittner
I wrote a little extension to store a few small strings in shared memory. It seems to be working fine, and now I would like to write some regression tests; but it's not immediately obvious to me how I can do that. The approach used by, for example, citext doesn't work, because I don't see how to

Re: [HACKERS] Request to add options to tools/git_changelog

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 4:04 PM, Bruce Momjian br...@momjian.us wrote: I am again requesting the addition of options to tools/git_changelog so I can more easily produce the release notes.  I asked for this during 9.1 development and it was rejected.  I am currently using my own custom version

Re: [HACKERS] psql omits row count under \x auto

2012-04-25 Thread Robert Haas
On Mon, Apr 23, 2012 at 12:30 PM, Noah Misch n...@leadboat.com wrote: Looks like the logic in printQuery() needs further treatment. Do you want to propose a patch, or are you hoping someone else is going to address this? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise

Re: [HACKERS] Patch: add timing of buffer I/O requests

2012-04-25 Thread Peter Eisentraut
On mån, 2012-04-23 at 22:03 -0400, Robert Haas wrote: Perhaps, but nobody's explained what we gain out of NOT using numeric. So if you want to have possibly different internal and external representations, why not use interval for the external one? -- Sent via pgsql-hackers mailing list

Re: [HACKERS] Regression tests for preload extension

2012-04-25 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: I wrote a little extension to store a few small strings in shared memory. It seems to be working fine, and now I would like to write some regression tests; but it's not immediately obvious to me how I can do that. The approach used by, for

Re: [HACKERS] Request to add options to tools/git_changelog

2012-04-25 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: The attached patch gives you an idea of what I want to add. This patch doesn't seem to be against HEAD? --details-after Show branch and author info after the commit description I don't understand the point of that. --master-only Show commits

Re: [HACKERS] Patch: add timing of buffer I/O requests

2012-04-25 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On mån, 2012-04-23 at 22:03 -0400, Robert Haas wrote: Perhaps, but nobody's explained what we gain out of NOT using numeric. So if you want to have possibly different internal and external representations, why not use interval for the external one?

Re: [HACKERS] Patch: add timing of buffer I/O requests

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 5:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: Peter Eisentraut pete...@gmx.net writes: On mån, 2012-04-23 at 22:03 -0400, Robert Haas wrote: Perhaps, but nobody's explained what we gain out of NOT using numeric. So if you want to have possibly different internal and

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Merlin Moncure
On Wed, Apr 25, 2012 at 11:53 AM, Robert Haas robertmh...@gmail.com wrote: On Wed, Apr 25, 2012 at 12:30 PM, Simon Riggs si...@2ndquadrant.com wrote: On Wed, Apr 25, 2012 at 5:19 PM, Robert Haas robertmh...@gmail.com wrote: Oh, we're talking about different things, and I'm slightly confused.

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Jaime Casanova
On Wed, Apr 25, 2012 at 5:46 PM, Merlin Moncure mmonc...@gmail.com wrote: I don't know how GTT play inside the Oracle stack such that they aren't super popular, but if they work in the standby they will quickly become a killer feature.  IMNSHO it's annoying but acceptable to be forced to

Re: [HACKERS] patch submission: truncate trailing nulls from heap rows to reduce the size of the null bitmap

2012-04-25 Thread Jameison Martin
Tom, I whipped up some  INSERT/SELECT tests where I selected into a temporary table as you suggested. The target temporary table and the source table were in cache and I basically disabled things that would cause noise. The source table had 5 integer columns, and was populated with 10 million

Re: [HACKERS] urgent help required

2012-04-25 Thread Mark Kirkwood
On 19/04/12 06:23, Josh Berkus wrote: Nagaraj, i am nagaraj, i am newbi in this database world. i required your help. 2 dyas back i formatted one of my client system. which is having postgresql 8.2 database that was having data. but i am not taken backup of the data. 1) how to take the data

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Noah Misch
On Wed, Apr 25, 2012 at 10:10:31AM +0100, Simon Riggs wrote: So you are saying it is OK to not be able to *create* them on HS, just *use* pre-defined tables? I estimated that much to cover a worthy portion of the need, yes. That's almost useless IMHO. Based on the range of assessments

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Noah Misch
On Wed, Apr 25, 2012 at 11:49:23AM -0400, Robert Haas wrote: On Tue, Apr 24, 2012 at 11:55 PM, Noah Misch n...@leadboat.com wrote: Our temporary tables are cataloged and filled like permanent tables. ?This has the major advantage of making most code operate on tables with minimal regard

Re: [HACKERS] psql omits row count under \x auto

2012-04-25 Thread Noah Misch
On Wed, Apr 25, 2012 at 04:57:36PM -0400, Robert Haas wrote: On Mon, Apr 23, 2012 at 12:30 PM, Noah Misch n...@leadboat.com wrote: Looks like the logic in printQuery() needs further treatment. Do you want to propose a patch, or are you hoping someone else is going to address this? I

Re: [HACKERS] PL/PGSQL bug in handling composite types

2012-04-25 Thread Tom Lane
Boszormenyi Zoltan z...@cybertec.at writes: we have found a way to make pl/pgsql throw an error for a legitimate use case that works in plain SQL. The fact that it doesn't work the way you thought doesn't make it a bug. plpgsql expects an assignment INTO row_variable to be supplied from one

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 10:04 PM, Noah Misch n...@leadboat.com wrote: Based on the range of assessments spanning your almost useless to Merlin's killer feature, I gather that its utility is exceptionally site-specific. Well said, sir. It might be worth taking a couple of steps backward, here.

Re: [HACKERS] Temporary tables under hot standby

2012-04-25 Thread Robert Haas
On Wed, Apr 25, 2012 at 10:16 PM, Noah Misch n...@leadboat.com wrote: Past discussions have raised the issue of interaction between commands like ALTER TABLE and sessions using the new-variety temporary table. ?As a first cut, let's keep this simple and have ongoing use of the table block

Re: [HACKERS] Request to add options to tools/git_changelog

2012-04-25 Thread Bruce Momjian
On Wed, Apr 25, 2012 at 05:09:04PM -0400, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: The attached patch gives you an idea of what I want to add. This patch doesn't seem to be against HEAD? Yes, if people approve, I will work on a current patch against HEAD.

Re: [HACKERS] Request to add options to tools/git_changelog

2012-04-25 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: On Wed, Apr 25, 2012 at 05:09:04PM -0400, Tom Lane wrote: --details-after Show branch and author info after the commit description I don't understand the point of that. The release notes have the author at the end of the text. So? The committer is