Re: Error with index on unlogged table
| От | Andres Freund |
|---|---|
| Тема | Re: Error with index on unlogged table |
| Дата | |
| Msg-id | 20151203210943.GA28762@awork2.anarazel.de обсуждение исходный текст |
| Ответ на | Re: Error with index on unlogged table (Michael Paquier <michael.paquier@gmail.com>) |
| Ответы |
Re: Error with index on unlogged table
|
| Список | pgsql-hackers |
Hi,
On 2015-11-20 16:11:15 +0900, Michael Paquier wrote:
> diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
> index cc845d2..4883697 100644
> --- a/src/backend/access/transam/xlog.c
> +++ b/src/backend/access/transam/xlog.c
> @@ -9503,6 +9503,14 @@ xlog_redo(XLogRecPtr lsn, XLogRecord *record)
> data += sizeof(BkpBlock);
>
> RestoreBackupBlockContents(lsn, bkpb, data, false, false);
> +
> + if (bkpb.fork == INIT_FORKNUM)
> + {
> + SMgrRelation srel;
> + srel = smgropen(bkpb.node, InvalidBackendId);
> + smgrimmedsync(srel, INIT_FORKNUM);
> + smgrclose(srel);
> + }
> }
> else if (info == XLOG_BACKUP_END)
> {
A smgrwrite() instead of a smgrimmedsync() should be sufficient here.
- Andres
В списке pgsql-hackers по дате отправления: