Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Fujii Masao
On Thu, Oct 27, 2011 at 3:29 AM, Magnus Hagander mag...@hagander.net wrote: I've applied this version with a few more minor changes that Heikki found. Cool! When I tried pg_receivexlog and checked the contents of streamed WAL file by xlogdump, I found that recent WAL records that walsender has

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Magnus Hagander
On Thu, Oct 27, 2011 at 09:29, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 27, 2011 at 3:29 AM, Magnus Hagander mag...@hagander.net wrote: I've applied this version with a few more minor changes that Heikki found. Cool! When I tried pg_receivexlog and checked the contents of

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Fujii Masao
On Thu, Oct 27, 2011 at 4:40 PM, Magnus Hagander mag...@hagander.net wrote: On Thu, Oct 27, 2011 at 09:29, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 27, 2011 at 3:29 AM, Magnus Hagander mag...@hagander.net wrote: I've applied this version with a few more minor changes that Heikki

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Magnus Hagander
On Thu, Oct 27, 2011 at 09:46, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 27, 2011 at 4:40 PM, Magnus Hagander mag...@hagander.net wrote: On Thu, Oct 27, 2011 at 09:29, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 27, 2011 at 3:29 AM, Magnus Hagander mag...@hagander.net

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Fujii Masao
On Thu, Oct 27, 2011 at 4:49 PM, Magnus Hagander mag...@hagander.net wrote: On Thu, Oct 27, 2011 at 09:46, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 27, 2011 at 4:40 PM, Magnus Hagander mag...@hagander.net wrote: On Thu, Oct 27, 2011 at 09:29, Fujii Masao masao.fu...@gmail.com wrote:

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-10-27 Thread Heikki Linnakangas
On 27.10.2011 09:57, Heikki Linnakangas wrote: My suggestion is to fix the CLOG problem in that same way that you fixed the SUBTRANS problem, i.e. by moving LogStandbySnapshot() to before CheckPointGuts(). Here's what I image CreateCheckPoint() should look like: 1) LogStandbySnapshot() and

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Magnus Hagander
On Thu, Oct 27, 2011 at 10:12, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 27, 2011 at 4:49 PM, Magnus Hagander mag...@hagander.net wrote: On Thu, Oct 27, 2011 at 09:46, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 27, 2011 at 4:40 PM, Magnus Hagander mag...@hagander.net

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Fujii Masao
On Thu, Oct 27, 2011 at 5:18 PM, Magnus Hagander mag...@hagander.net wrote: Not sure I follow. When we arrive at PQgetCopyData() there should be nothing buffered, and if the end of stream happens there it returns -1, and we exit, no? So where is the data that's lost? I do realize we don't

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-10-27 Thread Simon Riggs
On Thu, Oct 27, 2011 at 4:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Wed, Oct 26, 2011 at 12:16 PM, Simon Riggs si...@2ndquadrant.com wrote: This fixes both the subtrans and clog bugs in one patch. I don't see the point of changing StartupCLOG() to

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-10-27 Thread Heikki Linnakangas
On 27.10.2011 02:29, Florian Pflug wrote: Per my theory about the cause of the problem in my other mail, I think you might see StartupCLOG failures even during crash recovery, provided that wal_level was set to hot_standby when the primary crashed. Here's how 1) We start a checkpoint, and get

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Fujii Masao
On Thu, Oct 27, 2011 at 6:25 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 27, 2011 at 5:18 PM, Magnus Hagander mag...@hagander.net wrote: Not sure I follow. When we arrive at PQgetCopyData() there should be nothing buffered, and if the end of stream happens there it returns -1, and

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Magnus Hagander
On Thu, Oct 27, 2011 at 12:29, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 27, 2011 at 6:25 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 27, 2011 at 5:18 PM, Magnus Hagander mag...@hagander.net wrote: Not sure I follow. When we arrive at PQgetCopyData() there should be

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Fujii Masao
On Thu, Oct 27, 2011 at 7:48 PM, Magnus Hagander mag...@hagander.net wrote: On Thu, Oct 27, 2011 at 12:29, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 27, 2011 at 6:25 PM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Oct 27, 2011 at 5:18 PM, Magnus Hagander mag...@hagander.net

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Heikki Linnakangas
On 27.10.2011 14:09, Fujii Masao wrote: On Thu, Oct 27, 2011 at 7:48 PM, Magnus Hagandermag...@hagander.net wrote: I'm rewriting the handling of partial files per the other thread started by Heikki. The idea is that there will be an actual .partial file in there when pg_receivexlog has ended,

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Magnus Hagander
On Thu, Oct 27, 2011 at 13:19, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 27.10.2011 14:09, Fujii Masao wrote: On Thu, Oct 27, 2011 at 7:48 PM, Magnus Hagandermag...@hagander.net  wrote: I'm rewriting the handling of partial files per the other thread started by

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-10-27 Thread Robert Haas
On Thu, Oct 27, 2011 at 5:37 AM, Simon Riggs si...@2ndquadrant.com wrote: On Thu, Oct 27, 2011 at 4:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Wed, Oct 26, 2011 at 12:16 PM, Simon Riggs si...@2ndquadrant.com wrote: This fixes both the subtrans and

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Robert Haas
On Thu, Oct 27, 2011 at 7:19 AM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 27.10.2011 14:09, Fujii Masao wrote: On Thu, Oct 27, 2011 at 7:48 PM, Magnus Hagandermag...@hagander.net  wrote: I'm rewriting the handling of partial files per the other thread started by

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-10-27 Thread Florian Pflug
On Oct27, 2011, at 08:57 , Heikki Linnakangas wrote: On 27.10.2011 02:29, Florian Pflug wrote: Per my theory about the cause of the problem in my other mail, I think you might see StartupCLOG failures even during crash recovery, provided that wal_level was set to hot_standby when the primary

Re: [HACKERS] isolationtester and invalid permutations

2011-10-27 Thread Robert Haas
On Tue, Oct 25, 2011 at 9:13 PM, Alvaro Herrera alvhe...@alvh.no-ip.org wrote: Instead of simply aborting a spec that specifies running commands on blocked sessions (what we call an invalid permutation), it seems more useful to report the problem, cleanup the sessions, and continue with the

Re: [HACKERS] (PATCH) Adding CORRESPONDING (NULL error)

2011-10-27 Thread Erik Rijkers
(pgsql 9.2devel (25 oct) with your latest CORRESPONDING patch; linux x86_64 GNU/Linux 2.6.18-274.3.1.el5) Hi, here is another peculiarity, which I think is a bug: -- first without CORRESPONDING: $ psql -Xaf null.sql select 1 a , 2 b union all select null a, 4 b ; a |

[HACKERS] Hot Standby startup with overflowed snapshots

2011-10-27 Thread Simon Riggs
Chris Redekop's recent report of slow startup for Hot Standby has made me revisit the code there. Although there isn't a bug, there is a missed opportunity for starting up faster which could be the source of Chris' annoyance. The following patch allows a faster startup in some circumstances.

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-10-27 Thread Simon Riggs
On Thu, Oct 27, 2011 at 12:36 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Oct 27, 2011 at 5:37 AM, Simon Riggs si...@2ndquadrant.com wrote: On Thu, Oct 27, 2011 at 4:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: Robert Haas robertmh...@gmail.com writes: On Wed, Oct 26, 2011 at 12:16 PM,

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-10-27 Thread Simon Riggs
On Thu, Oct 27, 2011 at 12:29 AM, Florian Pflug f...@phlo.org wrote: Per my theory about the cause of the problem in my other mail, I think you might see StartupCLOG failures even during crash recovery, provided that wal_level was set to hot_standby when the primary crashed. Here's how 1) We

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-10-27 Thread Florian Pflug
On Oct27, 2011, at 15:51 , Simon Riggs wrote: On Thu, Oct 27, 2011 at 12:29 AM, Florian Pflug f...@phlo.org wrote: Here's what I image CreateCheckPoint() should look like: 1) LogStandbySnapshot() and fill out oldestActiveXid 2) Fill out REDO 3) Wait for concurrent commits 4) Fill out

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-10-27 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Thu, Oct 27, 2011 at 12:36 PM, Robert Haas robertmh...@gmail.com wrote: On Thu, Oct 27, 2011 at 5:37 AM, Simon Riggs si...@2ndquadrant.com wrote: It's much easier to understand that StartupCLOG() is actually a no-op and that we need to trim the clog

Re: [HACKERS] Your review of pg_receivexlog/pg_basebackup

2011-10-27 Thread Magnus Hagander
On Wed, Oct 26, 2011 at 09:52, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: (CC'ing pgsql-hackers, this started as an IM discussion yesterday but really belongs in the archives) On 25.10.2011 23:52, Magnus Hagander wrote: There's a tiny chance to get incomplete xlog files

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-10-27 Thread Simon Riggs
On Thu, Oct 27, 2011 at 3:03 PM, Florian Pflug f...@phlo.org wrote: I think you make a good case for doing this. However, I'm concerned that moving LogStandbySnapshot() in a backpatch seems more risky than it's worth. We could easily introduce a new bug into what we would all agree is a

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: On Thu, Oct 27, 2011 at 13:19, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 27.10.2011 14:09, Fujii Masao wrote: Yes. But that sounds unuserfriendly. Padding the WAL file manually is easy-to-do for a user? I'd definitely want

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Magnus Hagander
On Thu, Oct 27, 2011 at 16:54, Tom Lane t...@sss.pgh.pa.us wrote: Magnus Hagander mag...@hagander.net writes: On Thu, Oct 27, 2011 at 13:19, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 27.10.2011 14:09, Fujii Masao wrote: Yes. But that sounds unuserfriendly. Padding the

Re: [HACKERS] Updated version of pg_receivexlog

2011-10-27 Thread Dimitri Fontaine
Magnus Hagander mag...@hagander.net writes: On Thu, Oct 27, 2011 at 13:19, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: Perhaps we should add automatic padding in the server, though. It wouldn't take much code in the server, and would make life easier for people writing their

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-10-27 Thread Simon Riggs
On Thu, Oct 27, 2011 at 3:13 PM, Tom Lane t...@sss.pgh.pa.us wrote: However, the obvious next question is whether those other modules don't need to be changed also, and if not why not. Good point. StartupSubtrans() is also changed by this patch, since it will be supplied with an earlier

[HACKERS] out-of-order caution

2011-10-27 Thread Kevin Grittner
On the docs page for the SELECT statement, there is a caution which starts with: | It is possible for a SELECT command using ORDER BY and FOR | UPDATE/SHARE to return rows out of order. This is because ORDER BY | is applied first. Is this risk limited to queries running in READ COMMITTED

Re: [HACKERS] out-of-order caution

2011-10-27 Thread Simon Riggs
On Thu, Oct 27, 2011 at 4:41 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: On the docs page for the SELECT statement, there is a caution which starts with: | It is possible for a SELECT command using ORDER BY and FOR | UPDATE/SHARE to return rows out of order. This is because ORDER BY

[HACKERS] plpgsql versus long ELSIF chains

2011-10-27 Thread Tom Lane
Some off-list discussion found that the cause of this problem: http://archives.postgresql.org/pgsql-general/2011-10/msg00879.php was an attempt to write a plpgsql IF-ELSIF-ELSIF-ELSIF-ELSIF-...-ELSE statement with five thousand branches. Putting aside the wisdom of doing that, it seems like the

Re: [HACKERS] Hot Standby startup with overflowed snapshots

2011-10-27 Thread Chris Redekop
Thanks for the patch Simon, but unfortunately it does not resolve the issue I am seeing. The standby still refuses to finish starting up until long after all clients have disconnected from the primary (10 minutes). I do see your new log statement on startup, but only once - it does not repeat.

Re: [HACKERS] plpgsql versus long ELSIF chains

2011-10-27 Thread David E. Wheeler
On Oct 27, 2011, at 9:18 AM, Tom Lane wrote: So I'm going to go off and do that, but I wonder whether anyone thinks this is sufficiently important to back-patch. I'm inclined to think that back-patching isn't a good idea, because changing the representation of PLpgSQL_stmt_if will break (at

Re: [HACKERS] plpgsql versus long ELSIF chains

2011-10-27 Thread Heikki Linnakangas
On 27.10.2011 19:18, Tom Lane wrote: So really what needs to be done here is to make ELSIF chains explicit in the parsetree representation, and handle them via looping not recursion at runtime. This will also make it a lot easier to do the grammar via left-recursion. So I'm going to go off and

Re: [HACKERS] Hot Standby startup with overflowed snapshots

2011-10-27 Thread Simon Riggs
On Thu, Oct 27, 2011 at 5:26 PM, Chris Redekop ch...@replicon.com wrote: Thanks for the patch Simon, but unfortunately it does not resolve the issue I am seeing.  The standby still refuses to finish starting up until long after all clients have disconnected from the primary (10 minutes).  I do

Re: [HACKERS] Bug in walsender when calling out to do_pg_stop_backup (and others?)

2011-10-27 Thread Bruce Momjian
Greg Jaskiewicz wrote: On 19 Oct 2011, at 18:28, Florian Pflug wrote: All the other flags which indicate cancellation reasons are set from signal handers, I believe. We could of course mark as ClientConnectionLostPending as volatile just to be consistent. Not sure whether that's a good

Re: [HACKERS] out-of-order caution

2011-10-27 Thread Kevin Grittner
Simon Riggs si...@2ndquadrant.com wrote: On Thu, Oct 27, 2011 at 4:41 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: On the docs page for the SELECT statement, there is a caution which starts with: | It is possible for a SELECT command using ORDER BY and FOR | UPDATE/SHARE to return

Re: [HACKERS] out-of-order caution

2011-10-27 Thread Robert Haas
On Thu, Oct 27, 2011 at 1:51 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Simon Riggs si...@2ndquadrant.com wrote: On Thu, Oct 27, 2011 at 4:41 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: On the docs page for the SELECT statement, there is a caution which starts with: |

Re: [HACKERS] out-of-order caution

2011-10-27 Thread Kevin Grittner
Robert Haas robertmh...@gmail.com wrote: Simple test case: rhaas=# create table oops (a int); CREATE TABLE rhaas=# insert into oops values (1), (2), (3), (4); INSERT 0 4 rhaas=# begin; BEGIN rhaas=# update oops set a = 5 where a = 2; UPDATE 1 In another session: rhaas=# select *

Re: [HACKERS] (PATCH) Adding CORRESPONDING (NULL error)

2011-10-27 Thread Kerem Kat
Hi, Union with NULL error persists without the corresponding patch. Here is the output from postgres without the patch: SELECT a FROM (SELECT 1 a) foo UNION SELECT a FROM (SELECT NULL a) foo2; ERROR: failed to find conversion function from unknown to integer It is thrown from

Re: [HACKERS] Hot Backup with rsync fails at pg_clog if under load

2011-10-27 Thread Florian Pflug
On Oct27, 2011, at 16:30 , Simon Riggs wrote: On Thu, Oct 27, 2011 at 3:03 PM, Florian Pflug f...@phlo.org wrote: I think you make a good case for doing this. However, I'm concerned that moving LogStandbySnapshot() in a backpatch seems more risky than it's worth. We could easily introduce

Re: [HACKERS] out-of-order caution

2011-10-27 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Simon Riggs si...@2ndquadrant.com wrote: On Thu, Oct 27, 2011 at 4:41 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: | It is possible for a SELECT command using ORDER BY and FOR | UPDATE/SHARE to return rows out of order. This is

Re: [HACKERS] out-of-order caution

2011-10-27 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: (2) They *can* get a serialization failure involving just two transactions: a read and a write. Only if you ignore the difference between SELECT FOR UPDATE/SHARE and plain SELECT. I think calling the former a read is a conceptual error to

[HACKERS] portal with hold

2011-10-27 Thread fschmidt
I am posting to beg for the implementation of a with hold feature for portals, similar to what available for cursors. This is needed by the JDBC driver to implement Java's Result.HOLD_CURSORS_OVER_COMMIT which is needed to make Java's setFetchSize() work which is needed to read large result sets.

[HACKERS] fun with unlogged tables

2011-10-27 Thread Robert Haas
One of the optimizations that I did for 9.1 was to make transactions that touch only temporary and/or unlogged tables always commit asynchronously, because if the database crashes the table contents will be blown away in their entirety, and whether or not the commit made it down to disk won't

Re: [HACKERS] (PATCH) Adding CORRESPONDING (NULL error)

2011-10-27 Thread Tom Lane
Kerem Kat kerem...@gmail.com writes: Union with NULL error persists without the corresponding patch. Here is the output from postgres without the patch: SELECT a FROM (SELECT 1 a) foo UNION SELECT a FROM (SELECT NULL a) foo2; ERROR: failed to find conversion function from unknown to

Re: [HACKERS] pg_dumpall Sets Roll default_tablespace Before Creating Tablespaces

2011-10-27 Thread Bruce Momjian
Florian Pflug wrote: On Oct21, 2011, at 16:42 , Phil Sorber wrote: If you did want to make them immutable, I also like Florian's idea of a dependency graph. This would make the dumps less readable though. Hm, I kinda reversed my opinion on that, though - i.e., I no longer think that the

Re: [HACKERS] (PATCH) Adding CORRESPONDING (NULL error)

2011-10-27 Thread Tom Lane
I wrote: Kerem Kat kerem...@gmail.com writes: Union with NULL error persists without the corresponding patch. Here is the output from postgres without the patch: SELECT a FROM (SELECT 1 a) foo UNION SELECT a FROM (SELECT NULL a) foo2; ERROR: failed to find conversion function from

Re: [HACKERS] (PATCH) Adding CORRESPONDING (NULL error)

2011-10-27 Thread Tom Lane
Kerem Kat kerem...@gmail.com writes: On Thu, Oct 27, 2011 at 23:20, Tom Lane t...@sss.pgh.pa.us wrote: BTW, just to clarify: although that case fails, the case Erik was complaining of does work in unmodified Postgres: ... and I agree with him that it should still work with CORRESPONDING.

Re: [HACKERS] Hot Standby startup with overflowed snapshots

2011-10-27 Thread Chris Redekop
hrmz, still basically the same behaviour. I think it might be a *little* better with this patch. Before when under load it would start up quickly maybe 2 or 3 times out of 10 attemptswith this patch it might be up to 4 or 5 times out of 10...ish...or maybe it was just fluke *shrug*. I'm

Re: [HACKERS] (PATCH) Adding CORRESPONDING (NULL error)

2011-10-27 Thread Kerem Kat
On Thu, Oct 27, 2011 at 23:20, Tom Lane t...@sss.pgh.pa.us wrote: I wrote: Kerem Kat kerem...@gmail.com writes: Union with NULL error persists without the corresponding patch. Here is the output from postgres without the patch: SELECT a FROM (SELECT 1 a) foo UNION SELECT a FROM (SELECT

Re: [HACKERS] Hot Standby startup with overflowed snapshots

2011-10-27 Thread Simon Riggs
On Thu, Oct 27, 2011 at 10:09 PM, Chris Redekop ch...@replicon.com wrote: hrmz, still basically the same behaviour.  I think it might be a *little* better with this patch.  Before when under load it would start up quickly maybe 2 or 3 times out of 10 attemptswith this patch it might be up

Re: [HACKERS] pg_dumpall Sets Roll default_tablespace Before Creating Tablespaces

2011-10-27 Thread Florian Pflug
On Oct27, 2011, at 23:02 , Bruce Momjian wrote: Florian Pflug wrote: On Oct21, 2011, at 16:42 , Phil Sorber wrote: If you did want to make them immutable, I also like Florian's idea of a dependency graph. This would make the dumps less readable though. Hm, I kinda reversed my opinion on

[HACKERS] Add socket dir to pg_config..?

2011-10-27 Thread Stephen Frost
All, Was just wondering if we might want to include the default socket directory that was compiled in as part of the pg_config output..? Thanks, Stephen signature.asc Description: Digital signature

Re: [HACKERS] pg_upgrade if 'postgres' database is dropped

2011-10-27 Thread Bruce Momjian
Robert Haas wrote: On Tue, Oct 4, 2011 at 12:11 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: pg_upgrade doesn't work if the 'postgres' database has been dropped in the old cluster: ~/pgsql.master$ bin/pg_upgrade -b ~/pgsql.91stable/bin -B bin/ -d

Re: [HACKERS] pg_upgrade if 'postgres' database is dropped

2011-10-27 Thread Stephen Frost
* Bruce Momjian (br...@momjian.us) wrote: So, it is going to be confusing to support both databases because there is the cleanup details I have to document if I use template1. Presumably there's some other database in the system besides template1 if postgres doesn't exist.. Would it be

Re: [HACKERS] pg_upgrade if 'postgres' database is dropped

2011-10-27 Thread Bruce Momjian
Stephen Frost wrote: -- Start of PGP signed section. * Bruce Momjian (br...@momjian.us) wrote: So, it is going to be confusing to support both databases because there is the cleanup details I have to document if I use template1. Presumably there's some other database in the system besides

Re: [HACKERS] pg_upgrade if 'postgres' database is dropped

2011-10-27 Thread Stephen Frost
* Bruce Momjian (br...@momjian.us) wrote: I have not seen enough demand to make this a user-visible configuration. We can just tell them to create a postgres database. Frankly, they would have had to _remove_ the postgres database after initdb for it not to be there, and they are instructed

Re: [HACKERS] Hot Standby startup with overflowed snapshots

2011-10-27 Thread Chris Redekop
Sorry...designed was poor choice of words, I meant not unexpected. Doing the checkpoint right after pg_stop_backup() looks like it will work perfectly for me, so thanks for all your help! On a side note I am sporadically seeing another error on hotstandby startup. I'm not terribly concerned

Re: [HACKERS] pg_upgrade if 'postgres' database is dropped

2011-10-27 Thread Bruce Momjian
Stephen Frost wrote: -- Start of PGP signed section. * Bruce Momjian (br...@momjian.us) wrote: I have not seen enough demand to make this a user-visible configuration. We can just tell them to create a postgres database. Frankly, they would have had to _remove_ the postgres database after

Re: [HACKERS] pg_upgrade if 'postgres' database is dropped

2011-10-27 Thread Stephen Frost
* Bruce Momjian (br...@momjian.us) wrote: Well, you would have to remove it _after_ you did the pg_upgrade. Right now if you do a normal dump/restore upgrade, you also have to re-remove the postgres database. We don't have any mechanism to drop a database as part of pg_dumpall's restore if

Re: [HACKERS] Add socket dir to pg_config..?

2011-10-27 Thread Tom Lane
Stephen Frost sfr...@snowman.net writes: Was just wondering if we might want to include the default socket directory that was compiled in as part of the pg_config output..? [ shrug... ] We don't report the compiled-in port number, which is considerably more critical. And we don't report

Re: [HACKERS] pg_upgrade if 'postgres' database is dropped

2011-10-27 Thread Bruce Momjian
Stephen Frost wrote: -- Start of PGP signed section. * Bruce Momjian (br...@momjian.us) wrote: Well, you would have to remove it _after_ you did the pg_upgrade. Right now if you do a normal dump/restore upgrade, you also have to re-remove the postgres database. We don't have any mechanism

Re: [HACKERS] pg_upgrade if 'postgres' database is dropped

2011-10-27 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Stephen Frost wrote: Yes, they would have removed it because they didn't want it. As I recall, part of the agreement to create an extra database by default was that it could be removed if users didn't want it. Turning around and then saying but things

Re: [HACKERS] pg_upgrade if 'postgres' database is dropped

2011-10-27 Thread Bruce Momjian
Tom Lane wrote: Bruce Momjian br...@momjian.us writes: Stephen Frost wrote: Yes, they would have removed it because they didn't want it. As I recall, part of the agreement to create an extra database by default was that it could be removed if users didn't want it. Turning around and

Re: [HACKERS] pg_upgrade if 'postgres' database is dropped

2011-10-27 Thread Robert Haas
On Thu, Oct 27, 2011 at 11:35 PM, Bruce Momjian br...@momjian.us wrote: What about creating a new, single-purpose database in the source cluster and then removing it again after we're done? That is not a problem --- I can easily use template1. Huh? You just said upthread that you didn't want

Re: [HACKERS] pg_upgrade if 'postgres' database is dropped

2011-10-27 Thread Bruce Momjian
Robert Haas wrote: On Thu, Oct 27, 2011 at 11:35 PM, Bruce Momjian br...@momjian.us wrote: What about creating a new, single-purpose database in the source cluster and then removing it again after we're done? That is not a problem --- I can easily use template1. Huh? You just said

Re: [HACKERS] Hot Standby startup with overflowed snapshots

2011-10-27 Thread Robert Haas
On Thu, Oct 27, 2011 at 6:55 PM, Simon Riggs si...@2ndquadrant.com wrote: It seems cheap to add in a call to LogStandbySnapshot() after each call to pg_stop_backup(). Does anyone think this case is worth adding code for? Seems like one more thing to break. Why at that particular time? It

[HACKERS] Include commit identifier in version() function

2011-10-27 Thread pasman pasmański
Hi. I think, it be useful to include in version() function a hexadecimal identifier of commit, for fast checkout to it in git. -- pasman -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Review: [PL/pgSQL] %TYPE and array declaration - second patch

2011-10-27 Thread Tom Lane
Pavel Stehule pavel.steh...@gmail.com writes: there is final Wojciech's patch I looked this over a little bit, but I don't see an answer to the question I put on the commitfest entry: why is this being done in plpgsql, and not somewhere in the core code? The core has also got the concept of

Re: [HACKERS] pg_upgrade if 'postgres' database is dropped

2011-10-27 Thread Tom Lane
Bruce Momjian br...@momjian.us writes: Robert Haas wrote: that if you're doing something to the database that someone might object to, you oughtn't be doing it to the postgres database either. You should create a database just for pg_upgrade's use and install its crap in there. It installs

Re: [HACKERS] Review: [PL/pgSQL] %TYPE and array declaration - second patch

2011-10-27 Thread Pavel Stehule
Hello 2011/10/28 Tom Lane t...@sss.pgh.pa.us: Pavel Stehule pavel.steh...@gmail.com writes: there is final Wojciech's patch this is just small note about length of this patch. This patch was significantly smaller then he solved problem with derivate types for compound types - it should to