Re: [HACKERS] COPY FREEZE has no warning

2013-02-02 Thread Noah Misch
On Sat, Feb 02, 2013 at 10:12:54AM -0500, Bruce Momjian wrote: > On Sat, Feb 2, 2013 at 09:51:13AM -0500, Noah Misch wrote: > > Let's touch on the exception in passing by using the phrase "last > > truncated", > > giving this wording for both the second and the third COPY FREEZE error > > sites:

Re: [HACKERS] COPY FREEZE has no warning

2013-02-02 Thread Bruce Momjian
On Sat, Feb 2, 2013 at 12:09:05PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > Well, so you are saying that there really isn't any use-visible logic > > for those messages to be different, > > No, and in fact the whole block of code is badly written because it > conflates two unrelated tes

Re: [HACKERS] COPY FREEZE has no warning

2013-02-02 Thread Tom Lane
Bruce Momjian writes: > Well, so you are saying that there really isn't any use-visible logic > for those messages to be different, No, and in fact the whole block of code is badly written because it conflates two unrelated tests. I guess somebody was trying to save a couple of nanoseconds by no

Re: [HACKERS] COPY FREEZE has no warning

2013-02-02 Thread Bruce Momjian
On Sat, Feb 2, 2013 at 09:51:13AM -0500, Noah Misch wrote: > > OK, so, should we change the error message: > > > > cannot perform FREEZE because of transaction activity after table > > creation or truncation > > > > to > > > > cannot perform FREEZE because the table was not created

Re: [HACKERS] COPY FREEZE has no warning

2013-02-02 Thread Noah Misch
On Fri, Feb 01, 2013 at 12:57:18PM -0500, Bruce Momjian wrote: > On Tue, Jan 29, 2013 at 08:34:24PM -0500, Noah Misch wrote: > > On Fri, Jan 25, 2013 at 11:28:58PM -0500, Bruce Momjian wrote: > > > BEGIN; > > > TRUNCATE vistest; > > > SAVEPOINT s1; > > > COPY vistest FROM stdin CSV FREEZE;

Re: [HACKERS] COPY FREEZE has no warning

