Re: Database setup for pgarchives - Mailing list pgsql-www

From Magnus Hagander
Subject Re: Database setup for pgarchives
Date
Msg-id CABUevEw4unAdYCxTXBOS8+F7hKnzbZgBCAzksbA-YxnQK94HGg@mail.gmail.com
Whole thread Raw
In response to Database setup for pgarchives  (Sahil Harpal <sahilharpal1234@gmail.com>)
Responses Re: Database setup for pgarchives  (Sahil Harpal <sahilharpal1234@gmail.com>)
List pgsql-www
On Wed, Jul 20, 2022 at 11:13 PM Sahil Harpal <sahilharpal1234@gmail.com> wrote:
>
> Hello everyone,
> I am working on the improvement of pgarchives project as a part of GSoC.
> I need help in database initialization. Do anyone have a database initialization script which will create all the
requiredtables and fills it with sample data? Because what I observed the simple migration is not actually creating all
thetables. Like table list_months is not getting created during migration process. 

There is very much a backlog on fixing this. This:
https://www.postgresql.org/message-id/12eb75f0-3fc2-14f3-0931-4f29e145f182%40cmatte.me
may be a good starting point. It's been on my list for far too long to
review that submission and I haven't gotten around to it, but it can
hopefully help set you on the right track.

The core problem being that some items are created manually using the
scripts in loader/sql and some are in the django models, which is...
Not very good.


> Also can I get some sample real word data that can be dump from the current database? I tried inserting some sample
databut may be due to some internal constraints/dependency with other tables/info it is not working properly and giving
erroron accessing mail threads. 

Download a mbox file for one month of say pgsql-hackers from the
website, and load that using loader/load_message.py. That's what I
usually do to inject test data. The only thing needed before that is
to create the list pgsql-hackers (well, you can call the list whatever
you want, but it has to be *a* list that you specify with -l to the
loader script). If you get a whole months worth of it it pretty much
always contains a big enough mix of threads to make it useful for
testing.

> It would be really helpful if I get a database initialization script which will create all required tables and some
samplereal world data that I can use for testing. 

Yeah, just getting a single-step setup of an initial, if empty,
database would be good.

--
 Magnus Hagander
 Me: https://www.hagander.net/
 Work: https://www.redpill-linpro.com/



pgsql-www by date:

Previous
From: Sahil Harpal
Date:
Subject: Re: Database setup for pgarchives
Next
From: Bill Rosmus
Date:
Subject: Wiki editor request