pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgres open source upgrades
9+ messages / 6 participants
[nested] [flat]
* Postgres open source upgrades
@ 2022-06-28 19:13 Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:09 ` Re: Postgres open source upgrades Bruce Momjian <bruce@momjian.us>
2022-06-28 20:12 ` Re: Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
0 siblings, 2 replies; 9+ messages in thread
From: Teja Jakkidi @ 2022-06-28 19:13 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
Hello pgsql-admin,
I am very new to Postgres and trying to learn how upgrades work in Postgres.
We have open source installation and I am wondering if anyone can help me with correct documentation or steps on performing minor and major version upgrades.
Thanks,
J. Teja Sri.
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres open source upgrades
2022-06-28 19:13 Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
@ 2022-06-28 20:09 ` Bruce Momjian <bruce@momjian.us>
2022-06-28 20:14 ` Re: Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 21:07 ` Re: Postgres open source upgrades Karl Denninger <karl@denninger.net>
1 sibling, 2 replies; 9+ messages in thread
From: Bruce Momjian @ 2022-06-28 20:09 UTC (permalink / raw)
To: Teja Jakkidi <teja.jakkidi05@gmail.com>; +Cc: pgsql-admin@lists.postgresql.org
On Tue, Jun 28, 2022 at 12:13:11PM -0700, Teja Jakkidi wrote:
> Hello pgsql-admin,
>
> I am very new to Postgres and trying to learn how upgrades work in Postgres.
> We have open source installation and I am wondering if anyone can help me with correct documentation or steps on performing minor and major version upgrades.
Please look here:
https://www.postgresql.org/support/versioning/
There are links to the documentation there.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
Indecision is a decision. Inaction is an action. Mark Batterson
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres open source upgrades
2022-06-28 19:13 Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:09 ` Re: Postgres open source upgrades Bruce Momjian <bruce@momjian.us>
@ 2022-06-28 20:14 ` Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:26 ` Re: Postgres open source upgrades Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 9+ messages in thread
From: Teja Jakkidi @ 2022-06-28 20:14 UTC (permalink / raw)
To: Bruce Momjian <bruce@momjian.us>; +Cc: pgsql-admin@lists.postgresql.org
Thank you very much, Momjian.
I also tried to test a minor upgrade with online documentation I found. I implemented the below steps for upgrading from 14.1 to 14.2 and this is open source.
Before upgrade binary location is /postgres/14
1. Stop the cluster
2. Rename old binary location to /postgres/14.old
3. Create new binary location /postgres/14.2
4. Untar the software,
Configure in the new directory 14.2 with new unrated software
Make world
Make install-world
5. Rename /postgres/14.2 to /postgres/14
6. Start the cluster
Cluster started and I was able to connect remotely with no issues. However when I tried using psql, I got below error:
Connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed.
But my postgres has been using socket file in /tmp location before upgrade. I am not sure why after upgrade psql is searching at a different allocation for socket.
Can someone help me here?
Are the steps that I did, correct??
Thanks and Regards,
J. Teja Sri.
> On Jun 28, 2022, at 1:09 PM, Bruce Momjian <bruce@momjian.us> wrote:
>
> On Tue, Jun 28, 2022 at 12:13:11PM -0700, Teja Jakkidi wrote:
>> Hello pgsql-admin,
>>
>> I am very new to Postgres and trying to learn how upgrades work in Postgres.
>> We have open source installation and I am wondering if anyone can help me with correct documentation or steps on performing minor and major version upgrades.
>
> Please look here:
>
> https://www.postgresql.org/support/versioning/
>
> There are links to the documentation there.
>
> --
> Bruce Momjian <bruce@momjian.us> https://momjian.us
> EDB https://enterprisedb.com
>
> Indecision is a decision. Inaction is an action. Mark Batterson
>
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres open source upgrades
2022-06-28 19:13 Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:09 ` Re: Postgres open source upgrades Bruce Momjian <bruce@momjian.us>
2022-06-28 20:14 ` Re: Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
@ 2022-06-28 20:26 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-06-28 21:05 ` Re: Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Tom Lane @ 2022-06-28 20:26 UTC (permalink / raw)
To: Teja Jakkidi <teja.jakkidi05@gmail.com>; +Cc: Bruce Momjian <bruce@momjian.us>; pgsql-admin@lists.postgresql.org
Teja Jakkidi <teja.jakkidi05@gmail.com> writes:
> Cluster started and I was able to connect remotely with no issues. However when I tried using psql, I got below error:
> Connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed.
> But my postgres has been using socket file in /tmp location before upgrade. I am not sure why after upgrade psql is searching at a different allocation for socket.
> Can someone help me here?
Some distributions configure the code with a different default socket
location because they don't like putting the socket in /tmp. It's
best to use a server and libraries all built by the same source so
that you don't have to fight with decisions like that. If you have
to, though, it's possible to force the server to put its socket
where you want (see unix_socket_directories).
regards, tom lane
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres open source upgrades
2022-06-28 19:13 Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:09 ` Re: Postgres open source upgrades Bruce Momjian <bruce@momjian.us>
2022-06-28 20:14 ` Re: Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:26 ` Re: Postgres open source upgrades Tom Lane <tgl@sss.pgh.pa.us>
@ 2022-06-28 21:05 ` Teja Jakkidi <teja.jakkidi05@gmail.com>
0 siblings, 0 replies; 9+ messages in thread
From: Teja Jakkidi @ 2022-06-28 21:05 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Bruce Momjian <bruce@momjian.us>; pgsql-admin@lists.postgresql.org
> unix_socket_directories Is set to the default one which is /temp
Before the minor upgrade it is using the correct location. However after upgrade when I started Postgres using pg_ctl start, logs reported as listening on socket at /tmp. So the server started on correct socket.
However when I tried using psql, it is checking a completed different socket location /var/run/postgresql/.s.PGSQL.5432
Thanks and Regards,
J. Teja Sri.
> On Jun 28, 2022, at 1:26 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Teja Jakkidi <teja.jakkidi05@gmail.com> writes:
>> Cluster started and I was able to connect remotely with no issues. However when I tried using psql, I got below error:
>> Connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed.
>> But my postgres has been using socket file in /tmp location before upgrade. I am not sure why after upgrade psql is searching at a different allocation for socket.
>> Can someone help me here?
>
> Some distributions configure the code with a different default socket
> location because they don't like putting the socket in /tmp. It's
> best to use a server and libraries all built by the same source so
> that you don't have to fight with decisions like that. If you have
> to, though, it's possible to force the server to put its socket
> where you want (see unix_socket_directories).
>
> regards, tom lane
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres open source upgrades
2022-06-28 19:13 Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:09 ` Re: Postgres open source upgrades Bruce Momjian <bruce@momjian.us>
@ 2022-06-28 21:07 ` Karl Denninger <karl@denninger.net>
1 sibling, 0 replies; 9+ messages in thread
From: Karl Denninger @ 2022-06-28 21:07 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
On 6/28/2022 16:09, Bruce Momjian wrote:
> On Tue, Jun 28, 2022 at 12:13:11PM -0700, Teja Jakkidi wrote:
>> Hello pgsql-admin,
>>
>> I am very new to Postgres and trying to learn how upgrades work in Postgres.
>> We have open source installation and I am wondering if anyone can help me with correct documentation or steps on performing minor and major version upgrades.
> Please look here:
>
> https://www.postgresql.org/support/versioning/
>
> There are links to the documentation there.
To add to this from real-world experience over a /long /period of time
(I've been using this code since the 1990s!) with Postgres:
I've never had a minor version upgrade blow up in my face. Major
version upgrades require some care because if the "upgrade in place"
procedure is used and something goes wrong with it you can be in serious
trouble. It's supposed to check that but if it goes bad on you then I
hope you have a valid and recent backup as you can be in extremely
serious trouble if not/. Theoretically /the in-place process should
check first and refuse to proceed if there's a problem but if you
haven't met Mrs. Murphy I recommend thinking a long time before
proceeding with that in the absence of a mitigation strategy with data
you care about.
Exactly how you mitigate that risk requires some thought and much
depends on prior planning (the obvious is to not upgrade in-place and
thus the "pre-upgrade" copy, and the binaries, are still there in case
something goes wrong -- but that requires both the processing time and
disk storage for the second copy.)
--
Karl Denninger
karl@denninger.net
/The Market Ticker/
/[S/MIME encrypted email preferred]/
Attachments:
smime.p7s (application/pkcs7-signature, 4.8K) download
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres open source upgrades
2022-06-28 19:13 Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
@ 2022-06-28 20:12 ` Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:24 ` Re: Postgres open source upgrades David G. Johnston <david.g.johnston@gmail.com>
1 sibling, 1 reply; 9+ messages in thread
From: Teja Jakkidi @ 2022-06-28 20:12 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
I also tried to test a minor upgrade with online documentation I found. I implemented the below steps for upgrading from 14.1 to 14.2 and this is open source.
Before upgrade binary location is /postgres/14
1. Stop the cluster
2. Rename old binary location to /postgres/14.old
3. Create new binary location /postgres/14.2
4. Untar the software,
Configure in the new directory 14.2 with new unrated software
Make world
Make install-world
5. Rename /postgres/14.2 to /postgres/14
6. Start the cluster
Cluster started and I was able to connect remotely with no issues. However when I tried using psql, I got below error:
Connection to server on socket “/var/run/postgresql/.s.PGSQL.5432” failed.
But my postgres has been using socket file in /tmp location before upgrade. I am not sure why after upgrade psql is searching at a different allocation for socket.
Can someone help me here?
Are the steps that I did, correct??
Thanks and Regards,
J. Teja Sri.
> On Jun 28, 2022, at 12:13 PM, Teja Jakkidi <teja.jakkidi05@gmail.com> wrote:
>
> Hello pgsql-admin,
>
> I am very new to Postgres and trying to learn how upgrades work in Postgres.
> We have open source installation and I am wondering if anyone can help me with correct documentation or steps on performing minor and major version upgrades.
>
> Thanks,
> J. Teja Sri.
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres open source upgrades
2022-06-28 19:13 Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:12 ` Re: Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
@ 2022-06-28 20:24 ` David G. Johnston <david.g.johnston@gmail.com>
2022-06-28 21:46 ` Re: Postgres open source upgrades Ron <ronljohnsonjr@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: David G. Johnston @ 2022-06-28 20:24 UTC (permalink / raw)
To: Teja Jakkidi <teja.jakkidi05@gmail.com>; +Cc: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On Tue, Jun 28, 2022 at 1:12 PM Teja Jakkidi <teja.jakkidi05@gmail.com>
wrote:
>
> 4. Untar the software,
> Configure in the new directory 14.2 with new unrated software
> Make world
> Make install-world
>
>
If your operating environment provides packages you might want to consider
just using those. Minor updates are a breeze. You always need to be
cautious with major version upgrades but still should be fairly
straight-forward.
David J.
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres open source upgrades
2022-06-28 19:13 Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:12 ` Re: Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:24 ` Re: Postgres open source upgrades David G. Johnston <david.g.johnston@gmail.com>
@ 2022-06-28 21:46 ` Ron <ronljohnsonjr@gmail.com>
0 siblings, 0 replies; 9+ messages in thread
From: Ron @ 2022-06-28 21:46 UTC (permalink / raw)
To: Pgsql-admin <pgsql-admin@lists.postgresql.org>
On 6/28/22 15:24, David G. Johnston wrote:
> On Tue, Jun 28, 2022 at 1:12 PM Teja Jakkidi <teja.jakkidi05@gmail.com> wrote:
>
>
> 4. Untar the software,
> Configure in the new directory 14.2 with new unrated software
> Make world
> Make install-world
>
>
> If your operating environment provides packages you might want to consider
> just using those. Minor updates are a breeze. You always need to be
> cautious with major version upgrades but still should be fairly
> straight-forward.
*THIS* is the answer. It's not 2002 anymore; building from source is for
developers and when Postgresql hasn't been packaged for your target. But
Postgresql.org or your distro almost certainly have packages for your system.
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2022-06-28 21:46 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-06-28 19:13 Postgres open source upgrades Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:09 ` Bruce Momjian <bruce@momjian.us>
2022-06-28 20:14 ` Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:26 ` Tom Lane <tgl@sss.pgh.pa.us>
2022-06-28 21:05 ` Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 21:07 ` Karl Denninger <karl@denninger.net>
2022-06-28 20:12 ` Teja Jakkidi <teja.jakkidi05@gmail.com>
2022-06-28 20:24 ` David G. Johnston <david.g.johnston@gmail.com>
2022-06-28 21:46 ` Ron <ronljohnsonjr@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox