Robert Mach wrote:

I see different ways of delivering this functionality to Postgresql. The best of course would be to become part of Postgresql release either as a PostgreSQL command (like UPDATE) or as an postgresql server application like vacuumdb. Other possibility is to create a freestanding program that would be called with location of datafiles as arguments. Last possibility is to create an administrative console access (single user mode) to the database in which this integrity check could be fired.

I discussed It with Niel and for logical test It should be PostgreSQL function. However, for physical layer test database cluster should be in inconsistent state and PostgreSQL startup process fails. It means that there are only limited possibilities.

1) standalone binary, which will be linked mostly from postgreSQL object files and replace main and add new testing functionality. This is recommended by Neil.

2) Add new postmaster context/mod - repair and recovery, when postgres is run as "postmaster --recovery".

3) My personal favorite is create management console - which allows to perform check without physically access to local machine. Management console should be use for another purpose - for example disable/enable databases from cluster, perform upgrade of datalayer to the new version, kill sessions, update postgresql.conf and so on...

However this solution has significant impact on current postgres behavior, but I think it should be big deal for postgres.


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to