Re: [BUGS] BUG #5447: VPATH install postgres.bki

2010-05-04 Thread Craig Ringer

On 04/05/10 04:49, Graham wrote:


The following bug has been logged online:

Bug reference:  5447
Logged by:  Graham
Email address:  li...@information-cascade.co.uk
PostgreSQL version: 9.0beta1
Operating system:   linux
Description:VPATH install  postgres.bki
Details:

Build with VPATH works well upto installing
postgresql-9.0beta1/src/backend/catalog/postgres.bki
which is in the source tree not the object tree


I'm going to ask a stupid question:

"VPATH" ? What do you mean?

Also: You've omitted some key details, such as the command line(s) you 
ran leading up to this error, the exact OS and distro version, your 
version of gcc and make, etc.


--
Craig Ringer

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #5439: Table crash after CLUSTER command

2010-05-04 Thread Stefan Kirchev
Thank you for the replay.
I will follow your advice. First will upgrade to 8.4 (or at least to the
latest 8.3 release), than will try to reproduce the error.
For now I will stick to using VACUUM FULL and REINDEX.
Thanks again.
Best Regards
Stefan Kirchev

On Mon, Apr 26, 2010 at 5:06 PM, Kevin Grittner  wrote:

> "Stefan Kirchev"  wrote:
>
> > PostgreSQL version: 8.3.3
>
> > Description:Table crash after CLUSTER command
>
> > I order to keep good performance on tables CLUSTER is done
> > regularly on each table every Sunday. Almost every time we loose a
> > table which must be recreated afterward. The error yield is:
> > pnp=# select * from  alcatel_bss_kpi_tmp.cs_hourly_kpi limit 1;
> > ERROR:  could not open relation 1663/16404/2426042: No such file
> > or directory
>
> My first recommendation would be to apply the fixes for the bugs
> found during the last two years by upgrading your executable to
> 8.3.10.  This does not require a dump and load, but if you have any
> GiST indexes, or if you have hash indexes on intervals, you will
> need to rebuild those indexes.  To get more details, see:
>
> http://www.postgresql.org/docs/8.3/static/release
>
> FWIW, we CLUSTER a few very small, very frequently updated tables
> daily in about 100 databases to ensure that we recover from bloat
> from the occasional long-running transaction, and we've *never*
> seen this.
>
> If you actually need to cluster *every* table *every* week, you
> should review your vacuum policy.
>
> -Kevin
>


Re: [BUGS] BUG #5447: VPATH install postgres.bki

2010-05-04 Thread Craig Ringer
Please reply to the list, not just to me. The "Reply all" button in your 
mail client should take care of that.


Reply follows.

On 4/05/2010 9:16 PM, Graham Swallow wrote:

I fixed it for me at home by copying three files,
from the source tree to the object tree,
where makefile expected them to be
(it had forgot $PWD is  in _obj/... not in _src/...).

  postgres.bki
  postgres.description
  postgres.shdescription


OK, you're referring to out-of-tree builds. Sorry, I mostly work with 
CMake not autotools, so "VPATH" didn't leap out at me.


Sounds like it's just a mattter of adding appropriate variable 
substitutions for the install lines of those files. I'll look at it in 
the morning (it's late here) if nobody beats me to it - this is probably 
something my meagre skills are actually up to ;-)


--
Craig Ringer

--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #5447: VPATH install postgres.bki

2010-05-04 Thread Graham Swallow
(1) Thanks, I hope that PG9 is as good as it can be
(2) I had hoped that gmail would reply-all, doing "the right thing"
(3) Mailing list? This is a mailing list?

You mean when I grumble into this web-form,
it gets broadcast over the public address tannoy?
WOW !

Graham


On 4 May 2010 14:32, Craig Ringer  wrote:
> Please reply to the list, not just to me. The "Reply all" button in your
> mail client should take care of that.
>
> Reply follows.
>
> On 4/05/2010 9:16 PM, Graham Swallow wrote:
>>
>> I fixed it for me at home by copying three files,
>> from the source tree to the object tree,
>> where makefile expected them to be
>> (it had forgot $PWD is  in _obj/... not in _src/...).
>>
>>  postgres.bki
>>  postgres.description
>>  postgres.shdescription
>
> OK, you're referring to out-of-tree builds. Sorry, I mostly work with CMake
> not autotools, so "VPATH" didn't leap out at me.
>
> Sounds like it's just a mattter of adding appropriate variable substitutions
> for the install lines of those files. I'll look at it in the morning (it's
> late here) if nobody beats me to it - this is probably something my meagre
> skills are actually up to ;-)
>
> --
> Craig Ringer
>

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #5447: VPATH install postgres.bki

2010-05-04 Thread Alvaro Herrera
Graham wrote:

> Build with VPATH works well upto installing
> postgresql-9.0beta1/src/backend/catalog/postgres.bki
> which is in the source tree not the object tree

Strange.  I always use VPATH builds and I've never seen this problem.  I
only use CVS checkouts though.  Maybe something is broken in the
tarball.  I'll have a look this afternoon is no one beats me to it.

PS: yes, it's a mailing list -- see
http://archives.postgresql.org/pgsql-bugs/2010-05

