Re: [HACKERS] Dumping an Extension's Script

2012-12-05 Thread Dimitri Fontaine
Alvaro Herrera alvhe...@2ndquadrant.com writes: What happens on a normal pg_dump of the complete database? For extensions that were installed using strings instead of files, do I get a string back? Because if not, the restore is clearly going to fail anyway. The argument here is that the

Re: [HACKERS] Review: Extra Daemons / bgworker

2012-12-05 Thread Simon Riggs
On 5 December 2012 22:22, Andres Freund and...@2ndquadrant.com wrote: On 2012-12-05 19:03:44 -0300, Alvaro Herrera wrote: Simon Riggs wrote: Prefer BgWorkerStart_ConsistentState to be renamed to BgWorkerRun_InHotStandby BgWorkerStart_RecoveryFinished to be renamed to

Re: [HACKERS] Dumping an Extension's Script

2012-12-05 Thread Andres Freund
On 2012-12-05 23:28:45 +0100, Dimitri Fontaine wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: What happens on a normal pg_dump of the complete database? For extensions that were installed using strings instead of files, do I get a string back? Because if not, the restore is

Re: [HACKERS] ALTER TABLE ... NOREWRITE option

2012-12-05 Thread Simon Riggs
On 5 December 2012 22:21, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Simon Riggs si...@2ndquadrant.com writes: CREATE EVENT TRIGGER my_event_trigger ON table_rewrite EXECUTE PROCEDURE consider_whether_to_throw_an_error(); +1, I was just thinking that myself. +1, and I think

Re: [HACKERS] Dumping an Extension's Script

2012-12-05 Thread Dimitri Fontaine
Andres Freund and...@2ndquadrant.com writes: The argument here is that the user would then have packaged its extension as files in the meantime. If not, that's operational error. A backup you didn't restore successfully isn't a backup anyway. Uh. Wait. What? If that argument is valid, we

Re: [HACKERS] ALTER TABLE ... NOREWRITE option

2012-12-05 Thread Dimitri Fontaine
Simon Riggs si...@2ndquadrant.com writes: On 5 December 2012 22:21, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Simon Riggs si...@2ndquadrant.com writes: CREATE EVENT TRIGGER my_event_trigger ON table_rewrite EXECUTE PROCEDURE consider_whether_to_throw_an_error(); +1, I was just

Re: [HACKERS] ALTER TABLE ... NOREWRITE option

2012-12-05 Thread Andres Freund
On 2012-12-05 22:41:21 +, Simon Riggs wrote: On 5 December 2012 22:21, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Simon Riggs si...@2ndquadrant.com writes: CREATE EVENT TRIGGER my_event_trigger ON table_rewrite EXECUTE PROCEDURE consider_whether_to_throw_an_error();

Re: [HACKERS] Dumping an Extension's Script

2012-12-05 Thread Robert Haas
On Wed, Dec 5, 2012 at 5:08 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes: Yeah, DROP will work. But what about ALTER .. UPDATE? What about it? Well, with the design you have proposed, unless you have access to the filesystem, it ain't gonna

Re: [HACKERS] strange isolation test buildfarm failure on guaibasaurus

2012-12-05 Thread Kevin Grittner
Stefan Kaltenbrunner wrote: Subject: [HACKERS] strange isolation test buildfarm failure on guaibasaurus http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=guaibasaurusdt=2012-12-05%2016%3A17%3A01 seems like a rather odd failure in the isolation test (client) Lines which might get the

Re: [HACKERS] Dumping an Extension's Script

2012-12-05 Thread Robert Haas
On Wed, Dec 5, 2012 at 5:43 PM, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: I don't find that argument convincing in the slightest. Could I perhaps convince you to dig up a reference? I would be interested in the arguments for that design back then. I think here it is:

Re: [HACKERS] ALTER TABLE ... NOREWRITE option

2012-12-05 Thread Robert Haas
On Wed, Dec 5, 2012 at 5:56 PM, Andres Freund and...@2ndquadrant.com wrote: On 2012-12-05 22:41:21 +, Simon Riggs wrote: On 5 December 2012 22:21, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Simon Riggs si...@2ndquadrant.com writes: CREATE EVENT TRIGGER my_event_trigger ON

Re: [HACKERS] Dumping an Extension's Script

