Re: Database setup for pgarchives

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Sahil Harpal <sahilharpal1234(at)gmail(dot)com>
Cc: PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>
Subject: Re: Database setup for pgarchives
Date: 2022-07-21 09:59:45
Message-ID: CABUevEw4unAdYCxTXBOS8+F7hKnzbZgBCAzksbA-YxnQK94HGg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Wed, Jul 20, 2022 at 11:13 PM Sahil Harpal <sahilharpal1234(at)gmail(dot)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 required tables and fills it with sample data? Because what I observed the simple migration is not actually creating all the tables. 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 data but may be due to some internal constraints/dependency with other tables/info it is not working properly and giving error on 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 sample real 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/

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Bill Rosmus 2022-07-21 18:31:15 Wiki editor request
Previous Message Sahil Harpal 2022-07-21 09:19:23 Re: Database setup for pgarchives