-- 
Alvaro Herrerahttp://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #5447: VPATH install postgres.bki

2010-05-04 Thread Tom Lane
Alvaro Herrera  writes:
> Graham wrote:
>> Build with VPATH works well upto installing
>> postgresql-9.0beta1/src/backend/catalog/postgres.bki
>> which is in the source tree not the object tree

> Strange.  I always use VPATH builds and I've never seen this problem.  I
> only use CVS checkouts though.  Maybe something is broken in the
> tarball.  I'll have a look this afternoon is no one beats me to it.

I don't think anyone has tried a VPATH build starting from a
distribution tarball.  The OP is correct that things are going to fall
over in that case.  My thought about fixing it was that postgres.bki
and related files ought to be forced to be built/used in $(srcdir),
but I didn't get further than that.  Peter, what do you think?

regards, tom lane

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Re: [BUGS] BUG #5447: VPATH install postgres.bki

2010-05-04 Thread Peter Eisentraut
On tis, 2010-05-04 at 10:49 -0400, Tom Lane wrote:
> Alvaro Herrera  writes:
> > Graham wrote:
> >> Build with VPATH works well upto installing
> >> postgresql-9.0beta1/src/backend/catalog/postgres.bki
> >> which is in the source tree not the object tree
> 
> > Strange.  I always use VPATH builds and I've never seen this problem.  I
> > only use CVS checkouts though.  Maybe something is broken in the
> > tarball.  I'll have a look this afternoon is no one beats me to it.
> 
> I don't think anyone has tried a VPATH build starting from a
> distribution tarball.  The OP is correct that things are going to fall
> over in that case.  My thought about fixing it was that postgres.bki
> and related files ought to be forced to be built/used in $(srcdir),
> but I didn't get further than that.  Peter, what do you think?

We have a prebaked solution for this in the docs build.  The attached
patch appears to fix it.
Index: doc/src/sgml/Makefile
===
RCS file: /cvsroot/pgsql/doc/src/sgml/Makefile,v
retrieving revision 1.142
diff -u -3 -p -r1.142 Makefile
--- doc/src/sgml/Makefile	1 May 2010 21:31:17 -	1.142
+++ doc/src/sgml/Makefile	4 May 2010 19:45:51 -
@@ -277,8 +277,6 @@ check: postgres.sgml $(ALMOSTALLSGML) ch
 ## Install
 ##
 
-vpathsearch = `for f in $(addsuffix /$(1),$(subst :, ,. $(VPATH))); do test -r $$f && echo $$f && break; done`
-
 install: install-html
 
 ifneq ($(PORTNAME), sco)
Index: src/Makefile.global.in
===
RCS file: /cvsroot/pgsql/src/Makefile.global.in,v
retrieving revision 1.261
diff -u -3 -p -r1.261 Makefile.global.in
--- src/Makefile.global.in	24 Mar 2010 13:14:02 -	1.261
+++ src/Makefile.global.in	4 May 2010 19:45:51 -
@@ -44,6 +44,8 @@ srcdir = $(top_srcdir)/$(subdir)
 VPATH = $(srcdir)
 endif
 
+vpathsearch = `for f in $(addsuffix /$(1),$(subst :, ,. $(VPATH))); do test -r $$f && echo $$f && break; done`
+
 # Saved arguments from configure
 configure_args = @configure_args@
 
Index: src/backend/catalog/Makefile
===
RCS file: /cvsroot/pgsql/src/backend/catalog/Makefile,v
retrieving revision 1.77
diff -u -3 -p -r1.77 Makefile
--- src/backend/catalog/Makefile	16 Feb 2010 22:34:43 -	1.77
+++ src/backend/catalog/Makefile	4 May 2010 19:45:51 -
@@ -59,9 +59,9 @@ postgres.bki: genbki.pl Catalog.pm $(POS
 
 .PHONY: install-data
 install-data: $(BKIFILES) installdirs
-	$(INSTALL_DATA) postgres.bki '$(DESTDIR)$(datadir)/postgres.bki'
-	$(INSTALL_DATA) postgres.description '$(DESTDIR)$(datadir)/postgres.description'
-	$(INSTALL_DATA) postgres.shdescription '$(DESTDIR)$(datadir)/postgres.shdescription'
+	$(INSTALL_DATA) $(call vpathsearch,postgres.bki) '$(DESTDIR)$(datadir)/postgres.bki'
+	$(INSTALL_DATA) $(call vpathsearch,postgres.description) '$(DESTDIR)$(datadir)/postgres.description'
+	$(INSTALL_DATA) $(call vpathsearch,postgres.shdescription) '$(DESTDIR)$(datadir)/postgres.shdescription'
 	$(INSTALL_DATA) $(srcdir)/system_views.sql '$(DESTDIR)$(datadir)/system_views.sql'
 	$(INSTALL_DATA) $(srcdir)/information_schema.sql '$(DESTDIR)$(datadir)/information_schema.sql'
 	$(INSTALL_DATA) $(srcdir)/sql_features.txt '$(DESTDIR)$(datadir)/sql_features.txt'

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs