pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Prioritize history files when archiving
5+ messages / 1 participants
[nested] [flat]

* pgsql: Prioritize history files when archiving
@ 2018-12-24 11:28  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 5+ messages in thread

From: Michael Paquier @ 2018-12-24 11:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prioritize history files when archiving

At the end of recovery for the post-promotion process, a new history
file is created followed by the last partial segment of the previous
timeline.  Based on the timing, the archiver would first try to archive
the last partial segment and then the history file.  This can delay the
detection of a new timeline taken, particularly depending on the time it
takes to transfer the last partial segment as it delays the moment the
history file of the new timeline gets archived.  This can cause promoted
standbys to use the same timeline as one already taken depending on the
circumstances if multiple instances look at archives at the same
location.

This commit changes the order of archiving so as history files are
archived in priority over other file types, which reduces the likelihood
of the same timeline being taken (still not reducing the window to
zero), and it makes the archiver behave more consistently with the
startup process doing its post-promotion business.

Author: David Steele
Reviewed-by: Michael Paquier, Kyotaro Horiguchi
Discussion: https://postgr.es/m/929068cf-69e1-bba2-9dc0-e05986aed471@pgmasters.net
Backpatch-through: 9.5

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a016f59d5901ce37f28e58b622169b579258c2e0

Modified Files
--------------
src/backend/postmaster/pgarch.c | 72 ++++++++++++++++++++++++++---------------
1 file changed, 46 insertions(+), 26 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Prioritize history files when archiving
@ 2018-12-24 11:28  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 5+ messages in thread

From: Michael Paquier @ 2018-12-24 11:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prioritize history files when archiving

At the end of recovery for the post-promotion process, a new history
file is created followed by the last partial segment of the previous
timeline.  Based on the timing, the archiver would first try to archive
the last partial segment and then the history file.  This can delay the
detection of a new timeline taken, particularly depending on the time it
takes to transfer the last partial segment as it delays the moment the
history file of the new timeline gets archived.  This can cause promoted
standbys to use the same timeline as one already taken depending on the
circumstances if multiple instances look at archives at the same
location.

This commit changes the order of archiving so as history files are
archived in priority over other file types, which reduces the likelihood
of the same timeline being taken (still not reducing the window to
zero), and it makes the archiver behave more consistently with the
startup process doing its post-promotion business.

Author: David Steele
Reviewed-by: Michael Paquier, Kyotaro Horiguchi
Discussion: https://postgr.es/m/929068cf-69e1-bba2-9dc0-e05986aed471@pgmasters.net
Backpatch-through: 9.5

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0857575774a25a9778abd1b6f500b61092766418

Modified Files
--------------
src/backend/postmaster/pgarch.c | 72 ++++++++++++++++++++++++++---------------
1 file changed, 46 insertions(+), 26 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Prioritize history files when archiving
@ 2018-12-24 11:28  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 5+ messages in thread

From: Michael Paquier @ 2018-12-24 11:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prioritize history files when archiving

At the end of recovery for the post-promotion process, a new history
file is created followed by the last partial segment of the previous
timeline.  Based on the timing, the archiver would first try to archive
the last partial segment and then the history file.  This can delay the
detection of a new timeline taken, particularly depending on the time it
takes to transfer the last partial segment as it delays the moment the
history file of the new timeline gets archived.  This can cause promoted
standbys to use the same timeline as one already taken depending on the
circumstances if multiple instances look at archives at the same
location.

This commit changes the order of archiving so as history files are
archived in priority over other file types, which reduces the likelihood
of the same timeline being taken (still not reducing the window to
zero), and it makes the archiver behave more consistently with the
startup process doing its post-promotion business.

Author: David Steele
Reviewed-by: Michael Paquier, Kyotaro Horiguchi
Discussion: https://postgr.es/m/929068cf-69e1-bba2-9dc0-e05986aed471@pgmasters.net
Backpatch-through: 9.5

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b981df4cc09aca978c5ce55e437a74913d09cccc

Modified Files
--------------
src/backend/postmaster/pgarch.c | 72 ++++++++++++++++++++++++++---------------
1 file changed, 46 insertions(+), 26 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Prioritize history files when archiving
@ 2018-12-24 11:28  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 5+ messages in thread

From: Michael Paquier @ 2018-12-24 11:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prioritize history files when archiving

At the end of recovery for the post-promotion process, a new history
file is created followed by the last partial segment of the previous
timeline.  Based on the timing, the archiver would first try to archive
the last partial segment and then the history file.  This can delay the
detection of a new timeline taken, particularly depending on the time it
takes to transfer the last partial segment as it delays the moment the
history file of the new timeline gets archived.  This can cause promoted
standbys to use the same timeline as one already taken depending on the
circumstances if multiple instances look at archives at the same
location.

This commit changes the order of archiving so as history files are
archived in priority over other file types, which reduces the likelihood
of the same timeline being taken (still not reducing the window to
zero), and it makes the archiver behave more consistently with the
startup process doing its post-promotion business.

Author: David Steele
Reviewed-by: Michael Paquier, Kyotaro Horiguchi
Discussion: https://postgr.es/m/929068cf-69e1-bba2-9dc0-e05986aed471@pgmasters.net
Backpatch-through: 9.5

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9378701243b5a9075a5c0e11909cb3eec7428801

Modified Files
--------------
src/backend/postmaster/pgarch.c | 72 ++++++++++++++++++++++++++---------------
1 file changed, 46 insertions(+), 26 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* pgsql: Prioritize history files when archiving
@ 2018-12-24 11:28  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 5+ messages in thread

From: Michael Paquier @ 2018-12-24 11:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prioritize history files when archiving

At the end of recovery for the post-promotion process, a new history
file is created followed by the last partial segment of the previous
timeline.  Based on the timing, the archiver would first try to archive
the last partial segment and then the history file.  This can delay the
detection of a new timeline taken, particularly depending on the time it
takes to transfer the last partial segment as it delays the moment the
history file of the new timeline gets archived.  This can cause promoted
standbys to use the same timeline as one already taken depending on the
circumstances if multiple instances look at archives at the same
location.

This commit changes the order of archiving so as history files are
archived in priority over other file types, which reduces the likelihood
of the same timeline being taken (still not reducing the window to
zero), and it makes the archiver behave more consistently with the
startup process doing its post-promotion business.

Author: David Steele
Reviewed-by: Michael Paquier, Kyotaro Horiguchi
Discussion: https://postgr.es/m/929068cf-69e1-bba2-9dc0-e05986aed471@pgmasters.net
Backpatch-through: 9.5

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/37126251ab7732a2b047a38571ef8dd9738a5fdf

Modified Files
--------------
src/backend/postmaster/pgarch.c | 72 ++++++++++++++++++++++++++---------------
1 file changed, 46 insertions(+), 26 deletions(-)



^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2018-12-24 11:28 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-12-24 11:28 pgsql: Prioritize history files when archiving Michael Paquier <michael@paquier.xyz>
2018-12-24 11:28 pgsql: Prioritize history files when archiving Michael Paquier <michael@paquier.xyz>
2018-12-24 11:28 pgsql: Prioritize history files when archiving Michael Paquier <michael@paquier.xyz>
2018-12-24 11:28 pgsql: Prioritize history files when archiving Michael Paquier <michael@paquier.xyz>
2018-12-24 11:28 pgsql: Prioritize history files when archiving Michael Paquier <michael@paquier.xyz>

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