Re: [HACKERS] Updated version of pg_receivexlog

2011-09-28 Thread Jaime Casanova
On Tue, Aug 16, 2011 at 9:32 AM, Magnus Hagander mag...@hagander.net wrote: Here's an updated version of pg_receivexlog, that should now actually work (it previously failed miserably when a replication record crossed a WAL file boundary - something which I at the time could not properly

Re: [HACKERS] synchronized snapshots

2011-09-28 Thread Marko Tiikkaja
Hi Joachim, On 14/09/2011 05:37, Joachim Wieland wrote: Here is a new version of this patch In a sequence such as this: BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE; INSERT INTO foo VALUES (-1); SELECT pg_export_snapshot(); the row added to foo is not visible in the exported

Re: [HACKERS] Updated version of pg_receivexlog

2011-09-28 Thread Jaime Casanova
On Wed, Sep 28, 2011 at 1:38 AM, Jaime Casanova ja...@2ndquadrant.com wrote: On Tue, Aug 16, 2011 at 9:32 AM, Magnus Hagander mag...@hagander.net wrote: Here's an updated version of pg_receivexlog, that should now actually work (it previously failed miserably when a replication record crossed

Re: [HACKERS] pg_upgrade - add config directory setting

2011-09-28 Thread Peter Eisentraut
On tis, 2011-09-27 at 16:13 -0700, Steve Crawford wrote: It would perhaps be useful to add optional --old-confdir and --new-confdir parameters to pg_upgrade. If these parameters are absent then pg_upgrade would work as it does now and assume that the config files are in the datadir. It

Re: [HACKERS] Mismatch of relation names: pg_toast.pg_toast_nnn during pg_upgrade from 8.4 to 9.1

2011-09-28 Thread Peter Eisentraut
On tis, 2011-09-27 at 16:19 -0700, Jamie Fox wrote: It fails at this stage: Restoring user relation files linking /data/pgsql/prod-84/base/11564/2613 to /data/pgsql/prod-91/base/12698/12570 linking /data/pgsql/prod-84/base/11564/2683 to /data/pgsql/prod-91/base/12698/12572

Re: [HACKERS] fix for pg_upgrade

