Thread: 7.4 -> 7.4.1 upgrade with customization on freebsd

7.4 -> 7.4.1 upgrade with customization on freebsd

From
Date:
I installed 7.4 from the FreeBSD ports collection (I'm running 4.9-RELEASE).
Did nothing special, just make && make install and all was well.

I now have updated my ports collection via cvsup and see that the 7.4.1 port
is available.  So now I have several, very specific needs:

1) having now done some development in 7.4, I've decided I need to be able
to exceed the default limit of 16 arguments for plpgsql functions

2) I would like to upgrade to 7.4.1 without having to re-edit any config
files or change any paths.

3) I would like to prevent the database shown by "pkg_version -v" from
having one entry for 7.4 and another for 7.4.1

Suggestions?  Caveat: I'm a java + sql centered coder and makefiles make me
wince.


Bill McMilleon


Re: 7.4 -> 7.4.1 upgrade with customization on freebsd

From
"Joshua D. Drake"
Date:
Hello,

  Well... 7.4 to 7.4.1 is a direct upgrade. You do not have to do a
reinitdb which means you do
not have to reconfigure the system. I can't help you with your BSD
specific issues (I don't know much about it)
but from the PostgreSQL perspective, you should be abble to just upgrade.

   One note would be to backup your data/ directory, and then remove
postgresql in whichever manner
BSD does. Then install 7.4.1, and restore your data directory.

   Any people using BSD want to help on this one a little?

Sincerely,

Joshua D. Drake

bill.postgresql-users@mcmilleon.com wrote:

>I installed 7.4 from the FreeBSD ports collection (I'm running 4.9-RELEASE).
>Did nothing special, just make && make install and all was well.
>
>I now have updated my ports collection via cvsup and see that the 7.4.1 port
>is available.  So now I have several, very specific needs:
>
>1) having now done some development in 7.4, I've decided I need to be able
>to exceed the default limit of 16 arguments for plpgsql functions
>
>2) I would like to upgrade to 7.4.1 without having to re-edit any config
>files or change any paths.
>
>3) I would like to prevent the database shown by "pkg_version -v" from
>having one entry for 7.4 and another for 7.4.1
>
>Suggestions?  Caveat: I'm a java + sql centered coder and makefiles make me
>wince.
>
>
>Bill McMilleon
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 5: Have you checked our extensive FAQ?
>
>               http://www.postgresql.org/docs/faqs/FAQ.html
>
>


--
Command Prompt, Inc., home of Mammoth PostgreSQL - S/ODBC and S/JDBC
Postgresql support, programming shared hosting and dedicated hosting.
+1-503-667-4564 - jd@commandprompt.com - http://www.commandprompt.com
PostgreSQL Replicator -- production quality replication for PostgreSQL


Re: 7.4 -> 7.4.1 upgrade with customization on freebsd

From
"scott.marlowe"
Date:
On Fri, 16 Jan 2004 bill.postgresql-users@mcmilleon.com wrote:

>
> I installed 7.4 from the FreeBSD ports collection (I'm running 4.9-RELEASE).
> Did nothing special, just make && make install and all was well.
>
> I now have updated my ports collection via cvsup and see that the 7.4.1 port
> is available.  So now I have several, very specific needs:
>
> 1) having now done some development in 7.4, I've decided I need to be able
> to exceed the default limit of 16 arguments for plpgsql functions

Then you will have to recompile the server, as well as dump / initdb /
restore it.

> 2) I would like to upgrade to 7.4.1 without having to re-edit any config
> files or change any paths.

Just backup the config files in $PGDATA to another directory, and toss
them back into $PGDATA after the initdb

> 3) I would like to prevent the database shown by "pkg_version -v" from
> having one entry for 7.4 and another for 7.4.1

Not a clue here, I'm not a debian user.


Re: 7.4 -> 7.4.1 upgrade with customization on freebsd

From
"scott.marlowe"
Date:
On Sat, 17 Jan 2004, Joshua D. Drake wrote:

> Hello,
>
>   Well... 7.4 to 7.4.1 is a direct upgrade. You do not have to do a
> reinitdb which means you do

You may have missed where bill said he wanted to change a default limit
for plpgsql function args from 16 to something else.  that will require a
reinitdb...

And Bill, in my other reply, I meant to say I'm not a BSD user, not that I
wasn't a debian user.  My brain hurts... :-)


Re: 7.4 -> 7.4.1 upgrade with customization on freebsd

From
Fernando Schapachnik
Date:
En un mensaje anterior, scott.marlowe escribió:
> > 2) I would like to upgrade to 7.4.1 without having to re-edit any config
> > files or change any paths.
>
> Just backup the config files in $PGDATA to another directory, and toss
> them back into $PGDATA after the initdb
>
> > 3) I would like to prevent the database shown by "pkg_version -v" from
> > having one entry for 7.4 and another for 7.4.1

As Scott said, backup /usr/local/pgsql/data, pkg_delete the old version, make &&
make install the new one and the restore your old data directory. For package
upgrades, take a look at sysutil/portupgrade (you still need to backup the data
dir).

Good luck.

Re: 7.4 -> 7.4.1 upgrade with customization on freebsd

From
Fernando Schapachnik
Date:
En un mensaje anterior, scott.marlowe escribió:
> On Sat, 17 Jan 2004, Joshua D. Drake wrote:
>
> > Hello,
> >
> >   Well... 7.4 to 7.4.1 is a direct upgrade. You do not have to do a
> > reinitdb which means you do
>
> You may have missed where bill said he wanted to change a default limit
> for plpgsql function args from 16 to something else.  that will require a
> reinitdb...

I missed that too. Instead of backing up the data directory, pg_dump and backup
the *.conf files. After the port upgrade, initdb, the replace the *.conf files
with the backuped up versions and pg_restore your DB.

Regards.

Fernando.

Re: 7.4 -> 7.4.1 upgrade with customization on freebsd

From
Date:
> On Fri, 16 Jan 2004 bill.postgresql-users@mcmilleon.com wrote:

[snip]

> > 1) having now done some development in 7.4, I've decided I need to be
> able to exceed the default limit of 16 arguments for plpgsql functions
>
> Then you will have to recompile the server, as well as dump / initdb /
> restore it.

Where can I go to get guidance on exactly how to do this.  It would be ideal
to be able to simply change my typical ports command of:

    make && make install

...into...

    make --max-args-option=32 && make install

but I doubt it will be that simple.  And, at this point, I have no idea what
that make option would be.  I'd like to try building this from ports if at
all possible.  I could fall back to download source and run ./configure,
etc. but prefer not to.

Thanks everyone for your help so far.

Bill McMilleon




Re: 7.4 -> 7.4.1 upgrade with customization on freebsd

From
Jeff Eckermann
Date:
--- bill.postgresql-users@mcmilleon.com wrote:
> > On Fri, 16 Jan 2004
> bill.postgresql-users@mcmilleon.com wrote:
>
> [snip]
>
> > > 1) having now done some development in 7.4, I've
> decided I need to be
> > able to exceed the default limit of 16 arguments
> for plpgsql functions
> >
> > Then you will have to recompile the server, as
> well as dump / initdb /
> > restore it.
>
> Where can I go to get guidance on exactly how to do
> this.  It would be ideal
> to be able to simply change my typical ports command
> of:
>
>     make && make install
>
> ...into...
>
>     make --max-args-option=32 && make install
>
> but I doubt it will be that simple.  And, at this
> point, I have no idea what
> that make option would be.  I'd like to try building
> this from ports if at
> all possible.  I could fall back to download source
> and run ./configure,
> etc. but prefer not to.
>
> Thanks everyone for your help so far.

You will need to start over.  You can preserve your
data by either of the two previously suggested
methods, i.e. pg_dumpall, or copy the $PGDATA
directory off to the side, then restore it later.

Remove the port with pkg_delete or whatever the
correct command on FreeBSD is these days (haven't done
it for a while).  Do a "make fetch" to get your 7.4.1
source.

In your port directory you should now have a "work"
directory, under which will be the Postgres source,
starting at the "src" directory.  Go to the file
src/include/pg_config.h, and change the settings for
FUNC_MAX_ARGS and INDEX_MAX_KEYS to 32 (they have to
have the same value).

Next "make install", restore your data, and you should
be good.  Note that I am pulling this from the list
archives and have never done this myself (and working
from memory a good bit besides), so caveat emptor.

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

Re: 7.4 -> 7.4.1 upgrade with customization on freebsd

From
Tom Lane
Date:
Jeff Eckermann <jeff_eckermann@yahoo.com> writes:
> --- bill.postgresql-users@mcmilleon.com wrote:
>> 1) having now done some development in 7.4, I've
>> decided I need to be
>> able to exceed the default limit of 16 arguments
>> for plpgsql functions

Bill, you do realize that the default limit is not 16?  It's been 32
for a good while ...

> You will need to start over.  You can preserve your
> data by either of the two previously suggested
> methods, i.e. pg_dumpall, or copy the $PGDATA
> directory off to the side, then restore it later.

He had better pg_dumpall, because the modified server won't be able to
use the old $PGDATA tree.

            regards, tom lane