pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Fix replay of create database records on standby
10+ messages / 1 participants
[nested] [flat]
* pgsql: Fix replay of create database records on standby
@ 2022-03-25 12:17 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 10+ messages in thread
From: Alvaro Herrera @ 2022-03-25 12:17 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix replay of create database records on standby
Crash recovery on standby may encounter missing directories when
replaying create database WAL records. Prior to this patch, the standby
would fail to recover in such a case. However, the directories could be
legitimately missing. Consider a sequence of WAL records as follows:
CREATE DATABASE
DROP DATABASE
DROP TABLESPACE
If, after replaying the last WAL record and removing the tablespace
directory, the standby crashes and has to replay the create database
record again, the crash recovery must be able to move on.
This patch adds a mechanism similar to invalid-page tracking, to keep a
tally of missing directories during crash recovery. If all the missing
directory references are matched with corresponding drop records at the
end of crash recovery, the standby can safely continue following the
primary.
Backpatch to 13, at least for now. The bug is older, but fixing it in
older branches requires more careful study of the interactions with
commit e6d8069522c8, which appeared in 13.
A new TAP test file is added to verify the condition. However, because
it depends on commit d6d317dbf615, it can only be added to branch
master. I (Álvaro) manually verified that the code behaves as expected
in branch 14. It's a bit nervous-making to leave the code uncovered by
tests in older branches, but leaving the bug unfixed is even worse.
Also, the main reason this fix took so long is precisely that we
couldn't agree on a good strategy to approach testing for the bug, so
perhaps this is the best we can do.
Diagnosed-by: Paul Guo <paulguo@gmail.com>
Author: Paul Guo <paulguo@gmail.com>
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Author: Asim R Praveen <apraveen@pivotal.io>
Discussion: https://postgr.es/m/CAEET0ZGx9AvioViLf7nbR_8tH9-=27DN5xWJ2P9-ROH16e4JUA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/49d9cfc68bf4e0d32a948fe72d5a0ef7f464944e
Modified Files
--------------
src/backend/access/transam/xlogrecovery.c | 6 ++
src/backend/access/transam/xlogutils.c | 159 +++++++++++++++++++++++++++-
src/backend/commands/dbcommands.c | 57 ++++++++++
src/backend/commands/tablespace.c | 17 +++
src/include/access/xlogutils.h | 4 +
src/test/recovery/t/029_replay_tsp_drops.pl | 67 ++++++++++++
src/tools/pgindent/typedefs.list | 2 +
7 files changed, 311 insertions(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 10+ messages in thread
* pgsql: Fix replay of create database records on standby
@ 2022-03-25 12:17 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 10+ messages in thread
From: Alvaro Herrera @ 2022-03-25 12:17 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix replay of create database records on standby
Crash recovery on standby may encounter missing directories when
replaying create database WAL records. Prior to this patch, the standby
would fail to recover in such a case. However, the directories could be
legitimately missing. Consider a sequence of WAL records as follows:
CREATE DATABASE
DROP DATABASE
DROP TABLESPACE
If, after replaying the last WAL record and removing the tablespace
directory, the standby crashes and has to replay the create database
record again, the crash recovery must be able to move on.
This patch adds a mechanism similar to invalid-page tracking, to keep a
tally of missing directories during crash recovery. If all the missing
directory references are matched with corresponding drop records at the
end of crash recovery, the standby can safely continue following the
primary.
Backpatch to 13, at least for now. The bug is older, but fixing it in
older branches requires more careful study of the interactions with
commit e6d8069522c8, which appeared in 13.
A new TAP test file is added to verify the condition. However, because
it depends on commit d6d317dbf615, it can only be added to branch
master. I (Álvaro) manually verified that the code behaves as expected
in branch 14. It's a bit nervous-making to leave the code uncovered by
tests in older branches, but leaving the bug unfixed is even worse.
Also, the main reason this fix took so long is precisely that we
couldn't agree on a good strategy to approach testing for the bug, so
perhaps this is the best we can do.
Diagnosed-by: Paul Guo <paulguo@gmail.com>
Author: Paul Guo <paulguo@gmail.com>
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Author: Asim R Praveen <apraveen@pivotal.io>
Discussion: https://postgr.es/m/CAEET0ZGx9AvioViLf7nbR_8tH9-=27DN5xWJ2P9-ROH16e4JUA@mail.gmail.com
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/ffd28516e69983d44616451b808b1c9d4f3c2b60
Modified Files
--------------
src/backend/access/transam/xlog.c | 6 ++
src/backend/access/transam/xlogutils.c | 159 ++++++++++++++++++++++++++++++++-
src/backend/commands/dbcommands.c | 56 ++++++++++++
src/backend/commands/tablespace.c | 17 ++++
src/include/access/xlogutils.h | 4 +
src/tools/pgindent/typedefs.list | 2 +
6 files changed, 243 insertions(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 10+ messages in thread
* pgsql: Fix replay of create database records on standby
@ 2022-03-25 12:17 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 10+ messages in thread
From: Alvaro Herrera @ 2022-03-25 12:17 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix replay of create database records on standby
Crash recovery on standby may encounter missing directories when
replaying create database WAL records. Prior to this patch, the standby
would fail to recover in such a case. However, the directories could be
legitimately missing. Consider a sequence of WAL records as follows:
CREATE DATABASE
DROP DATABASE
DROP TABLESPACE
If, after replaying the last WAL record and removing the tablespace
directory, the standby crashes and has to replay the create database
record again, the crash recovery must be able to move on.
This patch adds a mechanism similar to invalid-page tracking, to keep a
tally of missing directories during crash recovery. If all the missing
directory references are matched with corresponding drop records at the
end of crash recovery, the standby can safely continue following the
primary.
Backpatch to 13, at least for now. The bug is older, but fixing it in
older branches requires more careful study of the interactions with
commit e6d8069522c8, which appeared in 13.
A new TAP test file is added to verify the condition. However, because
it depends on commit d6d317dbf615, it can only be added to branch
master. I (Álvaro) manually verified that the code behaves as expected
in branch 14. It's a bit nervous-making to leave the code uncovered by
tests in older branches, but leaving the bug unfixed is even worse.
Also, the main reason this fix took so long is precisely that we
couldn't agree on a good strategy to approach testing for the bug, so
perhaps this is the best we can do.
Diagnosed-by: Paul Guo <paulguo@gmail.com>
Author: Paul Guo <paulguo@gmail.com>
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Author: Asim R Praveen <apraveen@pivotal.io>
Discussion: https://postgr.es/m/CAEET0ZGx9AvioViLf7nbR_8tH9-=27DN5xWJ2P9-ROH16e4JUA@mail.gmail.com
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/50e3ed8e9172fe3cb9bc20899acaa4a8a0fd2388
Modified Files
--------------
src/backend/access/transam/xlog.c | 6 ++
src/backend/access/transam/xlogutils.c | 159 ++++++++++++++++++++++++++++++++-
src/backend/commands/dbcommands.c | 56 ++++++++++++
src/backend/commands/tablespace.c | 17 ++++
src/include/access/xlogutils.h | 4 +
src/tools/pgindent/typedefs.list | 2 +
6 files changed, 243 insertions(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 10+ messages in thread
* pgsql: Fix replay of create database records on standby
@ 2022-07-28 06:39 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 10+ messages in thread
From: Alvaro Herrera @ 2022-07-28 06:39 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix replay of create database records on standby
Crash recovery on standby may encounter missing directories
when replaying database-creation WAL records. Prior to this
patch, the standby would fail to recover in such a case;
however, the directories could be legitimately missing.
Consider the following sequence of commands:
CREATE DATABASE
DROP DATABASE
DROP TABLESPACE
If, after replaying the last WAL record and removing the
tablespace directory, the standby crashes and has to replay the
create database record again, crash recovery must be able to continue.
A fix for this problem was already attempted in 49d9cfc68bf4, but it
was reverted because of design issues. This new version is based
on Robert Haas' proposal: any missing tablespaces are created
during recovery before reaching consistency. Tablespaces
are created as real directories, and should be deleted
by later replay. CheckRecoveryConsistency ensures
they have disappeared.
The problems detected by this new code are reported as PANIC,
except when allow_in_place_tablespaces is set to ON, in which
case they are WARNING. Apart from making tests possible, this
gives users an escape hatch in case things don't go as planned.
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Author: Asim R Praveen <apraveen@pivotal.io>
Author: Paul Guo <paulguo@gmail.com>
Reviewed-by: Anastasia Lubennikova <lubennikovaav@gmail.com> (older versions)
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com> (older versions)
Reviewed-by: Michaël Paquier <michael@paquier.xyz>
Diagnosed-by: Paul Guo <paulguo@gmail.com>
Discussion: https://postgr.es/m/CAEET0ZGx9AvioViLf7nbR_8tH9-=27DN5xWJ2P9-ROH16e4JUA@mail.gmail.com
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/9a7e26b9c2ac7094f8a7d26cb32a8bc57d28d3f1
Modified Files
--------------
src/backend/access/transam/xlog.c | 61 +++++++++++
src/backend/commands/dbcommands.c | 69 ++++++++++++
src/backend/commands/tablespace.c | 40 ++-----
src/test/recovery/t/033_replay_tsp_drops.pl | 163 ++++++++++++++++++++++++++++
4 files changed, 302 insertions(+), 31 deletions(-)
^ permalink raw reply [nested|flat] 10+ messages in thread
* pgsql: Fix replay of create database records on standby
@ 2022-07-28 06:39 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 10+ messages in thread
From: Alvaro Herrera @ 2022-07-28 06:39 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix replay of create database records on standby
Crash recovery on standby may encounter missing directories
when replaying database-creation WAL records. Prior to this
patch, the standby would fail to recover in such a case;
however, the directories could be legitimately missing.
Consider the following sequence of commands:
CREATE DATABASE
DROP DATABASE
DROP TABLESPACE
If, after replaying the last WAL record and removing the
tablespace directory, the standby crashes and has to replay the
create database record again, crash recovery must be able to continue.
A fix for this problem was already attempted in 49d9cfc68bf4, but it
was reverted because of design issues. This new version is based
on Robert Haas' proposal: any missing tablespaces are created
during recovery before reaching consistency. Tablespaces
are created as real directories, and should be deleted
by later replay. CheckRecoveryConsistency ensures
they have disappeared.
The problems detected by this new code are reported as PANIC,
except when allow_in_place_tablespaces is set to ON, in which
case they are WARNING. Apart from making tests possible, this
gives users an escape hatch in case things don't go as planned.
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Author: Asim R Praveen <apraveen@pivotal.io>
Author: Paul Guo <paulguo@gmail.com>
Reviewed-by: Anastasia Lubennikova <lubennikovaav@gmail.com> (older versions)
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com> (older versions)
Reviewed-by: Michaël Paquier <michael@paquier.xyz>
Diagnosed-by: Paul Guo <paulguo@gmail.com>
Discussion: https://postgr.es/m/CAEET0ZGx9AvioViLf7nbR_8tH9-=27DN5xWJ2P9-ROH16e4JUA@mail.gmail.com
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/8348413dbded3c5880cf64e6a51d2a362c93ded4
Modified Files
--------------
src/backend/access/transam/xlogrecovery.c | 50 ++++++++
src/backend/commands/dbcommands.c | 77 +++++++++++++
src/backend/commands/tablespace.c | 40 ++-----
src/test/recovery/t/033_replay_tsp_drops.pl | 169 ++++++++++++++++++++++++++++
4 files changed, 305 insertions(+), 31 deletions(-)
^ permalink raw reply [nested|flat] 10+ messages in thread
* pgsql: Fix replay of create database records on standby
@ 2022-07-28 06:39 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 10+ messages in thread
From: Alvaro Herrera @ 2022-07-28 06:39 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix replay of create database records on standby
Crash recovery on standby may encounter missing directories
when replaying database-creation WAL records. Prior to this
patch, the standby would fail to recover in such a case;
however, the directories could be legitimately missing.
Consider the following sequence of commands:
CREATE DATABASE
DROP DATABASE
DROP TABLESPACE
If, after replaying the last WAL record and removing the
tablespace directory, the standby crashes and has to replay the
create database record again, crash recovery must be able to continue.
A fix for this problem was already attempted in 49d9cfc68bf4, but it
was reverted because of design issues. This new version is based
on Robert Haas' proposal: any missing tablespaces are created
during recovery before reaching consistency. Tablespaces
are created as real directories, and should be deleted
by later replay. CheckRecoveryConsistency ensures
they have disappeared.
The problems detected by this new code are reported as PANIC,
except when allow_in_place_tablespaces is set to ON, in which
case they are WARNING. Apart from making tests possible, this
gives users an escape hatch in case things don't go as planned.
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Author: Asim R Praveen <apraveen@pivotal.io>
Author: Paul Guo <paulguo@gmail.com>
Reviewed-by: Anastasia Lubennikova <lubennikovaav@gmail.com> (older versions)
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com> (older versions)
Reviewed-by: Michaël Paquier <michael@paquier.xyz>
Diagnosed-by: Paul Guo <paulguo@gmail.com>
Discussion: https://postgr.es/m/CAEET0ZGx9AvioViLf7nbR_8tH9-=27DN5xWJ2P9-ROH16e4JUA@mail.gmail.com
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/5a10c262fc6038be0b6d5c9bc1796094b0650bbe
Modified Files
--------------
src/backend/access/transam/xlog.c | 61 +++++++++++
src/backend/commands/dbcommands.c | 69 ++++++++++++
src/backend/commands/tablespace.c | 40 ++-----
src/test/recovery/t/033_replay_tsp_drops.pl | 163 ++++++++++++++++++++++++++++
4 files changed, 302 insertions(+), 31 deletions(-)
^ permalink raw reply [nested|flat] 10+ messages in thread
* pgsql: Fix replay of create database records on standby
@ 2022-07-28 06:39 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 10+ messages in thread
From: Alvaro Herrera @ 2022-07-28 06:39 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix replay of create database records on standby
Crash recovery on standby may encounter missing directories
when replaying database-creation WAL records. Prior to this
patch, the standby would fail to recover in such a case;
however, the directories could be legitimately missing.
Consider the following sequence of commands:
CREATE DATABASE
DROP DATABASE
DROP TABLESPACE
If, after replaying the last WAL record and removing the
tablespace directory, the standby crashes and has to replay the
create database record again, crash recovery must be able to continue.
A fix for this problem was already attempted in 49d9cfc68bf4, but it
was reverted because of design issues. This new version is based
on Robert Haas' proposal: any missing tablespaces are created
during recovery before reaching consistency. Tablespaces
are created as real directories, and should be deleted
by later replay. CheckRecoveryConsistency ensures
they have disappeared.
The problems detected by this new code are reported as PANIC,
except when allow_in_place_tablespaces is set to ON, in which
case they are WARNING. Apart from making tests possible, this
gives users an escape hatch in case things don't go as planned.
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Author: Asim R Praveen <apraveen@pivotal.io>
Author: Paul Guo <paulguo@gmail.com>
Reviewed-by: Anastasia Lubennikova <lubennikovaav@gmail.com> (older versions)
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com> (older versions)
Reviewed-by: Michaël Paquier <michael@paquier.xyz>
Diagnosed-by: Paul Guo <paulguo@gmail.com>
Discussion: https://postgr.es/m/CAEET0ZGx9AvioViLf7nbR_8tH9-=27DN5xWJ2P9-ROH16e4JUA@mail.gmail.com
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/a3aacb7cbfc74fc20e8681cba99e2db84c8dd980
Modified Files
--------------
src/backend/access/transam/xlog.c | 49 +++++++++
src/backend/commands/dbcommands.c | 69 ++++++++++++
src/backend/commands/tablespace.c | 40 ++-----
src/test/recovery/t/033_replay_tsp_drops.pl | 163 ++++++++++++++++++++++++++++
4 files changed, 290 insertions(+), 31 deletions(-)
^ permalink raw reply [nested|flat] 10+ messages in thread
* pgsql: Fix replay of create database records on standby
@ 2022-07-28 06:39 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 10+ messages in thread
From: Alvaro Herrera @ 2022-07-28 06:39 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix replay of create database records on standby
Crash recovery on standby may encounter missing directories
when replaying database-creation WAL records. Prior to this
patch, the standby would fail to recover in such a case;
however, the directories could be legitimately missing.
Consider the following sequence of commands:
CREATE DATABASE
DROP DATABASE
DROP TABLESPACE
If, after replaying the last WAL record and removing the
tablespace directory, the standby crashes and has to replay the
create database record again, crash recovery must be able to continue.
A fix for this problem was already attempted in 49d9cfc68bf4, but it
was reverted because of design issues. This new version is based
on Robert Haas' proposal: any missing tablespaces are created
during recovery before reaching consistency. Tablespaces
are created as real directories, and should be deleted
by later replay. CheckRecoveryConsistency ensures
they have disappeared.
The problems detected by this new code are reported as PANIC,
except when allow_in_place_tablespaces is set to ON, in which
case they are WARNING. Apart from making tests possible, this
gives users an escape hatch in case things don't go as planned.
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Author: Asim R Praveen <apraveen@pivotal.io>
Author: Paul Guo <paulguo@gmail.com>
Reviewed-by: Anastasia Lubennikova <lubennikovaav@gmail.com> (older versions)
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com> (older versions)
Reviewed-by: Michaël Paquier <michael@paquier.xyz>
Diagnosed-by: Paul Guo <paulguo@gmail.com>
Discussion: https://postgr.es/m/CAEET0ZGx9AvioViLf7nbR_8tH9-=27DN5xWJ2P9-ROH16e4JUA@mail.gmail.com
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/6d20f8c5a46a04767cd7bf10c6d7f3de423597a5
Modified Files
--------------
src/backend/access/transam/xlog.c | 61 +++++++++++
src/backend/commands/dbcommands.c | 69 ++++++++++++
src/backend/commands/tablespace.c | 40 ++-----
src/test/recovery/t/033_replay_tsp_drops.pl | 163 ++++++++++++++++++++++++++++
4 files changed, 302 insertions(+), 31 deletions(-)
^ permalink raw reply [nested|flat] 10+ messages in thread
* pgsql: Fix replay of create database records on standby
@ 2022-07-28 06:39 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 10+ messages in thread
From: Alvaro Herrera @ 2022-07-28 06:39 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix replay of create database records on standby
Crash recovery on standby may encounter missing directories
when replaying database-creation WAL records. Prior to this
patch, the standby would fail to recover in such a case;
however, the directories could be legitimately missing.
Consider the following sequence of commands:
CREATE DATABASE
DROP DATABASE
DROP TABLESPACE
If, after replaying the last WAL record and removing the
tablespace directory, the standby crashes and has to replay the
create database record again, crash recovery must be able to continue.
A fix for this problem was already attempted in 49d9cfc68bf4, but it
was reverted because of design issues. This new version is based
on Robert Haas' proposal: any missing tablespaces are created
during recovery before reaching consistency. Tablespaces
are created as real directories, and should be deleted
by later replay. CheckRecoveryConsistency ensures
they have disappeared.
The problems detected by this new code are reported as PANIC,
except when allow_in_place_tablespaces is set to ON, in which
case they are WARNING. Apart from making tests possible, this
gives users an escape hatch in case things don't go as planned.
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Author: Asim R Praveen <apraveen@pivotal.io>
Author: Paul Guo <paulguo@gmail.com>
Reviewed-by: Anastasia Lubennikova <lubennikovaav@gmail.com> (older versions)
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com> (older versions)
Reviewed-by: Michaël Paquier <michael@paquier.xyz>
Diagnosed-by: Paul Guo <paulguo@gmail.com>
Discussion: https://postgr.es/m/CAEET0ZGx9AvioViLf7nbR_8tH9-=27DN5xWJ2P9-ROH16e4JUA@mail.gmail.com
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/084318c33a1f8aeebe492812bd1b2ed0dbafe645
Modified Files
--------------
src/backend/access/transam/xlog.c | 61 +++++++++++
src/backend/commands/dbcommands.c | 68 ++++++++++++
src/backend/commands/tablespace.c | 40 ++-----
src/test/recovery/t/033_replay_tsp_drops.pl | 163 ++++++++++++++++++++++++++++
4 files changed, 301 insertions(+), 31 deletions(-)
^ permalink raw reply [nested|flat] 10+ messages in thread
* pgsql: Fix replay of create database records on standby
@ 2022-07-28 06:41 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 10+ messages in thread
From: Alvaro Herrera @ 2022-07-28 06:41 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Fix replay of create database records on standby
Crash recovery on standby may encounter missing directories
when replaying database-creation WAL records. Prior to this
patch, the standby would fail to recover in such a case;
however, the directories could be legitimately missing.
Consider the following sequence of commands:
CREATE DATABASE
DROP DATABASE
DROP TABLESPACE
If, after replaying the last WAL record and removing the
tablespace directory, the standby crashes and has to replay the
create database record again, crash recovery must be able to continue.
A fix for this problem was already attempted in 49d9cfc68bf4, but it
was reverted because of design issues. This new version is based
on Robert Haas' proposal: any missing tablespaces are created
during recovery before reaching consistency. Tablespaces
are created as real directories, and should be deleted
by later replay. CheckRecoveryConsistency ensures
they have disappeared.
The problems detected by this new code are reported as PANIC,
except when allow_in_place_tablespaces is set to ON, in which
case they are WARNING. Apart from making tests possible, this
gives users an escape hatch in case things don't go as planned.
Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Author: Asim R Praveen <apraveen@pivotal.io>
Author: Paul Guo <paulguo@gmail.com>
Reviewed-by: Anastasia Lubennikova <lubennikovaav@gmail.com> (older versions)
Reviewed-by: Fujii Masao <masao.fujii@oss.nttdata.com> (older versions)
Reviewed-by: Michaël Paquier <michael@paquier.xyz>
Diagnosed-by: Paul Guo <paulguo@gmail.com>
Discussion: https://postgr.es/m/CAEET0ZGx9AvioViLf7nbR_8tH9-=27DN5xWJ2P9-ROH16e4JUA@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9e4f914b5eba3f49ab99bdecdc4f96fac099571f
Modified Files
--------------
src/backend/access/transam/xlogrecovery.c | 50 ++++++++
src/backend/commands/dbcommands.c | 77 +++++++++++++
src/backend/commands/tablespace.c | 40 ++-----
src/test/recovery/t/033_replay_tsp_drops.pl | 169 ++++++++++++++++++++++++++++
4 files changed, 305 insertions(+), 31 deletions(-)
^ permalink raw reply [nested|flat] 10+ messages in thread
end of thread, other threads:[~2022-07-28 06:41 UTC | newest]
Thread overview: 10+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-03-25 12:17 pgsql: Fix replay of create database records on standby Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-03-25 12:17 pgsql: Fix replay of create database records on standby Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-03-25 12:17 pgsql: Fix replay of create database records on standby Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-07-28 06:39 pgsql: Fix replay of create database records on standby Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-07-28 06:39 pgsql: Fix replay of create database records on standby Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-07-28 06:39 pgsql: Fix replay of create database records on standby Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-07-28 06:39 pgsql: Fix replay of create database records on standby Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-07-28 06:39 pgsql: Fix replay of create database records on standby Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-07-28 06:39 pgsql: Fix replay of create database records on standby Alvaro Herrera <alvherre@alvh.no-ip.org>
2022-07-28 06:41 pgsql: Fix replay of create database records on standby Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox