pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15939: Postgres database size is growing due to oraphan objects
3+ messages / 3 participants
[nested] [flat]

* BUG #15939: Postgres database size is growing due to oraphan objects
@ 2019-08-05 08:15 PG Bug reporting form <noreply@postgresql.org>
  2019-08-06 20:29 ` Re: BUG #15939: Postgres database size is growing due to oraphan objects Heikki Linnakangas <hlinnaka@iki.fi>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2019-08-05 08:15 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: svnitsakaram94@gmail.com

The following bug has been logged on the website:

Bug reference:      15939
Logged by:          Saka Ram Dewasi
Email address:      svnitsakaram94@gmail.com
PostgreSQL version: Unsupported/Unknown
Operating system:   RHEL 7.4
Description:        

Hi All,

We have SSO based web login portal. Below is the our architecture details.

User---> Load balancer(vADC)---> Tomcat Server 7.0.19(Web Server) ---> Load
Balancer (vADC) --> 
Jboss EAP 6.2(Application Server) --> Postgres 9.3 (Database)

Here Postgres will receive user request from jboss server for login. We
found that each time when users logged out of system orphan objects are
generating which is causing database growth. We checked our database tables
which having column type is OID/bytea. We found that there are only two
tables which is having column type OID/bytea. Surprisingly , These tables
dont have any data(Only two rows in each tables). These tables are not
generating any orphan objects(LO objects). Orphan objects are stored in
pg_largeobjects table. Due to orphan objects, size of pg_largeobject is
growing hence db so. We want to implement trigger based deletion of orphan
objects ( LO objects) . But for that we have to know which application
tables are generating orphan objects. How to identify application tables
which are generating orphan objects. Kindly guide.

Thanks and Regards
Saka Dewasi



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #15939: Postgres database size is growing due to oraphan objects
  2019-08-05 08:15 BUG #15939: Postgres database size is growing due to oraphan objects PG Bug reporting form <noreply@postgresql.org>
@ 2019-08-06 20:29 ` Heikki Linnakangas <hlinnaka@iki.fi>
  2019-08-20 12:57   ` Re: BUG #15939: Postgres database size is growing due to oraphan objects Dave Cramer <davecramer@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Heikki Linnakangas @ 2019-08-06 20:29 UTC (permalink / raw)
  To: svnitsakaram94@gmail.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>

Hi!

On 05/08/2019 11:15, PG Bug reporting form wrote:
> We have SSO based web login portal. Below is the our architecture details.
> 
> User---> Load balancer(vADC)---> Tomcat Server 7.0.19(Web Server) ---> Load
> Balancer (vADC) -->
> Jboss EAP 6.2(Application Server) --> Postgres 9.3 (Database)

PostgreSQL 9.3 is very old, and is no longer supported. You should 
upgrade, although I doubt it would help with this particular problem.

> Here Postgres will receive user request from jboss server for login. We
> found that each time when users logged out of system orphan objects are
> generating which is causing database growth. We checked our database tables
> which having column type is OID/bytea. We found that there are only two
> tables which is having column type OID/bytea. Surprisingly , These tables
> dont have any data(Only two rows in each tables). These tables are not
> generating any orphan objects(LO objects). Orphan objects are stored in
> pg_largeobjects table. Due to orphan objects, size of pg_largeobject is
> growing hence db so. We want to implement trigger based deletion of orphan
> objects ( LO objects) . But for that we have to know which application
> tables are generating orphan objects. How to identify application tables
> which are generating orphan objects. Kindly guide.

I don't quite understand where those Large Objects are coming from, if 
you're not using them in your application. Perhaps the JDBC driver is 
creating them behind your back? Enabling statement logging might give a 
clue (log_statement=all).

There's a contrib module called 'vacuumlo' that might help you to clean 
them up, see https://www.postgresql.org/docs/current/vacuumlo.html.

- Heikki





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #15939: Postgres database size is growing due to oraphan objects
  2019-08-05 08:15 BUG #15939: Postgres database size is growing due to oraphan objects PG Bug reporting form <noreply@postgresql.org>
  2019-08-06 20:29 ` Re: BUG #15939: Postgres database size is growing due to oraphan objects Heikki Linnakangas <hlinnaka@iki.fi>
@ 2019-08-20 12:57   ` Dave Cramer <davecramer@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Dave Cramer @ 2019-08-20 12:57 UTC (permalink / raw)
  To: Heikki Linnakangas <hlinnaka@iki.fi>; +Cc: svnitsakaram94@gmail.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>

On Tue, 6 Aug 2019 at 16:29, Heikki Linnakangas <hlinnaka@iki.fi> wrote:

> Hi!
>
> On 05/08/2019 11:15, PG Bug reporting form wrote:
> > We have SSO based web login portal. Below is the our architecture
> details.
> >
> > User---> Load balancer(vADC)---> Tomcat Server 7.0.19(Web Server) --->
> Load
> > Balancer (vADC) -->
> > Jboss EAP 6.2(Application Server) --> Postgres 9.3 (Database)
>
> PostgreSQL 9.3 is very old, and is no longer supported. You should
> upgrade, although I doubt it would help with this particular problem.
>
> > Here Postgres will receive user request from jboss server for login. We
> > found that each time when users logged out of system orphan objects are
> > generating which is causing database growth. We checked our database
> tables
> > which having column type is OID/bytea. We found that there are only two
> > tables which is having column type OID/bytea. Surprisingly , These tables
> > dont have any data(Only two rows in each tables). These tables are not
> > generating any orphan objects(LO objects). Orphan objects are stored in
> > pg_largeobjects table. Due to orphan objects, size of pg_largeobject is
> > growing hence db so. We want to implement trigger based deletion of
> orphan
> > objects ( LO objects) . But for that we have to know which application
> > tables are generating orphan objects. How to identify application tables
> > which are generating orphan objects. Kindly guide.
>
> I don't quite understand where those Large Objects are coming from, if
> you're not using them in your application. Perhaps the JDBC driver is
> creating them behind your back? Enabling statement logging might give a
> clue (log_statement=all).
>
> No, we do some things for you but creating Large Objects is not one of them

Dave

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2019-08-20 12:57 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-08-05 08:15 BUG #15939: Postgres database size is growing due to oraphan objects PG Bug reporting form <noreply@postgresql.org>
2019-08-06 20:29 ` Heikki Linnakangas <hlinnaka@iki.fi>
2019-08-20 12:57   ` Dave Cramer <davecramer@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