2012-12-05 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes: Well, with the design you have proposed, unless you have access to the filesystem, it ain't gonna work. And if you have access to the filesystem, then this whole discussion is moot. I did mention that this version of the patch is only ready to host

[HACKERS] Functional dependency in GROUP BY through JOINs

2012-12-05 Thread David Rowley
Some idle thoughts has provoked me to sending this email. I'm wondering what I'm seeing here, is a simple missed optimisation or something that would be very difficult to implement, or even perhaps something I've completely misunderstood. To set the scene let's go with the old products and

Re: [HACKERS] Enabling Checksums

2012-12-05 Thread Robert Haas
On Tue, Dec 4, 2012 at 6:17 PM, Jeff Davis pg...@j-davis.com wrote: Or, I could write up a test framework in ruby or python, using the appropriate pg driver, and some not-so-portable shell commands to start and stop the server. Then, I can publish that on this list, and that would at least

Re: [HACKERS] ALTER TABLE ... NOREWRITE option

2012-12-05 Thread Simon Riggs
On 5 December 2012 22:49, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Simon Riggs si...@2ndquadrant.com writes: On 5 December 2012 22:21, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Simon Riggs si...@2ndquadrant.com writes: CREATE EVENT TRIGGER my_event_trigger ON table_rewrite

Re: [HACKERS] ALTER TABLE ... NOREWRITE option

2012-12-05 Thread Simon Riggs
On 5 December 2012 23:34, Robert Haas robertmh...@gmail.com wrote: On Wed, Dec 5, 2012 at 5:56 PM, Andres Freund and...@2ndquadrant.com wrote: On 2012-12-05 22:41:21 +, Simon Riggs wrote: On 5 December 2012 22:21, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Simon Riggs

Re: [HACKERS] Commits 8de72b and 5457a1 (COPY FREEZE)

2012-12-05 Thread Robert Haas
On Tue, Dec 4, 2012 at 3:38 PM, Jeff Davis pg...@j-davis.com wrote: After reading that thread, I still don't understand why it's unsafe to set HEAP_XMIN_COMMITTED in those conditions. Even if it is, I would think that a sufficiently narrow case -- such as CTAS outside of a transaction block --

Re: [HACKERS] Dumping an Extension's Script

2012-12-05 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: In other words, the first paragraph is arguing for something like the notion of an extension template - the ability to store the extension files inside the server, in cases where you don't want them to appear in the file system. But perhaps

Re: [HACKERS] Enabling Checksums

2012-12-05 Thread Simon Riggs
On 5 December 2012 23:40, Robert Haas robertmh...@gmail.com wrote: On Tue, Dec 4, 2012 at 6:17 PM, Jeff Davis pg...@j-davis.com wrote: Or, I could write up a test framework in ruby or python, using the appropriate pg driver, and some not-so-portable shell commands to start and stop the server.

Re: [HACKERS] Dumping an Extension's Script

2012-12-05 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: Robert Haas robertmh...@gmail.com writes: Well, there's certainly a point, because IIUC Dimitri's patch dumps the file into the pg_dump output no matter whether the file originally came from an SQL command or the filesystem. IMHO, anyone who

Re: [HACKERS] Fwd: question on foreign key lock

2012-12-05 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Dec 5, 2012 at 7:08 AM, Filip Rembiałkowski filip.rembialkow...@gmail.com wrote: 3. I made a naive test of simply changing AccessExclusiveLock to ExclusiveLock, and seeing how many regression tests it breaks. It breaks none :-) Sure. You

Re: [HACKERS] Dumping an Extension's Script

2012-12-05 Thread Tom Lane
Dimitri Fontaine dimi...@2ndquadrant.fr writes: In the patch we're talking about, the --extension-script is an accumulative option that needs an argument, so you do pg_dump --extension-script istore --extension-script foo or if you're into short options pg_dump -X istore -X foo -X

Re: [HACKERS] Commits 8de72b and 5457a1 (COPY FREEZE)

2012-12-05 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Tue, Dec 4, 2012 at 3:38 PM, Jeff Davis pg...@j-davis.com wrote: After reading that thread, I still don't understand why it's unsafe to set HEAP_XMIN_COMMITTED in those conditions. Even if it is, I would think that a sufficiently narrow case -- such

Re: [HACKERS] ALTER TABLE ... NOREWRITE option

