initDB - storage manager issues

From: Tareq Aljabban <tareq(dot)aljabban(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: initDB - storage manager issues
Date: 2012-03-03 20:12:55
Message-ID: CAGOe0a+WqACpOGjGJNqpMUbODDuoeGKSAKVzUKKynLvT09OH3Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

I'm writing two alternative storage managers for PostgreSQL. The first
implementation worked well. I had a different way of splitting the data
over the files, than how the original PG implementation stored them. My
first implementation stored files locally in the same table space used by
the original implementation.

In the second storage manager implementation, I'm trying to store files on
a remote file system, instead of the local one. I'm following the exact
same logic followed in the first implementation. However, when running
initDB(), I'm getting the following exception:

WARNING: no roles are defined in this database system

HINT: You should immediately run CREATE USER "ticker23" SUPERUSER;.

FATAL: database "template1" does not exist

child process exited with exit code 1

This exception is thrown at the function: *setup_auth* in initdb.c when
trying to execute the command:

REVOKE ALL on pg_authid FROM public

I don't know what's happening exactly in this command, but apparently the
needed data cannot be accessed for some reasons.

Two important notes:

1.

I debugged the application and found that the storage manager is not
even involved when executing this 'revoke all' command.
2.

Some module other than the storage manager is accessing the file system.
For example the storage manager creates only the folder base/1 (under
base), but when the execution finishes I find two other folders: base/11818
and base/11826. The code that does this copying clearly doesn't do any data
processing as it happened also for my local implementation where files had
totally different formatting from the one of the original storage managers.

Where are the local files accessed other than the storage manager?

Any ideas on what is going wrong, and how I can fix it is appreciated.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Anatole Laffreux 2012-03-04 09:53:39 Paging results from a query
Previous Message Daniel Staal 2012-03-03 01:04:40 Re: Restoring selected records from backup file