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

From Sahil Harpal
Subject Re: Database setup for pgarchives
Date
Msg-id CAKi=nndtx9ysbT077XcyjPs0NqYvu3nD70w+o3Dpc0mdubcBBw@mail.gmail.com
Whole thread Raw
In response to Re: Database setup for pgarchives  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Database setup for pgarchives  (Sahil Harpal <sahilharpal1234@gmail.com>)
List pgsql-www
I tried things on WSL. In the wsl I am facing psql:schema.sql:94: ERROR:  text search parser "tsparser" does not exist error on executing schema.sql. What would be a solution for this?
Also I created a database in the WSL but I'm not getting how can I add the pgsql-hackers list in the database which is required to load the data using mbox. 
Could you please share the SQL query that I need to use for the list name and listgroup insertion?

On Thu, 21 Jul 2022 at 15:30, Magnus Hagander <magnus@hagander.net> wrote:
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 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/

pgsql-www by date:

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