2012-12-05 Thread Robert Haas
On Wed, Dec 5, 2012 at 6:45 PM, Simon Riggs si...@2ndquadrant.com wrote: Yes, but it is also the trigger writers problem. Maybe to some degree. I don't think that a server crash or something like a block-read error is ever tolerable though, no matter how silly the user is with their event

Re: [HACKERS] Commits 8de72b and 5457a1 (COPY FREEZE)

2012-12-05 Thread Jeff Davis
On Wed, 2012-12-05 at 19:43 -0500, Tom Lane wrote: From memory, the tqual.c code assumes that any tuple with XMIN_COMMITTED couldn't possibly be from its own transaction, and thus it doesn't make the tests that would be appropriate for a tuple that is from the current transaction. Maybe it's

Re: [HACKERS] WIP: store additional info in GIN index

2012-12-05 Thread Tomas Vondra
On 5.12.2012 09:10, Alexander Korotkov wrote: On Wed, Dec 5, 2012 at 1:56 AM, Tomas Vondra t...@fuzzy.cz mailto:t...@fuzzy.cz wrote: Thanks for bug report. It is fixed in the attached patch. Hi, I gave it another try and this time it went fine - I didn't get any segfault when loading the

Re: [HACKERS] Forgotten argument description in header of index_create

2012-12-05 Thread Alvaro Herrera
Michael Paquier escribió: Hi all, While reading some index-related code, I found that the description of the argument is_internal of index_create in index.c has been forgotten in commit f4c4335. Correction patch attached. Thanks, pushed. -- Álvaro Herrera

[HACKERS] Fix for pg_upgrade status display

2012-12-05 Thread Bruce Momjian
Pg_upgrade displays file names during copy and database names during dump/restore. Andrew Dunstan identified three bugs: * long file names were being truncated to 60 _leading_ characters, which often do not change for long file names * file names were truncated to 60 characters in log files

Re: [HACKERS] autovacuum truncate exclusive lock round two

2012-12-05 Thread Jan Wieck
On 12/5/2012 2:00 PM, Robert Haas wrote: Many it'd be sensible to relate the retry time to the time spend vacuuming the table. Say, if the amount of time spent retrying exceeds 10% of the time spend vacuuming the table, with a minimum of 1s and a maximum of 1min, give up. That way, big tables

[HACKERS] [BUG?] lag of minRecoveryPont in archive recovery

2012-12-05 Thread Kyotaro HORIGUCHI
Hello, I have a problem with PostgreSQL 9.2 with Pacemaker. HA standby sometime failes to start under normal operation. Testing with a bare replication pair showed that the standby failes startup recovery under the operation sequence shown below. 9.3dev too, but 9.1 does not have this problem.

Re: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL

2012-12-05 Thread Amit Kapila
On Tuesday, December 04, 2012 8:37 AM Amit Kapila wrote: On Monday, December 03, 2012 8:59 PM Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Sat, Dec 1, 2012 at 11:45 AM, Tom Lane t...@sss.pgh.pa.us wrote: But even if we can't make that work, it's not grounds for reserving

Re: [HACKERS] strange isolation test buildfarm failure on guaibasaurus

2012-12-05 Thread Tom Lane
Kevin Grittner kgri...@mail.com writes: Stefan Kaltenbrunner wrote: seems like a rather odd failure in the isolation test (client) Lines which might get the attention of interested parties: TRAP: FailedAssertion(!(rel-rd_refcnt 0), File: relcache.c, Line: 1603) Hah ... I'd looked at that

Re: [HACKERS] PATCH: optimized DROP of multiple tables within a transaction

2012-12-05 Thread Shigeru Hanada
On Mon, Nov 12, 2012 at 4:36 AM, Tomas Vondra t...@fuzzy.cz wrote: Hi, I've prepared a slightly updated patch, based on the previous review. See it attached. All changes in v3 patch seem good, however I found some places which requires cosmetic changes. Please see attached v3.1 patch for

Re: [HACKERS] why can't plpgsql return a row-expression?

2012-12-05 Thread Pavel Stehule
2012/12/5 Tom Lane t...@sss.pgh.pa.us: Asif Rehman asifr.reh...@gmail.com writes: Here is the updated patch. I overlooked the loop, checking to free the conversions map. Here are the results now. I looked at this patch briefly. It seems to me to be completely schizophrenic about the

<    1   2