Re: [HACKERS] pg_upgrade may be mortally wounded - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] pg_upgrade may be mortally wounded
Date
Msg-id 15542.933698897@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] pg_upgrade may be mortally wounded  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [HACKERS] pg_upgrade may be mortally wounded
List pgsql-hackers
Bruce Momjian <maillist@candle.pha.pa.us> writes:
>> ... So there seems
>> to be a real risk of having a cached copy of one of the pages of a user
>> index while pg_upgrade is overwriting the index file with new data...

> Oh, I see.  That would be a problem.

OK, then what do you think of the idea of changing pg_upgrade to use
a standalone backend, so that no postmaster is running while it runs?
That'd eliminate the shared-memory-cache issue and also prevent
accidental interference from other clients.

There's an awk script in there already that processes the pg_dump
script, so maybe we could change it to look for \connect commands
and replace them by re-executions of the backend.

BTW, do you think it's really necessary for the awk script to remove
COPY commands?  There shouldn't be any unwanted copies in there in
the first place, if the user made the dump with -s per instructions...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: RE: [HACKERS] Threads
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Threads