2011-09-28 Thread panam
Here are all generated log files. I just removed all other DBs except gnucash (which includes the accounts table), but the issue also emerges with other DBs. Upgraded the 9.1 instance to the new build (9.1.1.) as well but this apparently did not change anything. PG versions are (including

[HACKERS] Does RelCache/SysCache shrink except when relations are deleted?

2011-09-28 Thread MauMau
Hello, Please let me ask you some questions about RelCache/SysCache/CatCache design. I know I should post this to pgsql-general, but I decided to post here because the content includes design questions. Background My customer is facing a out of memory problem during a batch job. I'd like to

Re: [HACKERS] pg_upgrade automatic testing

2011-09-28 Thread Bruce Momjian
Bruce Momjian wrote: Tom Lane wrote: Bruce Momjian br...@momjian.us writes: I propose I just remove the 8.4 test and always allow toast table names not to match --- the oids are still checked and are preserved. +1. You'll still make the check for non-toast tables, of course?

Re: [HACKERS] fix for pg_upgrade

2011-09-28 Thread Bruce Momjian
panam wrote: Here are all generated log files. I just removed all other DBs except gnucash (which includes the accounts table), but the issue also emerges with other DBs. Upgraded the 9.1 instance to the new build (9.1.1.) as well but this apparently did not change anything. PG versions

Re: [HACKERS] synchronized snapshots

2011-09-28 Thread Joachim Wieland
Hi Marko, On Wed, Sep 28, 2011 at 2:29 AM, Marko Tiikkaja marko.tiikk...@2ndquadrant.com wrote: In a sequence such as this:  BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;  INSERT INTO foo VALUES (-1);  SELECT pg_export_snapshot(); the row added to foo is not visible in the exported

Re: [HACKERS] Mismatch of relation names: pg_toast.pg_toast_nnn during pg_upgrade from 8.4 to 9.1

2011-09-28 Thread Jamie Fox
Thanks, I'm following the thread pg_upgrade automatic testing and will try the patch just detailed there. Jamie On Wed, Sep 28, 2011 at 12:50 AM, Peter Eisentraut pete...@gmx.net wrote: On tis, 2011-09-27 at 16:19 -0700, Jamie Fox wrote: It fails at this stage:     Restoring user relation

[HACKERS] Feature proposal: www_fdw

2011-09-28 Thread Alexander Soudakov
Greetings postgres hackers! Here you can find www_fdw feature documentation: http://wiki.postgresql.org/wiki/WWW_FDW Looking forward for your feedback. -- Alexander Soudakov Developer Programmer email: cyga...@gmail.com skype: asudakov -- Sent via pgsql-hackers mailing list

Re: [HACKERS] pg_upgrade - add config directory setting

2011-09-28 Thread Alvaro Herrera
Excerpts from Peter Eisentraut's message of mié sep 28 04:49:43 -0300 2011: On tis, 2011-09-27 at 16:13 -0700, Steve Crawford wrote: It would perhaps be useful to add optional --old-confdir and --new-confdir parameters to pg_upgrade. If these parameters are absent then pg_upgrade would

Re: [HACKERS] Feature proposal: www_fdw

2011-09-28 Thread David Fetter
On Wed, Sep 28, 2011 at 05:32:37PM +0400, Alexander Soudakov wrote: Greetings postgres hackers! Here you can find www_fdw feature documentation: http://wiki.postgresql.org/wiki/WWW_FDW Looking forward for your feedback. Do you have some libraries you plan to base this on, or will you be

Re: [HACKERS] pg_upgrade - add config directory setting

2011-09-28 Thread Steve Crawford
On 09/28/2011 12:49 AM, Peter Eisentraut wrote: On tis, 2011-09-27 at 16:13 -0700, Steve Crawford wrote: It would perhaps be useful to add optional --old-confdir and --new-confdir parameters to pg_upgrade. If these parameters are absent then pg_upgrade would work as it does now and assume that

Re: [HACKERS] Feature proposal: www_fdw

2011-09-28 Thread Andrew Dunstan
On 09/28/2011 09:32 AM, Alexander Soudakov wrote: Greetings postgres hackers! Here you can find www_fdw feature documentation: http://wiki.postgresql.org/wiki/WWW_FDW Looking forward for your feedback. Why should this be a core feature, as the subject suggests? It could just be an

Re: [HACKERS] Feature proposal: www_fdw

2011-09-28 Thread Alexander Soudakov
On Wed, Sep 28, 2011 at 7:17 PM, David Fetter da...@fetter.org wrote: On Wed, Sep 28, 2011 at 05:32:37PM +0400, Alexander Soudakov wrote: Greetings postgres hackers! Here you can find www_fdw feature documentation: http://wiki.postgresql.org/wiki/WWW_FDW Looking forward for your feedback.

Re: [HACKERS] Extension proposal: www_fdw

2011-09-28 Thread Andrew Dunstan
On 09/28/2011 11:46 AM, Alexander Soudakov wrote: Why should this be a core feature, as the subject suggests? It could just be an extension, like other FDWs, no? Subject? I didn't mean this, truly speaking I missed this moment. But now I guess it would be ok it to be extension like other

Re: [HACKERS] Extension proposal: www_fdw

2011-09-28 Thread Alexander Soudakov
inline On Wed, Sep 28, 2011 at 7:21 PM, Andrew Dunstan and...@dunslane.net wrote: On 09/28/2011 09:32 AM, Alexander Soudakov wrote: Greetings postgres hackers! Here you can find www_fdw feature documentation: http://wiki.postgresql.org/wiki/WWW_FDW Looking forward for your feedback.

Re: [HACKERS] Feature proposal: www_fdw

2011-09-28 Thread Andrew Dunstan
On 09/28/2011 11:41 AM, Alexander Soudakov wrote: On Wed, Sep 28, 2011 at 7:17 PM, David Fetterda...@fetter.org wrote: On Wed, Sep 28, 2011 at 05:32:37PM +0400, Alexander Soudakov wrote: Greetings postgres hackers! Here you can find www_fdw feature documentation:

Re: [HACKERS] Feature proposal: www_fdw

2011-09-28 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: Why should this be a core feature, as the subject suggests? It could just be an extension, like other FDWs, no? In fact it had *better* be an extension, not core, because anything that allows the server to go out and touch the web is going to be a

Re: [HACKERS] fix for pg_upgrade

2011-09-28 Thread Bruce Momjian
Bruce Momjian wrote: OK, so it fails for all tables and you are using the newest version. Thanks for all your work. I am now guessing that pg_upgrade 9.1.X is just broken on Windows. Perhaps the variables set by pg_upgrade_support.so are not being passed into the server variables? I

[HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Will Leinweber
I ruined a 5 hour UPDATE by typoing a table name on a SELECT to verify the update worked. I suppose I have no one else to blame, but it was really frustrating, to say the least. I assume this has happened to others as well. I only later found out about SAVEPOINT, which I immediately ran the next

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Gurjeet Singh
On Tue, Sep 27, 2011 at 7:57 PM, Will Leinweber w...@heroku.com wrote: I ruined a 5 hour UPDATE by typoing a table name on a SELECT to verify the update worked. I suppose I have no one else to blame, but it was really frustrating, to say the least. I assume this has happened to others as

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Marko Tiikkaja
On 28/09/2011 02:57, Will Leinweber wrote: psql console, while in a transaction, and while in interactive mode, should savepoint for me. You are lucky, since that feature has been in psql for some time already. Simply add this to your .psqlrc: \set ON_ERROR_ROLLBACK on -- Marko Tiikkaja

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Alvaro Herrera
Excerpts from Will Leinweber's message of mar sep 27 20:57:52 -0300 2011: I ruined a 5 hour UPDATE by typoing a table name on a SELECT to verify the update worked. I suppose I have no one else to blame, but it was really frustrating, to say the least. I assume this has happened to others as

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Kevin Grittner
Gurjeet Singh singh.gurj...@gmail.com wrote: Will Leinweber w...@heroku.com wrote: I ruined a 5 hour UPDATE by typoing a table name on a SELECT to verify the update worked. Ouch! I normally use tab-completion or copy/paste to save myself from myself in such situations. I only later

Re: [HACKERS] Updated version of pg_receivexlog

2011-09-28 Thread Magnus Hagander
On Wed, Sep 28, 2011 at 08:38, Jaime Casanova ja...@2ndquadrant.com wrote: On Tue, Aug 16, 2011 at 9:32 AM, Magnus Hagander mag...@hagander.net wrote: Here's an updated version of pg_receivexlog, that should now actually work (it previously failed miserably when a replication record crossed a

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Kevin Grittner
Alvaro Herrera alvhe...@commandprompt.com wrote: See ON_ERROR_ROLLBACK http://www.postgresql.org/docs/9.0/static/app-psql.html I had missed that. Dang, this database product is rich with nice features! :-) -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] Updated version of pg_receivexlog

2011-09-28 Thread Magnus Hagander
On Wed, Sep 28, 2011 at 09:30, Jaime Casanova ja...@2ndquadrant.com wrote: On Wed, Sep 28, 2011 at 1:38 AM, Jaime Casanova ja...@2ndquadrant.com wrote: On Tue, Aug 16, 2011 at 9:32 AM, Magnus Hagander mag...@hagander.net wrote: Here's an updated version of pg_receivexlog, that should now

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Gurjeet Singh
On Wed, Sep 28, 2011 at 1:51 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Alvaro Herrera alvhe...@commandprompt.com wrote: See ON_ERROR_ROLLBACK http://www.postgresql.org/docs/9.0/static/app-psql.html I had missed that. Dang, this database product is rich with nice features!

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread David Fetter
On Wed, Sep 28, 2011 at 02:25:44PM -0400, Gurjeet Singh wrote: On Wed, Sep 28, 2011 at 1:51 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Alvaro Herrera alvhe...@commandprompt.com wrote: See ON_ERROR_ROLLBACK http://www.postgresql.org/docs/9.0/static/app-psql.html I had

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Stephen Frost
* Kevin Grittner (kevin.gritt...@wicourts.gov) wrote: Alvaro Herrera alvhe...@commandprompt.com wrote: See ON_ERROR_ROLLBACK http://www.postgresql.org/docs/9.0/static/app-psql.html I had missed that. Dang, this database product is rich with nice features! :-) Be careful when running

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Alvaro Herrera
Excerpts from Stephen Frost's message of mié sep 28 16:22:58 -0300 2011: Be careful when running scripts, however.. Any invocation of psql will read you .psqlrc and if you've got ON_ERROR_ROLLBACK set there then psql -f blah ; will pick up on that and you'll end up running every command in

Re: [HACKERS] Review of VS 2010 support patches

2011-09-28 Thread Brar Piening
Brar Piening wrote: The attached patch includes documentation changes and excludes my versions of pgbison.pl and pgflex.pl which have been replaced by Andrews' versions that are already commited. Building current head today I noticed that the patch doesn't apply cleanly anymore. Attached

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Kevin Grittner
Alvaro Herrera alvhe...@commandprompt.com wrote: ON_ERROR_ROLLBACK [on can be a problem in a script file] So set it to interactive. I think we have an opportunity for a documentation enhancement there. -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] Does RelCache/SysCache shrink except when relations are deleted?

2011-09-28 Thread Merlin Moncure
2011/9/28 MauMau maumau...@gmail.com: Hello, Please let me ask you some questions about RelCache/SysCache/CatCache design. I know I should post this to pgsql-general, but I decided to post here because the content includes design questions. Background My customer is facing a out of memory

Re: [HACKERS] Feature proposal: www_fdw

2011-09-28 Thread Oleg Bartunov
Guys, I suggest Alexander to announce his project just to let all us know and avoid duplicate work. I hope it's a good starter project for Alexander ! I agree with Andrew, it's also should be posted to -general. It's clear it should be an extension ! Oleg On Wed, 28 Sep 2011, Tom Lane wrote:

Re: [HACKERS] Feature proposal: www_fdw

2011-09-28 Thread Florian Pflug
On Sep28, 2011, at 15:32 , Alexander Soudakov wrote: Here you can find www_fdw feature documentation: http://wiki.postgresql.org/wiki/WWW_FDW Certainly looks useful (as a third-party extension, as others have already pointed out) What I didn't quite understand is how one would pass (dynamic)

Re: [HACKERS] fix for pg_upgrade

2011-09-28 Thread panam
Hi Bruce, here is the file you asked for: http://postgresql.1045698.n5.nabble.com/file/n4850735/pg_upgrade_logfile.txt pg_upgrade_logfile.txt I guess you are not addressing me here, right? The server will need to be started with -b and this will disable autovacuum. Can someone on Windows

Re: [HACKERS] Feature proposal: www_fdw

2011-09-28 Thread Kevin Grittner
Florian Pflug f...@phlo.org wrote: On Sep28, 2011, at 15:32 , Alexander Soudakov wrote: Here you can find www_fdw feature documentation: http://wiki.postgresql.org/wiki/WWW_FDW Certainly looks useful (as a third-party extension, as others have already pointed out) Our programmers agree

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Daniel Farina
On Wed, Sep 28, 2011 at 1:02 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Alvaro Herrera alvhe...@commandprompt.com wrote: ON_ERROR_ROLLBACK [on can be a problem in a script file] So set it to interactive. I think we have an opportunity for a documentation enhancement there. In

Re: [HACKERS] fix for pg_upgrade

2011-09-28 Thread Bruce Momjian
panam wrote: Hi Bruce, here is the file you asked for: http://postgresql.1045698.n5.nabble.com/file/n4850735/pg_upgrade_logfile.txt pg_upgrade_logfile.txt OK, I see it using -b to pg_ctl: C:\Program Files\PostgreSQL\9.1\bin/pg_ctl -w -l nul -D D:\applications\postgres\9.1 -o

Re: [HACKERS] Updated version of pg_receivexlog

2011-09-28 Thread Jaime Casanova
On Wed, Sep 28, 2011 at 12:50 PM, Magnus Hagander mag...@hagander.net wrote: pg_receivexlog worked good in my tests. pg_basebackup with --xlog=stream gives me an already recycled wal segment message (note that the file was in pg_xlog in the standby): FATAL:  could not receive data from WAL

Re: [HACKERS] fix for pg_upgrade

2011-09-28 Thread Alvaro Herrera
Excerpts from Bruce Momjian's message of mié sep 28 13:48:28 -0300 2011: Bruce Momjian wrote: OK, so it fails for all tables and you are using the newest version. Thanks for all your work. I am now guessing that pg_upgrade 9.1.X is just broken on Windows. Perhaps the variables set

Re: [HACKERS] feature request: auto savepoint for interactive psql when in transaction.

2011-09-28 Thread Will Leinweber
On Wed, Sep 28, 2011 at 10:39 AM, Marko Tiikkaja marko.tiikk...@2ndquadrant.com wrote:  Simply add this to your .psqlrc: \set ON_ERROR_ROLLBACK on Thank you Marko and Alvaro for pointing me in the right direction. I set it to 'interactive', which I think makes the most sense. I do wish this

Re: [HACKERS] pg_upgrade automatic testing

2011-09-28 Thread Bruce Momjian
Bruce Momjian wrote: Bruce Momjian wrote: Tom Lane wrote: Bruce Momjian br...@momjian.us writes: I propose I just remove the 8.4 test and always allow toast table names not to match --- the oids are still checked and are preserved. +1. You'll still make the check for

Re: [HACKERS] Mismatch of relation names: pg_toast.pg_toast_nnn during pg_upgrade from 8.4 to 9.1

2011-09-28 Thread Bruce Momjian
Jamie Fox wrote: Thanks, I'm following the thread pg_upgrade automatic testing and will try the patch just detailed there. I have applied the patch to head and 9.1.X. We still have a win32 bug to fix. It is a shame I was not able to fix these before 9.1.1 was released. :-(

Re: [HACKERS] fix for pg_upgrade

2011-09-28 Thread Bruce Momjian
Alvaro Herrera wrote: Excerpts from Bruce Momjian's message of mi?? sep 28 13:48:28 -0300 2011: Bruce Momjian wrote: OK, so it fails for all tables and you are using the newest version. Thanks for all your work. I am now guessing that pg_upgrade 9.1.X is just broken on Windows.

[HACKERS] Removing savepointLevel from TransactionState

2011-09-28 Thread Gurjeet Singh
I noticed that the savepointLevel member of TransactionStateData struct is initialized to 0 from TopTransactionStateData, and never incremented or decremented afterwards. Since this is a file-local struct I think we can simply get rid of all usages of this without any risk. I visited all the

Re: [HACKERS] pg_upgrade - add config directory setting

2011-09-28 Thread Peter Eisentraut
On ons, 2011-09-28 at 11:53 -0300, Alvaro Herrera wrote: Excerpts from Peter Eisentraut's message of mié sep 28 04:49:43 -0300 2011: On tis, 2011-09-27 at 16:13 -0700, Steve Crawford wrote: It would perhaps be useful to add optional --old-confdir and --new-confdir parameters to

Re: [HACKERS] Removing savepointLevel from TransactionState

2011-09-28 Thread Tom Lane
Gurjeet Singh singh.gurj...@gmail.com writes: I noticed that the savepointLevel member of TransactionStateData struct is initialized to 0 from TopTransactionStateData, and never incremented or decremented afterwards. Since this is a file-local struct I think we can simply get rid of all

Re: [HACKERS] Removing savepointLevel from TransactionState

2011-09-28 Thread Gurjeet Singh
On Thu, Sep 29, 2011 at 1:11 AM, Tom Lane t...@sss.pgh.pa.us wrote: Gurjeet Singh singh.gurj...@gmail.com writes: I noticed that the savepointLevel member of TransactionStateData struct is initialized to 0 from TopTransactionStateData, and never incremented or decremented afterwards.

Re: [HACKERS] Removing savepointLevel from TransactionState

2011-09-28 Thread Pavan Deolasee
On Thu, Sep 29, 2011 at 10:52 AM, Gurjeet Singh singh.gurj...@gmail.com wrote: On Thu, Sep 29, 2011 at 1:11 AM, Tom Lane t...@sss.pgh.pa.us wrote: Gurjeet Singh singh.gurj...@gmail.com writes: I noticed that the savepointLevel member of TransactionStateData struct is initialized to 0 from