pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedVacuum full
21+ messages / 10 participants
[nested] [flat]
* Vacuum full
@ 2002-11-06 01:48 Andrew Bartley <abartley@evolvosystems.com>
0 siblings, 1 reply; 21+ messages in thread
From: Andrew Bartley @ 2002-11-06 01:48 UTC (permalink / raw)
To: pgsql-general
We are using postgres 7.2
Can anyone tell me what the ramifications are if I do not vacuum full the whole DB?
Say if I was to selectively vacuum all of the PG tables, and only some of the Application tables.
We have a number of tables that are effectively archive type tables. They are large, but do not change. If
I was to vacuum these tables on a regular basis, it would add a significant portion of time to the housekeeping process.
Thanks
Andrew
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full
@ 2002-11-06 02:02 Justin Clift <justin@postgresql.org>
parent: Andrew Bartley <abartley@evolvosystems.com>
0 siblings, 1 reply; 21+ messages in thread
From: Justin Clift @ 2002-11-06 02:02 UTC (permalink / raw)
To: Andrew Bartley <abartley@evolvosystems.com>; +Cc: pgsql-general
Hi Andrew,
How much activity do you have on these archive type of tables? If you
run SELECT queries on them a lot, and you're often updating or deleting
rows (am specifically not meaning INSERTing new rows) then it might be
worthwhile VACUUMing them.
Otherwise, it looks like you might not gain much from doing so. :)
As a curiosity question, when you VACUUM, do you use the ANALYZE option?
As a second curiosity question, when you mention PostgreSQL 7.2, do you
mean 7.2 literally or 7.2.3? 7.2.3 is the recommended production
version due to bugs having been found in 7.2.2 and 7.2.1.
Hope that helps.
:-)
Regards and best wishes,
Justin Clift
Andrew Bartley wrote:
>
> We are using postgres 7.2
Can anyone tell me what the ramifications are if I do not vacuum full
the whole DB?
Say if I was to selectively vacuum all of the PG tables, and only some
of the Application tables.
We have a number of tables that are effectively archive type tables.
They are large, but do not change. If
I was to vacuum these tables on a regular basis, it would add a
significant portion of time to the housekeeping process.
Thanks
Andrew
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full
@ 2002-11-06 02:33 Andrew Bartley <abartley@evolvosystems.com>
parent: Justin Clift <justin@postgresql.org>
0 siblings, 1 reply; 21+ messages in thread
From: Andrew Bartley @ 2002-11-06 02:33 UTC (permalink / raw)
To: Justin Clift <justin@postgresql.org>; +Cc: pgsql-general
Thanks Justin,
These tables will be used for reporting only, No update or insert activity
at all.
Q1.
Once a day
All application table indexes are dropped.
A vacuum full analyse is executed.
Then all app table indexes are created.
Q2.
We are running. PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC
2.95.4
I know we are several versions behind. Is there a known bug list for this
version?
I am also aware there is an upper limit on the number of transactions
postgres can do before the DB needs vacuuming. Somthing to do with tran ids
wrapping or something. Do you know anything about this?
Thanks
Andrew
----- Original Message -----
From: "Justin Clift" <justin@postgresql.org>
To: "Andrew Bartley" <abartley@evolvosystems.com>
Cc: <pgsql-general@postgresql.org>
Sent: Wednesday, November 06, 2002 1:02 PM
Subject: Re: [GENERAL] Vacuum full
> Hi Andrew,
>
> How much activity do you have on these archive type of tables? If you
> run SELECT queries on them a lot, and you're often updating or deleting
> rows (am specifically not meaning INSERTing new rows) then it might be
> worthwhile VACUUMing them.
>
> Otherwise, it looks like you might not gain much from doing so. :)
>
> As a curiosity question, when you VACUUM, do you use the ANALYZE option?
>
> As a second curiosity question, when you mention PostgreSQL 7.2, do you
> mean 7.2 literally or 7.2.3? 7.2.3 is the recommended production
> version due to bugs having been found in 7.2.2 and 7.2.1.
>
> Hope that helps.
>
> :-)
>
> Regards and best wishes,
>
> Justin Clift
>
>
> Andrew Bartley wrote:
> >
> > We are using postgres 7.2
>
>
>
> Can anyone tell me what the ramifications are if I do not vacuum full
> the whole DB?
>
>
>
> Say if I was to selectively vacuum all of the PG tables, and only some
> of the Application tables.
>
>
>
> We have a number of tables that are effectively archive type tables.
> They are large, but do not change. If
>
> I was to vacuum these tables on a regular basis, it would add a
> significant portion of time to the housekeeping process.
>
>
>
> Thanks
>
> Andrew
>
> --
> "My grandfather once told me that there are two kinds of people: those
> who work and those who take the credit. He told me to try to be in the
> first group; there was less competition there."
> - Indira Gandhi
>
>
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full
@ 2002-11-06 02:50 Justin Clift <justin@postgresql.org>
parent: Andrew Bartley <abartley@evolvosystems.com>
0 siblings, 3 replies; 21+ messages in thread
From: Justin Clift @ 2002-11-06 02:50 UTC (permalink / raw)
To: Andrew Bartley <abartley@evolvosystems.com>; +Cc: pgsql-general
Andrew Bartley wrote:
>
> Thanks Justin,
>
> These tables will be used for reporting only, No update or insert activity
> at all.
As a thought, do you mean "no update or *delete* activity at all"? No
insert activity would generally mean you have empty tables (unless using
COPY to gather data).
If you're only adding data, then selecting against that, and not
updating or deleting records, you should be fine to skip the VACUUM of
those tables. Unsure as to whether you'd want to skip a seperate
ANALYZE of the tables though.
> Q1.
>
> Once a day
>
> All application table indexes are dropped.
>
> A vacuum full analyse is executed.
>
> Then all app table indexes are created.
Well, that should definitely keep things in check and maintainable. :)
> Q2.
>
> We are running. PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC
> 2.95.4
>
> I know we are several versions behind. Is there a known bug list for this
> version?
Hmmm. Don't remember. There are overview details of the changes in the
7.2.2 and 7.2.3 releases though on the PostgreSQL News page:
http://www.ca.postgresql.org/news.html
> I am also aware there is an upper limit on the number of transactions
> postgres can do before the DB needs vacuuming. Somthing to do with tran ids
> wrapping or something. Do you know anything about this?
Not my area. One of the more-hard-core developers will be able to tell
you about this though. From memory though it happens around the 2 or 4
billionth transaction mark, and something may have been done about it
for the upcoming 7.3 release (we're in beta testing of this at present).
Hope that helps.
:-)
Regards and best wishes,
Justin Clift
> Thanks
>
> Andrew
>
> ----- Original Message -----
> From: "Justin Clift" <justin@postgresql.org>
> To: "Andrew Bartley" <abartley@evolvosystems.com>
> Cc: <pgsql-general@postgresql.org>
> Sent: Wednesday, November 06, 2002 1:02 PM
> Subject: Re: [GENERAL] Vacuum full
>
> > Hi Andrew,
> >
> > How much activity do you have on these archive type of tables? If you
> > run SELECT queries on them a lot, and you're often updating or deleting
> > rows (am specifically not meaning INSERTing new rows) then it might be
> > worthwhile VACUUMing them.
> >
> > Otherwise, it looks like you might not gain much from doing so. :)
> >
> > As a curiosity question, when you VACUUM, do you use the ANALYZE option?
> >
> > As a second curiosity question, when you mention PostgreSQL 7.2, do you
> > mean 7.2 literally or 7.2.3? 7.2.3 is the recommended production
> > version due to bugs having been found in 7.2.2 and 7.2.1.
> >
> > Hope that helps.
> >
> > :-)
> >
> > Regards and best wishes,
> >
> > Justin Clift
> >
> >
> > Andrew Bartley wrote:
> > >
> > > We are using postgres 7.2
> >
> >
> >
> > Can anyone tell me what the ramifications are if I do not vacuum full
> > the whole DB?
> >
> >
> >
> > Say if I was to selectively vacuum all of the PG tables, and only some
> > of the Application tables.
> >
> >
> >
> > We have a number of tables that are effectively archive type tables.
> > They are large, but do not change. If
> >
> > I was to vacuum these tables on a regular basis, it would add a
> > significant portion of time to the housekeeping process.
> >
> >
> >
> > Thanks
> >
> > Andrew
> >
> > --
> > "My grandfather once told me that there are two kinds of people: those
> > who work and those who take the credit. He told me to try to be in the
> > first group; there was less competition there."
> > - Indira Gandhi
> >
> >
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full
@ 2002-11-06 03:10 Medi Montaseri <medi.montaseri@intransa.com>
parent: Justin Clift <justin@postgresql.org>
2 siblings, 0 replies; 21+ messages in thread
From: Medi Montaseri @ 2002-11-06 03:10 UTC (permalink / raw)
To: Justin Clift <justin@postgresql.org>; Andrew Bartley <abartley@evolvosystems.com>; +Cc: pgsql-general
I'd say VACUUM them as often as you can, because it updates the planner's
optimzation code or decision making process.
VACUUM also give back your disk space on both deleted and updated rows...
Also, 7.2.3 now allows VACUUMing to take place along with other normal DB
transactions, ie in parallel, so, you cron can outsource your VACUUM-ing to
a third party cron-job, give it a key to the building (ie DB) and go home...
Cheers....
On Tuesday 05 November 2002 18:50, Justin Clift wrote:
> Andrew Bartley wrote:
> > Thanks Justin,
> >
> > These tables will be used for reporting only, No update or insert
> > activity at all.
>
> As a thought, do you mean "no update or *delete* activity at all"? No
> insert activity would generally mean you have empty tables (unless using
> COPY to gather data).
>
> If you're only adding data, then selecting against that, and not
> updating or deleting records, you should be fine to skip the VACUUM of
> those tables. Unsure as to whether you'd want to skip a seperate
> ANALYZE of the tables though.
>
> > Q1.
> >
> > Once a day
> >
> > All application table indexes are dropped.
> >
> > A vacuum full analyse is executed.
> >
> > Then all app table indexes are created.
>
> Well, that should definitely keep things in check and maintainable. :)
>
> > Q2.
> >
> > We are running. PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC
> > 2.95.4
> >
> > I know we are several versions behind. Is there a known bug list for
> > this version?
>
> Hmmm. Don't remember. There are overview details of the changes in the
> 7.2.2 and 7.2.3 releases though on the PostgreSQL News page:
>
> http://www.ca.postgresql.org/news.html
>
> > I am also aware there is an upper limit on the number of transactions
> > postgres can do before the DB needs vacuuming. Somthing to do with tran
> > ids wrapping or something. Do you know anything about this?
>
> Not my area. One of the more-hard-core developers will be able to tell
> you about this though. From memory though it happens around the 2 or 4
> billionth transaction mark, and something may have been done about it
> for the upcoming 7.3 release (we're in beta testing of this at present).
>
> Hope that helps.
>
> :-)
>
> Regards and best wishes,
>
> Justin Clift
>
> > Thanks
> >
> > Andrew
> >
> > ----- Original Message -----
> > From: "Justin Clift" <justin@postgresql.org>
> > To: "Andrew Bartley" <abartley@evolvosystems.com>
> > Cc: <pgsql-general@postgresql.org>
> > Sent: Wednesday, November 06, 2002 1:02 PM
> > Subject: Re: [GENERAL] Vacuum full
> >
> > > Hi Andrew,
> > >
> > > How much activity do you have on these archive type of tables? If you
> > > run SELECT queries on them a lot, and you're often updating or deleting
> > > rows (am specifically not meaning INSERTing new rows) then it might be
> > > worthwhile VACUUMing them.
> > >
> > > Otherwise, it looks like you might not gain much from doing so. :)
> > >
> > > As a curiosity question, when you VACUUM, do you use the ANALYZE
> > > option?
> > >
> > > As a second curiosity question, when you mention PostgreSQL 7.2, do you
> > > mean 7.2 literally or 7.2.3? 7.2.3 is the recommended production
> > > version due to bugs having been found in 7.2.2 and 7.2.1.
> > >
> > > Hope that helps.
> > >
> > > :-)
> > >
> > > Regards and best wishes,
> > >
> > > Justin Clift
> > >
> > > Andrew Bartley wrote:
> > > > We are using postgres 7.2
> > >
> > > Can anyone tell me what the ramifications are if I do not vacuum full
> > > the whole DB?
> > >
> > >
> > >
> > > Say if I was to selectively vacuum all of the PG tables, and only some
> > > of the Application tables.
> > >
> > >
> > >
> > > We have a number of tables that are effectively archive type tables.
> > > They are large, but do not change. If
> > >
> > > I was to vacuum these tables on a regular basis, it would add a
> > > significant portion of time to the housekeeping process.
> > >
> > >
> > >
> > > Thanks
> > >
> > > Andrew
> > >
> > > --
> > > "My grandfather once told me that there are two kinds of people: those
> > > who work and those who take the credit. He told me to try to be in the
> > > first group; there was less competition there."
> > > - Indira Gandhi
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full
@ 2002-11-06 03:14 Andrew Bartley <abartley@evolvosystems.com>
parent: Justin Clift <justin@postgresql.org>
2 siblings, 2 replies; 21+ messages in thread
From: Andrew Bartley @ 2002-11-06 03:14 UTC (permalink / raw)
To: Justin Clift <justin@postgresql.org>; +Cc: pgsql-general
Thanks Justin,
I suppose the reason for the question is related to the limit on the number
trans before there is a problem.
Regarding the static type app tables I keep referring to. These tables are
period based. i.e. At the end of the period these tables are loaded and
vacuumed, then used for reporting purposes only. In the next/new period a
new table will be created added to/updated, then closed at the end of the
period. The tables are dynamically accessed using "execute" based on the
period selected in the report criteria requested by the user from the GUI.
The tables in question will never change from the point when the period is
closed.
Thanks for your help and info.
Andrew
----- Original Message -----
From: "Justin Clift" <justin@postgresql.org>
To: "Andrew Bartley" <abartley@evolvosystems.com>
Cc: <pgsql-general@postgresql.org>
Sent: Wednesday, November 06, 2002 1:50 PM
Subject: Re: [GENERAL] Vacuum full
> Andrew Bartley wrote:
> >
> > Thanks Justin,
> >
> > These tables will be used for reporting only, No update or insert
activity
> > at all.
>
> As a thought, do you mean "no update or *delete* activity at all"? No
> insert activity would generally mean you have empty tables (unless using
> COPY to gather data).
>
> If you're only adding data, then selecting against that, and not
> updating or deleting records, you should be fine to skip the VACUUM of
> those tables. Unsure as to whether you'd want to skip a seperate
> ANALYZE of the tables though.
>
>
> > Q1.
> >
> > Once a day
> >
> > All application table indexes are dropped.
> >
> > A vacuum full analyse is executed.
> >
> > Then all app table indexes are created.
>
> Well, that should definitely keep things in check and maintainable. :)
>
>
> > Q2.
> >
> > We are running. PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC
> > 2.95.4
> >
> > I know we are several versions behind. Is there a known bug list for
this
> > version?
>
> Hmmm. Don't remember. There are overview details of the changes in the
> 7.2.2 and 7.2.3 releases though on the PostgreSQL News page:
>
> http://www.ca.postgresql.org/news.html
>
>
> > I am also aware there is an upper limit on the number of transactions
> > postgres can do before the DB needs vacuuming. Somthing to do with tran
ids
> > wrapping or something. Do you know anything about this?
>
> Not my area. One of the more-hard-core developers will be able to tell
> you about this though. From memory though it happens around the 2 or 4
> billionth transaction mark, and something may have been done about it
> for the upcoming 7.3 release (we're in beta testing of this at present).
>
> Hope that helps.
>
> :-)
>
> Regards and best wishes,
>
> Justin Clift
>
> > Thanks
> >
> > Andrew
> >
> > ----- Original Message -----
> > From: "Justin Clift" <justin@postgresql.org>
> > To: "Andrew Bartley" <abartley@evolvosystems.com>
> > Cc: <pgsql-general@postgresql.org>
> > Sent: Wednesday, November 06, 2002 1:02 PM
> > Subject: Re: [GENERAL] Vacuum full
> >
> > > Hi Andrew,
> > >
> > > How much activity do you have on these archive type of tables? If you
> > > run SELECT queries on them a lot, and you're often updating or
deleting
> > > rows (am specifically not meaning INSERTing new rows) then it might be
> > > worthwhile VACUUMing them.
> > >
> > > Otherwise, it looks like you might not gain much from doing so. :)
> > >
> > > As a curiosity question, when you VACUUM, do you use the ANALYZE
option?
> > >
> > > As a second curiosity question, when you mention PostgreSQL 7.2, do
you
> > > mean 7.2 literally or 7.2.3? 7.2.3 is the recommended production
> > > version due to bugs having been found in 7.2.2 and 7.2.1.
> > >
> > > Hope that helps.
> > >
> > > :-)
> > >
> > > Regards and best wishes,
> > >
> > > Justin Clift
> > >
> > >
> > > Andrew Bartley wrote:
> > > >
> > > > We are using postgres 7.2
> > >
> > >
> > >
> > > Can anyone tell me what the ramifications are if I do not vacuum full
> > > the whole DB?
> > >
> > >
> > >
> > > Say if I was to selectively vacuum all of the PG tables, and only some
> > > of the Application tables.
> > >
> > >
> > >
> > > We have a number of tables that are effectively archive type tables.
> > > They are large, but do not change. If
> > >
> > > I was to vacuum these tables on a regular basis, it would add a
> > > significant portion of time to the housekeeping process.
> > >
> > >
> > >
> > > Thanks
> > >
> > > Andrew
> > >
> > > --
> > > "My grandfather once told me that there are two kinds of people: those
> > > who work and those who take the credit. He told me to try to be in the
> > > first group; there was less competition there."
> > > - Indira Gandhi
> > >
> > >
>
> --
> "My grandfather once told me that there are two kinds of people: those
> who work and those who take the credit. He told me to try to be in the
> first group; there was less competition there."
> - Indira Gandhi
>
>
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full
@ 2002-11-06 03:36 Justin Clift <justin@postgresql.org>
parent: Andrew Bartley <abartley@evolvosystems.com>
1 sibling, 1 reply; 21+ messages in thread
From: Justin Clift @ 2002-11-06 03:36 UTC (permalink / raw)
To: Andrew Bartley <abartley@evolvosystems.com>; +Cc: pgsql-general
Andrew Bartley wrote:
>
> Thanks Justin,
>
> I suppose the reason for the question is related to the limit on the number
> trans before there is a problem.
No stress. One of the developers will be able to answer you in regards
to this. :) If no-one pipes up and says anything, then it's worth
asking on the PostgreSQL Hackers mailing list
(pgsql-hackers@postgresql.org).
> Regarding the static type app tables I keep referring to. These tables are
> period based. i.e. At the end of the period these tables are loaded and
> vacuumed, then used for reporting purposes only. In the next/new period a
> new table will be created added to/updated, then closed at the end of the
> period. The tables are dynamically accessed using "execute" based on the
> period selected in the report criteria requested by the user from the GUI.
>
> The tables in question will never change from the point when the period is
> closed.
Ok, after they're loaded it's worth doing an ANALYZE to ensure the
planner statistics and similar are updated and made accurate. After
that though, as they're totally static you'd be wasting your time
running VACUUM or any further ANALYZE's on them.
> Thanks for your help and info.
That's cool. :)
Regards and best wishes,
Justin Clift
> Andrew
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full
@ 2002-11-06 03:52 Andrew Bartley <abartley@evolvosystems.com>
parent: Justin Clift <justin@postgresql.org>
0 siblings, 1 reply; 21+ messages in thread
From: Andrew Bartley @ 2002-11-06 03:52 UTC (permalink / raw)
To: Justin Clift <justin@postgresql.org>; +Cc: pgsql-general
Thanks
I think that is what I wanted to hear.
Regarding the version we are running. The last upgrade I did from 7.1 to
7.2.1 took several months. The main problem was not the change in the
semantics of the syntax, but the performance blow out we experienced. Once
I had re-written the offending code, several weeks of regression testing had
to be done. I will look at the link you sent me regarding the 7.2/3 news,
to see if there are any bugs that could be a potential problem for us.
Thanks again for your time
Andrew Bartley
----- Original Message -----
From: "Justin Clift" <justin@postgresql.org>
To: "Andrew Bartley" <abartley@evolvosystems.com>
Cc: <pgsql-general@postgresql.org>
Sent: Wednesday, November 06, 2002 2:36 PM
Subject: Re: [GENERAL] Vacuum full
> Andrew Bartley wrote:
> >
> > Thanks Justin,
> >
> > I suppose the reason for the question is related to the limit on the
number
> > trans before there is a problem.
>
> No stress. One of the developers will be able to answer you in regards
> to this. :) If no-one pipes up and says anything, then it's worth
> asking on the PostgreSQL Hackers mailing list
> (pgsql-hackers@postgresql.org).
>
> > Regarding the static type app tables I keep referring to. These tables
are
> > period based. i.e. At the end of the period these tables are loaded and
> > vacuumed, then used for reporting purposes only. In the next/new period
a
> > new table will be created added to/updated, then closed at the end of
the
> > period. The tables are dynamically accessed using "execute" based on
the
> > period selected in the report criteria requested by the user from the
GUI.
> >
> > The tables in question will never change from the point when the period
is
> > closed.
>
> Ok, after they're loaded it's worth doing an ANALYZE to ensure the
> planner statistics and similar are updated and made accurate. After
> that though, as they're totally static you'd be wasting your time
> running VACUUM or any further ANALYZE's on them.
>
>
> > Thanks for your help and info.
>
> That's cool. :)
>
> Regards and best wishes,
>
> Justin Clift
>
> > Andrew
>
> --
> "My grandfather once told me that there are two kinds of people: those
> who work and those who take the credit. He told me to try to be in the
> first group; there was less competition there."
> - Indira Gandhi
>
>
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full
@ 2002-11-06 04:18 Bruno Wolff III <bruno@wolff.to>
parent: Andrew Bartley <abartley@evolvosystems.com>
1 sibling, 0 replies; 21+ messages in thread
From: Bruno Wolff III @ 2002-11-06 04:18 UTC (permalink / raw)
To: Andrew Bartley <abartley@evolvosystems.com>; +Cc: Justin Clift <justin@postgresql.org>; pgsql-general
On Wed, Nov 06, 2002 at 14:14:23 +1100,
Andrew Bartley <abartley@evolvosystems.com> wrote:
>
> I suppose the reason for the question is related to the limit on the number
> trans before there is a problem.
This is covered in the documentation. It is recommended that you vacuum
at least every billion (10^9) transactions. Problems occur after about
2 billion transactions. The documentation covers this in more detail.
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full
@ 2002-11-06 12:05 Andrew Sullivan <andrew@libertyrms.info>
parent: Justin Clift <justin@postgresql.org>
2 siblings, 0 replies; 21+ messages in thread
From: Andrew Sullivan @ 2002-11-06 12:05 UTC (permalink / raw)
To: pgsql-general
On Wed, Nov 06, 2002 at 01:50:00PM +1100, Justin Clift wrote:
> Andrew Bartley wrote:
>
> > I am also aware there is an upper limit on the number of transactions
> > postgres can do before the DB needs vacuuming. Somthing to do with tran ids
> > wrapping or something. Do you know anything about this?
>
> Not my area. One of the more-hard-core developers will be able to tell
> you about this though. From memory though it happens around the 2 or 4
> billionth transaction mark, and something may have been done about it
> for the upcoming 7.3 release (we're in beta testing of this at present).
There has alwaus been a problem with transaction id wrap-around.
There is a maximum number of transactions the system can perform
before the transaction identifiers (which are required for MVCC to
work) wrap (the ids are int4, so the number is strictly speaking 4
billion).
Prior to 7.2.x, the only way to solve the problem was a complete
initdb-and-restore.
As of 7.2, there is a better solution; but the price of the solution
is that _every table_ in the database must be vacuumed at least once
every billion transactions. See
<http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/routine-vacuuming.html#VACUUM-FOR-WRAPAR...;
(that's a long line. Sorry.)
VACUUM without FULL doesn't block, however. It will cost you almost
nothing to VACUUM nightly with cron. Think Martha Stewart: It's a
Good Thing.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full
@ 2002-11-06 12:07 Andrew Sullivan <andrew@libertyrms.info>
parent: Andrew Bartley <abartley@evolvosystems.com>
0 siblings, 0 replies; 21+ messages in thread
From: Andrew Sullivan @ 2002-11-06 12:07 UTC (permalink / raw)
To: pgsql-general
On Wed, Nov 06, 2002 at 02:52:11PM +1100, Andrew Bartley wrote:
> I had re-written the offending code, several weeks of regression testing had
> to be done. I will look at the link you sent me regarding the 7.2/3 news,
> to see if there are any bugs that could be a potential problem for us.
There are. In particular, there are issues with VACUUM that turn out
to be bad news if a non-superuser vacuums.
7.2.3 is a binary replacement for 7.2.1, so you should be able just
to stop the postmaster and re-start with 7.2.1.
A
--
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
^ permalink raw reply [nested|flat] 21+ messages in thread
* Vacuum full?
@ 2002-11-07 20:22 Dmitry Tkach <dmitry@openratings.com>
0 siblings, 1 reply; 21+ messages in thread
From: Dmitry Tkach @ 2002-11-07 20:22 UTC (permalink / raw)
To: pgsql-general
Hi, everybody!
I am having a weird problem with one of the tables in the database...
It seems to be working fine, whatever I do with it, EXCEPT, when I try
to to VACUUM FULL, it sits there for a while, and then fails with a message:
ERROR: No one parent tuple was found
Does anybody know what it means, and, more importantly, what could have caused it, and
how it can be fixed (dropping and recreating the table is not an option - it is fairly
large, and there is a whole bunch of other tables that are referencing this one)...
Any help would be greatly appreciated!
Thanks a lot!
Dima
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full?
@ 2002-11-07 20:54 Tom Lane <tgl@sss.pgh.pa.us>
parent: Dmitry Tkach <dmitry@openratings.com>
0 siblings, 2 replies; 21+ messages in thread
From: Tom Lane @ 2002-11-07 20:54 UTC (permalink / raw)
To: Dmitry Tkach <dmitry@openratings.com>; +Cc: pgsql-general
Dmitry Tkach <dmitry@openratings.com> writes:
> ERROR: No one parent tuple was found
Closing out other open transactions will probably make that go away.
You should also consider updating to 7.2.3, if you're not there already.
(IIRC, there is a partial fix in 7.2.3. 7.3 will fix all the causes we
know about.)
regards, tom lane
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full?
@ 2002-11-07 21:23 Tom Lane <tgl@sss.pgh.pa.us>
parent: Dmitry Tkach <dmitry@openratings.com>
0 siblings, 0 replies; 21+ messages in thread
From: Tom Lane @ 2002-11-07 21:23 UTC (permalink / raw)
To: Dmitry Tkach <dmitry@openratings.com>; +Cc: pgsql-general
Dmitry Tkach <dmitry@openratings.com> writes:
> By closing other transactions, did you mean ALL transactions open in
> that database, or just the ones, having anything to do with that table
> (reading/writing)?
I mean ALL.
You can start some new ones right away, but your current open
transactions are determining what VACUUM thinks might be a still-visible
tuple. You need to make the "oldest open transaction number" move
forward.
regards, tom lane
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full?
@ 2002-11-07 21:42 Dmitry Tkach <dmitry@openratings.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 21+ messages in thread
From: Dmitry Tkach @ 2002-11-07 21:42 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-general
Thanks, Tom!
By closing other transactions, did you mean ALL transactions open in
that database, or just the ones, having anything to do with that table
(reading/writing)?
Thanks again!
Dima
Tom Lane wrote:
>Dmitry Tkach <dmitry@openratings.com> writes:
>
>>ERROR: No one parent tuple was found
>>
>
>Closing out other open transactions will probably make that go away.
>You should also consider updating to 7.2.3, if you're not there already.
>(IIRC, there is a partial fix in 7.2.3. 7.3 will fix all the causes we
>know about.)
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full?
@ 2002-11-18 20:04 Vivek Khera <khera@kcilink.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 21+ messages in thread
From: Vivek Khera @ 2002-11-18 20:04 UTC (permalink / raw)
To: pgsql-general
>>>>> "TL" == Tom Lane <tgl@sss.pgh.pa.us> writes:
TL> Dmitry Tkach <dmitry@openratings.com> writes:
>> ERROR: No one parent tuple was found
TL> Closing out other open transactions will probably make that go away.
TL> You should also consider updating to 7.2.3, if you're not there already.
TL> (IIRC, there is a partial fix in 7.2.3. 7.3 will fix all the causes we
TL> know about.)
Funny, I was just about to ask this question... I took down my DB
system (made it inaccessible to all external apps by the access list)
then ran vacuum full verbose analyze. This is what I got:
NOTICE: --Relation user_list--
NOTICE: Pages 644320: Changed 1273, reaped 627556, Empty 0, New 0; Tup 9668482: Vac 290, Keep/VTL 0/0, UnUsed 26051805, MinLen 100, MaxLen 528; Re-using: Free/Avail. Space 3645214756/3644567436; EndEmpty/Avail. Pages 0/630623.
CPU 56.31s/1.01u sec elapsed 178.60 sec.
NOTICE: Index user_list_pkey: Pages 51806; Tuples 9668482: Deleted 290.
CPU 5.08s/14.16u sec elapsed 118.28 sec.
ERROR: No one parent tuple was found
It looks like it did reap a bunch of pages, which is good, but the
error gives me the willies.
Curiously, last time I did this (July 4), I got the same error, so I
really doubt it is an open transaction, unless such a thing survives
db shutdown and restart ;-)
When 7.3 comes out, I'll do a dump/reload so the problem *should* go
away then... right now I'm at 7.2.1.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera@kciLink.com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full?
@ 2002-11-18 20:34 Tom Lane <tgl@sss.pgh.pa.us>
parent: Vivek Khera <khera@kcilink.com>
0 siblings, 1 reply; 21+ messages in thread
From: Tom Lane @ 2002-11-18 20:34 UTC (permalink / raw)
To: Vivek Khera <khera@kcilink.com>; +Cc: pgsql-general
Vivek Khera <khera@kcilink.com> writes:
> Curiously, last time I did this (July 4), I got the same error, so I
> really doubt it is an open transaction, unless such a thing survives
> db shutdown and restart ;-)
Yes, there is one known variant that survives a shutdown. I am certain
that that form of the problem is patched in 7.2.3-RH (Red Hat's
release), but don't recall if it's in the community 7.2.3 release or
not. In any case the fix is in 7.3, along with fixes for other cases
that can produce the same error message.
regards, tom lane
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: Vacuum full?
@ 2002-11-18 21:14 Vivek Khera <khera@kcilink.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 21+ messages in thread
From: Vivek Khera @ 2002-11-18 21:14 UTC (permalink / raw)
To: pgsql-general
>>>>> "TL" == Tom Lane <tgl@sss.pgh.pa.us> writes:
TL> Vivek Khera <khera@kcilink.com> writes:
>> Curiously, last time I did this (July 4), I got the same error, so I
>> really doubt it is an open transaction, unless such a thing survives
>> db shutdown and restart ;-)
TL> Yes, there is one known variant that survives a shutdown. I am certain
TL> that that form of the problem is patched in 7.2.3-RH (Red Hat's
TL> release), but don't recall if it's in the community 7.2.3 release or
TL> not. In any case the fix is in 7.3, along with fixes for other cases
TL> that can produce the same error message.
Wow... even if I cleanly shut down all my applications, then shut down
the server I can run into this?
I guess 7.3 can't come soon enough! ;-)
I suppose it is high time to pull down the 7.3b5 and give it a whirl
on the development box.
Thanks.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D. Khera Communications, Inc.
Internet: khera@kciLink.com Rockville, MD +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera http://www.khera.org/~vivek/
^ permalink raw reply [nested|flat] 21+ messages in thread
* vacuum full
@ 2021-08-30 17:42 Vijaykumar Jain <vijaykumarjain.github@gmail.com>
0 siblings, 1 reply; 21+ messages in thread
From: Vijaykumar Jain @ 2021-08-30 17:42 UTC (permalink / raw)
To: pgsql-general <pgsql-general@lists.postgresql.org>
Just keeping it in a separate email, incase this is thrashed down.
vacuum full has a lot of problem stories, not just because the db gets
locked, but also because it is mostly (mis)used when there are space issues.
of course, there are strong warnings in docs and wiki about using a vacuum
full,
but i was just thinking
vacuumdb and vacuumlo can make use of options like --dry-run, like
pg_repack allows,
but also just abort incase there is no disk space available.
i mean, i have seen confident replies from earlier mailing threads, where
assume 2x disk required per object that is full vacuumed at least.
can this be converted into an estimate of sorts on objects that would be
vacuumed and free disk that would be required before any operation starts.
maybe this is wishful thinking, but just asking.
--
Thanks,
Vijay
Mumbai, India
^ permalink raw reply [nested|flat] 21+ messages in thread
* Re: vacuum full
@ 2021-08-30 18:05 Vijaykumar Jain <vijaykumarjain.github@gmail.com>
parent: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
0 siblings, 1 reply; 21+ messages in thread
From: Vijaykumar Jain @ 2021-08-30 18:05 UTC (permalink / raw)
To: pgsql-general <pgsql-general@lists.postgresql.org>
On Mon, 30 Aug 2021 at 23:12, Vijaykumar Jain <
vijaykumarjain.github@gmail.com> wrote:
> Just keeping it in a separate email, incase this is thrashed down.
> vacuum full has a lot of problem stories, not just because the db gets
> locked, but also because it is mostly (mis)used when there are space issues.
>
>
ok ignore.
I think querying the disk for available space may be shell access from the
client, a security issue.
Also, a 10GB table with all dead tuples is 100% bloat, and would not really
need additional space for table rebuilds.
I think we can just put out some queries like bloat estimation of
relations, to get an idea of wasted space and used space
and estimate based on that on how much would be taken up from the disk
before being cleaned up.
ref queries: PostgresQL Automating VACUUM FULL for bloated tables - Stack
Overflow
<https://stackoverflow.com/questions/13931989/postgresql-automating-vacuum-full-for-bloated-tables;
--
Thanks,
Vijay
Mumbai, India
^ permalink raw reply [nested|flat] 21+ messages in thread
* RE: vacuum full
@ 2021-09-06 06:05 Ian Dauncey <Ian.Dauncey@bankzero.co.za>
parent: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
0 siblings, 0 replies; 21+ messages in thread
From: Ian Dauncey @ 2021-09-06 06:05 UTC (permalink / raw)
To: Vijaykumar Jain <vijaykumarjain.github@gmail.com>; pgsql-general <pgsql-general@lists.postgresql.org>
Morning.
Thanks for all the replies.
What I did to remove these files was to backup of the DB, drop the DB and then I restored the DB.
Regards
Ian
From: Vijaykumar Jain <vijaykumarjain.github@gmail.com>
Sent: Monday, 30 August 2021 20:06
To: pgsql-general <pgsql-general@lists.postgresql.org>
Subject: Re: vacuum full
External email - treat with caution
On Mon, 30 Aug 2021 at 23:12, Vijaykumar Jain <vijaykumarjain.github@gmail.com<mailto:vijaykumarjain.github@gmail.com>> wrote:
Just keeping it in a separate email, incase this is thrashed down.
vacuum full has a lot of problem stories, not just because the db gets locked, but also because it is mostly (mis)used when there are space issues.
ok ignore.
I think querying the disk for available space may be shell access from the client, a security issue.
Also, a 10GB table with all dead tuples is 100% bloat, and would not really need additional space for table rebuilds.
I think we can just put out some queries like bloat estimation of relations, to get an idea of wasted space and used space
and estimate based on that on how much would be taken up from the disk before being cleaned up.
ref queries: PostgresQL Automating VACUUM FULL for bloated tables - Stack Overflow<https://stackoverflow.com/questions/13931989/postgresql-automating-vacuum-full-for-bloated-tables;
--
Thanks,
Vijay
Mumbai, India
Disclaimer
The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.
This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast, a leader in email security and cyber resilience. Mimecast integrates email defenses with brand protection, security awareness training, web security, compliance and other essential capabilities. Mimecast helps protect large and small organizations from malicious activity, human error and technology failure; and to lead the movement toward building a more resilient world. To find out more, visit our website.
^ permalink raw reply [nested|flat] 21+ messages in thread
end of thread, other threads:[~2021-09-06 06:05 UTC | newest]
Thread overview: 21+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-06 01:48 Vacuum full Andrew Bartley <abartley@evolvosystems.com>
2002-11-06 02:02 ` Justin Clift <justin@postgresql.org>
2002-11-06 02:33 ` Andrew Bartley <abartley@evolvosystems.com>
2002-11-06 02:50 ` Justin Clift <justin@postgresql.org>
2002-11-06 03:10 ` Medi Montaseri <medi.montaseri@intransa.com>
2002-11-06 03:14 ` Andrew Bartley <abartley@evolvosystems.com>
2002-11-06 03:36 ` Justin Clift <justin@postgresql.org>
2002-11-06 03:52 ` Andrew Bartley <abartley@evolvosystems.com>
2002-11-06 12:07 ` Andrew Sullivan <andrew@libertyrms.info>
2002-11-06 04:18 ` Bruno Wolff III <bruno@wolff.to>
2002-11-06 12:05 ` Andrew Sullivan <andrew@libertyrms.info>
2002-11-07 20:22 Vacuum full? Dmitry Tkach <dmitry@openratings.com>
2002-11-07 20:54 ` Re: Vacuum full? Tom Lane <tgl@sss.pgh.pa.us>
2002-11-07 21:42 ` Re: Vacuum full? Dmitry Tkach <dmitry@openratings.com>
2002-11-07 21:23 ` Re: Vacuum full? Tom Lane <tgl@sss.pgh.pa.us>
2002-11-18 20:04 ` Re: Vacuum full? Vivek Khera <khera@kcilink.com>
2002-11-18 20:34 ` Re: Vacuum full? Tom Lane <tgl@sss.pgh.pa.us>
2002-11-18 21:14 ` Re: Vacuum full? Vivek Khera <khera@kcilink.com>
2021-08-30 17:42 vacuum full Vijaykumar Jain <vijaykumarjain.github@gmail.com>
2021-08-30 18:05 ` Re: vacuum full Vijaykumar Jain <vijaykumarjain.github@gmail.com>
2021-09-06 06:05 ` RE: vacuum full Ian Dauncey <Ian.Dauncey@bankzero.co.za>
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