2013-02-01 Thread Bruce Momjian
On Tue, Jan 29, 2013 at 08:34:24PM -0500, Noah Misch wrote: > On Fri, Jan 25, 2013 at 11:28:58PM -0500, Bruce Momjian wrote: > > On Fri, Jan 25, 2013 at 11:08:56PM -0500, Tom Lane wrote: > > > Bruce Momjian writes: > > > > ! ereport(ERROR, > > > > !

Re: [HACKERS] COPY FREEZE has no warning

2013-01-29 Thread Noah Misch
On Fri, Jan 25, 2013 at 11:28:58PM -0500, Bruce Momjian wrote: > On Fri, Jan 25, 2013 at 11:08:56PM -0500, Tom Lane wrote: > > Bruce Momjian writes: > > > ! ereport(ERROR, > > > ! > > > (ERRCODE_OBJECT_NOT_IN_PREREQUI

Re: [HACKERS] COPY FREEZE has no warning

2013-01-26 Thread Bruce Momjian
On Fri, Jan 25, 2013 at 11:28:58PM -0500, Bruce Momjian wrote: > On Fri, Jan 25, 2013 at 11:08:56PM -0500, Tom Lane wrote: > > Bruce Momjian writes: > > > ! ereport(ERROR, > > > ! > > > (ERRCODE_OBJECT_NOT_IN_PREREQUI

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Bruce Momjian
On Fri, Jan 25, 2013 at 11:08:56PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > ! ereport(ERROR, > > ! > > (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE, > > ! errmsg("cannot perform FR

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Tom Lane
Bruce Momjian writes: > ! ereport(ERROR, > ! > (ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE, > ! errmsg("cannot perform FREEZE > because of previous table activity in the current tran

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Bruce Momjian
On Fri, Jan 25, 2013 at 05:30:58PM -0500, Tom Lane wrote: > Bruce Momjian writes: > > OK, updated patch attached that throws an error with a more specific > > message. > > > > * > > * As noted above rd_newRelfilenodeSubid is not set in all cases > > * where

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Michael Paquier
On Sat, Jan 26, 2013 at 2:42 AM, Robert Haas wrote: > On Fri, Jan 25, 2013 at 11:59 AM, Tom Lane wrote: > > Bruce Momjian writes: > >> On Fri, Jan 25, 2013 at 02:48:37AM +0100, Andres Freund wrote: > >>> FWIW, and I won't annoy anyone further after this email, now that its > >>> deterministic,

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Tom Lane
Bruce Momjian writes: > OK, updated patch attached that throws an error with a more specific > message. >* >* As noted above rd_newRelfilenodeSubid is not set in all cases >* where we can apply the optimization, so in those rare cases > !

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Bruce Momjian
On Fri, Jan 25, 2013 at 11:55:12AM -0800, Jeff Janes wrote: > On Fri, Jan 25, 2013 at 9:42 AM, Robert Haas wrote: > > On Fri, Jan 25, 2013 at 11:59 AM, Tom Lane wrote: > >> Bruce Momjian writes: > >>> On Fri, Jan 25, 2013 at 02:48:37AM +0100, Andres Freund wrote: > FWIW, and I won't annoy a

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Jeff Janes
On Fri, Jan 25, 2013 at 9:42 AM, Robert Haas wrote: > On Fri, Jan 25, 2013 at 11:59 AM, Tom Lane wrote: >> Bruce Momjian writes: >>> On Fri, Jan 25, 2013 at 02:48:37AM +0100, Andres Freund wrote: FWIW, and I won't annoy anyone further after this email, now that its deterministic, I sti

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Fri, Jan 25, 2013 at 11:59 AM, Tom Lane wrote: > > Bruce Momjian writes: > >> On Fri, Jan 25, 2013 at 02:48:37AM +0100, Andres Freund wrote: > >>> FWIW, and I won't annoy anyone further after this email, now that its > >>> deterministic, I still t

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Robert Haas
On Fri, Jan 25, 2013 at 11:59 AM, Tom Lane wrote: > Bruce Momjian writes: >> On Fri, Jan 25, 2013 at 02:48:37AM +0100, Andres Freund wrote: >>> FWIW, and I won't annoy anyone further after this email, now that its >>> deterministic, I still think that this should be an ERROR not a WARNING. > >> A

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Tom Lane
Bruce Momjian writes: > On Fri, Jan 25, 2013 at 02:48:37AM +0100, Andres Freund wrote: >> FWIW, and I won't annoy anyone further after this email, now that its >> deterministic, I still think that this should be an ERROR not a WARNING. > As the FREEZE is just an optimization, I thought NOTICE, vs

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Bruce Momjian
On Fri, Jan 25, 2013 at 10:30:40AM -0500, Stephen Frost wrote: > * Bruce Momjian (br...@momjian.us) wrote: > > On Fri, Jan 25, 2013 at 02:48:37AM +0100, Andres Freund wrote: > > > On 2013-01-23 14:02:46 -0500, Bruce Momjian wrote: > > > > As a reminder, COPY FREEZE still does not issue any warning/

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Stephen Frost
* Bruce Momjian (br...@momjian.us) wrote: > On Fri, Jan 25, 2013 at 02:48:37AM +0100, Andres Freund wrote: > > On 2013-01-23 14:02:46 -0500, Bruce Momjian wrote: > > > As a reminder, COPY FREEZE still does not issue any warning/notice if > > > the freezing does not happen: > > > > FWIW, and I won'

Re: [HACKERS] COPY FREEZE has no warning

2013-01-25 Thread Bruce Momjian
On Fri, Jan 25, 2013 at 02:48:37AM +0100, Andres Freund wrote: > On 2013-01-23 14:02:46 -0500, Bruce Momjian wrote: > > As a reminder, COPY FREEZE still does not issue any warning/notice if > > the freezing does not happen: > > FWIW, and I won't annoy anyone further after this email, now that its

Re: [HACKERS] COPY FREEZE has no warning

2013-01-24 Thread Andres Freund
On 2013-01-23 14:02:46 -0500, Bruce Momjian wrote: > As a reminder, COPY FREEZE still does not issue any warning/notice if > the freezing does not happen: FWIW, and I won't annoy anyone further after this email, now that its deterministic, I still think that this should be an ERROR not a WARNING.

Re: [HACKERS] COPY FREEZE has no warning

2013-01-24 Thread Bruce Momjian
On Thu, Jan 24, 2013 at 06:55:17PM -0500, Tom Lane wrote: > Bruce Momjian writes: > >> Didn't we want to issue the user some kind of feedback? > > > As no one wanted to write this patch, I have developed the attached > > version. > > Please note the comment directly above where you patched. > >

Re: [HACKERS] COPY FREEZE has no warning

2013-01-24 Thread Tom Lane
Bruce Momjian writes: >> Didn't we want to issue the user some kind of feedback? > As no one wanted to write this patch, I have developed the attached > version. Please note the comment directly above where you patched. The proposed message doesn't seem to me to be following the message style g

Re: [HACKERS] COPY FREEZE has no warning

2013-01-24 Thread Bruce Momjian
On Thu, Jan 24, 2013 at 05:30:22PM -0500, Peter Eisentraut wrote: > On 1/24/13 5:09 PM, Bruce Momjian wrote: > > On Wed, Jan 23, 2013 at 02:02:46PM -0500, Bruce Momjian wrote: > >> As a reminder, COPY FREEZE still does not issue any warning/notice if > >> the freezing does not happen: > > > As no

Re: [HACKERS] COPY FREEZE has no warning

2013-01-24 Thread Peter Eisentraut
On 1/24/13 5:09 PM, Bruce Momjian wrote: > On Wed, Jan 23, 2013 at 02:02:46PM -0500, Bruce Momjian wrote: >> As a reminder, COPY FREEZE still does not issue any warning/notice if >> the freezing does not happen: > As no one wanted to write this patch, I have developed the attached > version. I th

Re: [HACKERS] COPY FREEZE has no warning

2013-01-24 Thread Bruce Momjian
On Wed, Jan 23, 2013 at 02:02:46PM -0500, Bruce Momjian wrote: > As a reminder, COPY FREEZE still does not issue any warning/notice if > the freezing does not happen: > > Requests copying the data with rows already frozen, just as they > would be after running the VACUUM FREEZE command

Re: [HACKERS] COPY FREEZE has no warning

2013-01-23 Thread Robert Haas
On Wed, Jan 23, 2013 at 2:02 PM, Bruce Momjian wrote: > As a reminder, COPY FREEZE still does not issue any warning/notice if > the freezing does not happen: > > Requests copying the data with rows already frozen, just as they > would be after running the VACUUM FREEZE command. >

[HACKERS] COPY FREEZE has no warning

2013-01-23 Thread Bruce Momjian
As a reminder, COPY FREEZE still does not issue any warning/notice if the freezing does not happen: Requests copying the data with rows already frozen, just as they would be after running the VACUUM FREEZE command. This is intended as a performance option for initial data loading