Re: [HACKERS] pg_migrator to /contrib in a later 9.0 beta

2010-04-30 Thread Bruce Momjian
Tom Lane wrote: > Dimitri Fontaine writes: > > Peter Eisentraut writes: > >> I also think that the standards for contrib should not be so lax that a > >> completely new module can be added after beta. (This is mostly informed > >> by the feeling that contrib should go away entirely.) > > > +1 >

Re: [HACKERS] HS - odd process listing

2010-04-30 Thread Tom Lane
Stefan Kaltenbrunner writes: > While playing with HS/SR on -HEAD I noticed that setting > setting max_standby_delay to "-1" leads to the following kind of odd ps > display: > 1000 20254 9.2 11.3 8625164 5600644 ? Rs 21:22 1:50 > postgres: startup process waiting for max_standby_d

Re: [HACKERS] Synchronous replication patch built on SR

2010-04-30 Thread Bruce Momjian
Please add it to the next commit-fest: https://commitfest.postgresql.org/action/commitfest_view/inprogress --- z...@cybertec.at wrote: > Resending, my ISP lost my mail yesterday. :-( > > ===

[HACKERS] HS - odd process listing

2010-04-30 Thread Stefan Kaltenbrunner
While playing with HS/SR on -HEAD I noticed that setting setting max_standby_delay to "-1" leads to the following kind of odd ps display: 1000 20254 9.2 11.3 8625164 5600644 ? Rs 21:22 1:50 postgres: startup process waiting for max_standby_delay (4294967295 s) This seems fair

Re: [HACKERS] COPY is not working

2010-04-30 Thread Tom Lane
Jaime Casanova writes: > COPY is not working on latest HEAD? I've added this to the COPY notes section: COPY only deals with the specific table named; it does not copy data to or from child tables. Thus for example COPY table TO shows the same data as SELECT * FROM ONLY tabl

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Kevin Grittner
Heikki Linnakangas wrote: > Kevin Grittner wrote: >> Surely it would confuse people to see they have fewer than >> min_wal_segments WAL segments. > > they wouldn't see that, that's the point of the setting. I was thinking, in particular, about beginners poking around to see how things look afte

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Heikki Linnakangas
Kevin Grittner wrote: > Heikki Linnakangas wrote: > >> Yeah, min_wal_segments or something would make sense. > > Surely it would confuse people to see they have fewer than > min_wal_segments WAL segments. Umm, they wouldn't see that, that's the point of the setting. The segments are not remov

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Simon Riggs
On Fri, 2010-04-30 at 14:42 -0400, Tom Lane wrote: > Robert Haas writes: > > On Fri, Apr 30, 2010 at 1:44 PM, Simon Riggs wrote: > >> Why is that not called "max_wal_segments"? wal_keep_segments sounds like > >> its been through Google translate. > > > Because it's not a maximum? > > Indeed. I

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Tom Lane
Alvaro Herrera writes: > Bruce Momjian escribió: >> Which is where my 'wal_keep_segments = -1' idea came from. > Are you suggesting that -1 should mean "keep all segments that fit on > disk, but if creating a new segment fails with ENOSPC, recycle the > oldest one"? No, keep means keep. Even if

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Heikki Linnakangas
Michael Tharp wrote: > On 04/30/2010 01:53 PM, Robert Haas wrote: >> >> Well, one of us is. Why would you want to retain all of your WAL logs >> in pg_xlog forever? > > To create or re-synchronize SR slaves, one could change > wal_keep_segments to -1, run a backup, wait for the slaves to catch up

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Alvaro Herrera
Bruce Momjian escribió: > Which is where my 'wal_keep_segments = -1' idea came from. Are you suggesting that -1 should mean "keep all segments that fit on disk, but if creating a new segment fails with ENOSPC, recycle the oldest one"? -- Alvaro Herrerahttp://www.

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Tom Lane
Heikki Linnakangas writes: > Bruce Momjian wrote: >> Should we allow -1 to mean "keep all segments"? > Umm, you can't keep all segments around forever, can you? Surely you > have to recycle them sooner or later or you will run out of disk space. You couldn't use that as a permanent setting, but

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Robert Haas
On Fri, Apr 30, 2010 at 2:08 PM, Simon Riggs wrote: > On Fri, 2010-04-30 at 13:52 -0400, Robert Haas wrote: >> On Fri, Apr 30, 2010 at 1:44 PM, Simon Riggs wrote: >> > On Fri, 2010-04-30 at 12:22 -0400, Bruce Momjian wrote: >> >> > >> >> > (wal_keep_segments can be changed without restarting, rig

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Bruce Momjian
Heikki Linnakangas wrote: > Bruce Momjian wrote: > > Tom Lane wrote: > >> Heikki Linnakangas writes: > >>> Tom Lane wrote: > If you aren't archiving then there's no guarantee that you'll still have > a continuous WAL series starting from the start of the backup. > >>> I wasn't really thi

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Tom Lane
Robert Haas writes: > On Fri, Apr 30, 2010 at 1:44 PM, Simon Riggs wrote: >> Why is that not called "max_wal_segments"? wal_keep_segments sounds like >> its been through Google translate. > Because it's not a maximum? Indeed. It would really be more like min_wal_segments, if we wanted to name

Re: WAL page magic number (was Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct)

2010-04-30 Thread Heikki Linnakangas
Bruce Momjian wrote: > Heikki Linnakangas wrote: >> Tom Lane wrote: >>> Heikki Linnakangas writes: Browsing the history of XLOG_PAGE_MAGIC, it used to be incremented by one whenever the format changes, at least as long as it has been been in xlog_internal.h. It started at 0xD05B in

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Bruce Momjian
Heikki Linnakangas wrote: > Robert Haas wrote: > > On Fri, Apr 30, 2010 at 1:44 PM, Simon Riggs wrote: > >> On Fri, 2010-04-30 at 12:22 -0400, Bruce Momjian wrote: > (wal_keep_segments can be changed without restarting, right?) > >>> Should we allow -1 to mean "keep all segments"? > >> Why is

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Kevin Grittner
Heikki Linnakangas wrote: > Yeah, min_wal_segments or something would make sense. Surely it would confuse people to see they have fewer than min_wal_segments WAL segments. -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: htt

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Heikki Linnakangas
Bruce Momjian wrote: > Tom Lane wrote: >> Heikki Linnakangas writes: >>> Tom Lane wrote: If you aren't archiving then there's no guarantee that you'll still have a continuous WAL series starting from the start of the backup. >>> I wasn't really thinking of this use case, but you could se

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Heikki Linnakangas
Robert Haas wrote: > On Fri, Apr 30, 2010 at 1:44 PM, Simon Riggs wrote: >> On Fri, 2010-04-30 at 12:22 -0400, Bruce Momjian wrote: (wal_keep_segments can be changed without restarting, right?) >>> Should we allow -1 to mean "keep all segments"? >> Why is that not called "max_wal_segments"? w

Re: [HACKERS] pg_migrator to /contrib in a later 9.0 beta

2010-04-30 Thread Dimitri Fontaine
Andrew Dunstan writes: > Quite so. Getting a better extensions mechanism doesn't mean we should > abandon what we currently have, IMNSHO. Yeah, agreed. Exactly what I proposed. The only change is the distribution mean. Either we keep things as they are now exactly, or we use the new Archive Netwo

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Simon Riggs
On Fri, 2010-04-30 at 13:58 -0400, Bruce Momjian wrote: > Robert Haas wrote: > > On Fri, Apr 30, 2010 at 1:39 PM, Bruce Momjian wrote: > > > Robert Haas wrote: > > >> On Fri, Apr 30, 2010 at 12:22 PM, Bruce Momjian wrote: > > >> > Tom Lane wrote: > > >> >> Heikki Linnakangas writes: > > >> >> >

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Simon Riggs
On Fri, 2010-04-30 at 13:52 -0400, Robert Haas wrote: > On Fri, Apr 30, 2010 at 1:44 PM, Simon Riggs wrote: > > On Fri, 2010-04-30 at 12:22 -0400, Bruce Momjian wrote: > >> > > >> > (wal_keep_segments can be changed without restarting, right?) > >> > >> Should we allow -1 to mean "keep all segment

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Bruce Momjian
Robert Haas wrote: > On Fri, Apr 30, 2010 at 1:39 PM, Bruce Momjian wrote: > > Robert Haas wrote: > >> On Fri, Apr 30, 2010 at 12:22 PM, Bruce Momjian wrote: > >> > Tom Lane wrote: > >> >> Heikki Linnakangas writes: > >> >> > Tom Lane wrote: > >> >> >> If you aren't archiving then there's no gua

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Michael Tharp
On 04/30/2010 01:53 PM, Robert Haas wrote: Well, one of us is. Why would you want to retain all of your WAL logs in pg_xlog forever? ...Robert To create or re-synchronize SR slaves, one could change wal_keep_segments to -1, run a backup, wait for the slaves to catch up, and change it back

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Robert Haas
On Fri, Apr 30, 2010 at 1:39 PM, Bruce Momjian wrote: > Robert Haas wrote: >> On Fri, Apr 30, 2010 at 12:22 PM, Bruce Momjian wrote: >> > Tom Lane wrote: >> >> Heikki Linnakangas writes: >> >> > Tom Lane wrote: >> >> >> If you aren't archiving then there's no guarantee that you'll still >> >> >

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Robert Haas
On Fri, Apr 30, 2010 at 1:44 PM, Simon Riggs wrote: > On Fri, 2010-04-30 at 12:22 -0400, Bruce Momjian wrote: >> > >> > (wal_keep_segments can be changed without restarting, right?) >> >> Should we allow -1 to mean "keep all segments"? > > Why is that not called "max_wal_segments"? wal_keep_segmen

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Bruce Momjian
Simon Riggs wrote: > On Fri, 2010-04-30 at 12:22 -0400, Bruce Momjian wrote: > > > > > > (wal_keep_segments can be changed without restarting, right?) > > > > Should we allow -1 to mean "keep all segments"? > > Why is that not called "max_wal_segments"? wal_keep_segments sounds like > its been t

Re: [HACKERS] missing file in git repo

2010-04-30 Thread Andrew Dunstan
Kevin Grittner wrote: The reported source of the software seems to have gone away. I can let you have my copy, which reliably reproduces the error, so we have a good failure test case. If it's not as recent as this: http://ww2.fs.ei.tum.de/~corecode/hg/fromcvs/log/132 we might want

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Simon Riggs
On Fri, 2010-04-30 at 12:22 -0400, Bruce Momjian wrote: > > > > (wal_keep_segments can be changed without restarting, right?) > > Should we allow -1 to mean "keep all segments"? Why is that not called "max_wal_segments"? wal_keep_segments sounds like its been through Google translate. -- Simo

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Bruce Momjian
Robert Haas wrote: > On Fri, Apr 30, 2010 at 12:22 PM, Bruce Momjian wrote: > > Tom Lane wrote: > >> Heikki Linnakangas writes: > >> > Tom Lane wrote: > >> >> If you aren't archiving then there's no guarantee that you'll still have > >> >> a continuous WAL series starting from the start of the ba

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Robert Haas
On Fri, Apr 30, 2010 at 12:22 PM, Bruce Momjian wrote: > Tom Lane wrote: >> Heikki Linnakangas writes: >> > Tom Lane wrote: >> >> If you aren't archiving then there's no guarantee that you'll still have >> >> a continuous WAL series starting from the start of the backup. >> >> > I wasn't really t

Re: WAL page magic number (was Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct)

2010-04-30 Thread Bruce Momjian
Heikki Linnakangas wrote: > Tom Lane wrote: > > Heikki Linnakangas writes: > >> Browsing the history of XLOG_PAGE_MAGIC, it used to be incremented by > >> one whenever the format changes, at least as long as it has been been in > >> xlog_internal.h. It started at 0xD05B in 2005, and was incremente

Re: pg_start_backup and pg_stop_backup Re: [HACKERS] Re: [COMMITTERS] pgsql: Make CheckRequiredParameterValues() depend upon correct

2010-04-30 Thread Bruce Momjian
Tom Lane wrote: > Heikki Linnakangas writes: > > Tom Lane wrote: > >> If you aren't archiving then there's no guarantee that you'll still have > >> a continuous WAL series starting from the start of the backup. > > > I wasn't really thinking of this use case, but you could set > > wal_keep_segmen

Re: [HACKERS] Invalidating dependent views and functions

2010-04-30 Thread Merlin Moncure
On Fri, Apr 30, 2010 at 8:08 AM, Robert Haas wrote: > On Fri, Apr 30, 2010 at 3:33 AM, Scott Bailey wrote: >> Proposal: Add an invalid flag to pg_class. Invalid objects would be ignored >> when doing dependency checks for DDL statements. And an exception would be >> thrown when an invalid object

Re: [HACKERS] missing file in git repo

2010-04-30 Thread Kevin Grittner
Andrew Dunstan wrote: > If any Ruby hacker feels like fixing it please speak up. I can't take it on any time soon. If nobody else picks it up, I can get to it "eventually". Anyone taking it on might want to read through the thread which starts at: http://archives.postgresql.org/pgsql-hacke

Re: [HACKERS] pg_migrator to /contrib in a later 9.0 beta

2010-04-30 Thread Peter Eisentraut
On fre, 2010-04-30 at 10:45 -0400, Tom Lane wrote: > In the end, the main useful function that contrib serves is to provide > examples of how to write Postgres extensions. Maybe, but pg_migrator surely doesn't fit that. And neither does about a third of the other contrib modules, IMO. > Because

Re: [HACKERS] pg_migrator to /contrib in a later 9.0 beta

2010-04-30 Thread Andrew Dunstan
Tom Lane wrote: Dimitri Fontaine writes: Peter Eisentraut writes: I also think that the standards for contrib should not be so lax that a completely new module can be added after beta. (This is mostly informed by the feeling that contrib should go away entirely.) +1

Re: [HACKERS] missing file in git repo

2010-04-30 Thread Andrew Dunstan
Tom Lane wrote: Heikki Linnakangas writes: Cédric Villemain wrote: 2010/4/30 Stefan Kaltenbrunner : I don't think the git repo was ever considered working for the backbranches at all... Really ?! Then we have to remove the backbranches from the git. http://wiki.post

Re: [HACKERS] pg_migrator to /contrib in a later 9.0 beta

2010-04-30 Thread Tom Lane
Dimitri Fontaine writes: > Peter Eisentraut writes: >> I also think that the standards for contrib should not be so lax that a >> completely new module can be added after beta. (This is mostly informed >> by the feeling that contrib should go away entirely.) > +1 > For the record, the contrib

Re: [HACKERS] Invalidating dependent views and functions

2010-04-30 Thread Tom Lane
Scott Bailey writes: > Proposal: Add an invalid flag to pg_class. Invalid objects would be > ignored when doing dependency checks for DDL statements. And an > exception would be thrown when an invalid object is called. IMO, the way Oracle does this pretty much sucks, and shouldn't be emulated.

Re: [HACKERS] missing file in git repo

2010-04-30 Thread Tom Lane
Heikki Linnakangas writes: > Cédric Villemain wrote: >> 2010/4/30 Stefan Kaltenbrunner : >>> I don't think the git repo was ever considered working for the backbranches >>> at all... >> >> Really ?! >> Then we have to remove the backbranches from the git. >> http://wiki.postgresql.org/wiki/Workin

Re: [HACKERS] Add column if not exists (CINE)

2010-04-30 Thread Bruce Momjian
Tom Lane wrote: > Robert Haas writes: > > We can artificially make this problem as complicated as we wish, but > > the people who are asking for this feature (including me) will, I > > believe, be quite happy with a solution that throws, say, a NOTICE > > instead of an ERROR when the object alread

Re: [HACKERS] Invalidating dependent views and functions

2010-04-30 Thread Robert Haas
On Fri, Apr 30, 2010 at 3:33 AM, Scott Bailey wrote: > Proposal: Add an invalid flag to pg_class. Invalid objects would be ignored > when doing dependency checks for DDL statements. And an exception would be > thrown when an invalid object is called. > > This is similar to what Oracle does. And mo

Re: [HACKERS] missing file in git repo

2010-04-30 Thread Heikki Linnakangas
Cédric Villemain wrote: > 2010/4/30 Stefan Kaltenbrunner : >> I don't think the git repo was ever considered working for the backbranches >> at all... > > Really ?! > Then we have to remove the backbranches from the git. > http://wiki.postgresql.org/wiki/Working_with_Git#Using_Back_Branches Yeah,

Re: [HACKERS] failed assertion and panic in standby mode

2010-04-30 Thread Simon Riggs
On Fri, 2010-04-30 at 09:35 +0300, Heikki Linnakangas wrote: > Hmm, I see a bug in btree_redo handling of XLOG_BTREE_REUSE_PAGE. If > hot standby is not enabled in the standby, it chokes on that record > type. It's missing from btree_desc too. Yep, correct fix. > This demonstrates that there rea

Re: [HACKERS] missing file in git repo

2010-04-30 Thread Cédric Villemain
2010/4/30 Stefan Kaltenbrunner : > Alexey Klyukin wrote: >> >> I think postgres git repo is broken. >> >> The compilation of REL7_4_STABLE from git fails on my system with: >> >> make -C src all >> make -C port all >> make[2]: *** No rule to make target `sprompt.o', needed by `libpgport.a'. >>  Sto

Re: [HACKERS] COPY is not working

2010-04-30 Thread Cédric Villemain
2010/4/30 Jaime Casanova : > On Fri, Apr 30, 2010 at 1:13 AM, Takahiro Itagaki > wrote: >> >> Jaime Casanova wrote: >> >>> ah! this is because COPY doesn't follow inherited tables... should it? >> >> Yes. You can use "COPY (SELECT * FROM a) TO " instead to copy all tuples. >> >> http://developer.

Re: [HACKERS] missing file in git repo

2010-04-30 Thread Stefan Kaltenbrunner
Alexey Klyukin wrote: I think postgres git repo is broken. The compilation of REL7_4_STABLE from git fails on my system with: make -C src all make -C port all make[2]: *** No rule to make target `sprompt.o', needed by `libpgport.a'. Stop. There is no sprompt.c in src/port in the sources obtai

[HACKERS] missing file in git repo

2010-04-30 Thread Alexey Klyukin
I think postgres git repo is broken. The compilation of REL7_4_STABLE from git fails on my system with: make -C src all make -C port all make[2]: *** No rule to make target `sprompt.o', needed by `libpgport.a'. Stop. There is no sprompt.c in src/port in the sources obtained from git. However,

[HACKERS] Patch for PKST timezone

2010-04-30 Thread Aftab Hussain
Hi all, Please accept attached patch for the following problem. af...@aftab-laptop:/opt/dev/pgsql/install/dbserver/bin$ af...@aftab-laptop:/opt/dev/pgsql/install/dbserver/bin$ ./psql postgres psql (9.0beta1) Type "help" for help. postgres=# SHOW timezone; TimeZone -- Asia/Karachi

Re: [HACKERS] pg_migrator to /contrib in a later 9.0 beta

2010-04-30 Thread Dimitri Fontaine
Peter Eisentraut writes: > My personal feeling is that pg_migrator should be fully integrated, but > it's too late for that, obviously. Let's do it for 9.1. +1 > I also think that the standards for contrib should not be so lax that a > completely new module can be added after beta. (This is mo

Re: [HACKERS] Invalidating dependent views and functions

2010-04-30 Thread Takahiro Itagaki
Scott Bailey wrote: > Problem: We need to change the last_name column of the people table from > varchar(30) to varchar(50). > Proposal: Add an invalid flag to pg_class. Your example is one of the simplest cases, but there are other complex usages. For example, shrinking varchar length, alteri

[HACKERS] Invalidating dependent views and functions

2010-04-30 Thread Scott Bailey
I've been working on a brute force method of saving view and function source when changes to an underlying object force that object to be dropped. But I think there is a way for Postgres to handle this that wouldn't be too hard to implement and would be extremely useful for us users. Problem: