[PATCH] Rename pg_switch_xlog to pg_switch_wal
Based on discussion in
/messages/by-id/CAE1wr-w=LE1cK5uG_rmAh-VBxc4_Bnw-gAE3qSqL-=tWwvLvjQ@mail.gmail.com
.
Tested via regression tests.
To be applied in master only and to be included in 10.0.
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
0001-Rename-pg_switch_xlog-to-pg_switch_wal.patchtext/x-patch; charset=US-ASCII; name=0001-Rename-pg_switch_xlog-to-pg_switch_wal.patchDownload
From 2502b9f36f08965a66f4125952f23e1f6ede4d83 Mon Sep 17 00:00:00 2001
From: Vladimir Rusinov <vrusinov@google.com>
Date: Mon, 12 Dec 2016 13:23:32 +0000
Subject: [PATCH 1/1] Rename pg_switch_xlog to pg_switch_wal.
Based on discussion in https://www.postgresql.org/message-id/CAE1wr-w%3DLE1cK5uG_rmAh-VBxc4_Bnw-gAE3qSqL-%3DtWwvLvjQ%40mail.gmail.com.
Tested via regression tests.
To be applied in master only and to be included in 10.0.
Signed-off-by: Vladimir Rusinov <vrusinov@google.com>
---
doc/src/sgml/backup.sgml | 2 +-
doc/src/sgml/func.sgml | 8 ++++----
doc/src/sgml/high-availability.sgml | 2 +-
src/backend/access/transam/xlogfuncs.c | 6 ++++--
src/backend/catalog/system_views.sql | 2 +-
src/include/access/xlog_fn.h | 2 +-
src/include/catalog/pg_proc.h | 2 +-
src/test/recovery/t/002_archiving.pl | 2 +-
src/test/recovery/t/003_recovery_targets.pl | 2 +-
src/test/regress/expected/hs_standby_functions.out | 2 +-
src/test/regress/sql/hs_primary_extremes.sql | 2 +-
src/test/regress/sql/hs_primary_setup.sql | 2 +-
src/test/regress/sql/hs_standby_functions.sql | 2 +-
13 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 6eaed1e..dc00a00 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -726,7 +726,7 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0
<para>
Also, you can force a segment switch manually with
- <function>pg_switch_xlog</> if you want to ensure that a
+ <function>pg_switch_wal</> if you want to ensure that a
just-finished transaction is archived as soon as possible. Other utility
functions related to WAL management are listed in <xref
linkend="functions-admin-backup-table">.
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index eca98df..e11aec9 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -17949,7 +17949,7 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_backup_start_time</primary>
</indexterm>
<indexterm>
- <primary>pg_switch_xlog</primary>
+ <primary>pg_switch_wal</primary>
</indexterm>
<indexterm>
<primary>pg_xlogfile_name</primary>
@@ -18043,7 +18043,7 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_switch_xlog()</function></literal>
+ <literal><function>pg_switch_wal()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Force switch to a new transaction log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry>
@@ -18122,11 +18122,11 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_switch_xlog</> moves to the next transaction log file, allowing the
+ <function>pg_switch_wal</> moves to the next transaction log file, allowing the
current file to be archived (assuming you are using continuous archiving).
The return value is the ending transaction log location + 1 within the just-completed transaction log file.
If there has been no transaction log activity since the last transaction log switch,
- <function>pg_switch_xlog</> does nothing and returns the start location
+ <function>pg_switch_wal</> does nothing and returns the start location
of the transaction log file currently in use.
</para>
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index 6b89507..a1dd93b 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -2201,7 +2201,7 @@ LOG: database system is ready to accept read only connections
<para>
WAL file control commands will not work during recovery,
- e.g. <function>pg_start_backup</>, <function>pg_switch_xlog</> etc.
+ e.g. <function>pg_start_backup</>, <function>pg_switch_wal</> etc.
</para>
<para>
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index 01cbd90..6547b8f 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -277,13 +277,15 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS)
}
/*
- * pg_switch_xlog: switch to next xlog file
+ * pg_switch_wal: switch to next wal (aka xlog) file
+ *
+ * Renamed from pg_switch_xlog in 10.0
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_switch_xlog(PG_FUNCTION_ARGS)
+pg_switch_wal(PG_FUNCTION_ARGS)
{
XLogRecPtr switchpoint;
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index df59d18..ffd1fad 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -1039,7 +1039,7 @@ REVOKE EXECUTE ON FUNCTION pg_start_backup(text, boolean, boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup() FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup(boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_create_restore_point(text) FROM public;
-REVOKE EXECUTE ON FUNCTION pg_switch_xlog() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_switch_wal() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_pause() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_rotate_logfile() FROM public;
diff --git a/src/include/access/xlog_fn.h b/src/include/access/xlog_fn.h
index 576a4dc..7aa4e95 100644
--- a/src/include/access/xlog_fn.h
+++ b/src/include/access/xlog_fn.h
@@ -16,7 +16,7 @@
extern Datum pg_start_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup_v2(PG_FUNCTION_ARGS);
-extern Datum pg_switch_xlog(PG_FUNCTION_ARGS);
+extern Datum pg_switch_wal(PG_FUNCTION_ARGS);
extern Datum pg_create_restore_point(PG_FUNCTION_ARGS);
extern Datum pg_current_xlog_location(PG_FUNCTION_ARGS);
extern Datum pg_current_xlog_insert_location(PG_FUNCTION_ARGS);
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 96e77ec..c600c1b 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -3141,7 +3141,7 @@ DATA(insert OID = 3813 ( pg_is_in_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s
DESCR("true if server is in online backup");
DATA(insert OID = 3814 ( pg_backup_start_time PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_backup_start_time _null_ _null_ _null_ ));
DESCR("start time of an online backup");
-DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_xlog _null_ _null_ _null_ ));
+DATA(insert OID = 2848 ( pg_switch_wal PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
DESCR("switch to new xlog file");
DATA(insert OID = 3098 ( pg_create_restore_point PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 3220 "25" _null_ _null_ _null_ _null_ _null_ pg_create_restore_point _null_ _null_ _null_ ));
DESCR("create a named restore point");
diff --git a/src/test/recovery/t/002_archiving.pl b/src/test/recovery/t/002_archiving.pl
index fc2bf7e..c34c6ae 100644
--- a/src/test/recovery/t/002_archiving.pl
+++ b/src/test/recovery/t/002_archiving.pl
@@ -36,7 +36,7 @@ my $current_lsn =
$node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
# Force archiving of WAL file to make it present on master
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Add some more content, it should not be present on standby
$node_master->safe_psql('postgres',
diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl
index a82545b..6f78e2a 100644
--- a/src/test/recovery/t/003_recovery_targets.pl
+++ b/src/test/recovery/t/003_recovery_targets.pl
@@ -97,7 +97,7 @@ $node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(5001,6000))");
# Force archiving of WAL file
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Test recovery targets
my @recovery_params = ("recovery_target = 'immediate'");
diff --git a/src/test/regress/expected/hs_standby_functions.out b/src/test/regress/expected/hs_standby_functions.out
index 16d50a8..e0af677 100644
--- a/src/test/regress/expected/hs_standby_functions.out
+++ b/src/test/regress/expected/hs_standby_functions.out
@@ -15,7 +15,7 @@ select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
-select pg_switch_xlog();
+select pg_switch_wal();
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
select pg_stop_backup();
diff --git a/src/test/regress/sql/hs_primary_extremes.sql b/src/test/regress/sql/hs_primary_extremes.sql
index 629efb4..2051e2e 100644
--- a/src/test/regress/sql/hs_primary_extremes.sql
+++ b/src/test/regress/sql/hs_primary_extremes.sql
@@ -70,4 +70,4 @@ SELECT count(*) > 257 FROM pg_locks;
COMMIT;
SELECT hs_locks_drop(257);
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_primary_setup.sql b/src/test/regress/sql/hs_primary_setup.sql
index a00b367..eeb4421 100644
--- a/src/test/regress/sql/hs_primary_setup.sql
+++ b/src/test/regress/sql/hs_primary_setup.sql
@@ -22,4 +22,4 @@ insert into hs3 values (115);
DROP sequence if exists hsseq;
create sequence hsseq;
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_standby_functions.sql b/src/test/regress/sql/hs_standby_functions.sql
index 7577045..251bac0 100644
--- a/src/test/regress/sql/hs_standby_functions.sql
+++ b/src/test/regress/sql/hs_standby_functions.sql
@@ -10,7 +10,7 @@ select txid_current();
select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
-select pg_switch_xlog();
+select pg_switch_wal();
select pg_stop_backup();
-- should return no rows
--
2.8.0.rc3.226.g39d4020
On 12/13/16 12:47 PM, Vladimir Rusinov wrote:
Based on discussion in
/messages/by-id/CAE1wr-w=LE1cK5uG_rmAh-VBxc4_Bnw-gAE3qSqL-=tWwvLvjQ@mail.gmail.com.Tested via regression tests.
To be applied in master only and to be included in 10.0.
I don't think the idea was to rename just one "xlog" function to "wal".
Personally, I think this is not important, but if you want to do it, I'd
follow the suggestion in the thread to rename all functions and leave
the old names as aliases or wrappers of some kind.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Wed, Dec 14, 2016 at 4:07 PM, Peter Eisentraut <
peter.eisentraut@2ndquadrant.com> wrote:
On 12/13/16 12:47 PM, Vladimir Rusinov wrote:
Based on discussion in
/messages/by-id/CAE1wr-w%253DLE1cK5uG_rmAh-VBxc4_Bnw-gAE3qSqL-%3DtWwvLvjQ%40mail.gmail.com.
Tested via regression tests.
To be applied in master only and to be included in 10.0.I don't think the idea was to rename just one "xlog" function to "wal".
Others will follow later in separate patches. Or is it preferred to have
one huge patch submitted?
Personally, I think this is not important, but if you want to do it, I'd
follow the suggestion in the thread to rename all functions and leave
the old names as aliases or wrappers of some kind.
I think I agree with Michael Paquier: "Better to do breakages in a single
release rather than spreading them across releases.".
There's going to be a lot of broken scripts following pg_xlog rename, so I
think it makes sense to just drop functions as well. We don't maintain
pg_xlog -> pg_wal symlink, do we?
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
On Thu, Dec 15, 2016 at 1:20 AM, Vladimir Rusinov <vrusinov@google.com> wrote:
On Wed, Dec 14, 2016 at 4:07 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
Others will follow later in separate patches. Or is it preferred to have one
huge patch submitted?
Please yes. One change makes little sense.
Personally, I think this is not important, but if you want to do it, I'd
follow the suggestion in the thread to rename all functions and leave
the old names as aliases or wrappers of some kind.I think I agree with Michael Paquier: "Better to do breakages in a single
release rather than spreading them across releases.".
There's going to be a lot of broken scripts following pg_xlog rename, so I
think it makes sense to just drop functions as well.
For consistency that makes sense in my view. But I won't be too noisy
as well if people think that we should keep aliases for compatibility.
We don't maintain pg_xlog -> pg_wal symlink, do we?
This part would be a mess for base backups, that's why we didn't do
it. Symlinks are equivalent to empty directories in the pg_basebackup
world. So by having one you would very likely break your backup *and*
restore tools silently.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Wed, Dec 14, 2016 at 11:51 PM, Michael Paquier <michael.paquier@gmail.com
wrote:
On Wed, Dec 14, 2016 at 4:07 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
Others will follow later in separate patches. Or is it preferred to haveone
huge patch submitted?
Please yes. One change makes little sense.
Ack. I was not sure what patch size is preferred here. Will continue with a
patch in original thread later.
Thanks for feedback!
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
On Thu, Dec 15, 2016 at 8:51 AM, Michael Paquier
<michael.paquier@gmail.com> wrote:
On Thu, Dec 15, 2016 at 1:20 AM, Vladimir Rusinov <vrusinov@google.com> wrote:
Personally, I think this is not important, but if you want to do it, I'd
follow the suggestion in the thread to rename all functions and leave
the old names as aliases or wrappers of some kind.I think I agree with Michael Paquier: "Better to do breakages in a single
release rather than spreading them across releases.".
There's going to be a lot of broken scripts following pg_xlog rename, so I
think it makes sense to just drop functions as well.For consistency that makes sense in my view. But I won't be too noisy
as well if people think that we should keep aliases for compatibility.
Actually, I am changing my mind on this bit, following Peter's
opinion. Maintaining aliases of the past functions is a no-brainer,
and it has no cost in terms of maintenance. That will save much pain
to many monitoring scripts as well.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
1) I agree with Michael that we should make this change backward compatible. It would help PostgreSQL image if we did not break everyone's code. It costs businesses money to rewrite code (e.g. middle tier software, backup tools, etc), test and redeploy to their customers.
2) We decided to rename the pg_xlog directory because people were deleting it when disks were getting full thinking it was just unimportant logging data; I get that. I'm a little unclear why we need to change the functions - it would be less painful to our users and less risky if we just left them as is. Could someone please elaborate why this change is necessary? I'm just trying to understand that.
Thanks,
-Cynthia
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Cynthia,
* Cynthia Shang (cynthia.shang@crunchydata.com) wrote:
1) I agree with Michael that we should make this change backward compatible. It would help PostgreSQL image if we did not break everyone's code. It costs businesses money to rewrite code (e.g. middle tier software, backup tools, etc), test and redeploy to their customers.
While I agree that we don't want to break client code or to make
backwards incompatible changes without good cause, in this case, it's
definitely a good cause and it makes sense to have things be consistent
and that includes changing these functions.
We make backwards-incompatible changes with each major release, which is
part of why we support older versions of PG for as long as we do- to
give PG users time to make any necessary changes for the new version of
PG. One could argue that we shouldn't ever make a backwards
incompatible change because it will break an existing user's code and
cost users time and effort to rewrite that code, but the flip side of
that is that the extra code and complexity results in its own
maintenance burdens for the code and the project moving forward.
Generally speaking, we've also found that backwards compatibility
'features' end up having a much longer life than they should.
Ultimately, the best way forward tends to be either make the backwards
incompatible change or don't make the change at all. We've already
agreed on this particular change, and with good reason, so the way
forward is to make the rest of the changes, not to go half-way or to try
and provide some backwards compatibility complexity.
2) We decided to rename the pg_xlog directory because people were deleting it when disks were getting full thinking it was just unimportant logging data; I get that. I'm a little unclear why we need to change the functions - it would be less painful to our users and less risky if we just left them as is. Could someone please elaborate why this change is necessary? I'm just trying to understand that.
It would be inconsistent to change the directory name without also
changing the documentation, functions, and other user-facing pieces.
Thanks!
Stephen
I have never heard of coding standards where naming conventions required a function/variable name match a directory or file name. It seems that would be restrictive.
I'm not trying to pick a fight, I just think the pros should outweigh the cons when choosing a path forward. In this case I see lots of cons and one partial pro; partial because renaming only user facing functions and documentation will create inconsistency within the Postgres code for all of the following. It sounds as if your minds are already made up, which saddens me but I will say nothing further on the matter.
xlog <https://doxygen.postgresql.org/structlogstreamer__param.html#aa537f3fc7164183c962c58ded88e89f0> - logstreamer_param
xlog.c <https://doxygen.postgresql.org/xlog_8c.html>
xlog.h <https://doxygen.postgresql.org/xlog_8h.html>
XLOG_BACKUP_END <https://doxygen.postgresql.org/pg__control_8h.html#ad9d92339bbf37810f7dfae4b3dbdf2c3> - pg_control.h
XLOG_BACKUP_LABEL <https://doxygen.postgresql.org/pg__standby_8c.html#a9e28a4fd60add05fb281b523dde816d9> - pg_standby.c
xlog_blcksz <https://doxygen.postgresql.org/structControlFileData.html#ae41f5131a8b8add3a9a8896027dcd7eb> - ControlFileData
XLOG_BLCKSZ_K <https://doxygen.postgresql.org/pg__test__fsync_8c.html#afc05fa8d4ff04e3820d70e13e7a8c9f3> - pg_test_fsync.c
XLOG_BRIN_CREATE_INDEX <https://doxygen.postgresql.org/brin__xlog_8h.html#ab56748e29ec0e518dbe6aec2ad9174d2> - brin_xlog.h
XLOG_BRIN_INIT_PAGE <https://doxygen.postgresql.org/brin__xlog_8h.html#ad4da725dab7941c79b95f306f93f0733> - brin_xlog.h
XLOG_BRIN_INSERT <https://doxygen.postgresql.org/brin__xlog_8h.html#af325e689ce6b134004d634e5f4f5fc22> - brin_xlog.h
XLOG_BRIN_OPMASK <https://doxygen.postgresql.org/brin__xlog_8h.html#abda79bb9dc455d307cbe04550b4a75a0> - brin_xlog.h
XLOG_BRIN_REVMAP_EXTEND <https://doxygen.postgresql.org/brin__xlog_8h.html#a3ee32c12f868b6645d522a3cd8697a29> - brin_xlog.h
XLOG_BRIN_REVMAP_VACUUM <https://doxygen.postgresql.org/brin__xlog_8h.html#aebb67fc99f73c1fd6a3408683cd4165a> - brin_xlog.h
XLOG_BRIN_SAMEPAGE_UPDATE <https://doxygen.postgresql.org/brin__xlog_8h.html#a6e8d0c699dbecfa2d1be99b9c68ed529> - brin_xlog.h
XLOG_BRIN_UPDATE <https://doxygen.postgresql.org/brin__xlog_8h.html#adacb7563b0c0d602cdcb22a853834009> - brin_xlog.h
XLOG_BTREE_DELETE <https://doxygen.postgresql.org/nbtree_8h.html#af36ce520ea71dc51d72ee11c637bad71> - nbtree.h
XLOG_BTREE_INSERT_LEAF <https://doxygen.postgresql.org/nbtree_8h.html#a855451db931e66a5536c04967332c353> - nbtree.h
XLOG_BTREE_INSERT_META <https://doxygen.postgresql.org/nbtree_8h.html#ac7c6b3a582fd3d4cd57744f70829d017> - nbtree.h
XLOG_BTREE_INSERT_UPPER <https://doxygen.postgresql.org/nbtree_8h.html#a902a50eeae554560fdfc83947ede0798> - nbtree.h
XLOG_BTREE_MARK_PAGE_HALFDEAD <https://doxygen.postgresql.org/nbtree_8h.html#acb2d5fad8d393b45d5baed66eb963cac> - nbtree.h
XLOG_BTREE_NEWROOT <https://doxygen.postgresql.org/nbtree_8h.html#aeb46a6c11b567f31166bc637871b8940> - nbtree.h
XLOG_BTREE_REUSE_PAGE <https://doxygen.postgresql.org/nbtree_8h.html#adb8efa2ad4e95da9e9a30fa3ba86d66a> - nbtree.h
XLOG_BTREE_SPLIT_L <https://doxygen.postgresql.org/nbtree_8h.html#ae01749da77b228c8bd873557877dbdbb> - nbtree.h
XLOG_BTREE_SPLIT_L_ROOT <https://doxygen.postgresql.org/nbtree_8h.html#a3fc243b315c69170c44d58cfbf9cf1a9> - nbtree.h
XLOG_BTREE_SPLIT_R <https://doxygen.postgresql.org/nbtree_8h.html#a619f011a3d4e02994f10a5c5eca1bbce> - nbtree.h
XLOG_BTREE_SPLIT_R_ROOT <https://doxygen.postgresql.org/nbtree_8h.html#a509d120723af55b9004d2154a9788776> - nbtree.h
XLOG_BTREE_UNLINK_PAGE <https://doxygen.postgresql.org/nbtree_8h.html#aa0f8ea18c61c3c2d1f492e700f63d128> - nbtree.h
XLOG_BTREE_UNLINK_PAGE_META <https://doxygen.postgresql.org/nbtree_8h.html#aa1e90ef7a8ae497f6ba95d9b6544dfaa> - nbtree.h
XLOG_BTREE_VACUUM <https://doxygen.postgresql.org/nbtree_8h.html#a470f820d137d81d227e7d6d9d53835a3> - nbtree.h
XLOG_CHECKPOINT_ONLINE <https://doxygen.postgresql.org/pg__control_8h.html#afc093bf9e7639cfeda0a45ef48c9c77e> - pg_control.h
XLOG_CHECKPOINT_SHUTDOWN <https://doxygen.postgresql.org/pg__control_8h.html#ab5870b9e3586602b5c0cfaad533c9c3c> - pg_control.h
XLOG_CONTROL_FILE <https://doxygen.postgresql.org/xlog__internal_8h.html#a243af5b9b94bfc6356d44053a6f08e13>xlog_internal.h
XLOG_DATA <https://doxygen.postgresql.org/pg__standby_8c.html#a37d04756edf3c23236e1182e9b41f7b8>pg_standby.c
XLOG_DBASE_CREATE <https://doxygen.postgresql.org/dbcommands__xlog_8h.html#ab2eb2d181264280d88da0de6023a5b03> - dbcommands_xlog.h
XLOG_DBASE_DROP <https://doxygen.postgresql.org/dbcommands__xlog_8h.html#a82159f86420a7d740047120d691e078c> - dbcommands_xlog.h
xlog_desc <javascript:searchResults.Toggle(%22SR_xlog_5fdesc%22)>
xlog_dir <javascript:searchResults.Toggle(%22SR_xlog_5fdir%22)>
XLOG_END_OF_RECOVERY <https://doxygen.postgresql.org/pg__control_8h.html#afe9e6ee9f0b19be02e7d802fd7b0dd5d> - pg_control.h
xlog_fn.h <https://doxygen.postgresql.org/xlog__fn_8h.html>
XLOG_FNAME_LEN <https://doxygen.postgresql.org/xlog__internal_8h.html#a806888338de344e3fbb7c91a788149da> - xlog_internal.h
XLOG_FPI <https://doxygen.postgresql.org/pg__control_8h.html#a77c5fe73e060f7759deb421a0b2c4af6> - pg_control.h
XLOG_FPI_FOR_HINT <https://doxygen.postgresql.org/pg__control_8h.html#a7cc48ed8535d7c8321cd096d62bc84da> - pg_control.h
XLOG_FPW_CHANGE <https://doxygen.postgresql.org/pg__control_8h.html#a21c819d8dad919204caf8198d6f29e8a> - pg_control.h
XLOG_FROM_ANY <https://doxygen.postgresql.org/xlog_8c.html#aa4ae6b53287149eeb167868e4a55d714aea9ce17d7eded4324cc8f5416a0163da> - xlog.c
XLOG_FROM_ARCHIVE <https://doxygen.postgresql.org/xlog_8c.html#aa4ae6b53287149eeb167868e4a55d714adffd65e4ec3f1091765ac4438e6beacd> - xlog.c
XLOG_FROM_PG_WAL <https://doxygen.postgresql.org/xlog_8c.html#aa4ae6b53287149eeb167868e4a55d714a6953cfa8a50e9a0cca70e93713b673f2> - xlog.c
XLOG_FROM_STREAM <https://doxygen.postgresql.org/xlog_8c.html#aa4ae6b53287149eeb167868e4a55d714abb692a2dd46cbbf9d2b4f346a8ef5ff9> - xlog.c
XLOG_GIN_CREATE_INDEX <https://doxygen.postgresql.org/gin__private_8h.html#aaecaef66228a8f431493e643bcbc3cf8> - gin_private.h
XLOG_GIN_CREATE_PTREE <https://doxygen.postgresql.org/gin__private_8h.html#aa0136e6761a3c5a3c5d33e4c135be255> - gin_private.h
XLOG_GIN_DELETE_LISTPAGE <https://doxygen.postgresql.org/gin__private_8h.html#af5de469705afaa58f3991be80091c1e1> - gin_private.h
XLOG_GIN_DELETE_PAGE <https://doxygen.postgresql.org/gin__private_8h.html#aaa85fe6ca88d3b567ebf8f58454b2602> - gin_private.h
XLOG_GIN_INSERT <https://doxygen.postgresql.org/gin__private_8h.html#a847d779049f75dff8be5b1c99400505f> - gin_private.h
XLOG_GIN_INSERT_LISTPAGE <https://doxygen.postgresql.org/gin__private_8h.html#ab697c4aab9b2da31177a87c5b46cca05> - gin_private.h
XLOG_GIN_SPLIT <https://doxygen.postgresql.org/gin__private_8h.html#ae601d320a2ed9b4dd95bab6967e7dd24> - gin_private.h
XLOG_GIN_UPDATE_META_PAGE <https://doxygen.postgresql.org/gin__private_8h.html#a19e96aa1f1af8c8917a7aea7f4238f0b> - gin_private.h
XLOG_GIN_VACUUM_DATA_LEAF_PAGE <https://doxygen.postgresql.org/gin__private_8h.html#ac1638e8f4fc822004e1cb66fd37ba48f> - gin_private.h
XLOG_GIN_VACUUM_PAGE <https://doxygen.postgresql.org/gin__private_8h.html#aa15459bf08d3806311e789b4e6de102c> - gin_private.h
XLOG_GIST_CREATE_INDEX <https://doxygen.postgresql.org/gist__private_8h.html#a5a8e2e98e31d45df90d39057e704ef73> - gist_private.h
XLOG_GIST_PAGE_SPLIT <https://doxygen.postgresql.org/gist__private_8h.html#ad8fe365920af63ec3592f5045d1d5f7c> - gist_private.h
XLOG_GIST_PAGE_UPDATE <https://doxygen.postgresql.org/gist__private_8h.html#ae1dfd9314093a34bd1559be465fa7a46> - gist_private.h
XLOG_HEAP2_CLEAN <https://doxygen.postgresql.org/heapam__xlog_8h.html#afd43c607f260d10d107b82ec56b46457> - heapam_xlog.h
XLOG_HEAP2_CLEANUP_INFO <https://doxygen.postgresql.org/heapam__xlog_8h.html#a287947ce9e8640c834c965da8e68ec31> - heapam_xlog.h
XLOG_HEAP2_FREEZE_PAGE <https://doxygen.postgresql.org/heapam__xlog_8h.html#a99228d35e6c15389dc6c0c932f8f2084> - heapam_xlog.h
XLOG_HEAP2_LOCK_UPDATED <https://doxygen.postgresql.org/heapam__xlog_8h.html#a953ee78dad4f0c83640fb5b58d450064> - heapam_xlog.h
XLOG_HEAP2_MULTI_INSERT <https://doxygen.postgresql.org/heapam__xlog_8h.html#a09d28a8ec766e208ef3f14c941a9dceb> - heapam_xlog.h
XLOG_HEAP2_NEW_CID <https://doxygen.postgresql.org/heapam__xlog_8h.html#aa6dce017eba7e3f59439352fac58a2c6> - heapam_xlog.h
XLOG_HEAP2_REWRITE <https://doxygen.postgresql.org/heapam__xlog_8h.html#a1d79b0ce034201fdb685f9023c73a496> - heapam_xlog.h
XLOG_HEAP2_VISIBLE <https://doxygen.postgresql.org/heapam__xlog_8h.html#ae2fb90fa2889e34ddbf1a9eb36ca0d58> - heapam_xlog.h
XLOG_HEAP_CONFIRM <https://doxygen.postgresql.org/heapam__xlog_8h.html#afb6ec95decce57c1fc5833050b687480> - heapam_xlog.h
XLOG_HEAP_DELETE <https://doxygen.postgresql.org/heapam__xlog_8h.html#a1699edb7efa9b08de135ca89a9d1e23c> - heapam_xlog.h
XLOG_HEAP_HOT_UPDATE <https://doxygen.postgresql.org/heapam__xlog_8h.html#a124f8f7c6207e8d372efa0b3b16bd60a> - heapam_xlog.h
XLOG_HEAP_INIT_PAGE <https://doxygen.postgresql.org/heapam__xlog_8h.html#ae969c2b1184a09f88380015d0e4130fe> - heapam_xlog.h
XLOG_HEAP_INPLACE <https://doxygen.postgresql.org/heapam__xlog_8h.html#a94a3532f2f214b304f3098919748edec> - heapam_xlog.h
XLOG_HEAP_INSERT <https://doxygen.postgresql.org/heapam__xlog_8h.html#acc254c522710da2616bae261202b9696> - heapam_xlog.h
XLOG_HEAP_LOCK <https://doxygen.postgresql.org/heapam__xlog_8h.html#ab9ac57018bc8ff9c82f6d44a8d3c1f57> - heapam_xlog.h
XLOG_HEAP_OPMASK <https://doxygen.postgresql.org/heapam__xlog_8h.html#a47385bef217a3dc92c3e9b99d69c70a3> - heapam_xlog.h
XLOG_HEAP_UPDATE <https://doxygen.postgresql.org/heapam__xlog_8h.html#a514352c407ee9f18f5056bd4d800e4c1> - heapam_xlog.h
XLOG_HISTORY <https://doxygen.postgresql.org/pg__standby_8c.html#a4da8f71093d15f8ddf825e8f14e6aacd> - pg_standby.c
xlog_identify <javascript:searchResults.Toggle(%22SR_xlog_5fidentify%22)>
XLOG_INCLUDE_ORIGIN <https://doxygen.postgresql.org/xlog_8h.html#a68159f3b34be48904cf9fcb06b58b36f> - xlog.h
xlog_internal.h <https://doxygen.postgresql.org/xlog__internal_8h.html>
XLOG_INVALIDATIONS <https://doxygen.postgresql.org/standbydefs_8h.html#a16cd2e19ee4c0d0ce2eb22167e0a5c38> - standbydefs.h
XLOG_LOGICAL_MESSAGE <https://doxygen.postgresql.org/message_8h.html#a83dd85b27791b757d7b1f9ee36faa5c4> - message.h
XLOG_MARK_UNIMPORTANT <https://doxygen.postgresql.org/xlog_8h.html#a150a45ddc593edecef4c8ba2f286e0fa> - xlog.h
XLOG_MULTIXACT_CREATE_ID <https://doxygen.postgresql.org/multixact_8h.html#a8e47af7b2edbf0ed8860fcdb68e59b77> - multixact.h
XLOG_MULTIXACT_TRUNCATE_ID <https://doxygen.postgresql.org/multixact_8h.html#a7e837595a280f12025a41fb023f6975d> - multixact.h
XLOG_MULTIXACT_ZERO_MEM_PAGE <https://doxygen.postgresql.org/multixact_8h.html#a15b1dd070fbcabfbaeadad4c61e9fe75> - multixact.h
XLOG_MULTIXACT_ZERO_OFF_PAGE <https://doxygen.postgresql.org/multixact_8h.html#a2977df1a4118452b0a0e5566fce294c8> - multixact.h
XLOG_NEXTOID <https://doxygen.postgresql.org/pg__control_8h.html#a8b15845655cddbc8ceff021e18b6bd5b> - pg_control.h
XLOG_NOOP <https://doxygen.postgresql.org/pg__control_8h.html#aa8d44e6e58023f97028a8d7774e3ae86> - pg_control.h
xlog_outdesc <https://doxygen.postgresql.org/xlog_8c.html#a28b0b87f29ac8c681ec55538c7a0d04b> - xlog.c
XLOG_PAGE_MAGIC <https://doxygen.postgresql.org/xlog__internal_8h.html#a8e4c79b6eca34bb621882f23adede48a> - xlog_internal.h
XLOG_PARAMETER_CHANGE <https://doxygen.postgresql.org/pg__control_8h.html#adc354269b79e6a53ea84bda5ca2e2b23> - pg_control.h
xlog_redo <javascript:searchResults.Toggle(%22SR_xlog_5fredo%22)>
XLOG_RELMAP_UPDATE <https://doxygen.postgresql.org/relmapper_8h.html#a0bb2f002d83ea93ea184515fcb12c487> - relmapper.h
XLOG_REPLORIGIN_DROP <https://doxygen.postgresql.org/origin_8h.html#aa1f479555c70bf34a53f288eb4fa9d57> - origin.h
XLOG_REPLORIGIN_SET <https://doxygen.postgresql.org/origin_8h.html#ae090bab365094adb43942a941a860089> - origin.h
XLOG_RESTORE_POINT <https://doxygen.postgresql.org/pg__control_8h.html#a0bc4e125e73e57add7c1a2b7555f483d> - pg_control.h
XLOG_RUNNING_XACTS <https://doxygen.postgresql.org/standbydefs_8h.html#ab12fbc0105f85b9584eb7abdf4be9c8f> - standbydefs.h
xlog_seg_size <https://doxygen.postgresql.org/structControlFileData.html#a23cf13e46c79d5ce43e944851bc3174b> - ControlFileData
XLOG_SEQ_LOG <https://doxygen.postgresql.org/sequence_8h.html#ae204442ea6ae0d63ec9dd9ecf6214b4c> - sequence.h
XLOG_SMGR_CREATE <https://doxygen.postgresql.org/storage__xlog_8h.html#a40d32269b4e6f811ff573b8ad8d2a7d1> - storage_xlog.h
XLOG_SMGR_TRUNCATE <https://doxygen.postgresql.org/storage__xlog_8h.html#a499478a7c38a8cc140996a22a71562d5> - storage_xlog.h
XLOG_SPGIST_ADD_LEAF <https://doxygen.postgresql.org/spgist__private_8h.html#a996b243b8c3c467525c5fdf491e2bc6a> - spgist_private.h
XLOG_SPGIST_ADD_NODE <https://doxygen.postgresql.org/spgist__private_8h.html#a991c366ac0b700ea6cf97859a52fd521> - spgist_private.h
XLOG_SPGIST_CREATE_INDEX <https://doxygen.postgresql.org/spgist__private_8h.html#a513a49635d4eab4620fa4a9cd0a66725> - spgist_private.h
XLOG_SPGIST_MOVE_LEAFS <https://doxygen.postgresql.org/spgist__private_8h.html#aaa895e0a5137b26cdee5793bdeee78d0> - spgist_private.h
XLOG_SPGIST_PICKSPLIT <https://doxygen.postgresql.org/spgist__private_8h.html#abdebd43c7d8301a686a9d9b2e88a03c0> - spgist_private.h
XLOG_SPGIST_SPLIT_TUPLE <https://doxygen.postgresql.org/spgist__private_8h.html#a1bb43c5b6f08956332f2b50fbfeac404> - spgist_private.h
XLOG_SPGIST_VACUUM_LEAF <https://doxygen.postgresql.org/spgist__private_8h.html#a4c695d55d965513172367a54dfb3cdd1> - spgist_private.h
XLOG_SPGIST_VACUUM_REDIRECT <https://doxygen.postgresql.org/spgist__private_8h.html#aed51a1b70c04d574444e535448bf35f6> - spgist_private.h
XLOG_SPGIST_VACUUM_ROOT <https://doxygen.postgresql.org/spgist__private_8h.html#a27c83b2efb3f0be9f543689cecaa5767> - spgist_private.h
XLOG_STANDBY_LOCK <https://doxygen.postgresql.org/standbydefs_8h.html#a5fd8850a1cbb0fb49ea85661db7a60a2> - standbydefs.h
XLOG_SWITCH <https://doxygen.postgresql.org/pg__control_8h.html#ad048df99b35282ec30f163c1957de9d3> - pg_control.h
XLOG_TBLSPC_CREATE <https://doxygen.postgresql.org/tablespace_8h.html#a2e90aef5768f29c831df3725ffa1afcc> - tablespace.h
XLOG_TBLSPC_DROP <https://doxygen.postgresql.org/tablespace_8h.html#a2b346ec30d305ad34a70419a14298a9a> - tablespace.h
XLOG_XACT_ABORT <https://doxygen.postgresql.org/xact_8h.html#a825804340e245b3d4c60e72cbd7a3b91> - xact.h
XLOG_XACT_ABORT_PREPARED <https://doxygen.postgresql.org/xact_8h.html#acf1fdec439e01d3c36aec08566f6af1f> - xact.h
XLOG_XACT_ASSIGNMENT <https://doxygen.postgresql.org/xact_8h.html#aca8845707c6dad5ad3afe07d5882eca4> - xact.h
XLOG_XACT_COMMIT <https://doxygen.postgresql.org/xact_8h.html#a6b0dd66a4a28c9923855a8834318ca09> - xact.h
XLOG_XACT_COMMIT_PREPARED <https://doxygen.postgresql.org/xact_8h.html#a1b3730bd05f35ffa696212d6589d0ce3> - xact.h
XLOG_XACT_HAS_INFO <https://doxygen.postgresql.org/xact_8h.html#adbbeafa721c6cd308c11022c965926ae> - xact.h
XLOG_XACT_OPMASK <https://doxygen.postgresql.org/xact_8h.html#a6b97d131ba561ba540b35f1990e8c669> - xact.h
XLOG_XACT_PREPARE <https://doxygen.postgresql.org/xact_8h.html#a544c5a98d349d6c27bb35ab636d029ed> - xact.h
xlogarchive.c <https://doxygen.postgresql.org/xlogarchive_8c.html>
XLogArchiveCheckDone <javascript:searchResults.Toggle(%22SR_xlogarchivecheckdone%22)>
XLogArchiveCleanup <javascript:searchResults.Toggle(%22SR_xlogarchivecleanup%22)>
XLogArchiveCommand <javascript:searchResults.Toggle(%22SR_xlogarchivecommand%22)>
XLogArchiveCommandSet <https://doxygen.postgresql.org/xlog_8h.html#a04faf4a0d4aa1cea61846b93f2afde94> - xlog.h
XLogArchiveForceDone <javascript:searchResults.Toggle(%22SR_xlogarchiveforcedone%22)>
XLogArchiveIsBusy <javascript:searchResults.Toggle(%22SR_xlogarchiveisbusy%22)>
XLogArchiveIsReady <javascript:searchResults.Toggle(%22SR_xlogarchiveisready%22)>
XLogArchiveIsReadyOrDone <javascript:searchResults.Toggle(%22SR_xlogarchiveisreadyordone%22)>
XLogArchiveMode <javascript:searchResults.Toggle(%22SR_xlogarchivemode%22)>
XLogArchiveNotify <javascript:searchResults.Toggle(%22SR_xlogarchivenotify%22)>
XLogArchiveNotifySeg <javascript:searchResults.Toggle(%22SR_xlogarchivenotifyseg%22)>
XLogArchiveTimeout <javascript:searchResults.Toggle(%22SR_xlogarchivetimeout%22)>
XLogArchivingActive <https://doxygen.postgresql.org/xlog_8h.html#a0722d9ca53151b7bc56ab5309dd29105> - xlog.h
XLogArchivingAlways <https://doxygen.postgresql.org/xlog_8h.html#ad0bef96195ee515f84087bc418251ae5> - xlog.h
XLogBackgroundFlush <javascript:searchResults.Toggle(%22SR_xlogbackgroundflush%22)>
XLogBeginInsert <javascript:searchResults.Toggle(%22SR_xlogbegininsert%22)>
XLOGbuffers <javascript:searchResults.Toggle(%22SR_xlogbuffers%22)>
XLogBytePosToEndRecPtr <https://doxygen.postgresql.org/xlog_8c.html#a63e9218c8da4f289d7fabafaf099c70d> - xlog.c
XLogBytePosToRecPtr <https://doxygen.postgresql.org/xlog_8c.html#a22948211fffe860cc7e711417fd2b88a> - xlog.c
XLogCacheBlck <https://doxygen.postgresql.org/structXLogCtlData.html#a7efa18acfc83b86b7e0bb39c5a1d6180> - XLogCtlData
XLogCheckBufferNeedsBackup <javascript:searchResults.Toggle(%22SR_xlogcheckbufferneedsbackup%22)>
XLogCheckInvalidPages <javascript:searchResults.Toggle(%22SR_xlogcheckinvalidpages%22)>
XLogCheckpointNeeded <https://doxygen.postgresql.org/xlog_8c.html#ac7fcdcaf3c30bfff91ba34a95f5b241f> - xlog.c
XLOGChooseNumBuffers <https://doxygen.postgresql.org/xlog_8c.html#a62eba629a392548a2ea30e4d301e68bf> - xlog.c
XLogCompressBackupBlock <https://doxygen.postgresql.org/xloginsert_8c.html#ae22ca35d456e30a52e7588ad53c578e5> - xloginsert.c
XLogCtl <https://doxygen.postgresql.org/xlog_8c.html#a08295a9c52c91e205eabca6c53dcbdbe> - xlog.c
XLogCtlData <javascript:searchResults.Toggle(%22SR_xlogctldata%22)>
XLogCtlInsert <javascript:searchResults.Toggle(%22SR_xlogctlinsert%22)>
xlogdefs.h <https://doxygen.postgresql.org/xlogdefs_8h.html>
xlogdesc.c <https://doxygen.postgresql.org/xlogdesc_8c.html>
XLOGDIR <https://doxygen.postgresql.org/xlog__internal_8h.html#a77e39e7339e0131203fbbf1da5faa873> - xlog_internal.h
XLogDropDatabase <javascript:searchResults.Toggle(%22SR_xlogdropdatabase%22)>
XLogDropRelation <javascript:searchResults.Toggle(%22SR_xlogdroprelation%22)>
XLogDumpConfig <javascript:searchResults.Toggle(%22SR_xlogdumpconfig%22)>
XLogDumpCountRecord <https://doxygen.postgresql.org/pg__xlogdump_8c.html#aff82bbaf0480cad26c82637fa0762056> - pg_xlogdump.c
XLogDumpDisplayRecord <https://doxygen.postgresql.org/pg__xlogdump_8c.html#aa022c354036b3f1d1989720730345f34> - pg_xlogdump.c
XLogDumpDisplayStats <https://doxygen.postgresql.org/pg__xlogdump_8c.html#a54882baadad1d6a5fcbdc7bdfe7bc5f8> - pg_xlogdump.c
XLogDumpPrivate <javascript:searchResults.Toggle(%22SR_xlogdumpprivate%22)>
XLogDumpReadPage <https://doxygen.postgresql.org/pg__xlogdump_8c.html#a20618c188fe79ca5007b4e77d2df205f> - pg_xlogdump.c
XLogDumpStats <javascript:searchResults.Toggle(%22SR_xlogdumpstats%22)>
XLogDumpStatsRow <https://doxygen.postgresql.org/pg__xlogdump_8c.html#aada1baa0d1f491b8d215dbceaf9a0daf> - pg_xlogdump.c
XLogDumpXLogRead <https://doxygen.postgresql.org/pg__xlogdump_8c.html#a4b36fa810a7810236008bb22c25f5ec3> - pg_xlogdump.c
xlogendptr <https://doxygen.postgresql.org/pg__basebackup_8c.html#af3c480069d8ad046ff341a6297d66b27> - pg_basebackup.c
XLogEnsureRecordSpace <javascript:searchResults.Toggle(%22SR_xlogensurerecordspace%22)>
XLogFileClose <https://doxygen.postgresql.org/xlog_8c.html#aa2986727c67ea03d40a1dbd566427822> - xlog.c
XLogFileCopy <https://doxygen.postgresql.org/xlog_8c.html#a48c561d496c6f6c127f5d3c7584edabc> - xlog.c
XLogFileInit <javascript:searchResults.Toggle(%22SR_xlogfileinit%22)>
XLogFileName <https://doxygen.postgresql.org/xlog__internal_8h.html#afc1a7b6a24ef166178cbe21014abe8a2> - xlog_internal.h
XLogFileNameById <https://doxygen.postgresql.org/xlog__internal_8h.html#ab81e30c6e569e65b5d8f04bbb48f021c> - xlog_internal.h
XLogFileNameP <javascript:searchResults.Toggle(%22SR_xlogfilenamep%22)>
XLogFileOpen <javascript:searchResults.Toggle(%22SR_xlogfileopen%22)>
xlogFilePath <javascript:searchResults.Toggle(%22SR_xlogfilepath%22)>
XLogFileRead <https://doxygen.postgresql.org/xlog_8c.html#a3b8c9c7dfdc4d28fb3071152bfe7017d> - xlog.c
XLogFileReadAnyTLI <https://doxygen.postgresql.org/xlog_8c.html#a7b23db980fb02113f4314e8132fe4d52> - xlog.c
XLOGfileslop <https://doxygen.postgresql.org/xlog_8c.html#a2f56b9336f820514ceecfece76228a7b> - xlog.c
XLogFlush <javascript:searchResults.Toggle(%22SR_xlogflush%22)>
xlogfpath <https://doxygen.postgresql.org/parsexlog_8c.html#afa3dcf4e435a4ed1b5f9a45f92d739e9> - parsexlog.c
XLogFromFileName <https://doxygen.postgresql.org/xlog__internal_8h.html#ab2ded6f67666f0069571b0e0c4ee556a> - xlog_internal.h
xlogfuncs.c <https://doxygen.postgresql.org/xlogfuncs_8c.html>
XLogGetLastRemovedSegno <javascript:searchResults.Toggle(%22SR_xloggetlastremovedsegno%22)>
XLogGetReplicationSlotMinimumLSN <https://doxygen.postgresql.org/xlog_8c.html#a459b5855b0f32fc4042a27193a8632d4> - xlog.c
XLogHaveInvalidPages <javascript:searchResults.Toggle(%22SR_xloghaveinvalidpages%22)>
XLogHintBitIsNeeded <https://doxygen.postgresql.org/xlog_8h.html#afba8efbfce50e33c2c306e79c7d7f853> - xlog.h
xlogid <https://doxygen.postgresql.org/structPageXLogRecPtr.html#ae1e0b292b5ec19588ed021069f200c44> - PageXLogRecPtr
XLogInitBufferForRedo <javascript:searchResults.Toggle(%22SR_xloginitbufferforredo%22)>
XLogInsert <javascript:searchResults.Toggle(%22SR_xloginsert%22)>
xloginsert.c <https://doxygen.postgresql.org/xloginsert_8c.html>
xloginsert.h <https://doxygen.postgresql.org/xloginsert_8h.html>
xloginsert_cxt <https://doxygen.postgresql.org/xloginsert_8c.html#a8b6566189db35d25132cc5498796531a> - xloginsert.c
XLogInsertAllowed <javascript:searchResults.Toggle(%22SR_xloginsertallowed%22)>
XLogInsertRecord <javascript:searchResults.Toggle(%22SR_xloginsertrecord%22)>
XLogIsNeeded <https://doxygen.postgresql.org/xlog_8h.html#af4225b3b8fcad6601cb5bde514838976> - xlog.h
XLogLogicalInfoActive <https://doxygen.postgresql.org/xlog_8h.html#a3565c399ee3d40ed4afa140478f7933e> - xlog.h
XLogLongPageHeader <https://doxygen.postgresql.org/xlog__internal_8h.html#a1b2b37485b2502f4c3b8e13caeb46eef> - xlog_internal.h
XLogLongPageHeaderData <javascript:searchResults.Toggle(%22SR_xloglongpageheaderdata%22)>
XLogNeedsFlush <javascript:searchResults.Toggle(%22SR_xlogneedsflush%22)>
XLogPageHeader <https://doxygen.postgresql.org/xlog__internal_8h.html#a6bf328cd65b03f2b2998ef4918464cf2> - xlog_internal.h
XLogPageHeaderData <javascript:searchResults.Toggle(%22SR_xlogpageheaderdata%22)>
XLogPageHeaderSize <https://doxygen.postgresql.org/xlog__internal_8h.html#ad4624af98c03ce138ba37961def4eb0c> - xlog_internal.h
XLogPageRead <https://doxygen.postgresql.org/xlog_8c.html#a0d4418cd82148abf0d5d163334851d85> - xlog.c
XLogPageReadCB <https://doxygen.postgresql.org/xlogreader_8h.html#a3a3a749f86bb5799646ba7a6af8b1821> - xlogreader.h
XLogPageReadPrivate <javascript:searchResults.Toggle(%22SR_xlogpagereadprivate%22)>
XLogPutNextOid <javascript:searchResults.Toggle(%22SR_xlogputnextoid%22)>
XLogRead <javascript:searchResults.Toggle(%22SR_xlogread%22)>
XLogReadBufferExtended <javascript:searchResults.Toggle(%22SR_xlogreadbufferextended%22)>
XLogReadBufferForRedo <javascript:searchResults.Toggle(%22SR_xlogreadbufferforredo%22)>
XLogReadBufferForRedoExtended <javascript:searchResults.Toggle(%22SR_xlogreadbufferforredoextended%22)>
xlogreader.c <https://doxygen.postgresql.org/xlogreader_8c.html>
xlogreader.h <https://doxygen.postgresql.org/xlogreader_8h.html>
XLogReaderAllocate <javascript:searchResults.Toggle(%22SR_xlogreaderallocate%22)>
XLogReaderFree <javascript:searchResults.Toggle(%22SR_xlogreaderfree%22)>
XLogReaderInvalReadState <javascript:searchResults.Toggle(%22SR_xlogreaderinvalreadstate%22)>
XLogReaderState <javascript:searchResults.Toggle(%22SR_xlogreaderstate%22)>
xlogreadfd <https://doxygen.postgresql.org/parsexlog_8c.html#a9c2a5beb275c3e24a51da84e5b31f17d> - parsexlog.c
XLogReadRecord <javascript:searchResults.Toggle(%22SR_xlogreadrecord%22)>
xlogreadsegno <https://doxygen.postgresql.org/parsexlog_8c.html#a5dae7dfe7aa758e9ff0521a133961c76> - parsexlog.c
XlogReadTwoPhaseData <https://doxygen.postgresql.org/twophase_8c.html#a044e6f482ece6c76aa19c2439e299469> - twophase.c
XLogRecData <javascript:searchResults.Toggle(%22SR_xlogrecdata%22)>
XLogReceiptSource <https://doxygen.postgresql.org/xlog_8c.html#a3f0d82893675c7792adcd4f92e52bf3c> - xlog.c
XLogReceiptTime <https://doxygen.postgresql.org/xlog_8c.html#ab42473e36af5d4090c276ed76948c244> - xlog.c
XLogRecGetBlockData <javascript:searchResults.Toggle(%22SR_xlogrecgetblockdata%22)>
XLogRecGetBlockTag <javascript:searchResults.Toggle(%22SR_xlogrecgetblocktag%22)>
XLogRecGetData <https://doxygen.postgresql.org/xlogreader_8h.html#a50063610bc5acb8bbf040147d6cdd7a7> - xlogreader.h
XLogRecGetDataLen <https://doxygen.postgresql.org/xlogreader_8h.html#a185e655425468ba0f002727139e954e3> - xlogreader.h
XLogRecGetInfo <https://doxygen.postgresql.org/xlogreader_8h.html#a20fc706271c4119b87defc34526016cb> - xlogreader.h
XLogRecGetOrigin <https://doxygen.postgresql.org/xlogreader_8h.html#a00b3b7a225a7f7a1bfb9ec7117dea1fd> - xlogreader.h
XLogRecGetPrev <https://doxygen.postgresql.org/xlogreader_8h.html#acaae032e576cc6b3d635469332c6597a> - xlogreader.h
XLogRecGetRmid <https://doxygen.postgresql.org/xlogreader_8h.html#a48a8f2bac4018d6753b09805a1546043> - xlogreader.h
XLogRecGetTotalLen <https://doxygen.postgresql.org/xlogreader_8h.html#a6518506bbdc4870638bf908b8ef647af> - xlogreader.h
XLogRecGetXid <https://doxygen.postgresql.org/xlogreader_8h.html#a845e6dce9851c668fd79907d0965d177> - xlogreader.h
XLogRecHasAnyBlockRefs <https://doxygen.postgresql.org/xlogreader_8h.html#ae5c8b95fa208a8eabf13b954311c30a5> - xlogreader.h
XLogRecHasBlockImage <https://doxygen.postgresql.org/xlogreader_8h.html#ac1a4a85adc4e0c19962be566a90a5633> - xlogreader.h
XLogRecHasBlockRef <https://doxygen.postgresql.org/xlogreader_8h.html#ac7ad516d66ff06aca1a2910b51823b4c> - xlogreader.h
XLogRecord <javascript:searchResults.Toggle(%22SR_xlogrecord%22)>
xlogrecord.h <https://doxygen.postgresql.org/xlogrecord_8h.html>
XLogRecordAssemble <https://doxygen.postgresql.org/xloginsert_8c.html#a46d746c6c6f2af9a494749982bb7e226> - xloginsert.c
XLogRecordBlockCompressHeader <javascript:searchResults.Toggle(%22SR_xlogrecordblockcompressheader%22)>
XLogRecordBlockHeader <javascript:searchResults.Toggle(%22SR_xlogrecordblockheader%22)>
XLogRecordBlockImageHeader <javascript:searchResults.Toggle(%22SR_xlogrecordblockimageheader%22)>
XLogRecordBuffer <javascript:searchResults.Toggle(%22SR_xlogrecordbuffer%22)>
XLogRecordDataHeaderLong <javascript:searchResults.Toggle(%22SR_xlogrecorddataheaderlong%22)>
XLogRecordDataHeaderShort <javascript:searchResults.Toggle(%22SR_xlogrecorddataheadershort%22)>
XLogRecordPageWithFreeSpace <javascript:searchResults.Toggle(%22SR_xlogrecordpagewithfreespace%22)>
XLogRecPtr <https://doxygen.postgresql.org/xlogdefs_8h.html#a9f798cf05369dc78cd7688060d2c5993> - xlogdefs.h
XLogRecPtrIsInvalid <https://doxygen.postgresql.org/xlogdefs_8h.html#a318e8305e570ecfb15130e6febed0e4e> - xlogdefs.h
XLogRecPtrToBufIdx <https://doxygen.postgresql.org/xlog_8c.html#a7724df206772409331239f2d400098cb> - xlog.c
XLogRecPtrToBytePos <https://doxygen.postgresql.org/xlog_8c.html#a71b7afa1e52f3cbbaf13713927de6c5a> - xlog.c
XLogRedoAction <https://doxygen.postgresql.org/xlogutils_8h.html#aed615cdfe11ef9fe82f892664c157d01> - xlogutils.h
XLogRegisterBlock <javascript:searchResults.Toggle(%22SR_xlogregisterblock%22)>
XLogRegisterBufData <javascript:searchResults.Toggle(%22SR_xlogregisterbufdata%22)>
XLogRegisterBuffer <javascript:searchResults.Toggle(%22SR_xlogregisterbuffer%22)>
XLogRegisterData <javascript:searchResults.Toggle(%22SR_xlogregisterdata%22)>
XLogReportParameters <https://doxygen.postgresql.org/xlog_8c.html#a4247736f85ad96f33cc37a290bbb1bf7> - xlog.c
XLogRequestWalReceiverReply <javascript:searchResults.Toggle(%22SR_xlogrequestwalreceiverreply%22)>
XLogResetInsertion <javascript:searchResults.Toggle(%22SR_xlogresetinsertion%22)>
XLogRestorePoint <javascript:searchResults.Toggle(%22SR_xlogrestorepoint%22)>
XLogSaveBufferForHint <javascript:searchResults.Toggle(%22SR_xlogsavebufferforhint%22)>
XLogSegmentsPerXLogId <https://doxygen.postgresql.org/xlog__internal_8h.html#a8ddde6138f591b4282127df0b62b17f5> - xlog_internal.h
XLogSegNo <https://doxygen.postgresql.org/xlogdefs_8h.html#afa9db36d4b92482e150dea8f2b079760> - xlogdefs.h
XLogSegNoOffsetToRecPtr <https://doxygen.postgresql.org/xlog__internal_8h.html#ab02a343a9314a29ab9f94fc96e0c9ffb> - xlog_internal.h
XLogSegSize <https://doxygen.postgresql.org/xlog__internal_8h.html#a223aba5b5efcaa6f9465cdf6b0e236e0> - xlog_internal.h
XLogSendLogical <https://doxygen.postgresql.org/walsender_8c.html#a4fe0e7ef70e1bf17e92708c09e0f5984> - walsender.c
XLogSendPhysical <https://doxygen.postgresql.org/walsender_8c.html#a1b69b9b9f5373335c6dc28671d20c3eb> - walsender.c
XLogSetAsyncXactLSN <javascript:searchResults.Toggle(%22SR_xlogsetasyncxactlsn%22)>
XLogSetRecordFlags <javascript:searchResults.Toggle(%22SR_xlogsetrecordflags%22)>
XLogSetReplicationSlotMinimumLSN <javascript:searchResults.Toggle(%22SR_xlogsetreplicationslotminimumlsn%22)>
XLOGShmemInit <javascript:searchResults.Toggle(%22SR_xlogshmeminit%22)>
XLOGShmemSize <javascript:searchResults.Toggle(%22SR_xlogshmemsize%22)>
XLogSource <https://doxygen.postgresql.org/xlog_8c.html#aa4ae6b53287149eeb167868e4a55d714> - xlog.c
xlogSourceNames <https://doxygen.postgresql.org/xlog_8c.html#a2bc71ea31ed3e005d6c67c444ace160e> - xlog.c
XLogStandbyInfoActive <https://doxygen.postgresql.org/xlog_8h.html#afc72a658a332edc7df1e62a52795fb03> - xlog.h
XLogTruncateRelation <javascript:searchResults.Toggle(%22SR_xlogtruncaterelation%22)>
xlogutils.c <https://doxygen.postgresql.org/xlogutils_8c.html>
xlogutils.h <https://doxygen.postgresql.org/xlogutils_8h.html>
xlogVacuumPage <https://doxygen.postgresql.org/ginvacuum_8c.html#a50c6cda171adcec5b3aabb90f46cd86e> - ginvacuum.c
XLogWalRcvFlush <https://doxygen.postgresql.org/walreceiver_8c.html#ae807ab6c61cc901281f1c4f79c4353d4> - walreceiver.c
XLogWalRcvProcessMsg <https://doxygen.postgresql.org/walreceiver_8c.html#abea9da4cdfbaff6e1b67394abe9fa01e> - walreceiver.c
XLogWalRcvSendHSFeedback <https://doxygen.postgresql.org/walreceiver_8c.html#ab160b7b903131c79de34f3ebc6236e52> - walreceiver.c
XLogWalRcvSendReply <https://doxygen.postgresql.org/walreceiver_8c.html#ad2122e96cbfb1c04533ead161720c455> - walreceiver.c
XLogWalRcvWrite <https://doxygen.postgresql.org/walreceiver_8c.html#aba5a7785f0fa8b96f70bd378df95aab2> - walreceiver.c
XLogWrite <https://doxygen.postgresql.org/xlog_8c.html#a2e2fc1a5e9a6536b067ce943d87f5b7c> - xlog.c
XLogwrtResult <javascript:searchResults.Toggle(%22SR_xlogwrtresult%22)>
XLogwrtRqst <javascript:searchResults.Toggle(%22SR_xlogwrtrqst%22)>
Show quoted text
On Dec 29, 2016, at 12:07 PM, Stephen Frost <sfrost@snowman.net> wrote:
Cynthia,
* Cynthia Shang (cynthia.shang@crunchydata.com) wrote:
1) I agree with Michael that we should make this change backward compatible. It would help PostgreSQL image if we did not break everyone's code. It costs businesses money to rewrite code (e.g. middle tier software, backup tools, etc), test and redeploy to their customers.
While I agree that we don't want to break client code or to make
backwards incompatible changes without good cause, in this case, it's
definitely a good cause and it makes sense to have things be consistent
and that includes changing these functions.We make backwards-incompatible changes with each major release, which is
part of why we support older versions of PG for as long as we do- to
give PG users time to make any necessary changes for the new version of
PG. One could argue that we shouldn't ever make a backwards
incompatible change because it will break an existing user's code and
cost users time and effort to rewrite that code, but the flip side of
that is that the extra code and complexity results in its own
maintenance burdens for the code and the project moving forward.Generally speaking, we've also found that backwards compatibility
'features' end up having a much longer life than they should.
Ultimately, the best way forward tends to be either make the backwards
incompatible change or don't make the change at all. We've already
agreed on this particular change, and with good reason, so the way
forward is to make the rest of the changes, not to go half-way or to try
and provide some backwards compatibility complexity.2) We decided to rename the pg_xlog directory because people were deleting it when disks were getting full thinking it was just unimportant logging data; I get that. I'm a little unclear why we need to change the functions - it would be less painful to our users and less risky if we just left them as is. Could someone please elaborate why this change is necessary? I'm just trying to understand that.
It would be inconsistent to change the directory name without also
changing the documentation, functions, and other user-facing pieces.Thanks!
Stephen
Cynthia,
Please don't top-post on the PG mailing lists but rather write responses
in-line.
* Cynthia Shang (cynthia.shang@crunchydata.com) wrote:
I have never heard of coding standards where naming conventions required a function/variable name match a directory or file name. It seems that would be restrictive.
We aren't discussing a coding standard, we're talking about changing the
references from 'xlog' to 'wal' to match the change we did to the
directory, to be consistent.
I'm not trying to pick a fight, I just think the pros should outweigh the cons when choosing a path forward. In this case I see lots of cons and one partial pro; partial because renaming only user facing functions and documentation will create inconsistency within the Postgres code for all of the following. It sounds as if your minds are already made up, which saddens me but I will say nothing further on the matter.
All backwards incompatible changes are judgement calls and people are
certainly welcome to have different opinions. I have a pretty strong
feeling about this particular change being worthwhile and also pretty
long overdue.
[... list of references to xlog in the code ...]
No need to include a list, I can find them myself. :)
Nearly all of the references listed are internal functions or references
in the code. Those don't need to be changed, just the user-facing
pieces, which is quite a bit less.
The doxygen website is generated directly off of the code and isn't
user-facing documentation.
Thanks!
Stephen
On Thu, Dec 29, 2016 at 5:48 PM, Cynthia Shang <
cynthia.shang@crunchydata.com> wrote:
I have never heard of coding standards where naming conventions required a
function/variable name match a directory or file name. It seems that would
be restrictive.
This is not about coding standard, this is about terminology and common
sense.
I'm not trying to pick a fight, I just think the pros should outweigh the
cons when choosing a path forward. In this case I see lots of cons and one
partial pro; partial because renaming only user facing functions and
documentation will create inconsistency within the Postgres code for all of
the following. It sounds as if your minds are already made up, which
saddens me but I will say nothing further on the matter.
Ultimately, from user/dba perspective code does not matter. Consistency
does. I found out firsthand that the fact pg_swicth_xlog() does something
in pg_wal directory is rather confusing.
The way I see it decision has been made to rename 'pg_xlog' to 'pg_wal'.
Since this directory name is effectively part of API (e.g. for setups with
xlog on different disk, backup scripts, etc), rest of API either needs to
follow or this decision needs to be revised (but that ship has probably
sailed).
I think small inconvenience of a small group of people (PostgreSQL
developers) is worth the improvement for much larger group of people
(PostgreSQL users).
Now, I'm not sure whether it is worth maintaining function aliases.
Assuming these are indeed trivial (can somebody point me to example?) I see
roughly the same amount of downsides both ways.
Having aliases raises additional questions:
- do we keep them documented (probably not?)
- do we keep them forever or kill in some future version?
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
On Thu, Dec 29, 2016 at 5:59 PM, Stephen Frost <sfrost@snowman.net> wrote:
I have a pretty strong
feeling about this particular change being worthwhile and also pretty
long overdue.
Yeah, sorry for that. I should be able to make some progress early January.
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
On Fri, Dec 30, 2016 at 2:59 AM, Stephen Frost <sfrost@snowman.net> wrote:
All backwards incompatible changes are judgement calls and people are
certainly welcome to have different opinions. I have a pretty strong
feeling about this particular change being worthwhile and also pretty
long overdue.
The renaming is definitely worth it to be consistent with the new
pg_wal/. Now as in the case of those functions we have ways a simple
way to avoid useless pain to users we should really take it easy. So
introducing a set of aliases and deprecating them after a couple of
years is a fine plan IMO.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Fri, Dec 30, 2016 at 8:08 PM, Vladimir Rusinov <vrusinov@google.com> wrote:
Now, I'm not sure whether it is worth maintaining function aliases. Assuming
these are indeed trivial (can somebody point me to example?) I see roughly
the same amount of downsides both ways.
Having aliases raises additional questions:
- do we keep them documented (probably not?)
- do we keep them forever or kill in some future version?
The idea here is to keep documented only the new function names, but
mention in the release notes that aliases are kept, and that those
will be dropped in a couple of years (see for example 5d58c07a for
initdb). This will give plenty of time to monitoring script
maintainers to adapt to the new world order.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Michael Paquier (michael.paquier@gmail.com) wrote:
On Fri, Dec 30, 2016 at 8:08 PM, Vladimir Rusinov <vrusinov@google.com> wrote:
Now, I'm not sure whether it is worth maintaining function aliases. Assuming
these are indeed trivial (can somebody point me to example?) I see roughly
the same amount of downsides both ways.
Having aliases raises additional questions:
- do we keep them documented (probably not?)
- do we keep them forever or kill in some future version?The idea here is to keep documented only the new function names, but
mention in the release notes that aliases are kept, and that those
will be dropped in a couple of years (see for example 5d58c07a for
initdb). This will give plenty of time to monitoring script
maintainers to adapt to the new world order.
I don't particularly like this. Undocumented aliases that make things
keep working are bound to just confuse people who are looking at what's
happening (eg: logging queries) and wondering "what the heck is that
function?!" and then if they're unable to find it in the docs then they
might think it's some local function that they can remove or similar.
Worse, those function aliases will probably continue to persist for
forever because no one can agree on removing them.
We maintain back-branches for years to provide people time to adjust
their code and whatever else they need to, no one is going to be forced
to move to 10 for quite a few years yet.
Additionally, people who are actually using these bits of the system are
almost certainly going to have to adjust things for the directory
change, having to change other bits of related code nearby at the same
time is much better than someone changing just the directory now and
then having to remmeber/realize that they have to change the function
calls in a few years or "whenever the PG people decide to remove the
function aliases."
Let's make this a clean break/change. Perhaps it will also encourage
people who have their own hacked together scripts to consider using a
well maintained alternative solution.
Thanks!
Stephen
On Fri, Dec 30, 2016 at 09:57:25AM -0500, Stephen Frost wrote:
Let's make this a clean break/change.
+1
If there are known management gizmos to notify, it'd be nice to try to
give them some sort of warning, but even for them, the release notes
should spell it out clearly.
That business where people would delete files with "log" in the path,
not infrequently on a system running at capacity, isn't just
theoretical. I've seen people lose data permanently that way, and I
know I'm not the only one who's seen this in the real world.
Best,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 12/30/2016 06:46 PM, David Fetter wrote:
On Fri, Dec 30, 2016 at 09:57:25AM -0500, Stephen Frost wrote:
Let's make this a clean break/change.
+1
+1
--
Vik Fearing +33 6 46 75 15 36
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 12/30/16 9:57 AM, Stephen Frost wrote:
Additionally, people who are actually using these bits of the system are
almost certainly going to have to adjust things for the directory
change,
Some *xlog* functions are commonly used to measure replay lag. That
usage would not be affected by the directory renaming. Renaming those
functions would only serve to annoy users and have them delay their
upgrades.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/1/17 9:48 AM, Peter Eisentraut wrote:
On 12/30/16 9:57 AM, Stephen Frost wrote:
Additionally, people who are actually using these bits of the system are
almost certainly going to have to adjust things for the directory
change,Some *xlog* functions are commonly used to measure replay lag. That
usage would not be affected by the directory renaming. Renaming those
functions would only serve to annoy users and have them delay their
upgrades.
Perhaps we should split the difference and do what we did for XML:
provide a contrib module with alias functions using the old (xlog) names.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/2/17 12:30 PM, Jim Nasby wrote:
On 1/1/17 9:48 AM, Peter Eisentraut wrote:
On 12/30/16 9:57 AM, Stephen Frost wrote:
Additionally, people who are actually using these bits of the system are
almost certainly going to have to adjust things for the directory
change,Some *xlog* functions are commonly used to measure replay lag. That
usage would not be affected by the directory renaming. Renaming those
functions would only serve to annoy users and have them delay their
upgrades.Perhaps we should split the difference and do what we did for XML:
provide a contrib module with alias functions using the old (xlog) names.
-1
Since these functions are normally used by admins and not generally used
in SQL and functions, I'm not convinced the maintenance of the extension
would be worth it. Admins are free to create whatever aliases they need
to get their work done.
--
-David
david@pgmasters.net
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/2/17 11:39 AM, David Steele wrote:
On 1/2/17 12:30 PM, Jim Nasby wrote:
On 1/1/17 9:48 AM, Peter Eisentraut wrote:
On 12/30/16 9:57 AM, Stephen Frost wrote:
Additionally, people who are actually using these bits of the system are
almost certainly going to have to adjust things for the directory
change,Some *xlog* functions are commonly used to measure replay lag. That
usage would not be affected by the directory renaming. Renaming those
functions would only serve to annoy users and have them delay their
upgrades.Perhaps we should split the difference and do what we did for XML:
provide a contrib module with alias functions using the old (xlog) names.-1
Since these functions are normally used by admins and not generally used
in SQL and functions, I'm not convinced the maintenance of the extension
would be worth it. Admins are free to create whatever aliases they need
to get their work done.
AIUI several others are arguing that this name change is going to break
a lot of user monitoring code. I certainly agree with Stephen that some
of the *xlog* functions are used for monitoring replay lag. So I think a
backwards compatibility fix is reasonable.
Why would we force users to each come up with their own solution to this
when we can just provide one?
BTW, I think fears of the maintenance cost of a contrib module are
pretty overblown... it's not like we change these functions that often.
We have added quite a few in the last few releases, but we don't need
backwards compatibility for new stuff.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
On 1/2/17 11:39 AM, David Steele wrote:
On 1/2/17 12:30 PM, Jim Nasby wrote:
On 1/1/17 9:48 AM, Peter Eisentraut wrote:
Perhaps we should split the difference and do what we did for XML:
provide a contrib module with alias functions using the old (xlog) names.
-1
Since these functions are normally used by admins and not generally used
in SQL and functions, I'm not convinced the maintenance of the extension
would be worth it. Admins are free to create whatever aliases they need
to get their work done.
BTW, I think fears of the maintenance cost of a contrib module are
pretty overblown... it's not like we change these functions that often.
We have added quite a few in the last few releases, but we don't need
backwards compatibility for new stuff.
I'm also -1 on this idea. If we're going to provide backwards
compatibility, we should just leave the old names in the core.
Providing an extension is more work for *everybody* --- for us, and
for the users who will have to learn about and install the extension.
I don't see any gain to justify that work, either.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Tue, Jan 3, 2017 at 4:18 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
I'm also -1 on this idea. If we're going to provide backwards
compatibility, we should just leave the old names in the core.
Providing an extension is more work for *everybody* --- for us, and
for the users who will have to learn about and install the extension.
I don't see any gain to justify that work, either.
Yeah, let's make the life of users just easier if we can, without any
extension. Some people are likely going to forget to enable it anyway,
and some more don't like installing the package dedicated to contrib
modules.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Tue, Jan 3, 2017 at 11:56 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:
Yeah, let's make the life of users just easier if we can, without any
extension. Some people are likely going to forget to enable it anyway,
and some more don't like installing the package dedicated to contrib
modules.
I think I +1 on this.
I've did a github search on these function names and there is a lot of code
that use them. E.g. there is 8.5k hits for pg_last_xlog_location
<https://github.com/search?q=pg_last_xlog_replay_location&type=Code&utf8=%E2%9C%93>;
a lot of them a forks and copy-pastes, but still, that's quite a lot. Let's
keep the aliases around for couple of versions after which hopefully a lot
of the code will be updated.
After I'm done with a patch I can take a look if there's a way to mass-fill
issues to affected projects on github (and maybe other hosting providers)
and ask them to migrate to new function names. This is of course will not
fix everything, but it would be a significant chunk. I suspect a lot of
private tools/scripts borrow snippets from github as well.
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
Vladamir, all,
* Vladimir Rusinov (vrusinov@google.com) wrote:
On Tue, Jan 3, 2017 at 11:56 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:Yeah, let's make the life of users just easier if we can, without any
extension. Some people are likely going to forget to enable it anyway,
and some more don't like installing the package dedicated to contrib
modules.I think I +1 on this.
I've did a github search on these function names and there is a lot of code
that use them. E.g. there is 8.5k hits for pg_last_xlog_location
<https://github.com/search?q=pg_last_xlog_replay_location&type=Code&utf8=%E2%9C%93>;
a lot of them a forks and copy-pastes, but still, that's quite a lot. Let's
keep the aliases around for couple of versions after which hopefully a lot
of the code will be updated.
And there's 12k hits for pg_xlog.
If we do that, we'll just end up with exactly the same question about
removing them and the same amount of code breakage in a few years. I
don't see how that is really helping anyone.
After I'm done with a patch I can take a look if there's a way to mass-fill
issues to affected projects on github (and maybe other hosting providers)
and ask them to migrate to new function names. This is of course will not
fix everything, but it would be a significant chunk. I suspect a lot of
private tools/scripts borrow snippets from github as well.
If they're maintained, then they'll be updated. I don't have any
sympathy if they aren't maintained.
If we really feel that this is the only thing between 9.6 and 10 that'll
cause problems for some serious amount of code and we don't expect to
change the function APIs anytime in the near future then perhaps we
could keep aliases, *document* them, and treat them as full functions
just like the regular ones. Doing that requires a bit of extra
documentation and a few extra entries in pg_proc. If we ever change
them then we'll need to make sure to let people know that they're both
changing, of course, in release notes and anywhere else.
Personally, I'm not excited about keeping these as documented aliases
because, frankly, I don't think it's the only thing that's going to
break for these projects between 9.6 and 10, and if they're being well
maintained then making the change isn't going to be a big deal, but I
won't object to adding them if that's what it takes to make progress
here.
Thanks!
Stephen
On Tue, Jan 3, 2017 at 3:37 PM, Stephen Frost <sfrost@snowman.net> wrote:
If they're maintained, then they'll be updated. I don't have any
sympathy if they aren't maintained.
Updating may be non-trivial effort even if they are maintained. E.g. some
project may need to support both 9.6 and 10.0, and a lot of them written in
a way that makes conditionals on function names non-trivial (e.g. there's
just flat .sql file that is expected to work everywhere).
*document* them, and treat them as full functions just like the regular
ones.
In my next WIP version of the patch (
https://github.com/vrusinov/postgres/tree/rename-xlog) I keep references to
old names in the description for the new names. This makes it
searchable/greppable and does not encourage their usage. Exact format may
change, but I'd certainly not like to treat them exactly like full
functions and I'd like them to be mentioned so it's possible to search.
Overall, I don't feel super-strong either way. Adding aliases does not seem
like a lot of effort or burden and I also see arguments for dropping them
sooner than later. As a compromise I propose keep aliases with hard
deadline for removal in 11.0.
This way we are nicer to people who maintain their tools and read release
notes via giving them more time, and nicer to ourselves via cleaning legacy
stuff relatively soon.
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
* Vladimir Rusinov (vrusinov@google.com) wrote:
On Tue, Jan 3, 2017 at 3:37 PM, Stephen Frost <sfrost@snowman.net> wrote:
If they're maintained, then they'll be updated. I don't have any
sympathy if they aren't maintained.
Updating may be non-trivial effort even if they are maintained. E.g. some
project may need to support both 9.6 and 10.0, and a lot of them written in
a way that makes conditionals on function names non-trivial (e.g. there's
just flat .sql file that is expected to work everywhere).
I don't think we should be concerned with that. Anything but the
simplest SQL scripts have a good chance of being broken across major
version upgrades, *especially* ones that are using admin functions,
which we change on a regular basis for various reasons.
*document* them, and treat them as full functions just like the regular
ones.
In my next WIP version of the patch (
https://github.com/vrusinov/postgres/tree/rename-xlog) I keep references to
old names in the description for the new names. This makes it
searchable/greppable and does not encourage their usage. Exact format may
change, but I'd certainly not like to treat them exactly like full
functions and I'd like them to be mentioned so it's possible to search.
My point is that we need to document them and make sure to mention them
whenever we change anything about them (release notes, etc), exactly to
make sure that someone reading the release notes will know what to
search their code for.
Overall, I don't feel super-strong either way. Adding aliases does not seem
like a lot of effort or burden and I also see arguments for dropping them
sooner than later. As a compromise I propose keep aliases with hard
deadline for removal in 11.0.
Ugh, no, I don't want to have this argument again next year.
This way we are nicer to people who maintain their tools and read release
notes via giving them more time, and nicer to ourselves via cleaning legacy
stuff relatively soon.
They have plenty of time. If we're going to remove them, then let's
just do it and have a clean break.
Thanks!
Stephen
Hi,
On 2017-01-03 10:37:08 -0500, Stephen Frost wrote:
* Vladimir Rusinov (vrusinov@google.com) wrote:
I think I +1 on this.
I've did a github search on these function names and there is a lot of code
that use them. E.g. there is 8.5k hits for pg_last_xlog_location
<https://github.com/search?q=pg_last_xlog_replay_location&type=Code&utf8=%E2%9C%93>;
a lot of them a forks and copy-pastes, but still, that's quite a lot. Let's
keep the aliases around for couple of versions after which hopefully a lot
of the code will be updated.And there's 12k hits for pg_xlog.
If we do that, we'll just end up with exactly the same question about
removing them and the same amount of code breakage in a few years. I
don't see how that is really helping anyone.
Meh^2. The cost of having pg_xlog was that people lost their
data. Hence their was motivation of changing things. The cost of having
some function aliases is, what, a pg_proc line? If we end up carrying
them forever, so what?
If we really feel that this is the only thing between 9.6 and 10 that'll
cause problems for some serious amount of code and we don't expect to
change the function APIs anytime in the near future then perhaps we
could keep aliases, *document* them, and treat them as full functions
just like the regular ones.
I think we've been far to cavalier lately about unnecessarily breaking
admin and monitoring tools. There's been pg_stat_activity backward
incompat changes in most of the last releases. It's a *PAIN* to develop
monitoring / admin tools that work with a number of releases. It's fine
to cause that pain if there's some considerable benefit (e.g. not
triggering data loss seems like a case for that, as imo is unifying
configuration), but I don't see how that justifying breaking things
gratuitously. Just renaming well known functions for a minor bit of
cleanliness seems not to survive a cost/benefit analysis.
Greetings,
Andres Freund
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 4 January 2017 at 07:32, Andres Freund <andres@anarazel.de> wrote:
I think we've been far to cavalier lately about unnecessarily breaking
admin and monitoring tools.
Just renaming well known functions for a minor bit of
cleanliness seems not to survive a cost/benefit analysis.
+1
This thread is at best a minor cleanup item, yet major work still
remains for 10.0.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Andres,
* Andres Freund (andres@anarazel.de) wrote:
On 2017-01-03 10:37:08 -0500, Stephen Frost wrote:
* Vladimir Rusinov (vrusinov@google.com) wrote:
I think I +1 on this.
I've did a github search on these function names and there is a lot of code
that use them. E.g. there is 8.5k hits for pg_last_xlog_location
<https://github.com/search?q=pg_last_xlog_replay_location&type=Code&utf8=%E2%9C%93>;
a lot of them a forks and copy-pastes, but still, that's quite a lot. Let's
keep the aliases around for couple of versions after which hopefully a lot
of the code will be updated.And there's 12k hits for pg_xlog.
If we do that, we'll just end up with exactly the same question about
removing them and the same amount of code breakage in a few years. I
don't see how that is really helping anyone.Meh^2. The cost of having pg_xlog was that people lost their
data. Hence their was motivation of changing things. The cost of having
some function aliases is, what, a pg_proc line? If we end up carrying
them forever, so what?
I outlined exactly that in the part you didn't quote.
If we really feel that this is the only thing between 9.6 and 10 that'll
cause problems for some serious amount of code and we don't expect to
change the function APIs anytime in the near future then perhaps we
could keep aliases, *document* them, and treat them as full functions
just like the regular ones.I think we've been far to cavalier lately about unnecessarily breaking
admin and monitoring tools. There's been pg_stat_activity backward
incompat changes in most of the last releases. It's a *PAIN* to develop
monitoring / admin tools that work with a number of releases. It's fine
to cause that pain if there's some considerable benefit (e.g. not
triggering data loss seems like a case for that, as imo is unifying
configuration), but I don't see how that justifying breaking things
gratuitously. Just renaming well known functions for a minor bit of
cleanliness seems not to survive a cost/benefit analysis.
I agree that we have been breaking monitoring tools on the regular for a
while as we continue to add capabilities and improve things, which is
part of the reason that I don't see this particular break as a very big
deal- serious monitoring tools are going to need to be updated anyway.
I don't see that changing any time soon either- we are woefully far
behind in this area compared to other databases and we should be trying
to encourage people to continue improving these areas, not making things
unnecessairly difficult by requiring backwards compatibility hacks.
As I said in what you did quote above- I won't complain if someone wants
the aliases and we include them in the documentation, but I don't agree
with the other suggestions of having undocumented aliases or not making
the change.
Thanks!
Stephen
Stephen Frost <sfrost@snowman.net> writes:
As I said in what you did quote above- I won't complain if someone wants
the aliases and we include them in the documentation, but I don't agree
with the other suggestions of having undocumented aliases or not making
the change.
FWIW, that position makes sense to me as well. If we keep aliases,
let's just reconcile ourselves to the probability that they'll be there
indefinitely. It's not that big a deal, and the other proposals are
bigger warts than having an alias.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Attaching a patch that renames all 'xlog' functions, keeping aliases for
old ones (since it looks like majority vote is for keeping them).
Following functions have been renamed:
Name | Replaced by
--------------------------------|-------------------------------
pg_current_xlog_flush_location | pg_current_wal_flush_location
pg_current_xlog_insert_location | pg_current_wal_insert_location
pg_current_xlog_location | pg_current_wal_location
pg_is_xlog_replay_paused | pg_is_recovery_paused
pg_last_xlog_receive_location | pg_last_wal_receive_location
pg_last_xlog_replay_location | pg_last_wal_replay_location
pg_switch_xlog | pg_switch_wal
pg_xlog_location_diff | pg_wal_location_diff
pg_xlog_replay_pause | pg_pause_recovery
pg_xlog_replay_resume | pg_resume_recovery
pg_xlogfile_name | pg_wal_file_name
pg_xlogfile_name_offset | pg_wal_file_name_offset
Questions/possible follow-up work:
- OIDs - where do I get numbers from? I was kinda choosing them at random,
unaware if there is some process for keeping track of them. Please point me
if such thing exists and I'll change them.
- Documentation. I've added a new section with a simple table, keeping it
somewhat neglected on purpose. We'll have old names in index and searchable
on page, but nothing more. Is it sufficient?
- New function names. I've used 'recovery' instead of 'xlog_replay' and
used 'wal_file' instead of 'xlogfile'. Does it make sense?
- Release notes. I was unable to find a draft for 10.0. How do I make sure
these renames are not forgotten?
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
0001-Remove-xlog-references-from-admin-functions.patchtext/x-patch; charset=US-ASCII; name=0001-Remove-xlog-references-from-admin-functions.patchDownload
From f7353e84a48eb6857a3f3acf6b6fe76675e11587 Mon Sep 17 00:00:00 2001
From: Vladimir Rusinov <vrusinov@google.com>
Date: Tue, 3 Jan 2017 12:17:26 +0000
Subject: [PATCH 1/1] Remove 'xlog' references from admin functions.
After 'pg_xlog' has been renamed to 'pg_wal' 'xlog' reference in function names is confusing.
This change renames 'xlog' in function names to 'wal', keeping old
function names as aliases.
Following functions have been renamed:
Name | Replaced by
--------------------------------|-------------------------------
pg_current_xlog_flush_location | pg_current_wal_flush_location
pg_current_xlog_insert_location | pg_current_wal_insert_location
pg_current_xlog_location | pg_current_wal_location
pg_is_xlog_replay_paused | pg_is_recovery_paused
pg_last_xlog_receive_location | pg_last_wal_receive_location
pg_last_xlog_replay_location | pg_last_wal_replay_location
pg_switch_xlog | pg_switch_wal
pg_xlog_location_diff | pg_wal_location_diff
pg_xlog_replay_pause | pg_pause_recovery
pg_xlog_replay_resume | pg_resume_recovery
pg_xlogfile_name | pg_wal_file_name
pg_xlogfile_name_offset | pg_wal_file_name_offset
Signed-off-by: Vladimir Rusinov <vrusinov@google.com>
---
contrib/bloom/t/001_wal.pl | 2 +-
contrib/test_decoding/expected/ddl.out | 2 +-
contrib/test_decoding/sql/ddl.sql | 2 +-
doc/src/sgml/backup.sgml | 6 +-
doc/src/sgml/func.sgml | 225 +++++++++++++++++----
doc/src/sgml/high-availability.sgml | 12 +-
doc/src/sgml/recovery-config.sgml | 2 +-
src/backend/access/transam/recovery.conf.sample | 7 +-
src/backend/access/transam/xlog.c | 2 +-
src/backend/access/transam/xlogfuncs.c | 43 ++--
src/backend/catalog/system_views.sql | 3 +
src/backend/po/de.po | 12 +-
src/backend/po/es.po | 12 +-
src/backend/po/fr.po | 12 +-
src/backend/po/id.po | 12 +-
src/backend/po/it.po | 12 +-
src/backend/po/ja.po | 12 +-
src/backend/po/pl.po | 12 +-
src/backend/po/pt_BR.po | 12 +-
src/backend/po/ru.po | 12 +-
src/backend/po/zh_CN.po | 12 +-
src/bin/pg_rewind/RewindTest.pm | 2 +-
src/bin/pg_rewind/libpq_fetch.c | 4 +-
src/include/access/xlog_fn.h | 24 +--
src/include/catalog/pg_proc.h | 92 ++++++---
src/test/modules/commit_ts/t/002_standby.pl | 8 +-
src/test/modules/commit_ts/t/003_standby_2.pl | 4 +-
src/test/recovery/t/002_archiving.pl | 6 +-
src/test/recovery/t/003_recovery_targets.pl | 16 +-
src/test/recovery/t/005_replay_delay.pl | 4 +-
src/test/recovery/t/008_fsm_truncation.pl | 4 +-
src/test/regress/expected/hs_standby_functions.out | 2 +-
src/test/regress/sql/hs_primary_extremes.sql | 2 +-
src/test/regress/sql/hs_primary_setup.sql | 2 +-
src/test/regress/sql/hs_standby_functions.sql | 2 +-
35 files changed, 391 insertions(+), 207 deletions(-)
diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl
index 56c6618d3d..dc907baf87 100644
--- a/contrib/bloom/t/001_wal.pl
+++ b/contrib/bloom/t/001_wal.pl
@@ -16,7 +16,7 @@ sub test_index_replay
# Wait for standby to catch up
my $applname = $node_standby->name;
my $caughtup_query =
-"SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
+"SELECT pg_current_wal_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
$node_master->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby 1 to catch up";
diff --git a/contrib/test_decoding/expected/ddl.out b/contrib/test_decoding/expected/ddl.out
index c104c4802d..275c84a450 100644
--- a/contrib/test_decoding/expected/ddl.out
+++ b/contrib/test_decoding/expected/ddl.out
@@ -58,7 +58,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
slot_name | plugin | slot_type | active | catalog_xmin_set | data_xmin_not_set | some_wal
-----------------+---------------+-----------+--------+------------------+-------------------+----------
diff --git a/contrib/test_decoding/sql/ddl.sql b/contrib/test_decoding/sql/ddl.sql
index 89b8b8f780..49dad39b50 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -29,7 +29,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
/*
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 6eaed1efbe..e37f101277 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -726,9 +726,9 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0
<para>
Also, you can force a segment switch manually with
- <function>pg_switch_xlog</> if you want to ensure that a
- just-finished transaction is archived as soon as possible. Other utility
- functions related to WAL management are listed in <xref
+ <function>pg_switch_wal</> if you want to ensure that a just-finished
+ transaction is archived as soon as possible. Other utility functions
+ related to WAL management are listed in <xref
linkend="functions-admin-backup-table">.
</para>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 10e31868ba..7a2304da6f 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -17925,13 +17925,13 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_create_restore_point</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_flush_location</primary>
+ <primary>pg_current_wal_flush_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_insert_location</primary>
+ <primary>pg_current_wal_insert_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_location</primary>
+ <primary>pg_current_wal_location</primary>
</indexterm>
<indexterm>
<primary>pg_start_backup</primary>
@@ -17946,24 +17946,25 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_backup_start_time</primary>
</indexterm>
<indexterm>
- <primary>pg_switch_xlog</primary>
+ <primary>pg_switch_wal</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name</primary>
+ <primary>pg_wal_file_name</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name_offset</primary>
+ <primary>pg_wal_file_name_offset</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_location_diff</primary>
+ <primary>pg_wal_location_diff</primary>
</indexterm>
<para>
The functions shown in <xref
linkend="functions-admin-backup-table"> assist in making on-line backups.
These functions cannot be executed during recovery (except
- <function>pg_is_in_backup</function>, <function>pg_backup_start_time</function>
- and <function>pg_xlog_location_diff</function>).
+ <function>pg_is_in_backup</function>,
+ <function>pg_backup_start_time</function> and
+ <function>pg_wal_location_diff</function>).
</para>
<table id="functions-admin-backup-table">
@@ -17984,21 +17985,21 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_flush_location()</function></literal>
+ <literal><function>pg_current_wal_flush_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log flush location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_insert_location()</function></literal>
+ <literal><function>pg_current_wal_insert_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log insert location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_location()</function></literal>
+ <literal><function>pg_current_wal_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log write location</entry>
@@ -18040,28 +18041,28 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_switch_xlog()</function></literal>
+ <literal><function>pg_switch_wal()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Force switch to a new transaction log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</type></entry>
<entry>Convert transaction log location string to file name</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</>, <type>integer</></entry>
<entry>Convert transaction log location string to file name and decimal byte offset within file</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlog_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>numeric</></entry>
<entry>Calculate the difference between two transaction log locations</entry>
@@ -18119,11 +18120,11 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_switch_xlog</> moves to the next transaction log file, allowing the
+ <function>pg_switch_wal</> moves to the next transaction log file, allowing the
current file to be archived (assuming you are using continuous archiving).
The return value is the ending transaction log location + 1 within the just-completed transaction log file.
If there has been no transaction log activity since the last transaction log switch,
- <function>pg_switch_xlog</> does nothing and returns the start location
+ <function>pg_switch_wal</> does nothing and returns the start location
of the transaction log file currently in use.
</para>
@@ -18138,10 +18139,10 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_current_xlog_location</> displays the current transaction log write
+ <function>pg_current_wal_location</> displays the current transaction log write
location in the same format used by the above functions. Similarly,
- <function>pg_current_xlog_insert_location</> displays the current transaction log
- insertion point and <function>pg_current_xlog_flush_location</> displays the
+ <function>pg_current_wal_insert_location</> displays the current transaction log
+ insertion point and <function>pg_current_wal_flush_location</> displays the
current transaction log flush point. The insertion point is the <quote>logical</>
end of the transaction log at any instant, while the write location is the end of
what has actually been written out from the server's internal buffers and flush
@@ -18154,17 +18155,17 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- You can use <function>pg_xlogfile_name_offset</> to extract the
+ You can use <function>pg_wal_file_name_offset</> to extract the
corresponding transaction log file name and byte offset from the results of any of the
above functions. For example:
<programlisting>
-postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
+postgres=# SELECT * FROM pg_wal_file_name_offset(pg_stop_backup());
file_name | file_offset
--------------------------+-------------
00000001000000000000000D | 4039624
(1 row)
</programlisting>
- Similarly, <function>pg_xlogfile_name</> extracts just the transaction log file name.
+ Similarly, <function>pg_wal_file_name</> extracts just the transaction log file name.
When the given transaction log location is exactly at a transaction log file boundary, both
these functions return the name of the preceding transaction log file.
This is usually the desired behavior for managing transaction log archiving
@@ -18173,7 +18174,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</para>
<para>
- <function>pg_xlog_location_diff</> calculates the difference in bytes
+ <function>pg_wal_location_diff</> calculates the difference in bytes
between two transaction log locations. It can be used with
<structname>pg_stat_replication</structname> or some functions shown in
<xref linkend="functions-admin-backup-table"> to get the replication lag.
@@ -18193,10 +18194,10 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<primary>pg_is_in_recovery</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_receive_location</primary>
+ <primary>pg_last_wal_receive_location</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_replay_location</primary>
+ <primary>pg_last_wal_replay_location</primary>
</indexterm>
<indexterm>
<primary>pg_last_xact_replay_timestamp</primary>
@@ -18228,7 +18229,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_receive_location()</function></literal>
+ <literal><function>pg_last_wal_receive_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location received and synced to disk by
@@ -18242,7 +18243,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_replay_location()</function></literal>
+ <literal><function>pg_last_wal_replay_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location replayed during recovery.
@@ -18274,13 +18275,13 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</table>
<indexterm>
- <primary>pg_is_xlog_replay_paused</primary>
+ <primary>pg_is_recovery_paused</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_pause</primary>
+ <primary>pg_pause_recovery</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_resume</primary>
+ <primary>pg_resume_recovery</primary>
</indexterm>
<para>
@@ -18300,7 +18301,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<tbody>
<row>
<entry>
- <literal><function>pg_is_xlog_replay_paused()</function></literal>
+ <literal><function>pg_is_recovery_paused()</function></literal>
</entry>
<entry><type>bool</type></entry>
<entry>True if recovery is paused.
@@ -18308,7 +18309,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_pause()</function></literal>
+ <literal><function>pg_pause_recovery()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Pauses recovery immediately (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -18316,7 +18317,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_resume()</function></literal>
+ <literal><function>pg_resume_recovery()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Restarts recovery if it was paused (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -19670,6 +19671,160 @@ SELECT (pg_stat_file('filename')).modification;
</sect2>
+
+ <sect2 id="functions-admin-deprecated">
+ <title>Deprecated Functions</title>
+
+ <indexterm>
+ <primary>pg_current_xlog_flush_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_current_xlog_insert_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_current_xlog_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_is_xlog_replay_paused</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_last_xlog_receive_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_last_xlog_replay_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_switch_xlog</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_replay_pause</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_location_diff</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_replay_resume</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlogfile_name</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlogfile_name_offset</primary>
+ </indexterm>
+
+ <para>
+ The functions shown in <xref linkend="functions-admin-deprecated-table"> are
+ deprecated and will be removed in a future PostgreSQL release. It is highly
+ recommended to use new function names instead.
+ </para>
+
+ <table id="functions-admin-deprecated-table">
+ <title>Deprecated Administration Functions</title>
+ <tgroup cols="2">
+ <thead><row><entry>Name</entry> <entry>Replaced by</entry></row></thead>
+ <tbody>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_flush_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_flush_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_insert_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_insert_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_is_xlog_replay_paused</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_is_recovery_paused</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_last_xlog_receive_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_last_wal_receive_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_last_xlog_replay_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_last_wal_replay_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_switch_xlog</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_switch_wal</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_location_diff</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_location_diff</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_replay_pause</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_pause_recovery</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_replay_resume</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_resume_recovery</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlogfile_name</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_file_name</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlogfile_name_offset</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_file_name_offset</function></literal>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </sect2>
+
</sect1>
<sect1 id="functions-trigger">
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index a1a9532088..e1c08c6e94 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -853,8 +853,8 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
standby. You can calculate this lag by comparing the current WAL write
location on the primary with the last WAL location received by the
standby. They can be retrieved using
- <function>pg_current_xlog_location</> on the primary and the
- <function>pg_last_xlog_receive_location</> on the standby,
+ <function>pg_current_wal_location</> on the primary and the
+ <function>pg_last_wal_receive_location</> on the standby,
respectively (see <xref linkend="functions-admin-backup-table"> and
<xref linkend="functions-recovery-info-table"> for details).
The last WAL receive location in the standby is also displayed in the
@@ -865,10 +865,10 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
You can retrieve a list of WAL sender processes via the
<link linkend="monitoring-stats-views-table">
<literal>pg_stat_replication</></link> view. Large differences between
- <function>pg_current_xlog_location</> and <literal>sent_location</> field
+ <function>pg_current_wal_location</> and <literal>sent_location</> field
might indicate that the master server is under heavy load, while
differences between <literal>sent_location</> and
- <function>pg_last_xlog_receive_location</> on the standby might indicate
+ <function>pg_last_wal_receive_location</> on the standby might indicate
network delay, or that the standby is under heavy load.
</para>
</sect3>
@@ -1587,7 +1587,7 @@ if (!triggered)
</para>
<para>
- An external program can call the <function>pg_xlogfile_name_offset()</>
+ An external program can call the <function>pg_wal_file_name_offset()</>
function (see <xref linkend="functions-admin">)
to find out the file name and the exact byte offset within it of
the current end of WAL. It can then access the WAL file directly
@@ -2225,7 +2225,7 @@ LOG: database system is ready to accept read only connections
<para>
WAL file control commands will not work during recovery,
- e.g. <function>pg_start_backup</>, <function>pg_switch_xlog</> etc.
+ e.g. <function>pg_start_backup</>, <function>pg_switch_wal</> etc.
</para>
<para>
diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml
index 8c24ae2174..60bf395cfa 100644
--- a/doc/src/sgml/recovery-config.sgml
+++ b/doc/src/sgml/recovery-config.sgml
@@ -321,7 +321,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
to be executed against the database to check if this recovery target
is the most desirable point for recovery.
The paused state can be resumed by
- using <function>pg_xlog_replay_resume()</> (see
+ using <function>pg_resume_recovery()</> (see
<xref linkend="functions-recovery-control-table">), which then
causes recovery to end. If this recovery target is not the
desired stopping point, then shut down the server, change the
diff --git a/src/backend/access/transam/recovery.conf.sample b/src/backend/access/transam/recovery.conf.sample
index 7a16751541..a854e5c51b 100644
--- a/src/backend/access/transam/recovery.conf.sample
+++ b/src/backend/access/transam/recovery.conf.sample
@@ -98,10 +98,9 @@
#
# If recovery_target_action = 'pause', recovery will pause when the
# recovery target is reached. The pause state will continue until
-# pg_xlog_replay_resume() is called. This setting has no effect if
-# no recovery target is set. If hot_standby is not enabled then the
-# server will shutdown instead, though you may request this in
-# any case by specifying 'shutdown'.
+# pg_resume_recovery() is called. This setting has no effect if no recovery
+# target is set. If hot_standby is not enabled then the server will shutdown
+# instead, though you may request this in any case by specifying 'shutdown'.
#
#recovery_target_action = 'pause'
#
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 70edafadff..40b67bdf3f 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5740,7 +5740,7 @@ recoveryPausesHere(void)
ereport(LOG,
(errmsg("recovery has paused"),
- errhint("Execute pg_xlog_replay_resume() to continue.")));
+ errhint("Execute pg_resume_recovery() to continue.")));
while (RecoveryIsPaused())
{
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index 5cafb8b913..b642272ce6 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -277,13 +277,13 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS)
}
/*
- * pg_switch_xlog: switch to next xlog file
+ * pg_switch_wal: switch to next WAL file
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_switch_xlog(PG_FUNCTION_ARGS)
+pg_switch_wal(PG_FUNCTION_ARGS)
{
XLogRecPtr switchpoint;
@@ -349,7 +349,7 @@ pg_create_restore_point(PG_FUNCTION_ARGS)
* to the kernel, but is not necessarily synced to disk.
*/
Datum
-pg_current_xlog_location(PG_FUNCTION_ARGS)
+pg_current_wal_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -370,7 +370,7 @@ pg_current_xlog_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
+pg_current_wal_insert_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -391,7 +391,7 @@ pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
+pg_current_wal_flush_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -413,7 +413,7 @@ pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
* and synced to disk by walreceiver.
*/
Datum
-pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
+pg_last_wal_receive_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -432,7 +432,7 @@ pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
* connections during recovery.
*/
Datum
-pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
+pg_last_wal_replay_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -445,15 +445,15 @@ pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
}
/*
- * Compute an xlog file name and decimal byte offset given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * Compute an WAL file name and decimal byte offset given a WAL location,
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*
* Note that a location exactly at a segment boundary is taken to be in
* the previous segment. This is usually the right thing, since the
* expected usage is to determine which xlog file(s) are ready to archive.
*/
Datum
-pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
+pg_wal_file_name_offset(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
uint32 xrecoff;
@@ -469,7 +469,8 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name_offset() cannot be executed during recovery.")));
+ errhint(
+ "pg_wal_file_name_offset() cannot be executed during recovery.")));
/*
* Construct a tuple descriptor for the result row. This must match this
@@ -512,10 +513,10 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
/*
* Compute an xlog file name given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*/
Datum
-pg_xlogfile_name(PG_FUNCTION_ARGS)
+pg_wal_file_name(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
XLogRecPtr locationpoint = PG_GETARG_LSN(0);
@@ -525,7 +526,7 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name() cannot be executed during recovery.")));
+ errhint("pg_wal_file_name() cannot be executed during recovery.")));
XLByteToPrevSeg(locationpoint, xlogsegno);
XLogFileName(xlogfilename, ThisTimeLineID, xlogsegno);
@@ -534,13 +535,13 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_pause - pause recovery now
+ * pg_pause_recovery - pause recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_pause(PG_FUNCTION_ARGS)
+pg_pause_recovery(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -554,13 +555,13 @@ pg_xlog_replay_pause(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_resume - resume recovery now
+ * pg_resume_recovery - resume recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_resume(PG_FUNCTION_ARGS)
+pg_resume_recovery(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -574,10 +575,10 @@ pg_xlog_replay_resume(PG_FUNCTION_ARGS)
}
/*
- * pg_is_xlog_replay_paused
+ * pg_is_recovery_paused
*/
Datum
-pg_is_xlog_replay_paused(PG_FUNCTION_ARGS)
+pg_is_recovery_paused(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -619,7 +620,7 @@ pg_is_in_recovery(PG_FUNCTION_ARGS)
* Compute the difference in bytes between two WAL locations.
*/
Datum
-pg_xlog_location_diff(PG_FUNCTION_ARGS)
+pg_wal_location_diff(PG_FUNCTION_ARGS)
{
Datum result;
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index 31aade102b..80c51c57c6 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -1050,8 +1050,11 @@ REVOKE EXECUTE ON FUNCTION pg_start_backup(text, boolean, boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup() FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup(boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_create_restore_point(text) FROM public;
+REVOKE EXECUTE ON FUNCTION pg_switch_wal() FROM public;
REVOKE EXECUTE ON FUNCTION pg_switch_xlog() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_pause_recovery() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_pause() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_resume_recovery() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_rotate_logfile() FROM public;
REVOKE EXECUTE ON FUNCTION pg_reload_conf() FROM public;
diff --git a/src/backend/po/de.po b/src/backend/po/de.po
index 9ac21992a9..20fa6a166d 100644
--- a/src/backend/po/de.po
+++ b/src/backend/po/de.po
@@ -2052,8 +2052,8 @@ msgstr "Wiederherstellung wurde pausiert"
#: access/transam/xlog.c:5643
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "F��hren Sie pg_xlog_replay_resume() aus um fortzusetzen."
+msgid "Execute pg_resume_recovery() to continue."
+msgstr "F��hren Sie pg_resume_recovery() aus um fortzusetzen."
#: access/transam/xlog.c:5850
#, c-format
@@ -2789,13 +2789,13 @@ msgstr "Wert zu lang f��r Restore-Punkt (maximal %d Zeichen)"
#: access/transam/xlogfuncs.c:472
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
#: access/transam/xlogfuncs.c:528
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
#: access/transam/xlogfuncs.c:548 access/transam/xlogfuncs.c:568
#: access/transam/xlogfuncs.c:585
diff --git a/src/backend/po/es.po b/src/backend/po/es.po
index 955531c295..46487973a4 100644
--- a/src/backend/po/es.po
+++ b/src/backend/po/es.po
@@ -2120,8 +2120,8 @@ msgstr "la recuperaci��n est�� en pausa"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Ejecute pg_xlog_replay_resume() para continuar."
+msgid "Execute pg_resume_recovery() to continue."
+msgstr "Ejecute pg_resume_recovery() para continuar."
#: access/transam/xlog.c:5852
#, c-format
@@ -2873,13 +2873,13 @@ msgstr "el valor es demasiado largo para un punto de recuperaci��n (m��ximo %d c
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() no puede ejecutarse durante la recuperaci��n."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() no puede ejecutarse durante la recuperaci��n."
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() no puede ejecutarse durante la recuperaci��n."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() no puede ejecutarse durante la recuperaci��n."
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569
#: access/transam/xlogfuncs.c:586
diff --git a/src/backend/po/fr.po b/src/backend/po/fr.po
index af5ee56238..6296ee9ab2 100644
--- a/src/backend/po/fr.po
+++ b/src/backend/po/fr.po
@@ -2039,8 +2039,8 @@ msgstr "restauration en pause"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Ex�cuter pg_xlog_replay_resume() pour continuer."
+msgid "Execute pg_resume_recovery() to continue."
+msgstr "Ex�cuter pg_resume_recovery() pour continuer."
#: access/transam/xlog.c:5852
#, c-format
@@ -2803,13 +2803,13 @@ msgstr "valeur trop longue pour le point de restauration (%d caract
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() ne peut pas �tre ex�cut� lors de la restauration."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() ne peut pas �tre ex�cut� lors de la restauration."
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() ne peut pas �tre ex�cut� lors de la restauration."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() ne peut pas �tre ex�cut� lors de la restauration."
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569 access/transam/xlogfuncs.c:586
#, c-format
diff --git a/src/backend/po/id.po b/src/backend/po/id.po
index d5d484132b..a69c167e27 100644
--- a/src/backend/po/id.po
+++ b/src/backend/po/id.po
@@ -1259,8 +1259,8 @@ msgstr "pemulihan berhenti"
#: access/transam/xlog.c:4669
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Menjalankan pg_xlog_replay_resume() untuk melanjutan."
+msgid "Execute pg_resume_recovery() to continue."
+msgstr "Menjalankan pg_resume_recovery() untuk melanjutan."
#: access/transam/xlog.c:4799
#, c-format
@@ -1911,8 +1911,8 @@ msgstr "nilai terlalu panjang untuk titik pemgembalian point (maksimal %d karakt
#: access/transam/xlogfuncs.c:300
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() tidak dapat dijalankan selama proses pemulihan."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() tidak dapat dijalankan selama proses pemulihan."
#: access/transam/xlogfuncs.c:312 access/transam/xlogfuncs.c:383 access/transam/xlogfuncs.c:540 access/transam/xlogfuncs.c:546
#, c-format
@@ -1921,8 +1921,8 @@ msgstr "tidak dapat menguraikan file log transaksi �� %s ��"
#: access/transam/xlogfuncs.c:374
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() tidak dapat menjalankan selama proses pemulihan."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() tidak dapat menjalankan selama proses pemulihan."
#: access/transam/xlogfuncs.c:402 access/transam/xlogfuncs.c:424 access/transam/xlogfuncs.c:446
#, c-format
diff --git a/src/backend/po/it.po b/src/backend/po/it.po
index 393ed954ae..4d71a6b134 100644
--- a/src/backend/po/it.po
+++ b/src/backend/po/it.po
@@ -2069,8 +2069,8 @@ msgstr "ripristino in pausa"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Esegui pg_xlog_replay_resume() per continuare."
+msgid "Execute pg_resume_recovery() to continue."
+msgstr "Esegui pg_resume_recovery() per continuare."
#: access/transam/xlog.c:5852
#, c-format
@@ -2812,13 +2812,13 @@ msgstr "il valore �� troppo lungo per un punto di ripristino (massimo %d caratte
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() non pu�� essere eseguito durante il recupero."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() non pu�� essere eseguito durante il recupero."
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() non pu�� essere eseguito durante il recupero."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() non pu�� essere eseguito durante il recupero."
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569
#: access/transam/xlogfuncs.c:586
diff --git a/src/backend/po/ja.po b/src/backend/po/ja.po
index 2fa5d48a82..f5e0f79bb4 100644
--- a/src/backend/po/ja.po
+++ b/src/backend/po/ja.po
@@ -1347,8 +1347,8 @@ msgstr "������������������������������������������������"
#: access/transam/xlog.c:5804
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "pg_xlog_replay_resume() ������������������������������������������������"
+msgid "Execute pg_resume_recovery() to continue."
+msgstr "pg_resume_recovery() ������������������������������������������������"
#: access/transam/xlog.c:5934
#, c-format
@@ -2042,8 +2042,8 @@ msgstr "������������������������������������������������������������������ %d
#: access/transam/xlogfuncs.c:290
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "������������������ pg_xlogfile_name_offset() ������������������������"
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "������������������ pg_wal_file_name_offset() ������������������������"
#: access/transam/xlogfuncs.c:302 access/transam/xlogfuncs.c:373
#: access/transam/xlogfuncs.c:530 access/transam/xlogfuncs.c:536
@@ -2053,8 +2053,8 @@ msgstr "������������������������������������\"%s\"������������������������������
#: access/transam/xlogfuncs.c:364
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "������������������ pg_xlogfile_name() ������������������������"
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "������������������ pg_wal_file_name() ������������������������"
#: access/transam/xlogfuncs.c:392 access/transam/xlogfuncs.c:414
#: access/transam/xlogfuncs.c:436
diff --git a/src/backend/po/pl.po b/src/backend/po/pl.po
index 677badf5be..c87384e4dc 100644
--- a/src/backend/po/pl.po
+++ b/src/backend/po/pl.po
@@ -2081,8 +2081,8 @@ msgstr "odzyskiwanie zosta��o wstrzymane"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Wykonaj pg_xlog_replay_resume() by kontynuowa��."
+msgid "Execute pg_resume_recovery() to continue."
+msgstr "Wykonaj pg_resume_recovery() by kontynuowa��."
#: access/transam/xlog.c:5852
#, c-format
@@ -2834,13 +2834,13 @@ msgstr "warto���� zbyt d��uga punktu przywr��cenia (maksimum %d znak��w)"
#: access/transam/xlogfuncs.c:472
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() nie mo��e by�� uruchomiony podczas trwania odzyskiwania."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() nie mo��e by�� uruchomiony podczas trwania odzyskiwania."
#: access/transam/xlogfuncs.c:528
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() nie mo��e by�� uruchomiony podczas trwania."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() nie mo��e by�� uruchomiony podczas trwania."
#: access/transam/xlogfuncs.c:548 access/transam/xlogfuncs.c:568
#: access/transam/xlogfuncs.c:585
diff --git a/src/backend/po/pt_BR.po b/src/backend/po/pt_BR.po
index 37e4a28f07..17717c78a5 100644
--- a/src/backend/po/pt_BR.po
+++ b/src/backend/po/pt_BR.po
@@ -1480,8 +1480,8 @@ msgstr "recupera����o est�� em pausa"
#: access/transam/xlog.c:5699
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Execute pg_xlog_replay_resume() para continuar."
+msgid "Execute pg_resume_recovery() to continue."
+msgstr "Execute pg_resume_recovery() para continuar."
#: access/transam/xlog.c:5914
#, c-format
@@ -2143,13 +2143,13 @@ msgstr "valor �� muito longo para ponto de restaura����o (m��ximo de %d caracter
#: access/transam/xlogfuncs.c:271
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() n��o pode ser executado durante recupera����o."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() n��o pode ser executado durante recupera����o."
#: access/transam/xlogfuncs.c:327
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() n��o pode ser executado durante recupera����o."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() n��o pode ser executado durante recupera����o."
#: access/transam/xlogfuncs.c:344 access/transam/xlogfuncs.c:366
#, c-format
diff --git a/src/backend/po/ru.po b/src/backend/po/ru.po
index 5bd8059a9d..645ddf828d 100644
--- a/src/backend/po/ru.po
+++ b/src/backend/po/ru.po
@@ -2401,8 +2401,8 @@ msgstr "���������������������������� ����������������������������"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "������������������ pg_xlog_replay_resume() ������ ����������������������."
+msgid "Execute pg_resume_recovery() to continue."
+msgstr "������������������ pg_resume_recovery() ������ ����������������������."
#: access/transam/xlog.c:5852
#, c-format
@@ -3265,14 +3265,14 @@ msgstr "���������������� ������ ���������� ���������������������������� ��������
#: access/transam/xlogfuncs.c:472
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
msgstr ""
-"�������������� pg_xlogfile_name_offset() ������������ ���������������� ���� ���������� ����������������������������."
+"�������������� pg_wal_file_name_offset() ������������ ���������������� ���� ���������� ����������������������������."
#: access/transam/xlogfuncs.c:528
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "�������������� pg_xlogfile_name() ������������ ���������������� �� ���������������� ����������������������������."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "�������������� pg_wal_file_name() ������������ ���������������� �� ���������������� ����������������������������."
#: access/transam/xlogfuncs.c:548 access/transam/xlogfuncs.c:568
#: access/transam/xlogfuncs.c:585
diff --git a/src/backend/po/zh_CN.po b/src/backend/po/zh_CN.po
index 1e6934a7a5..e1a61b214d 100644
--- a/src/backend/po/zh_CN.po
+++ b/src/backend/po/zh_CN.po
@@ -2229,8 +2229,8 @@ msgstr "���������������������"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "������ pg_xlog_replay_resume() ���������."
+msgid "Execute pg_resume_recovery() to continue."
+msgstr "������ pg_resume_recovery() ���������."
#: access/transam/xlog.c:5852
#, c-format
@@ -3055,13 +3055,13 @@ msgstr "������������������(������%d���������)"
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "������������������������������pg_xlogfile_name_offset()"
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "������������������������������pg_wal_file_name_offset()"
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "������������������������������pg_xlogfile_name() "
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "������������������������������pg_wal_file_name() "
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569
#: access/transam/xlogfuncs.c:586
diff --git a/src/bin/pg_rewind/RewindTest.pm b/src/bin/pg_rewind/RewindTest.pm
index 1c482617ad..c67212ff7a 100644
--- a/src/bin/pg_rewind/RewindTest.pm
+++ b/src/bin/pg_rewind/RewindTest.pm
@@ -156,7 +156,7 @@ sub promote_standby
# Wait for the standby to receive and write all WAL.
my $wal_received_query =
-"SELECT pg_current_xlog_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
+"SELECT pg_current_wal_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
$node_master->poll_query_until('postgres', $wal_received_query)
or die "Timed out while waiting for standby to receive and write WAL";
diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c
index a903849ee4..d2374201c6 100644
--- a/src/bin/pg_rewind/libpq_fetch.c
+++ b/src/bin/pg_rewind/libpq_fetch.c
@@ -121,7 +121,7 @@ run_simple_query(const char *sql)
}
/*
- * Calls pg_current_xlog_insert_location() function
+ * Calls pg_current_wal_insert_location() function
*/
XLogRecPtr
libpqGetCurrentXlogInsertLocation(void)
@@ -131,7 +131,7 @@ libpqGetCurrentXlogInsertLocation(void)
uint32 lo;
char *val;
- val = run_simple_query("SELECT pg_current_xlog_insert_location()");
+ val = run_simple_query("SELECT pg_current_wal_insert_location()");
if (sscanf(val, "%X/%X", &hi, &lo) != 2)
pg_fatal("unrecognized result \"%s\" for current WAL insert location\n", val);
diff --git a/src/include/access/xlog_fn.h b/src/include/access/xlog_fn.h
index a013d047a2..933de9607e 100644
--- a/src/include/access/xlog_fn.h
+++ b/src/include/access/xlog_fn.h
@@ -16,21 +16,21 @@
extern Datum pg_start_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup_v2(PG_FUNCTION_ARGS);
-extern Datum pg_switch_xlog(PG_FUNCTION_ARGS);
+extern Datum pg_switch_wal(PG_FUNCTION_ARGS);
extern Datum pg_create_restore_point(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_insert_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_flush_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_receive_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_replay_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_insert_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_flush_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_receive_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_replay_location(PG_FUNCTION_ARGS);
extern Datum pg_last_xact_replay_timestamp(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name_offset(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name_offset(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name(PG_FUNCTION_ARGS);
extern Datum pg_is_in_recovery(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_pause(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_resume(PG_FUNCTION_ARGS);
-extern Datum pg_is_xlog_replay_paused(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_location_diff(PG_FUNCTION_ARGS);
+extern Datum pg_pause_recovery(PG_FUNCTION_ARGS);
+extern Datum pg_resume_recovery(PG_FUNCTION_ARGS);
+extern Datum pg_is_recovery_paused(PG_FUNCTION_ARGS);
+extern Datum pg_wal_location_diff(PG_FUNCTION_ARGS);
extern Datum pg_is_in_backup(PG_FUNCTION_ARGS);
extern Datum pg_backup_start_time(PG_FUNCTION_ARGS);
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 37e022dc0d..f32c5ee19c 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -3127,37 +3127,51 @@ DESCR("get OID of current session's temp schema, if any");
DATA(insert OID = 2855 ( pg_is_other_temp_schema PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1 0 16 "26" _null_ _null_ _null_ _null_ _null_ pg_is_other_temp_schema _null_ _null_ _null_ ));
DESCR("is schema another session's temp schema?");
-DATA(insert OID = 2171 ( pg_cancel_backend PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 16 "23" _null_ _null_ _null_ _null_ _null_ pg_cancel_backend _null_ _null_ _null_ ));
+DATA(insert OID = 2171 ( pg_cancel_backend PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 16 "23" _null_ _null_ _null_ _null_ _null_ pg_cancel_backend _null_ _null_ _null_ ));
DESCR("cancel a server process' current query");
-DATA(insert OID = 2096 ( pg_terminate_backend PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 16 "23" _null_ _null_ _null_ _null_ _null_ pg_terminate_backend _null_ _null_ _null_ ));
+DATA(insert OID = 2096 ( pg_terminate_backend PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 16 "23" _null_ _null_ _null_ _null_ _null_ pg_terminate_backend _null_ _null_ _null_ ));
DESCR("terminate a server process");
-DATA(insert OID = 2172 ( pg_start_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v r 3 0 3220 "25 16 16" _null_ _null_ _null_ _null_ _null_ pg_start_backup _null_ _null_ _null_ ));
+DATA(insert OID = 2172 ( pg_start_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v r 3 0 3220 "25 16 16" _null_ _null_ _null_ _null_ _null_ pg_start_backup _null_ _null_ _null_ ));
DESCR("prepare for taking an online backup");
-DATA(insert OID = 2173 ( pg_stop_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_stop_backup _null_ _null_ _null_ ));
+DATA(insert OID = 2173 ( pg_stop_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_stop_backup _null_ _null_ _null_ ));
DESCR("finish taking an online backup");
-DATA(insert OID = 2739 ( pg_stop_backup PGNSP PGUID 12 1 1 0 0 f f f f t t v s 1 0 2249 "16" "{16,3220,25,25}" "{i,o,o,o}" "{exclusive,lsn,labelfile,spcmapfile}" _null_ _null_ pg_stop_backup_v2 _null_ _null_ _null_ ));
+DATA(insert OID = 2739 ( pg_stop_backup PGNSP PGUID 12 1 1 0 0 f f f f t t v s 1 0 2249 "16" "{16,3220,25,25}" "{i,o,o,o}" "{exclusive,lsn,labelfile,spcmapfile}" _null_ _null_ pg_stop_backup_v2 _null_ _null_ _null_ ));
DESCR("finish taking an online backup");
-DATA(insert OID = 3813 ( pg_is_in_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_backup _null_ _null_ _null_ ));
+DATA(insert OID = 3813 ( pg_is_in_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_backup _null_ _null_ _null_ ));
DESCR("true if server is in online backup");
-DATA(insert OID = 3814 ( pg_backup_start_time PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_backup_start_time _null_ _null_ _null_ ));
+DATA(insert OID = 3814 ( pg_backup_start_time PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_backup_start_time _null_ _null_ _null_ ));
DESCR("start time of an online backup");
-DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_xlog _null_ _null_ _null_ ));
-DESCR("switch to new xlog file");
-DATA(insert OID = 3098 ( pg_create_restore_point PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 3220 "25" _null_ _null_ _null_ _null_ _null_ pg_create_restore_point _null_ _null_ _null_ ));
+DATA(insert OID = 3449 ( pg_switch_wal PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("switch to new WAL file");
+DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("historical alias for pg_switch_wal");
+DATA(insert OID = 3098 ( pg_create_restore_point PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 3220 "25" _null_ _null_ _null_ _null_ _null_ pg_create_restore_point _null_ _null_ _null_ ));
DESCR("create a named restore point");
-DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_location _null_ _null_ _null_ ));
-DESCR("current xlog write location");
-DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_insert_location _null_ _null_ _null_ ));
-DESCR("current xlog insert location");
-DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_flush_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_xlogfile_name_offset _null_ _null_ _null_ ));
-DESCR("xlog filename and byte offset, given an xlog location");
-DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_xlogfile_name _null_ _null_ _null_ ));
-DESCR("xlog filename, given an xlog location");
-
-DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_xlog_location_diff _null_ _null_ _null_ ));
-DESCR("difference in bytes, given two xlog locations");
+DATA(insert OID = 3800 ( pg_current_wal_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("current WAL write location");
+DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_xlog_location");
+DATA(insert OID = 3801 ( pg_current_wal_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("current WAL insert location");
+DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_wal_insert_location");
+DATA(insert OID = 6015 ( pg_current_wal_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("current WAL flush location");
+DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_wal_flush_location");
+DATA(insert OID = 3452 ( pg_wal_file_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("WAL filename and byte offset, given an WAL location");
+DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_file_name_offset");
+DATA(insert OID = 3453 ( pg_wal_file_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("WAL filename, given a WAL location");
+DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_file_name");
+
+DATA(insert OID = 3445 ( pg_wal_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("difference in bytes, given two WAL locations");
+DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_location_diff");
DATA(insert OID = 3809 ( pg_export_snapshot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 0 0 25 "" _null_ _null_ _null_ _null_ _null_ pg_export_snapshot _null_ _null_ _null_ ));
DESCR("export a snapshot");
@@ -3165,19 +3179,29 @@ DESCR("export a snapshot");
DATA(insert OID = 3810 ( pg_is_in_recovery PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_recovery _null_ _null_ _null_ ));
DESCR("true if server is in recovery");
-DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_receive_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_replay_location _null_ _null_ _null_ ));
-DESCR("last xlog replay location");
+DATA(insert OID = 3446 ( pg_last_wal_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("current wal flush location");
+DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_last_wal_receive_location");
+DATA(insert OID = 3447 ( pg_last_wal_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("last wal replay location");
+DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_last_wal_replay_location");
DATA(insert OID = 3830 ( pg_last_xact_replay_timestamp PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_last_xact_replay_timestamp _null_ _null_ _null_ ));
DESCR("timestamp of last replay xact");
-DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_pause _null_ _null_ _null_ ));
-DESCR("pause xlog replay");
-DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_resume _null_ _null_ _null_ ));
-DESCR("resume xlog replay, if it was paused");
-DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_xlog_replay_paused _null_ _null_ _null_ ));
-DESCR("true if xlog replay is paused");
+DATA(insert OID = 3450 ( pg_pause_recovery PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_pause_recovery _null_ _null_ _null_ ));
+DESCR("pause WAL replay");
+DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_pause_recovery _null_ _null_ _null_ ));
+DESCR("historical alias for pg_pause_recovery");
+DATA(insert OID = 3451 ( pg_resume_recovery PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_resume_recovery _null_ _null_ _null_ ));
+DESCR("resume WAL replay, if it was paused");
+DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_resume_recovery _null_ _null_ _null_ ));
+DESCR("historical alias for pg_resume_recovery");
+DATA(insert OID = 3448 ( pg_is_recovery_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_recovery_paused _null_ _null_ _null_ ));
+DESCR("true if WAL replay for recovery is paused");
+DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_recovery_paused _null_ _null_ _null_ ));
+DESCR("historical alias for pg_is_recovery_paused");
DATA(insert OID = 2621 ( pg_reload_conf PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_reload_conf _null_ _null_ _null_ ));
DESCR("reload configuration files");
@@ -5345,6 +5369,8 @@ DESCR("pg_controldata recovery state information as a function");
DATA(insert OID = 3444 ( pg_control_init PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2249 "" "{23,23,23,23,23,23,23,23,23,16,16,16,23}" "{o,o,o,o,o,o,o,o,o,o,o,o,o}" "{max_data_alignment,database_block_size,blocks_per_segment,wal_block_size,bytes_per_wal_segment,max_identifier_length,max_index_columns,max_toast_chunk_size,large_object_chunk_size,bigint_timestamps,float4_pass_by_value,float8_pass_by_value,data_page_checksum_version}" _null_ _null_ pg_control_init _null_ _null_ _null_ ));
DESCR("pg_controldata init state information as a function");
+/* Next OID: 6016 */
+
/*
* Symbolic values for provolatile column: these indicate whether the result
* of a function is dependent *only* on the values of its explicit arguments,
diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl
index 4dbde2978e..3d43b3577c 100644
--- a/src/test/modules/commit_ts/t/002_standby.pl
+++ b/src/test/modules/commit_ts/t/002_standby.pl
@@ -32,9 +32,9 @@ my $master_ts = $master->safe_psql('postgres',
qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'}
);
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
my $standby_ts = $standby->safe_psql('postgres',
@@ -46,9 +46,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
$master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl
index d37ff182c4..8d4e438989 100644
--- a/src/test/modules/commit_ts/t/003_standby_2.pl
+++ b/src/test/modules/commit_ts/t/003_standby_2.pl
@@ -31,9 +31,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/recovery/t/002_archiving.pl b/src/test/recovery/t/002_archiving.pl
index fc2bf7ee1d..83b43bf84d 100644
--- a/src/test/recovery/t/002_archiving.pl
+++ b/src/test/recovery/t/002_archiving.pl
@@ -33,10 +33,10 @@ $node_standby->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $current_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Force archiving of WAL file to make it present on master
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Add some more content, it should not be present on standby
$node_master->safe_psql('postgres',
@@ -44,7 +44,7 @@ $node_master->safe_psql('postgres',
# Wait until necessary replay has been done on standby
my $caughtup_query =
- "SELECT '$current_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$current_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl
index a82545bf6f..b7b0caae68 100644
--- a/src/test/recovery/t/003_recovery_targets.pl
+++ b/src/test/recovery/t/003_recovery_targets.pl
@@ -32,7 +32,7 @@ sub test_recovery_standby
# Wait until standby has replayed enough data
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
@@ -57,7 +57,7 @@ $node_master->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $lsn1 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Take backup from which all operations will be run
$node_master->backup('my_backup');
@@ -67,14 +67,14 @@ $node_master->backup('my_backup');
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(1001,2000))");
my $ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), txid_current();");
+ "SELECT pg_current_wal_location(), txid_current();");
my ($lsn2, $recovery_txid) = split /\|/, $ret;
# More data, with recovery target timestamp
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(2001,3000))");
$ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), now();");
+ "SELECT pg_current_wal_location(), now();");
my ($lsn3, $recovery_time) = split /\|/, $ret;
# Even more data, this time with a recovery target name
@@ -82,22 +82,22 @@ $node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(3001,4000))");
my $recovery_name = "my_target";
my $lsn4 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"SELECT pg_create_restore_point('$recovery_name');");
# And now for a recovery target LSN
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(4001,5000))");
-my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $lsn5 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(5001,6000))");
# Force archiving of WAL file
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Test recovery targets
my @recovery_params = ("recovery_target = 'immediate'");
diff --git a/src/test/recovery/t/005_replay_delay.pl b/src/test/recovery/t/005_replay_delay.pl
index 640295bfa8..cd9e8f5c12 100644
--- a/src/test/recovery/t/005_replay_delay.pl
+++ b/src/test/recovery/t/005_replay_delay.pl
@@ -42,7 +42,7 @@ $node_master->safe_psql('postgres',
# Now wait for replay to complete on standby. We're done waiting when the
# slave has replayed up to the previously saved master LSN.
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $remaining = 90;
while ($remaining-- > 0)
@@ -50,7 +50,7 @@ while ($remaining-- > 0)
# Done waiting?
my $replay_status = $node_standby->safe_psql('postgres',
- "SELECT (pg_last_xlog_replay_location() - '$until_lsn'::pg_lsn) >= 0"
+ "SELECT (pg_last_wal_replay_location() - '$until_lsn'::pg_lsn) >= 0"
);
last if $replay_status eq 't';
diff --git a/src/test/recovery/t/008_fsm_truncation.pl b/src/test/recovery/t/008_fsm_truncation.pl
index 9f6bdb0b64..4419fc258c 100644
--- a/src/test/recovery/t/008_fsm_truncation.pl
+++ b/src/test/recovery/t/008_fsm_truncation.pl
@@ -69,11 +69,11 @@ vacuum verbose testtab;
$node_master->psql('postgres', 'checkpoint');
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Wait long enough for standby to receive and apply all WAL
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/regress/expected/hs_standby_functions.out b/src/test/regress/expected/hs_standby_functions.out
index 16d50a8285..e0af677ea1 100644
--- a/src/test/regress/expected/hs_standby_functions.out
+++ b/src/test/regress/expected/hs_standby_functions.out
@@ -15,7 +15,7 @@ select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
-select pg_switch_xlog();
+select pg_switch_wal();
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
select pg_stop_backup();
diff --git a/src/test/regress/sql/hs_primary_extremes.sql b/src/test/regress/sql/hs_primary_extremes.sql
index 629efb4be5..2051e2e5cf 100644
--- a/src/test/regress/sql/hs_primary_extremes.sql
+++ b/src/test/regress/sql/hs_primary_extremes.sql
@@ -70,4 +70,4 @@ SELECT count(*) > 257 FROM pg_locks;
COMMIT;
SELECT hs_locks_drop(257);
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_primary_setup.sql b/src/test/regress/sql/hs_primary_setup.sql
index a00b367cbc..eeb4421307 100644
--- a/src/test/regress/sql/hs_primary_setup.sql
+++ b/src/test/regress/sql/hs_primary_setup.sql
@@ -22,4 +22,4 @@ insert into hs3 values (115);
DROP sequence if exists hsseq;
create sequence hsseq;
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_standby_functions.sql b/src/test/regress/sql/hs_standby_functions.sql
index 7577045f11..251bac0a43 100644
--- a/src/test/regress/sql/hs_standby_functions.sql
+++ b/src/test/regress/sql/hs_standby_functions.sql
@@ -10,7 +10,7 @@ select txid_current();
select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
-select pg_switch_xlog();
+select pg_switch_wal();
select pg_stop_backup();
-- should return no rows
--
2.11.0.390.gc69c2f50cf-goog
On 2017-01-04 09:38:42 -0500, Stephen Frost wrote:
Andres,
* Andres Freund (andres@anarazel.de) wrote:
On 2017-01-03 10:37:08 -0500, Stephen Frost wrote:
* Vladimir Rusinov (vrusinov@google.com) wrote:
I think I +1 on this.
I've did a github search on these function names and there is a lot of code
that use them. E.g. there is 8.5k hits for pg_last_xlog_location
<https://github.com/search?q=pg_last_xlog_replay_location&type=Code&utf8=%E2%9C%93>;
a lot of them a forks and copy-pastes, but still, that's quite a lot. Let's
keep the aliases around for couple of versions after which hopefully a lot
of the code will be updated.And there's 12k hits for pg_xlog.
If we do that, we'll just end up with exactly the same question about
removing them and the same amount of code breakage in a few years. I
don't see how that is really helping anyone.Meh^2. The cost of having pg_xlog was that people lost their
data. Hence their was motivation of changing things. The cost of having
some function aliases is, what, a pg_proc line? If we end up carrying
them forever, so what?I outlined exactly that in the part you didn't quote.
Sure, but my point was that you and several others essentially argue for
breaking things gratuitously. And I think that's bad. That you can live
with backward compatibility doesn't change that point.
If we really feel that this is the only thing between 9.6 and 10 that'll
cause problems for some serious amount of code and we don't expect to
change the function APIs anytime in the near future then perhaps we
could keep aliases, *document* them, and treat them as full functions
just like the regular ones.I think we've been far to cavalier lately about unnecessarily breaking
admin and monitoring tools. There's been pg_stat_activity backward
incompat changes in most of the last releases. It's a *PAIN* to develop
monitoring / admin tools that work with a number of releases. It's fine
to cause that pain if there's some considerable benefit (e.g. not
triggering data loss seems like a case for that, as imo is unifying
configuration), but I don't see how that justifying breaking things
gratuitously. Just renaming well known functions for a minor bit of
cleanliness seems not to survive a cost/benefit analysis.I agree that we have been breaking monitoring tools on the regular for a
while as we continue to add capabilities and improve things, which is
part of the reason that I don't see this particular break as a very big
deal- serious monitoring tools are going to need to be updated anyway.
I have no problem with breaking things when necessary. I do have a
problem when we do so willy-nilly when providing backward-compatibility
would have been easy enough. E.g. Nearly all recent pg_stat_activity
changes would have been doable just as well without breakage.
I don't see that changing any time soon either- we are woefully far
behind in this area compared to other databases and we should be trying
to encourage people to continue improving these areas, not making things
unnecessairly difficult by requiring backwards compatibility hacks.
By breaking stuff on a regular basis we're also showing that we're
behind. Compatibility also is a big topic. We also force users to stay
behind longer, and to upgrade less frequently.
Andres
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Andres,
* Andres Freund (andres@anarazel.de) wrote:
On 2017-01-04 09:38:42 -0500, Stephen Frost wrote:
* Andres Freund (andres@anarazel.de) wrote:
On 2017-01-03 10:37:08 -0500, Stephen Frost wrote:
* Vladimir Rusinov (vrusinov@google.com) wrote:
I think I +1 on this.
I've did a github search on these function names and there is a lot of code
that use them. E.g. there is 8.5k hits for pg_last_xlog_location
<https://github.com/search?q=pg_last_xlog_replay_location&type=Code&utf8=%E2%9C%93>;
a lot of them a forks and copy-pastes, but still, that's quite a lot. Let's
keep the aliases around for couple of versions after which hopefully a lot
of the code will be updated.And there's 12k hits for pg_xlog.
If we do that, we'll just end up with exactly the same question about
removing them and the same amount of code breakage in a few years. I
don't see how that is really helping anyone.Meh^2. The cost of having pg_xlog was that people lost their
data. Hence their was motivation of changing things. The cost of having
some function aliases is, what, a pg_proc line? If we end up carrying
them forever, so what?I outlined exactly that in the part you didn't quote.
Sure, but my point was that you and several others essentially argue for
breaking things gratuitously. And I think that's bad. That you can live
with backward compatibility doesn't change that point.
I do not agree that we are arguing for breaking things gratuitously.
That's saying that there's no justification for such a change and I
think that's wrong- the prior names were driven off the directory name
and were, really, not well suited to what the functions were actually
for. This change is to align the functions with the agreed-upon
directory name change and because the new name is distinctly more
accurate than the prior name. As discussed previously, the term
'transaction log' is more closely related to what *clog* is than the
write-ahead log.
My feeling is that people who are arguing for the aliases are doing so
from a position of "it's easy for us to do, so we should," which I am
generally not in favor of when it comes to backwards compatibility
because it leaves things in an inconsistent state. Tools which monitor
the progression of our write-ahead-log (wal) from the primary to stanbys
will end up using a function that has "xlog" in the name, even though
that's an inconsistent and less than accurate name for what they're
actually doing, simply because "well, that part didn't break, so we
don't have to change it, even though these other things had to be
changed to refer to 'wal'". That, in my opinion, isn't the right
compromise to be making.
If we really feel that this is the only thing between 9.6 and 10 that'll
cause problems for some serious amount of code and we don't expect to
change the function APIs anytime in the near future then perhaps we
could keep aliases, *document* them, and treat them as full functions
just like the regular ones.I think we've been far to cavalier lately about unnecessarily breaking
admin and monitoring tools. There's been pg_stat_activity backward
incompat changes in most of the last releases. It's a *PAIN* to develop
monitoring / admin tools that work with a number of releases. It's fine
to cause that pain if there's some considerable benefit (e.g. not
triggering data loss seems like a case for that, as imo is unifying
configuration), but I don't see how that justifying breaking things
gratuitously. Just renaming well known functions for a minor bit of
cleanliness seems not to survive a cost/benefit analysis.I agree that we have been breaking monitoring tools on the regular for a
while as we continue to add capabilities and improve things, which is
part of the reason that I don't see this particular break as a very big
deal- serious monitoring tools are going to need to be updated anyway.I have no problem with breaking things when necessary. I do have a
problem when we do so willy-nilly when providing backward-compatibility
would have been easy enough. E.g. Nearly all recent pg_stat_activity
changes would have been doable just as well without breakage.
Would those changes have resulted in an inconsistent and difficult
system to understand and follow? For pg_stat_activity, frankly, I don't
recall offhand which probably means they weren't a very big deal for me.
Changes to anything related to the 'pg_xlog' directory or the set of
functions that pgbackrest or our tools care about are a lot closer to me
and changes there represent serious time that I'll need to ask David and
Jeff to spend on updating pgbackrest and our tooling for, yet I've had
no push-back from them on this because there is general agreement that
this is a good change to be making.
I don't see that changing any time soon either- we are woefully far
behind in this area compared to other databases and we should be trying
to encourage people to continue improving these areas, not making things
unnecessairly difficult by requiring backwards compatibility hacks.By breaking stuff on a regular basis we're also showing that we're
behind. Compatibility also is a big topic. We also force users to stay
behind longer, and to upgrade less frequently.
I don't mind showing that we're behind, it's a fact and anyone who cares
to will found that out quickly enough. I do object to putting up
roadblocks or making it more difficult than necessary to making
progress.
I have a pretty hard time believing that users are going to seriously
stay on older versions for very much longer just because of these
changes. Either they have a strong interest in the new features in
later releases and have cause to upgrade, in which case updating a few
function calls isn't going to be a big deal, or they don't have much
cause to change and therefore they're not going to rush to do so (which
is an entirly acceptable position!).
Lastly, if they have an issue with the tooling around the database that
uses these functions or they have an issue with the maintenance
requirements associated with such relativly mundane changes, that they
instead use tools which are well maintained and are updated consistently
with the changes being made.
Thanks!
Stephen
On Fri, Jan 6, 2017 at 1:31 AM, Vladimir Rusinov <vrusinov@google.com> wrote:
Attaching a patch that renames all 'xlog' functions, keeping aliases for old
ones (since it looks like majority vote is for keeping them).
OK.
- OIDs - where do I get numbers from? I was kinda choosing them at random,
unaware if there is some process for keeping track of them. Please point me
if such thing exists and I'll change them.
You can use src/include/catalog/unused_oids to look at the OIDs not
yet assigned. Assigning them logically increasing may be a good idea.
But OID ordering is not that mandatory for the internal functions and
operators.
- Documentation. I've added a new section with a simple table, keeping it
somewhat neglected on purpose. We'll have old names in index and searchable
on page, but nothing more. Is it sufficient?
I find quite clear what you have produced here. The table states
clearly the one-one mapping between the old and new entries.
- New function names. I've used 'recovery' instead of 'xlog_replay'
I would not have touched this one. But if we go this way, let's
bike-shed and use pg_recovery_ as prefix for consistency.
and used 'wal_file' instead of 'xlogfile'. Does it make sense?
This one yes.
For simplicity I would just have done a s/xlog/wal/ and keep the names
consistent a maximum with the old ones. But I am just working here.
You clearly put thoughts in the new names.
- Release notes. I was unable to find a draft for 10.0. How do I make sure
these renames are not forgotten?
That's part of the job of the release note writer, very likely Tom or
Bruce. The commit message should be explicit enough that the writer
does not have to dig into the code itself for the changes.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Wed, Jan 4, 2017 at 09:38:42AM -0500, Stephen Frost wrote:
I think we've been far to cavalier lately about unnecessarily breaking
admin and monitoring tools. There's been pg_stat_activity backward
incompat changes in most of the last releases. It's a *PAIN* to develop
monitoring / admin tools that work with a number of releases. It's fine
to cause that pain if there's some considerable benefit (e.g. not
triggering data loss seems like a case for that, as imo is unifying
configuration), but I don't see how that justifying breaking things
gratuitously. Just renaming well known functions for a minor bit of
cleanliness seems not to survive a cost/benefit analysis.I agree that we have been breaking monitoring tools on the regular for a
while as we continue to add capabilities and improve things, which is
part of the reason that I don't see this particular break as a very big
deal- serious monitoring tools are going to need to be updated anyway.I don't see that changing any time soon either- we are woefully far
behind in this area compared to other databases and we should be trying
to encourage people to continue improving these areas, not making things
unnecessairly difficult by requiring backwards compatibility hacks.
I agree. I know these changes are painful, and I will take
responsibility for perhaps the most cavalier breakage of
pg_stat_statements in renaming column procpid to pid. (I still stand
behind that change.)
As painful as these breakages are *at* the time of the breakage,
long-term, it keeps our user API clean. Frankly, because changes are
reviewed by so many people, we don't normally make dumb API mistakes
that require changes --- rather new features or complex interactions
require user API changes. We often feel we have too many users to make
the change, but every few years we double our user base and all those
new users see a nice clean API that previous users had to adjust to.
If we don't make changes like this, our API becomes nonintuitive very
quickly, and let's face it, we expose a lot of internal interfaces to
our users, so clarity is extra important.
I don't think anyone is arguing that these API breakages are cost-free,
but I think long-term, the costs are minor compared to the clean API we
provide to users.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/6/17 7:21 PM, Bruce Momjian wrote:
I don't think anyone is arguing that these API breakages are cost-free,
but I think long-term, the costs are minor compared to the clean API we
provide to users.
Except in this case we can provide a clean new API without gratuitously
breaking the old one.
I absolutely do agree that we have to have a way of making incompatible
changes from time to time (as I've been arguing over and over in the
plpgsql2 thread). I also think a one-size-fits-all approach to when a
break is allowed would be good. That said, the change to
pg_stat_activity caused a lot of needless user pain, and this one will
as well.
What makes this even more frustrating (to me at least) is that the
attitude that's been demonstrated around plpgsql is that there can
absolutely NEVER be a compatibility break of any kind.
So part of the project thinks it's perfectly OK to just break things
without any warning or support, while another part of the project
adamantly refuses any kind of a break at all, even what's breaking has
never officially been supported.
I don't think that dichotomy is good for the community or for our users.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Fri, Jan 6, 2017 at 12:44 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:
- OIDs - where do I get numbers from? I was kinda choosing them at
random,
unaware if there is some process for keeping track of them. Please point
me
if such thing exists and I'll change them.
You can use src/include/catalog/unused_oids to look at the OIDs not
yet assigned. Assigning them logically increasing may be a good idea.
But OID ordering is not that mandatory for the internal functions and
operators.
Thanks, that's useful tip.
Looks like I am fine, although I could have reused some lower numbers.
- New function names. I've used 'recovery' instead of 'xlog_replay'
I would not have touched this one. But if we go this way, let's
bike-shed and use pg_recovery_ as prefix for consistency.
Makes sense, renamed those to wal_replay.
- Release notes. I was unable to find a draft for 10.0. How do I make
sure
these renames are not forgotten?
That's part of the job of the release note writer, very likely Tom or
Bruce. The commit message should be explicit enough that the writer
does not have to dig into the code itself for the changes.
I see. Attached patch is just a output of 'git diff master' and does not
contain message since I've messed up squashing, but here's the commit
message I intended to use (feel free to reuse fully or partially, beware
that I have probably messed up grammar, so somebody who actually knows
English should review):
Remove 'xlog' references from admin functions.
After 'pg_xlog' has been renamed to 'pg_wal' 'xlog' reference in
function names is confusing.
This change renames 'xlog' in function names to 'wal', keeping old
function names as aliases.
Following functions have been renamed:
Name | Replaced by
--------------------------------|-------------------------------
pg_current_xlog_flush_location | pg_current_wal_flush_location
pg_current_xlog_insert_location | pg_current_wal_insert_location
pg_current_xlog_location | pg_current_wal_location
pg_is_xlog_replay_paused | pg_is_recovery_paused
pg_last_xlog_receive_location | pg_last_wal_receive_location
pg_last_xlog_replay_location | pg_last_wal_replay_location
pg_switch_xlog | pg_switch_wal
pg_xlog_location_diff | pg_wal_location_diff
pg_xlog_replay_pause | pg_wal_replay_pause
pg_xlog_replay_resume | pg_wal_replay_resume
pg_xlogfile_name | pg_wal_file_name
pg_xlogfile_name_offset | pg_wal_file_name_offset
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
0002-Remove-xlog-references-from-admin-functions.patchtext/x-patch; charset=US-ASCII; name=0002-Remove-xlog-references-from-admin-functions.patchDownload
diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl
index 56c6618d3d..dc907baf87 100644
--- a/contrib/bloom/t/001_wal.pl
+++ b/contrib/bloom/t/001_wal.pl
@@ -16,7 +16,7 @@ sub test_index_replay
# Wait for standby to catch up
my $applname = $node_standby->name;
my $caughtup_query =
-"SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
+"SELECT pg_current_wal_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
$node_master->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby 1 to catch up";
diff --git a/contrib/test_decoding/expected/ddl.out b/contrib/test_decoding/expected/ddl.out
index c104c4802d..275c84a450 100644
--- a/contrib/test_decoding/expected/ddl.out
+++ b/contrib/test_decoding/expected/ddl.out
@@ -58,7 +58,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
slot_name | plugin | slot_type | active | catalog_xmin_set | data_xmin_not_set | some_wal
-----------------+---------------+-----------+--------+------------------+-------------------+----------
diff --git a/contrib/test_decoding/sql/ddl.sql b/contrib/test_decoding/sql/ddl.sql
index 89b8b8f780..49dad39b50 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -29,7 +29,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
/*
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 6eaed1efbe..e37f101277 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -726,9 +726,9 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0
<para>
Also, you can force a segment switch manually with
- <function>pg_switch_xlog</> if you want to ensure that a
- just-finished transaction is archived as soon as possible. Other utility
- functions related to WAL management are listed in <xref
+ <function>pg_switch_wal</> if you want to ensure that a just-finished
+ transaction is archived as soon as possible. Other utility functions
+ related to WAL management are listed in <xref
linkend="functions-admin-backup-table">.
</para>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 10e31868ba..a5bfb4b306 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -17925,13 +17925,13 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_create_restore_point</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_flush_location</primary>
+ <primary>pg_current_wal_flush_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_insert_location</primary>
+ <primary>pg_current_wal_insert_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_location</primary>
+ <primary>pg_current_wal_location</primary>
</indexterm>
<indexterm>
<primary>pg_start_backup</primary>
@@ -17946,24 +17946,25 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_backup_start_time</primary>
</indexterm>
<indexterm>
- <primary>pg_switch_xlog</primary>
+ <primary>pg_switch_wal</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name</primary>
+ <primary>pg_wal_file_name</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name_offset</primary>
+ <primary>pg_wal_file_name_offset</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_location_diff</primary>
+ <primary>pg_wal_location_diff</primary>
</indexterm>
<para>
The functions shown in <xref
linkend="functions-admin-backup-table"> assist in making on-line backups.
These functions cannot be executed during recovery (except
- <function>pg_is_in_backup</function>, <function>pg_backup_start_time</function>
- and <function>pg_xlog_location_diff</function>).
+ <function>pg_is_in_backup</function>,
+ <function>pg_backup_start_time</function> and
+ <function>pg_wal_location_diff</function>).
</para>
<table id="functions-admin-backup-table">
@@ -17984,21 +17985,21 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_flush_location()</function></literal>
+ <literal><function>pg_current_wal_flush_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log flush location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_insert_location()</function></literal>
+ <literal><function>pg_current_wal_insert_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log insert location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_location()</function></literal>
+ <literal><function>pg_current_wal_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log write location</entry>
@@ -18040,28 +18041,28 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_switch_xlog()</function></literal>
+ <literal><function>pg_switch_wal()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Force switch to a new transaction log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</type></entry>
<entry>Convert transaction log location string to file name</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</>, <type>integer</></entry>
<entry>Convert transaction log location string to file name and decimal byte offset within file</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlog_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>numeric</></entry>
<entry>Calculate the difference between two transaction log locations</entry>
@@ -18119,11 +18120,11 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_switch_xlog</> moves to the next transaction log file, allowing the
+ <function>pg_switch_wal</> moves to the next transaction log file, allowing the
current file to be archived (assuming you are using continuous archiving).
The return value is the ending transaction log location + 1 within the just-completed transaction log file.
If there has been no transaction log activity since the last transaction log switch,
- <function>pg_switch_xlog</> does nothing and returns the start location
+ <function>pg_switch_wal</> does nothing and returns the start location
of the transaction log file currently in use.
</para>
@@ -18138,10 +18139,10 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_current_xlog_location</> displays the current transaction log write
+ <function>pg_current_wal_location</> displays the current transaction log write
location in the same format used by the above functions. Similarly,
- <function>pg_current_xlog_insert_location</> displays the current transaction log
- insertion point and <function>pg_current_xlog_flush_location</> displays the
+ <function>pg_current_wal_insert_location</> displays the current transaction log
+ insertion point and <function>pg_current_wal_flush_location</> displays the
current transaction log flush point. The insertion point is the <quote>logical</>
end of the transaction log at any instant, while the write location is the end of
what has actually been written out from the server's internal buffers and flush
@@ -18154,17 +18155,17 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- You can use <function>pg_xlogfile_name_offset</> to extract the
+ You can use <function>pg_wal_file_name_offset</> to extract the
corresponding transaction log file name and byte offset from the results of any of the
above functions. For example:
<programlisting>
-postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
+postgres=# SELECT * FROM pg_wal_file_name_offset(pg_stop_backup());
file_name | file_offset
--------------------------+-------------
00000001000000000000000D | 4039624
(1 row)
</programlisting>
- Similarly, <function>pg_xlogfile_name</> extracts just the transaction log file name.
+ Similarly, <function>pg_wal_file_name</> extracts just the transaction log file name.
When the given transaction log location is exactly at a transaction log file boundary, both
these functions return the name of the preceding transaction log file.
This is usually the desired behavior for managing transaction log archiving
@@ -18173,7 +18174,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</para>
<para>
- <function>pg_xlog_location_diff</> calculates the difference in bytes
+ <function>pg_wal_location_diff</> calculates the difference in bytes
between two transaction log locations. It can be used with
<structname>pg_stat_replication</structname> or some functions shown in
<xref linkend="functions-admin-backup-table"> to get the replication lag.
@@ -18193,10 +18194,10 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<primary>pg_is_in_recovery</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_receive_location</primary>
+ <primary>pg_last_wal_receive_location</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_replay_location</primary>
+ <primary>pg_last_wal_replay_location</primary>
</indexterm>
<indexterm>
<primary>pg_last_xact_replay_timestamp</primary>
@@ -18228,7 +18229,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_receive_location()</function></literal>
+ <literal><function>pg_last_wal_receive_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location received and synced to disk by
@@ -18242,7 +18243,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_replay_location()</function></literal>
+ <literal><function>pg_last_wal_replay_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location replayed during recovery.
@@ -18274,13 +18275,13 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</table>
<indexterm>
- <primary>pg_is_xlog_replay_paused</primary>
+ <primary>pg_is_recovery_paused</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_pause</primary>
+ <primary>pg_wal_replay_pause</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_resume</primary>
+ <primary>pg_wal_replay_resume</primary>
</indexterm>
<para>
@@ -18300,7 +18301,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<tbody>
<row>
<entry>
- <literal><function>pg_is_xlog_replay_paused()</function></literal>
+ <literal><function>pg_is_recovery_paused()</function></literal>
</entry>
<entry><type>bool</type></entry>
<entry>True if recovery is paused.
@@ -18308,7 +18309,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_pause()</function></literal>
+ <literal><function>pg_wal_replay_pause()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Pauses recovery immediately (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -18316,7 +18317,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_resume()</function></literal>
+ <literal><function>pg_wal_replay_resume()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Restarts recovery if it was paused (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -19670,6 +19671,160 @@ SELECT (pg_stat_file('filename')).modification;
</sect2>
+
+ <sect2 id="functions-admin-deprecated">
+ <title>Deprecated Functions</title>
+
+ <indexterm>
+ <primary>pg_current_xlog_flush_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_current_xlog_insert_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_current_xlog_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_is_xlog_replay_paused</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_last_xlog_receive_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_last_xlog_replay_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_switch_xlog</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_replay_pause</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_location_diff</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_replay_resume</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlogfile_name</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlogfile_name_offset</primary>
+ </indexterm>
+
+ <para>
+ The functions shown in <xref linkend="functions-admin-deprecated-table"> are
+ deprecated and will be removed in a future PostgreSQL release. It is highly
+ recommended to use new function names instead.
+ </para>
+
+ <table id="functions-admin-deprecated-table">
+ <title>Deprecated Administration Functions</title>
+ <tgroup cols="2">
+ <thead><row><entry>Name</entry> <entry>Replaced by</entry></row></thead>
+ <tbody>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_flush_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_flush_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_insert_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_insert_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_is_xlog_replay_paused</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_is_recovery_paused</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_last_xlog_receive_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_last_wal_receive_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_last_xlog_replay_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_last_wal_replay_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_switch_xlog</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_switch_wal</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_location_diff</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_location_diff</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_replay_pause</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_replay_pause</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_replay_resume</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_replay_resume</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlogfile_name</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_file_name</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlogfile_name_offset</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_file_name_offset</function></literal>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </sect2>
+
</sect1>
<sect1 id="functions-trigger">
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index a1a9532088..e1c08c6e94 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -853,8 +853,8 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
standby. You can calculate this lag by comparing the current WAL write
location on the primary with the last WAL location received by the
standby. They can be retrieved using
- <function>pg_current_xlog_location</> on the primary and the
- <function>pg_last_xlog_receive_location</> on the standby,
+ <function>pg_current_wal_location</> on the primary and the
+ <function>pg_last_wal_receive_location</> on the standby,
respectively (see <xref linkend="functions-admin-backup-table"> and
<xref linkend="functions-recovery-info-table"> for details).
The last WAL receive location in the standby is also displayed in the
@@ -865,10 +865,10 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
You can retrieve a list of WAL sender processes via the
<link linkend="monitoring-stats-views-table">
<literal>pg_stat_replication</></link> view. Large differences between
- <function>pg_current_xlog_location</> and <literal>sent_location</> field
+ <function>pg_current_wal_location</> and <literal>sent_location</> field
might indicate that the master server is under heavy load, while
differences between <literal>sent_location</> and
- <function>pg_last_xlog_receive_location</> on the standby might indicate
+ <function>pg_last_wal_receive_location</> on the standby might indicate
network delay, or that the standby is under heavy load.
</para>
</sect3>
@@ -1587,7 +1587,7 @@ if (!triggered)
</para>
<para>
- An external program can call the <function>pg_xlogfile_name_offset()</>
+ An external program can call the <function>pg_wal_file_name_offset()</>
function (see <xref linkend="functions-admin">)
to find out the file name and the exact byte offset within it of
the current end of WAL. It can then access the WAL file directly
@@ -2225,7 +2225,7 @@ LOG: database system is ready to accept read only connections
<para>
WAL file control commands will not work during recovery,
- e.g. <function>pg_start_backup</>, <function>pg_switch_xlog</> etc.
+ e.g. <function>pg_start_backup</>, <function>pg_switch_wal</> etc.
</para>
<para>
diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml
index 8c24ae2174..a91864bf62 100644
--- a/doc/src/sgml/recovery-config.sgml
+++ b/doc/src/sgml/recovery-config.sgml
@@ -321,7 +321,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
to be executed against the database to check if this recovery target
is the most desirable point for recovery.
The paused state can be resumed by
- using <function>pg_xlog_replay_resume()</> (see
+ using <function>pg_wal_replay_resume()</> (see
<xref linkend="functions-recovery-control-table">), which then
causes recovery to end. If this recovery target is not the
desired stopping point, then shut down the server, change the
diff --git a/src/backend/access/transam/recovery.conf.sample b/src/backend/access/transam/recovery.conf.sample
index 7a16751541..ace77df728 100644
--- a/src/backend/access/transam/recovery.conf.sample
+++ b/src/backend/access/transam/recovery.conf.sample
@@ -98,10 +98,9 @@
#
# If recovery_target_action = 'pause', recovery will pause when the
# recovery target is reached. The pause state will continue until
-# pg_xlog_replay_resume() is called. This setting has no effect if
-# no recovery target is set. If hot_standby is not enabled then the
-# server will shutdown instead, though you may request this in
-# any case by specifying 'shutdown'.
+# pg_wal_replay_resume() is called. This setting has no effect if no recovery
+# target is set. If hot_standby is not enabled then the server will shutdown
+# instead, though you may request this in any case by specifying 'shutdown'.
#
#recovery_target_action = 'pause'
#
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 70edafadff..6dd63a945f 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5740,7 +5740,7 @@ recoveryPausesHere(void)
ereport(LOG,
(errmsg("recovery has paused"),
- errhint("Execute pg_xlog_replay_resume() to continue.")));
+ errhint("Execute pg_wal_replay_resume() to continue.")));
while (RecoveryIsPaused())
{
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index 5cafb8b913..9a9b00fd1c 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -277,13 +277,13 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS)
}
/*
- * pg_switch_xlog: switch to next xlog file
+ * pg_switch_wal: switch to next WAL file
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_switch_xlog(PG_FUNCTION_ARGS)
+pg_switch_wal(PG_FUNCTION_ARGS)
{
XLogRecPtr switchpoint;
@@ -349,7 +349,7 @@ pg_create_restore_point(PG_FUNCTION_ARGS)
* to the kernel, but is not necessarily synced to disk.
*/
Datum
-pg_current_xlog_location(PG_FUNCTION_ARGS)
+pg_current_wal_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -370,7 +370,7 @@ pg_current_xlog_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
+pg_current_wal_insert_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -391,7 +391,7 @@ pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
+pg_current_wal_flush_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -413,7 +413,7 @@ pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
* and synced to disk by walreceiver.
*/
Datum
-pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
+pg_last_wal_receive_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -432,7 +432,7 @@ pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
* connections during recovery.
*/
Datum
-pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
+pg_last_wal_replay_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -445,15 +445,15 @@ pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
}
/*
- * Compute an xlog file name and decimal byte offset given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * Compute an WAL file name and decimal byte offset given a WAL location,
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*
* Note that a location exactly at a segment boundary is taken to be in
* the previous segment. This is usually the right thing, since the
* expected usage is to determine which xlog file(s) are ready to archive.
*/
Datum
-pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
+pg_wal_file_name_offset(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
uint32 xrecoff;
@@ -469,7 +469,8 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name_offset() cannot be executed during recovery.")));
+ errhint(
+ "pg_wal_file_name_offset() cannot be executed during recovery.")));
/*
* Construct a tuple descriptor for the result row. This must match this
@@ -512,10 +513,10 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
/*
* Compute an xlog file name given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*/
Datum
-pg_xlogfile_name(PG_FUNCTION_ARGS)
+pg_wal_file_name(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
XLogRecPtr locationpoint = PG_GETARG_LSN(0);
@@ -525,7 +526,7 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name() cannot be executed during recovery.")));
+ errhint("pg_wal_file_name() cannot be executed during recovery.")));
XLByteToPrevSeg(locationpoint, xlogsegno);
XLogFileName(xlogfilename, ThisTimeLineID, xlogsegno);
@@ -534,13 +535,13 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_pause - pause recovery now
+ * pg_wal_replay_pause - pause recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_pause(PG_FUNCTION_ARGS)
+pg_wal_replay_pause(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -554,13 +555,13 @@ pg_xlog_replay_pause(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_resume - resume recovery now
+ * pg_wal_replay_resume - resume recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_resume(PG_FUNCTION_ARGS)
+pg_wal_replay_resume(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -574,10 +575,10 @@ pg_xlog_replay_resume(PG_FUNCTION_ARGS)
}
/*
- * pg_is_xlog_replay_paused
+ * pg_is_recovery_paused
*/
Datum
-pg_is_xlog_replay_paused(PG_FUNCTION_ARGS)
+pg_is_recovery_paused(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -619,7 +620,7 @@ pg_is_in_recovery(PG_FUNCTION_ARGS)
* Compute the difference in bytes between two WAL locations.
*/
Datum
-pg_xlog_location_diff(PG_FUNCTION_ARGS)
+pg_wal_location_diff(PG_FUNCTION_ARGS)
{
Datum result;
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index 31aade102b..93c9d13950 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -1050,8 +1050,11 @@ REVOKE EXECUTE ON FUNCTION pg_start_backup(text, boolean, boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup() FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup(boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_create_restore_point(text) FROM public;
+REVOKE EXECUTE ON FUNCTION pg_switch_wal() FROM public;
REVOKE EXECUTE ON FUNCTION pg_switch_xlog() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_pause() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_pause() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_rotate_logfile() FROM public;
REVOKE EXECUTE ON FUNCTION pg_reload_conf() FROM public;
diff --git a/src/backend/po/de.po b/src/backend/po/de.po
index 9ac21992a9..494d4a33f4 100644
--- a/src/backend/po/de.po
+++ b/src/backend/po/de.po
@@ -2052,8 +2052,8 @@ msgstr "Wiederherstellung wurde pausiert"
#: access/transam/xlog.c:5643
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "F��hren Sie pg_xlog_replay_resume() aus um fortzusetzen."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "F��hren Sie pg_wal_replay_resume() aus um fortzusetzen."
#: access/transam/xlog.c:5850
#, c-format
@@ -2789,13 +2789,13 @@ msgstr "Wert zu lang f��r Restore-Punkt (maximal %d Zeichen)"
#: access/transam/xlogfuncs.c:472
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
#: access/transam/xlogfuncs.c:528
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
#: access/transam/xlogfuncs.c:548 access/transam/xlogfuncs.c:568
#: access/transam/xlogfuncs.c:585
diff --git a/src/backend/po/es.po b/src/backend/po/es.po
index 955531c295..6948c06fc4 100644
--- a/src/backend/po/es.po
+++ b/src/backend/po/es.po
@@ -2120,8 +2120,8 @@ msgstr "la recuperaci��n est�� en pausa"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Ejecute pg_xlog_replay_resume() para continuar."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Ejecute pg_wal_replay_resume() para continuar."
#: access/transam/xlog.c:5852
#, c-format
@@ -2873,13 +2873,13 @@ msgstr "el valor es demasiado largo para un punto de recuperaci��n (m��ximo %d c
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() no puede ejecutarse durante la recuperaci��n."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() no puede ejecutarse durante la recuperaci��n."
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() no puede ejecutarse durante la recuperaci��n."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() no puede ejecutarse durante la recuperaci��n."
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569
#: access/transam/xlogfuncs.c:586
diff --git a/src/backend/po/fr.po b/src/backend/po/fr.po
index af5ee56238..3a59504cac 100644
--- a/src/backend/po/fr.po
+++ b/src/backend/po/fr.po
@@ -2039,8 +2039,8 @@ msgstr "restauration en pause"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Ex�cuter pg_xlog_replay_resume() pour continuer."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Ex�cuter pg_wal_replay_resume() pour continuer."
#: access/transam/xlog.c:5852
#, c-format
@@ -2803,13 +2803,13 @@ msgstr "valeur trop longue pour le point de restauration (%d caract
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() ne peut pas �tre ex�cut� lors de la restauration."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() ne peut pas �tre ex�cut� lors de la restauration."
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() ne peut pas �tre ex�cut� lors de la restauration."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() ne peut pas �tre ex�cut� lors de la restauration."
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569 access/transam/xlogfuncs.c:586
#, c-format
diff --git a/src/backend/po/id.po b/src/backend/po/id.po
index d5d484132b..4e01aa989f 100644
--- a/src/backend/po/id.po
+++ b/src/backend/po/id.po
@@ -1259,8 +1259,8 @@ msgstr "pemulihan berhenti"
#: access/transam/xlog.c:4669
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Menjalankan pg_xlog_replay_resume() untuk melanjutan."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Menjalankan pg_wal_replay_resume() untuk melanjutan."
#: access/transam/xlog.c:4799
#, c-format
@@ -1911,8 +1911,8 @@ msgstr "nilai terlalu panjang untuk titik pemgembalian point (maksimal %d karakt
#: access/transam/xlogfuncs.c:300
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() tidak dapat dijalankan selama proses pemulihan."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() tidak dapat dijalankan selama proses pemulihan."
#: access/transam/xlogfuncs.c:312 access/transam/xlogfuncs.c:383 access/transam/xlogfuncs.c:540 access/transam/xlogfuncs.c:546
#, c-format
@@ -1921,8 +1921,8 @@ msgstr "tidak dapat menguraikan file log transaksi �� %s ��"
#: access/transam/xlogfuncs.c:374
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() tidak dapat menjalankan selama proses pemulihan."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() tidak dapat menjalankan selama proses pemulihan."
#: access/transam/xlogfuncs.c:402 access/transam/xlogfuncs.c:424 access/transam/xlogfuncs.c:446
#, c-format
diff --git a/src/backend/po/it.po b/src/backend/po/it.po
index 393ed954ae..39a8cab4b2 100644
--- a/src/backend/po/it.po
+++ b/src/backend/po/it.po
@@ -2069,8 +2069,8 @@ msgstr "ripristino in pausa"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Esegui pg_xlog_replay_resume() per continuare."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Esegui pg_wal_replay_resume() per continuare."
#: access/transam/xlog.c:5852
#, c-format
@@ -2812,13 +2812,13 @@ msgstr "il valore �� troppo lungo per un punto di ripristino (massimo %d caratte
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() non pu�� essere eseguito durante il recupero."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() non pu�� essere eseguito durante il recupero."
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() non pu�� essere eseguito durante il recupero."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() non pu�� essere eseguito durante il recupero."
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569
#: access/transam/xlogfuncs.c:586
diff --git a/src/backend/po/ja.po b/src/backend/po/ja.po
index 2fa5d48a82..f42b889656 100644
--- a/src/backend/po/ja.po
+++ b/src/backend/po/ja.po
@@ -1347,8 +1347,8 @@ msgstr "������������������������������������������������"
#: access/transam/xlog.c:5804
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "pg_xlog_replay_resume() ������������������������������������������������"
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "pg_wal_replay_resume() ������������������������������������������������"
#: access/transam/xlog.c:5934
#, c-format
@@ -2042,8 +2042,8 @@ msgstr "������������������������������������������������������������������ %d
#: access/transam/xlogfuncs.c:290
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "������������������ pg_xlogfile_name_offset() ������������������������"
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "������������������ pg_wal_file_name_offset() ������������������������"
#: access/transam/xlogfuncs.c:302 access/transam/xlogfuncs.c:373
#: access/transam/xlogfuncs.c:530 access/transam/xlogfuncs.c:536
@@ -2053,8 +2053,8 @@ msgstr "������������������������������������\"%s\"������������������������������
#: access/transam/xlogfuncs.c:364
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "������������������ pg_xlogfile_name() ������������������������"
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "������������������ pg_wal_file_name() ������������������������"
#: access/transam/xlogfuncs.c:392 access/transam/xlogfuncs.c:414
#: access/transam/xlogfuncs.c:436
diff --git a/src/backend/po/pl.po b/src/backend/po/pl.po
index 677badf5be..7c50e80229 100644
--- a/src/backend/po/pl.po
+++ b/src/backend/po/pl.po
@@ -2081,8 +2081,8 @@ msgstr "odzyskiwanie zosta��o wstrzymane"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Wykonaj pg_xlog_replay_resume() by kontynuowa��."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Wykonaj pg_wal_replay_resume() by kontynuowa��."
#: access/transam/xlog.c:5852
#, c-format
@@ -2834,13 +2834,13 @@ msgstr "warto���� zbyt d��uga punktu przywr��cenia (maksimum %d znak��w)"
#: access/transam/xlogfuncs.c:472
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() nie mo��e by�� uruchomiony podczas trwania odzyskiwania."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() nie mo��e by�� uruchomiony podczas trwania odzyskiwania."
#: access/transam/xlogfuncs.c:528
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() nie mo��e by�� uruchomiony podczas trwania."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() nie mo��e by�� uruchomiony podczas trwania."
#: access/transam/xlogfuncs.c:548 access/transam/xlogfuncs.c:568
#: access/transam/xlogfuncs.c:585
diff --git a/src/backend/po/pt_BR.po b/src/backend/po/pt_BR.po
index 37e4a28f07..438c4c2339 100644
--- a/src/backend/po/pt_BR.po
+++ b/src/backend/po/pt_BR.po
@@ -1480,8 +1480,8 @@ msgstr "recupera����o est�� em pausa"
#: access/transam/xlog.c:5699
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Execute pg_xlog_replay_resume() para continuar."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Execute pg_wal_replay_resume() para continuar."
#: access/transam/xlog.c:5914
#, c-format
@@ -2143,13 +2143,13 @@ msgstr "valor �� muito longo para ponto de restaura����o (m��ximo de %d caracter
#: access/transam/xlogfuncs.c:271
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() n��o pode ser executado durante recupera����o."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() n��o pode ser executado durante recupera����o."
#: access/transam/xlogfuncs.c:327
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() n��o pode ser executado durante recupera����o."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() n��o pode ser executado durante recupera����o."
#: access/transam/xlogfuncs.c:344 access/transam/xlogfuncs.c:366
#, c-format
diff --git a/src/backend/po/ru.po b/src/backend/po/ru.po
index 5bd8059a9d..f9d5a4731f 100644
--- a/src/backend/po/ru.po
+++ b/src/backend/po/ru.po
@@ -2401,8 +2401,8 @@ msgstr "���������������������������� ����������������������������"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "������������������ pg_xlog_replay_resume() ������ ����������������������."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "������������������ pg_wal_replay_resume() ������ ����������������������."
#: access/transam/xlog.c:5852
#, c-format
@@ -3265,14 +3265,14 @@ msgstr "���������������� ������ ���������� ���������������������������� ��������
#: access/transam/xlogfuncs.c:472
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
msgstr ""
-"�������������� pg_xlogfile_name_offset() ������������ ���������������� ���� ���������� ����������������������������."
+"�������������� pg_wal_file_name_offset() ������������ ���������������� ���� ���������� ����������������������������."
#: access/transam/xlogfuncs.c:528
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "�������������� pg_xlogfile_name() ������������ ���������������� �� ���������������� ����������������������������."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "�������������� pg_wal_file_name() ������������ ���������������� �� ���������������� ����������������������������."
#: access/transam/xlogfuncs.c:548 access/transam/xlogfuncs.c:568
#: access/transam/xlogfuncs.c:585
diff --git a/src/backend/po/zh_CN.po b/src/backend/po/zh_CN.po
index 1e6934a7a5..7ac1690cb0 100644
--- a/src/backend/po/zh_CN.po
+++ b/src/backend/po/zh_CN.po
@@ -2229,8 +2229,8 @@ msgstr "���������������������"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "������ pg_xlog_replay_resume() ���������."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "������ pg_wal_replay_resume() ���������."
#: access/transam/xlog.c:5852
#, c-format
@@ -3055,13 +3055,13 @@ msgstr "������������������(������%d���������)"
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "������������������������������pg_xlogfile_name_offset()"
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "������������������������������pg_wal_file_name_offset()"
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "������������������������������pg_xlogfile_name() "
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "������������������������������pg_wal_file_name() "
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569
#: access/transam/xlogfuncs.c:586
diff --git a/src/bin/pg_rewind/RewindTest.pm b/src/bin/pg_rewind/RewindTest.pm
index 1c482617ad..c67212ff7a 100644
--- a/src/bin/pg_rewind/RewindTest.pm
+++ b/src/bin/pg_rewind/RewindTest.pm
@@ -156,7 +156,7 @@ sub promote_standby
# Wait for the standby to receive and write all WAL.
my $wal_received_query =
-"SELECT pg_current_xlog_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
+"SELECT pg_current_wal_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
$node_master->poll_query_until('postgres', $wal_received_query)
or die "Timed out while waiting for standby to receive and write WAL";
diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c
index a903849ee4..d2374201c6 100644
--- a/src/bin/pg_rewind/libpq_fetch.c
+++ b/src/bin/pg_rewind/libpq_fetch.c
@@ -121,7 +121,7 @@ run_simple_query(const char *sql)
}
/*
- * Calls pg_current_xlog_insert_location() function
+ * Calls pg_current_wal_insert_location() function
*/
XLogRecPtr
libpqGetCurrentXlogInsertLocation(void)
@@ -131,7 +131,7 @@ libpqGetCurrentXlogInsertLocation(void)
uint32 lo;
char *val;
- val = run_simple_query("SELECT pg_current_xlog_insert_location()");
+ val = run_simple_query("SELECT pg_current_wal_insert_location()");
if (sscanf(val, "%X/%X", &hi, &lo) != 2)
pg_fatal("unrecognized result \"%s\" for current WAL insert location\n", val);
diff --git a/src/include/access/xlog_fn.h b/src/include/access/xlog_fn.h
index a013d047a2..a46b2f995c 100644
--- a/src/include/access/xlog_fn.h
+++ b/src/include/access/xlog_fn.h
@@ -16,21 +16,21 @@
extern Datum pg_start_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup_v2(PG_FUNCTION_ARGS);
-extern Datum pg_switch_xlog(PG_FUNCTION_ARGS);
+extern Datum pg_switch_wal(PG_FUNCTION_ARGS);
extern Datum pg_create_restore_point(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_insert_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_flush_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_receive_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_replay_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_insert_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_flush_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_receive_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_replay_location(PG_FUNCTION_ARGS);
extern Datum pg_last_xact_replay_timestamp(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name_offset(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name_offset(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name(PG_FUNCTION_ARGS);
extern Datum pg_is_in_recovery(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_pause(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_resume(PG_FUNCTION_ARGS);
-extern Datum pg_is_xlog_replay_paused(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_location_diff(PG_FUNCTION_ARGS);
+extern Datum pg_wal_replay_pause(PG_FUNCTION_ARGS);
+extern Datum pg_wal_replay_resume(PG_FUNCTION_ARGS);
+extern Datum pg_is_recovery_paused(PG_FUNCTION_ARGS);
+extern Datum pg_wal_location_diff(PG_FUNCTION_ARGS);
extern Datum pg_is_in_backup(PG_FUNCTION_ARGS);
extern Datum pg_backup_start_time(PG_FUNCTION_ARGS);
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 37e022dc0d..8561fcf291 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -3127,37 +3127,51 @@ DESCR("get OID of current session's temp schema, if any");
DATA(insert OID = 2855 ( pg_is_other_temp_schema PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1 0 16 "26" _null_ _null_ _null_ _null_ _null_ pg_is_other_temp_schema _null_ _null_ _null_ ));
DESCR("is schema another session's temp schema?");
-DATA(insert OID = 2171 ( pg_cancel_backend PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 16 "23" _null_ _null_ _null_ _null_ _null_ pg_cancel_backend _null_ _null_ _null_ ));
+DATA(insert OID = 2171 ( pg_cancel_backend PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 16 "23" _null_ _null_ _null_ _null_ _null_ pg_cancel_backend _null_ _null_ _null_ ));
DESCR("cancel a server process' current query");
-DATA(insert OID = 2096 ( pg_terminate_backend PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 16 "23" _null_ _null_ _null_ _null_ _null_ pg_terminate_backend _null_ _null_ _null_ ));
+DATA(insert OID = 2096 ( pg_terminate_backend PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 16 "23" _null_ _null_ _null_ _null_ _null_ pg_terminate_backend _null_ _null_ _null_ ));
DESCR("terminate a server process");
-DATA(insert OID = 2172 ( pg_start_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v r 3 0 3220 "25 16 16" _null_ _null_ _null_ _null_ _null_ pg_start_backup _null_ _null_ _null_ ));
+DATA(insert OID = 2172 ( pg_start_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v r 3 0 3220 "25 16 16" _null_ _null_ _null_ _null_ _null_ pg_start_backup _null_ _null_ _null_ ));
DESCR("prepare for taking an online backup");
-DATA(insert OID = 2173 ( pg_stop_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_stop_backup _null_ _null_ _null_ ));
+DATA(insert OID = 2173 ( pg_stop_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_stop_backup _null_ _null_ _null_ ));
DESCR("finish taking an online backup");
-DATA(insert OID = 2739 ( pg_stop_backup PGNSP PGUID 12 1 1 0 0 f f f f t t v s 1 0 2249 "16" "{16,3220,25,25}" "{i,o,o,o}" "{exclusive,lsn,labelfile,spcmapfile}" _null_ _null_ pg_stop_backup_v2 _null_ _null_ _null_ ));
+DATA(insert OID = 2739 ( pg_stop_backup PGNSP PGUID 12 1 1 0 0 f f f f t t v s 1 0 2249 "16" "{16,3220,25,25}" "{i,o,o,o}" "{exclusive,lsn,labelfile,spcmapfile}" _null_ _null_ pg_stop_backup_v2 _null_ _null_ _null_ ));
DESCR("finish taking an online backup");
-DATA(insert OID = 3813 ( pg_is_in_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_backup _null_ _null_ _null_ ));
+DATA(insert OID = 3813 ( pg_is_in_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_backup _null_ _null_ _null_ ));
DESCR("true if server is in online backup");
-DATA(insert OID = 3814 ( pg_backup_start_time PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_backup_start_time _null_ _null_ _null_ ));
+DATA(insert OID = 3814 ( pg_backup_start_time PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_backup_start_time _null_ _null_ _null_ ));
DESCR("start time of an online backup");
-DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_xlog _null_ _null_ _null_ ));
-DESCR("switch to new xlog file");
-DATA(insert OID = 3098 ( pg_create_restore_point PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 3220 "25" _null_ _null_ _null_ _null_ _null_ pg_create_restore_point _null_ _null_ _null_ ));
+DATA(insert OID = 3449 ( pg_switch_wal PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("switch to new WAL file");
+DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("historical alias for pg_switch_wal");
+DATA(insert OID = 3098 ( pg_create_restore_point PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 3220 "25" _null_ _null_ _null_ _null_ _null_ pg_create_restore_point _null_ _null_ _null_ ));
DESCR("create a named restore point");
-DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_location _null_ _null_ _null_ ));
-DESCR("current xlog write location");
-DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_insert_location _null_ _null_ _null_ ));
-DESCR("current xlog insert location");
-DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_flush_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_xlogfile_name_offset _null_ _null_ _null_ ));
-DESCR("xlog filename and byte offset, given an xlog location");
-DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_xlogfile_name _null_ _null_ _null_ ));
-DESCR("xlog filename, given an xlog location");
-
-DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_xlog_location_diff _null_ _null_ _null_ ));
-DESCR("difference in bytes, given two xlog locations");
+DATA(insert OID = 3800 ( pg_current_wal_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("current WAL write location");
+DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_xlog_location");
+DATA(insert OID = 3801 ( pg_current_wal_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("current WAL insert location");
+DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_wal_insert_location");
+DATA(insert OID = 6015 ( pg_current_wal_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("current WAL flush location");
+DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_wal_flush_location");
+DATA(insert OID = 3452 ( pg_wal_file_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("WAL filename and byte offset, given an WAL location");
+DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_file_name_offset");
+DATA(insert OID = 3453 ( pg_wal_file_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("WAL filename, given a WAL location");
+DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_file_name");
+
+DATA(insert OID = 3445 ( pg_wal_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("difference in bytes, given two WAL locations");
+DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_location_diff");
DATA(insert OID = 3809 ( pg_export_snapshot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 0 0 25 "" _null_ _null_ _null_ _null_ _null_ pg_export_snapshot _null_ _null_ _null_ ));
DESCR("export a snapshot");
@@ -3165,19 +3179,29 @@ DESCR("export a snapshot");
DATA(insert OID = 3810 ( pg_is_in_recovery PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_recovery _null_ _null_ _null_ ));
DESCR("true if server is in recovery");
-DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_receive_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_replay_location _null_ _null_ _null_ ));
-DESCR("last xlog replay location");
+DATA(insert OID = 3446 ( pg_last_wal_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("current wal flush location");
+DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_last_wal_receive_location");
+DATA(insert OID = 3447 ( pg_last_wal_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("last wal replay location");
+DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_last_wal_replay_location");
DATA(insert OID = 3830 ( pg_last_xact_replay_timestamp PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_last_xact_replay_timestamp _null_ _null_ _null_ ));
DESCR("timestamp of last replay xact");
-DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_pause _null_ _null_ _null_ ));
-DESCR("pause xlog replay");
-DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_resume _null_ _null_ _null_ ));
-DESCR("resume xlog replay, if it was paused");
-DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_xlog_replay_paused _null_ _null_ _null_ ));
-DESCR("true if xlog replay is paused");
+DATA(insert OID = 3450 ( pg_wal_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_pause _null_ _null_ _null_ ));
+DESCR("pause WAL replay");
+DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_pause _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_replay_pause");
+DATA(insert OID = 3451 ( pg_wal_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_resume _null_ _null_ _null_ ));
+DESCR("resume WAL replay, if it was paused");
+DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_resume _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_replay_resume");
+DATA(insert OID = 3448 ( pg_is_recovery_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_recovery_paused _null_ _null_ _null_ ));
+DESCR("true if WAL replay for recovery is paused");
+DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_recovery_paused _null_ _null_ _null_ ));
+DESCR("historical alias for pg_is_recovery_paused");
DATA(insert OID = 2621 ( pg_reload_conf PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_reload_conf _null_ _null_ _null_ ));
DESCR("reload configuration files");
@@ -5345,6 +5369,8 @@ DESCR("pg_controldata recovery state information as a function");
DATA(insert OID = 3444 ( pg_control_init PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2249 "" "{23,23,23,23,23,23,23,23,23,16,16,16,23}" "{o,o,o,o,o,o,o,o,o,o,o,o,o}" "{max_data_alignment,database_block_size,blocks_per_segment,wal_block_size,bytes_per_wal_segment,max_identifier_length,max_index_columns,max_toast_chunk_size,large_object_chunk_size,bigint_timestamps,float4_pass_by_value,float8_pass_by_value,data_page_checksum_version}" _null_ _null_ pg_control_init _null_ _null_ _null_ ));
DESCR("pg_controldata init state information as a function");
+/* Next OID: 6016 */
+
/*
* Symbolic values for provolatile column: these indicate whether the result
* of a function is dependent *only* on the values of its explicit arguments,
diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl
index 4dbde2978e..3d43b3577c 100644
--- a/src/test/modules/commit_ts/t/002_standby.pl
+++ b/src/test/modules/commit_ts/t/002_standby.pl
@@ -32,9 +32,9 @@ my $master_ts = $master->safe_psql('postgres',
qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'}
);
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
my $standby_ts = $standby->safe_psql('postgres',
@@ -46,9 +46,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
$master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl
index d37ff182c4..8d4e438989 100644
--- a/src/test/modules/commit_ts/t/003_standby_2.pl
+++ b/src/test/modules/commit_ts/t/003_standby_2.pl
@@ -31,9 +31,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/recovery/t/002_archiving.pl b/src/test/recovery/t/002_archiving.pl
index fc2bf7ee1d..83b43bf84d 100644
--- a/src/test/recovery/t/002_archiving.pl
+++ b/src/test/recovery/t/002_archiving.pl
@@ -33,10 +33,10 @@ $node_standby->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $current_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Force archiving of WAL file to make it present on master
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Add some more content, it should not be present on standby
$node_master->safe_psql('postgres',
@@ -44,7 +44,7 @@ $node_master->safe_psql('postgres',
# Wait until necessary replay has been done on standby
my $caughtup_query =
- "SELECT '$current_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$current_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl
index a82545bf6f..b7b0caae68 100644
--- a/src/test/recovery/t/003_recovery_targets.pl
+++ b/src/test/recovery/t/003_recovery_targets.pl
@@ -32,7 +32,7 @@ sub test_recovery_standby
# Wait until standby has replayed enough data
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
@@ -57,7 +57,7 @@ $node_master->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $lsn1 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Take backup from which all operations will be run
$node_master->backup('my_backup');
@@ -67,14 +67,14 @@ $node_master->backup('my_backup');
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(1001,2000))");
my $ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), txid_current();");
+ "SELECT pg_current_wal_location(), txid_current();");
my ($lsn2, $recovery_txid) = split /\|/, $ret;
# More data, with recovery target timestamp
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(2001,3000))");
$ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), now();");
+ "SELECT pg_current_wal_location(), now();");
my ($lsn3, $recovery_time) = split /\|/, $ret;
# Even more data, this time with a recovery target name
@@ -82,22 +82,22 @@ $node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(3001,4000))");
my $recovery_name = "my_target";
my $lsn4 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"SELECT pg_create_restore_point('$recovery_name');");
# And now for a recovery target LSN
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(4001,5000))");
-my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $lsn5 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(5001,6000))");
# Force archiving of WAL file
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Test recovery targets
my @recovery_params = ("recovery_target = 'immediate'");
diff --git a/src/test/recovery/t/005_replay_delay.pl b/src/test/recovery/t/005_replay_delay.pl
index 640295bfa8..cd9e8f5c12 100644
--- a/src/test/recovery/t/005_replay_delay.pl
+++ b/src/test/recovery/t/005_replay_delay.pl
@@ -42,7 +42,7 @@ $node_master->safe_psql('postgres',
# Now wait for replay to complete on standby. We're done waiting when the
# slave has replayed up to the previously saved master LSN.
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $remaining = 90;
while ($remaining-- > 0)
@@ -50,7 +50,7 @@ while ($remaining-- > 0)
# Done waiting?
my $replay_status = $node_standby->safe_psql('postgres',
- "SELECT (pg_last_xlog_replay_location() - '$until_lsn'::pg_lsn) >= 0"
+ "SELECT (pg_last_wal_replay_location() - '$until_lsn'::pg_lsn) >= 0"
);
last if $replay_status eq 't';
diff --git a/src/test/recovery/t/008_fsm_truncation.pl b/src/test/recovery/t/008_fsm_truncation.pl
index 9f6bdb0b64..4419fc258c 100644
--- a/src/test/recovery/t/008_fsm_truncation.pl
+++ b/src/test/recovery/t/008_fsm_truncation.pl
@@ -69,11 +69,11 @@ vacuum verbose testtab;
$node_master->psql('postgres', 'checkpoint');
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Wait long enough for standby to receive and apply all WAL
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/regress/expected/hs_standby_functions.out b/src/test/regress/expected/hs_standby_functions.out
index 16d50a8285..e0af677ea1 100644
--- a/src/test/regress/expected/hs_standby_functions.out
+++ b/src/test/regress/expected/hs_standby_functions.out
@@ -15,7 +15,7 @@ select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
-select pg_switch_xlog();
+select pg_switch_wal();
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
select pg_stop_backup();
diff --git a/src/test/regress/sql/hs_primary_extremes.sql b/src/test/regress/sql/hs_primary_extremes.sql
index 629efb4be5..2051e2e5cf 100644
--- a/src/test/regress/sql/hs_primary_extremes.sql
+++ b/src/test/regress/sql/hs_primary_extremes.sql
@@ -70,4 +70,4 @@ SELECT count(*) > 257 FROM pg_locks;
COMMIT;
SELECT hs_locks_drop(257);
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_primary_setup.sql b/src/test/regress/sql/hs_primary_setup.sql
index a00b367cbc..eeb4421307 100644
--- a/src/test/regress/sql/hs_primary_setup.sql
+++ b/src/test/regress/sql/hs_primary_setup.sql
@@ -22,4 +22,4 @@ insert into hs3 values (115);
DROP sequence if exists hsseq;
create sequence hsseq;
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_standby_functions.sql b/src/test/regress/sql/hs_standby_functions.sql
index 7577045f11..251bac0a43 100644
--- a/src/test/regress/sql/hs_standby_functions.sql
+++ b/src/test/regress/sql/hs_standby_functions.sql
@@ -10,7 +10,7 @@ select txid_current();
select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
-select pg_switch_xlog();
+select pg_switch_wal();
select pg_stop_backup();
-- should return no rows
On 1/9/17 10:50 AM, Vladimir Rusinov wrote:
pg_is_xlog_replay_paused | pg_is_recovery_paused
All the other xlog_replay names have been changed to wal_replay, so
making this one different is probably not so good.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Mon, Jan 9, 2017 at 4:14 PM, Peter Eisentraut <
peter.eisentraut@2ndquadrant.com> wrote:
pg_is_xlog_replay_paused | pg_is_recovery_paused
All the other xlog_replay names have been changed to wal_replay, so
making this one different is probably not so good.
Oops, forgot about that one. Attached patch with this addressed as well.
Remove 'xlog' references from admin functions.
After 'pg_xlog' has been renamed to 'pg_wal' 'xlog' reference in
function names is confusing.
This change renames 'xlog' in function names to 'wal', keeping old
function names as aliases.
Following functions have been renamed:
Name | Replaced by
--------------------------------|-------------------------------
pg_current_xlog_flush_location | pg_current_wal_flush_location
pg_current_xlog_insert_location | pg_current_wal_insert_location
pg_current_xlog_location | pg_current_wal_location
pg_is_xlog_replay_paused | pg_is_wal_replay_paused
pg_last_xlog_receive_location | pg_last_wal_receive_location
pg_last_xlog_replay_location | pg_last_wal_replay_location
pg_switch_xlog | pg_switch_wal
pg_xlog_location_diff | pg_wal_location_diff
pg_xlog_replay_pause | pg_wal_replay_pause
pg_xlog_replay_resume | pg_wal_replay_resume
pg_xlogfile_name | pg_wal_file_name
pg_xlogfile_name_offset | pg_wal_file_name_offset
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
0003-Remove-xlog-references-from-admin-functions.patchtext/x-patch; charset=US-ASCII; name=0003-Remove-xlog-references-from-admin-functions.patchDownload
diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl
index 56c6618d3d..dc907baf87 100644
--- a/contrib/bloom/t/001_wal.pl
+++ b/contrib/bloom/t/001_wal.pl
@@ -16,7 +16,7 @@ sub test_index_replay
# Wait for standby to catch up
my $applname = $node_standby->name;
my $caughtup_query =
-"SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
+"SELECT pg_current_wal_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
$node_master->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby 1 to catch up";
diff --git a/contrib/test_decoding/expected/ddl.out b/contrib/test_decoding/expected/ddl.out
index c104c4802d..275c84a450 100644
--- a/contrib/test_decoding/expected/ddl.out
+++ b/contrib/test_decoding/expected/ddl.out
@@ -58,7 +58,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
slot_name | plugin | slot_type | active | catalog_xmin_set | data_xmin_not_set | some_wal
-----------------+---------------+-----------+--------+------------------+-------------------+----------
diff --git a/contrib/test_decoding/sql/ddl.sql b/contrib/test_decoding/sql/ddl.sql
index 89b8b8f780..49dad39b50 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -29,7 +29,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
/*
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 6eaed1efbe..e37f101277 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -726,9 +726,9 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0
<para>
Also, you can force a segment switch manually with
- <function>pg_switch_xlog</> if you want to ensure that a
- just-finished transaction is archived as soon as possible. Other utility
- functions related to WAL management are listed in <xref
+ <function>pg_switch_wal</> if you want to ensure that a just-finished
+ transaction is archived as soon as possible. Other utility functions
+ related to WAL management are listed in <xref
linkend="functions-admin-backup-table">.
</para>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 10e31868ba..8021afb369 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -17925,13 +17925,13 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_create_restore_point</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_flush_location</primary>
+ <primary>pg_current_wal_flush_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_insert_location</primary>
+ <primary>pg_current_wal_insert_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_location</primary>
+ <primary>pg_current_wal_location</primary>
</indexterm>
<indexterm>
<primary>pg_start_backup</primary>
@@ -17946,24 +17946,25 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_backup_start_time</primary>
</indexterm>
<indexterm>
- <primary>pg_switch_xlog</primary>
+ <primary>pg_switch_wal</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name</primary>
+ <primary>pg_wal_file_name</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name_offset</primary>
+ <primary>pg_wal_file_name_offset</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_location_diff</primary>
+ <primary>pg_wal_location_diff</primary>
</indexterm>
<para>
The functions shown in <xref
linkend="functions-admin-backup-table"> assist in making on-line backups.
These functions cannot be executed during recovery (except
- <function>pg_is_in_backup</function>, <function>pg_backup_start_time</function>
- and <function>pg_xlog_location_diff</function>).
+ <function>pg_is_in_backup</function>,
+ <function>pg_backup_start_time</function> and
+ <function>pg_wal_location_diff</function>).
</para>
<table id="functions-admin-backup-table">
@@ -17984,21 +17985,21 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_flush_location()</function></literal>
+ <literal><function>pg_current_wal_flush_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log flush location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_insert_location()</function></literal>
+ <literal><function>pg_current_wal_insert_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log insert location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_location()</function></literal>
+ <literal><function>pg_current_wal_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log write location</entry>
@@ -18040,28 +18041,28 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_switch_xlog()</function></literal>
+ <literal><function>pg_switch_wal()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Force switch to a new transaction log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</type></entry>
<entry>Convert transaction log location string to file name</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</>, <type>integer</></entry>
<entry>Convert transaction log location string to file name and decimal byte offset within file</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlog_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>numeric</></entry>
<entry>Calculate the difference between two transaction log locations</entry>
@@ -18119,11 +18120,11 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_switch_xlog</> moves to the next transaction log file, allowing the
+ <function>pg_switch_wal</> moves to the next transaction log file, allowing the
current file to be archived (assuming you are using continuous archiving).
The return value is the ending transaction log location + 1 within the just-completed transaction log file.
If there has been no transaction log activity since the last transaction log switch,
- <function>pg_switch_xlog</> does nothing and returns the start location
+ <function>pg_switch_wal</> does nothing and returns the start location
of the transaction log file currently in use.
</para>
@@ -18138,10 +18139,10 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_current_xlog_location</> displays the current transaction log write
+ <function>pg_current_wal_location</> displays the current transaction log write
location in the same format used by the above functions. Similarly,
- <function>pg_current_xlog_insert_location</> displays the current transaction log
- insertion point and <function>pg_current_xlog_flush_location</> displays the
+ <function>pg_current_wal_insert_location</> displays the current transaction log
+ insertion point and <function>pg_current_wal_flush_location</> displays the
current transaction log flush point. The insertion point is the <quote>logical</>
end of the transaction log at any instant, while the write location is the end of
what has actually been written out from the server's internal buffers and flush
@@ -18154,17 +18155,17 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- You can use <function>pg_xlogfile_name_offset</> to extract the
+ You can use <function>pg_wal_file_name_offset</> to extract the
corresponding transaction log file name and byte offset from the results of any of the
above functions. For example:
<programlisting>
-postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
+postgres=# SELECT * FROM pg_wal_file_name_offset(pg_stop_backup());
file_name | file_offset
--------------------------+-------------
00000001000000000000000D | 4039624
(1 row)
</programlisting>
- Similarly, <function>pg_xlogfile_name</> extracts just the transaction log file name.
+ Similarly, <function>pg_wal_file_name</> extracts just the transaction log file name.
When the given transaction log location is exactly at a transaction log file boundary, both
these functions return the name of the preceding transaction log file.
This is usually the desired behavior for managing transaction log archiving
@@ -18173,7 +18174,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</para>
<para>
- <function>pg_xlog_location_diff</> calculates the difference in bytes
+ <function>pg_wal_location_diff</> calculates the difference in bytes
between two transaction log locations. It can be used with
<structname>pg_stat_replication</structname> or some functions shown in
<xref linkend="functions-admin-backup-table"> to get the replication lag.
@@ -18193,10 +18194,10 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<primary>pg_is_in_recovery</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_receive_location</primary>
+ <primary>pg_last_wal_receive_location</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_replay_location</primary>
+ <primary>pg_last_wal_replay_location</primary>
</indexterm>
<indexterm>
<primary>pg_last_xact_replay_timestamp</primary>
@@ -18228,7 +18229,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_receive_location()</function></literal>
+ <literal><function>pg_last_wal_receive_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location received and synced to disk by
@@ -18242,7 +18243,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_replay_location()</function></literal>
+ <literal><function>pg_last_wal_replay_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location replayed during recovery.
@@ -18274,13 +18275,13 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</table>
<indexterm>
- <primary>pg_is_xlog_replay_paused</primary>
+ <primary>pg_is_wal_replay_paused</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_pause</primary>
+ <primary>pg_wal_replay_pause</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_resume</primary>
+ <primary>pg_wal_replay_resume</primary>
</indexterm>
<para>
@@ -18300,7 +18301,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<tbody>
<row>
<entry>
- <literal><function>pg_is_xlog_replay_paused()</function></literal>
+ <literal><function>pg_is_wal_replay_paused()</function></literal>
</entry>
<entry><type>bool</type></entry>
<entry>True if recovery is paused.
@@ -18308,7 +18309,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_pause()</function></literal>
+ <literal><function>pg_wal_replay_pause()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Pauses recovery immediately (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -18316,7 +18317,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_resume()</function></literal>
+ <literal><function>pg_wal_replay_resume()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Restarts recovery if it was paused (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -19670,6 +19671,160 @@ SELECT (pg_stat_file('filename')).modification;
</sect2>
+
+ <sect2 id="functions-admin-deprecated">
+ <title>Deprecated Functions</title>
+
+ <indexterm>
+ <primary>pg_current_xlog_flush_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_current_xlog_insert_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_current_xlog_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_is_xlog_replay_paused</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_last_xlog_receive_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_last_xlog_replay_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_switch_xlog</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_replay_pause</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_location_diff</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_replay_resume</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlogfile_name</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlogfile_name_offset</primary>
+ </indexterm>
+
+ <para>
+ The functions shown in <xref linkend="functions-admin-deprecated-table"> are
+ deprecated and will be removed in a future PostgreSQL release. It is highly
+ recommended to use new function names instead.
+ </para>
+
+ <table id="functions-admin-deprecated-table">
+ <title>Deprecated Administration Functions</title>
+ <tgroup cols="2">
+ <thead><row><entry>Name</entry> <entry>Replaced by</entry></row></thead>
+ <tbody>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_flush_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_flush_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_insert_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_insert_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_is_xlog_replay_paused</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_is_wal_replay_paused</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_last_xlog_receive_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_last_wal_receive_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_last_xlog_replay_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_last_wal_replay_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_switch_xlog</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_switch_wal</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_location_diff</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_location_diff</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_replay_pause</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_replay_pause</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_replay_resume</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_replay_resume</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlogfile_name</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_file_name</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlogfile_name_offset</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_file_name_offset</function></literal>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </sect2>
+
</sect1>
<sect1 id="functions-trigger">
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index a1a9532088..e1c08c6e94 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -853,8 +853,8 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
standby. You can calculate this lag by comparing the current WAL write
location on the primary with the last WAL location received by the
standby. They can be retrieved using
- <function>pg_current_xlog_location</> on the primary and the
- <function>pg_last_xlog_receive_location</> on the standby,
+ <function>pg_current_wal_location</> on the primary and the
+ <function>pg_last_wal_receive_location</> on the standby,
respectively (see <xref linkend="functions-admin-backup-table"> and
<xref linkend="functions-recovery-info-table"> for details).
The last WAL receive location in the standby is also displayed in the
@@ -865,10 +865,10 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
You can retrieve a list of WAL sender processes via the
<link linkend="monitoring-stats-views-table">
<literal>pg_stat_replication</></link> view. Large differences between
- <function>pg_current_xlog_location</> and <literal>sent_location</> field
+ <function>pg_current_wal_location</> and <literal>sent_location</> field
might indicate that the master server is under heavy load, while
differences between <literal>sent_location</> and
- <function>pg_last_xlog_receive_location</> on the standby might indicate
+ <function>pg_last_wal_receive_location</> on the standby might indicate
network delay, or that the standby is under heavy load.
</para>
</sect3>
@@ -1587,7 +1587,7 @@ if (!triggered)
</para>
<para>
- An external program can call the <function>pg_xlogfile_name_offset()</>
+ An external program can call the <function>pg_wal_file_name_offset()</>
function (see <xref linkend="functions-admin">)
to find out the file name and the exact byte offset within it of
the current end of WAL. It can then access the WAL file directly
@@ -2225,7 +2225,7 @@ LOG: database system is ready to accept read only connections
<para>
WAL file control commands will not work during recovery,
- e.g. <function>pg_start_backup</>, <function>pg_switch_xlog</> etc.
+ e.g. <function>pg_start_backup</>, <function>pg_switch_wal</> etc.
</para>
<para>
diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml
index 8c24ae2174..a91864bf62 100644
--- a/doc/src/sgml/recovery-config.sgml
+++ b/doc/src/sgml/recovery-config.sgml
@@ -321,7 +321,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
to be executed against the database to check if this recovery target
is the most desirable point for recovery.
The paused state can be resumed by
- using <function>pg_xlog_replay_resume()</> (see
+ using <function>pg_wal_replay_resume()</> (see
<xref linkend="functions-recovery-control-table">), which then
causes recovery to end. If this recovery target is not the
desired stopping point, then shut down the server, change the
diff --git a/src/backend/access/transam/recovery.conf.sample b/src/backend/access/transam/recovery.conf.sample
index 7a16751541..ace77df728 100644
--- a/src/backend/access/transam/recovery.conf.sample
+++ b/src/backend/access/transam/recovery.conf.sample
@@ -98,10 +98,9 @@
#
# If recovery_target_action = 'pause', recovery will pause when the
# recovery target is reached. The pause state will continue until
-# pg_xlog_replay_resume() is called. This setting has no effect if
-# no recovery target is set. If hot_standby is not enabled then the
-# server will shutdown instead, though you may request this in
-# any case by specifying 'shutdown'.
+# pg_wal_replay_resume() is called. This setting has no effect if no recovery
+# target is set. If hot_standby is not enabled then the server will shutdown
+# instead, though you may request this in any case by specifying 'shutdown'.
#
#recovery_target_action = 'pause'
#
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 70edafadff..6dd63a945f 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5740,7 +5740,7 @@ recoveryPausesHere(void)
ereport(LOG,
(errmsg("recovery has paused"),
- errhint("Execute pg_xlog_replay_resume() to continue.")));
+ errhint("Execute pg_wal_replay_resume() to continue.")));
while (RecoveryIsPaused())
{
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index 5cafb8b913..bdcc39fef1 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -277,13 +277,13 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS)
}
/*
- * pg_switch_xlog: switch to next xlog file
+ * pg_switch_wal: switch to next WAL file
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_switch_xlog(PG_FUNCTION_ARGS)
+pg_switch_wal(PG_FUNCTION_ARGS)
{
XLogRecPtr switchpoint;
@@ -349,7 +349,7 @@ pg_create_restore_point(PG_FUNCTION_ARGS)
* to the kernel, but is not necessarily synced to disk.
*/
Datum
-pg_current_xlog_location(PG_FUNCTION_ARGS)
+pg_current_wal_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -370,7 +370,7 @@ pg_current_xlog_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
+pg_current_wal_insert_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -391,7 +391,7 @@ pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
+pg_current_wal_flush_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -413,7 +413,7 @@ pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
* and synced to disk by walreceiver.
*/
Datum
-pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
+pg_last_wal_receive_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -432,7 +432,7 @@ pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
* connections during recovery.
*/
Datum
-pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
+pg_last_wal_replay_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -445,15 +445,15 @@ pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
}
/*
- * Compute an xlog file name and decimal byte offset given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * Compute an WAL file name and decimal byte offset given a WAL location,
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*
* Note that a location exactly at a segment boundary is taken to be in
* the previous segment. This is usually the right thing, since the
* expected usage is to determine which xlog file(s) are ready to archive.
*/
Datum
-pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
+pg_wal_file_name_offset(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
uint32 xrecoff;
@@ -469,7 +469,8 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name_offset() cannot be executed during recovery.")));
+ errhint(
+ "pg_wal_file_name_offset() cannot be executed during recovery.")));
/*
* Construct a tuple descriptor for the result row. This must match this
@@ -512,10 +513,10 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
/*
* Compute an xlog file name given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*/
Datum
-pg_xlogfile_name(PG_FUNCTION_ARGS)
+pg_wal_file_name(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
XLogRecPtr locationpoint = PG_GETARG_LSN(0);
@@ -525,7 +526,7 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name() cannot be executed during recovery.")));
+ errhint("pg_wal_file_name() cannot be executed during recovery.")));
XLByteToPrevSeg(locationpoint, xlogsegno);
XLogFileName(xlogfilename, ThisTimeLineID, xlogsegno);
@@ -534,13 +535,13 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_pause - pause recovery now
+ * pg_wal_replay_pause - pause recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_pause(PG_FUNCTION_ARGS)
+pg_wal_replay_pause(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -554,13 +555,13 @@ pg_xlog_replay_pause(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_resume - resume recovery now
+ * pg_wal_replay_resume - resume recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_resume(PG_FUNCTION_ARGS)
+pg_wal_replay_resume(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -574,10 +575,10 @@ pg_xlog_replay_resume(PG_FUNCTION_ARGS)
}
/*
- * pg_is_xlog_replay_paused
+ * pg_is_wal_replay_paused
*/
Datum
-pg_is_xlog_replay_paused(PG_FUNCTION_ARGS)
+pg_is_wal_replay_paused(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -619,7 +620,7 @@ pg_is_in_recovery(PG_FUNCTION_ARGS)
* Compute the difference in bytes between two WAL locations.
*/
Datum
-pg_xlog_location_diff(PG_FUNCTION_ARGS)
+pg_wal_location_diff(PG_FUNCTION_ARGS)
{
Datum result;
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index 31aade102b..93c9d13950 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -1050,8 +1050,11 @@ REVOKE EXECUTE ON FUNCTION pg_start_backup(text, boolean, boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup() FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup(boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_create_restore_point(text) FROM public;
+REVOKE EXECUTE ON FUNCTION pg_switch_wal() FROM public;
REVOKE EXECUTE ON FUNCTION pg_switch_xlog() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_pause() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_pause() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_rotate_logfile() FROM public;
REVOKE EXECUTE ON FUNCTION pg_reload_conf() FROM public;
diff --git a/src/backend/po/de.po b/src/backend/po/de.po
index 9ac21992a9..494d4a33f4 100644
--- a/src/backend/po/de.po
+++ b/src/backend/po/de.po
@@ -2052,8 +2052,8 @@ msgstr "Wiederherstellung wurde pausiert"
#: access/transam/xlog.c:5643
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "F��hren Sie pg_xlog_replay_resume() aus um fortzusetzen."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "F��hren Sie pg_wal_replay_resume() aus um fortzusetzen."
#: access/transam/xlog.c:5850
#, c-format
@@ -2789,13 +2789,13 @@ msgstr "Wert zu lang f��r Restore-Punkt (maximal %d Zeichen)"
#: access/transam/xlogfuncs.c:472
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
#: access/transam/xlogfuncs.c:528
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
#: access/transam/xlogfuncs.c:548 access/transam/xlogfuncs.c:568
#: access/transam/xlogfuncs.c:585
diff --git a/src/backend/po/es.po b/src/backend/po/es.po
index 955531c295..6948c06fc4 100644
--- a/src/backend/po/es.po
+++ b/src/backend/po/es.po
@@ -2120,8 +2120,8 @@ msgstr "la recuperaci��n est�� en pausa"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Ejecute pg_xlog_replay_resume() para continuar."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Ejecute pg_wal_replay_resume() para continuar."
#: access/transam/xlog.c:5852
#, c-format
@@ -2873,13 +2873,13 @@ msgstr "el valor es demasiado largo para un punto de recuperaci��n (m��ximo %d c
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() no puede ejecutarse durante la recuperaci��n."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() no puede ejecutarse durante la recuperaci��n."
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() no puede ejecutarse durante la recuperaci��n."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() no puede ejecutarse durante la recuperaci��n."
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569
#: access/transam/xlogfuncs.c:586
diff --git a/src/backend/po/fr.po b/src/backend/po/fr.po
index af5ee56238..3a59504cac 100644
--- a/src/backend/po/fr.po
+++ b/src/backend/po/fr.po
@@ -2039,8 +2039,8 @@ msgstr "restauration en pause"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Ex�cuter pg_xlog_replay_resume() pour continuer."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Ex�cuter pg_wal_replay_resume() pour continuer."
#: access/transam/xlog.c:5852
#, c-format
@@ -2803,13 +2803,13 @@ msgstr "valeur trop longue pour le point de restauration (%d caract
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() ne peut pas �tre ex�cut� lors de la restauration."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() ne peut pas �tre ex�cut� lors de la restauration."
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() ne peut pas �tre ex�cut� lors de la restauration."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() ne peut pas �tre ex�cut� lors de la restauration."
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569 access/transam/xlogfuncs.c:586
#, c-format
diff --git a/src/backend/po/id.po b/src/backend/po/id.po
index d5d484132b..4e01aa989f 100644
--- a/src/backend/po/id.po
+++ b/src/backend/po/id.po
@@ -1259,8 +1259,8 @@ msgstr "pemulihan berhenti"
#: access/transam/xlog.c:4669
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Menjalankan pg_xlog_replay_resume() untuk melanjutan."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Menjalankan pg_wal_replay_resume() untuk melanjutan."
#: access/transam/xlog.c:4799
#, c-format
@@ -1911,8 +1911,8 @@ msgstr "nilai terlalu panjang untuk titik pemgembalian point (maksimal %d karakt
#: access/transam/xlogfuncs.c:300
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() tidak dapat dijalankan selama proses pemulihan."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() tidak dapat dijalankan selama proses pemulihan."
#: access/transam/xlogfuncs.c:312 access/transam/xlogfuncs.c:383 access/transam/xlogfuncs.c:540 access/transam/xlogfuncs.c:546
#, c-format
@@ -1921,8 +1921,8 @@ msgstr "tidak dapat menguraikan file log transaksi �� %s ��"
#: access/transam/xlogfuncs.c:374
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() tidak dapat menjalankan selama proses pemulihan."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() tidak dapat menjalankan selama proses pemulihan."
#: access/transam/xlogfuncs.c:402 access/transam/xlogfuncs.c:424 access/transam/xlogfuncs.c:446
#, c-format
diff --git a/src/backend/po/it.po b/src/backend/po/it.po
index 393ed954ae..39a8cab4b2 100644
--- a/src/backend/po/it.po
+++ b/src/backend/po/it.po
@@ -2069,8 +2069,8 @@ msgstr "ripristino in pausa"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Esegui pg_xlog_replay_resume() per continuare."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Esegui pg_wal_replay_resume() per continuare."
#: access/transam/xlog.c:5852
#, c-format
@@ -2812,13 +2812,13 @@ msgstr "il valore �� troppo lungo per un punto di ripristino (massimo %d caratte
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() non pu�� essere eseguito durante il recupero."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() non pu�� essere eseguito durante il recupero."
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() non pu�� essere eseguito durante il recupero."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() non pu�� essere eseguito durante il recupero."
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569
#: access/transam/xlogfuncs.c:586
diff --git a/src/backend/po/ja.po b/src/backend/po/ja.po
index 2fa5d48a82..f42b889656 100644
--- a/src/backend/po/ja.po
+++ b/src/backend/po/ja.po
@@ -1347,8 +1347,8 @@ msgstr "������������������������������������������������"
#: access/transam/xlog.c:5804
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "pg_xlog_replay_resume() ������������������������������������������������"
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "pg_wal_replay_resume() ������������������������������������������������"
#: access/transam/xlog.c:5934
#, c-format
@@ -2042,8 +2042,8 @@ msgstr "������������������������������������������������������������������ %d
#: access/transam/xlogfuncs.c:290
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "������������������ pg_xlogfile_name_offset() ������������������������"
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "������������������ pg_wal_file_name_offset() ������������������������"
#: access/transam/xlogfuncs.c:302 access/transam/xlogfuncs.c:373
#: access/transam/xlogfuncs.c:530 access/transam/xlogfuncs.c:536
@@ -2053,8 +2053,8 @@ msgstr "������������������������������������\"%s\"������������������������������
#: access/transam/xlogfuncs.c:364
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "������������������ pg_xlogfile_name() ������������������������"
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "������������������ pg_wal_file_name() ������������������������"
#: access/transam/xlogfuncs.c:392 access/transam/xlogfuncs.c:414
#: access/transam/xlogfuncs.c:436
diff --git a/src/backend/po/pl.po b/src/backend/po/pl.po
index 677badf5be..7c50e80229 100644
--- a/src/backend/po/pl.po
+++ b/src/backend/po/pl.po
@@ -2081,8 +2081,8 @@ msgstr "odzyskiwanie zosta��o wstrzymane"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Wykonaj pg_xlog_replay_resume() by kontynuowa��."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Wykonaj pg_wal_replay_resume() by kontynuowa��."
#: access/transam/xlog.c:5852
#, c-format
@@ -2834,13 +2834,13 @@ msgstr "warto���� zbyt d��uga punktu przywr��cenia (maksimum %d znak��w)"
#: access/transam/xlogfuncs.c:472
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() nie mo��e by�� uruchomiony podczas trwania odzyskiwania."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() nie mo��e by�� uruchomiony podczas trwania odzyskiwania."
#: access/transam/xlogfuncs.c:528
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() nie mo��e by�� uruchomiony podczas trwania."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() nie mo��e by�� uruchomiony podczas trwania."
#: access/transam/xlogfuncs.c:548 access/transam/xlogfuncs.c:568
#: access/transam/xlogfuncs.c:585
diff --git a/src/backend/po/pt_BR.po b/src/backend/po/pt_BR.po
index 37e4a28f07..438c4c2339 100644
--- a/src/backend/po/pt_BR.po
+++ b/src/backend/po/pt_BR.po
@@ -1480,8 +1480,8 @@ msgstr "recupera����o est�� em pausa"
#: access/transam/xlog.c:5699
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Execute pg_xlog_replay_resume() para continuar."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Execute pg_wal_replay_resume() para continuar."
#: access/transam/xlog.c:5914
#, c-format
@@ -2143,13 +2143,13 @@ msgstr "valor �� muito longo para ponto de restaura����o (m��ximo de %d caracter
#: access/transam/xlogfuncs.c:271
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() n��o pode ser executado durante recupera����o."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() n��o pode ser executado durante recupera����o."
#: access/transam/xlogfuncs.c:327
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() n��o pode ser executado durante recupera����o."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() n��o pode ser executado durante recupera����o."
#: access/transam/xlogfuncs.c:344 access/transam/xlogfuncs.c:366
#, c-format
diff --git a/src/backend/po/ru.po b/src/backend/po/ru.po
index 5bd8059a9d..f9d5a4731f 100644
--- a/src/backend/po/ru.po
+++ b/src/backend/po/ru.po
@@ -2401,8 +2401,8 @@ msgstr "���������������������������� ����������������������������"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "������������������ pg_xlog_replay_resume() ������ ����������������������."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "������������������ pg_wal_replay_resume() ������ ����������������������."
#: access/transam/xlog.c:5852
#, c-format
@@ -3265,14 +3265,14 @@ msgstr "���������������� ������ ���������� ���������������������������� ��������
#: access/transam/xlogfuncs.c:472
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
msgstr ""
-"�������������� pg_xlogfile_name_offset() ������������ ���������������� ���� ���������� ����������������������������."
+"�������������� pg_wal_file_name_offset() ������������ ���������������� ���� ���������� ����������������������������."
#: access/transam/xlogfuncs.c:528
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "�������������� pg_xlogfile_name() ������������ ���������������� �� ���������������� ����������������������������."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "�������������� pg_wal_file_name() ������������ ���������������� �� ���������������� ����������������������������."
#: access/transam/xlogfuncs.c:548 access/transam/xlogfuncs.c:568
#: access/transam/xlogfuncs.c:585
diff --git a/src/backend/po/zh_CN.po b/src/backend/po/zh_CN.po
index 1e6934a7a5..7ac1690cb0 100644
--- a/src/backend/po/zh_CN.po
+++ b/src/backend/po/zh_CN.po
@@ -2229,8 +2229,8 @@ msgstr "���������������������"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "������ pg_xlog_replay_resume() ���������."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "������ pg_wal_replay_resume() ���������."
#: access/transam/xlog.c:5852
#, c-format
@@ -3055,13 +3055,13 @@ msgstr "������������������(������%d���������)"
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "������������������������������pg_xlogfile_name_offset()"
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "������������������������������pg_wal_file_name_offset()"
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "������������������������������pg_xlogfile_name() "
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "������������������������������pg_wal_file_name() "
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569
#: access/transam/xlogfuncs.c:586
diff --git a/src/bin/pg_rewind/RewindTest.pm b/src/bin/pg_rewind/RewindTest.pm
index 1c482617ad..c67212ff7a 100644
--- a/src/bin/pg_rewind/RewindTest.pm
+++ b/src/bin/pg_rewind/RewindTest.pm
@@ -156,7 +156,7 @@ sub promote_standby
# Wait for the standby to receive and write all WAL.
my $wal_received_query =
-"SELECT pg_current_xlog_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
+"SELECT pg_current_wal_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
$node_master->poll_query_until('postgres', $wal_received_query)
or die "Timed out while waiting for standby to receive and write WAL";
diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c
index a903849ee4..d2374201c6 100644
--- a/src/bin/pg_rewind/libpq_fetch.c
+++ b/src/bin/pg_rewind/libpq_fetch.c
@@ -121,7 +121,7 @@ run_simple_query(const char *sql)
}
/*
- * Calls pg_current_xlog_insert_location() function
+ * Calls pg_current_wal_insert_location() function
*/
XLogRecPtr
libpqGetCurrentXlogInsertLocation(void)
@@ -131,7 +131,7 @@ libpqGetCurrentXlogInsertLocation(void)
uint32 lo;
char *val;
- val = run_simple_query("SELECT pg_current_xlog_insert_location()");
+ val = run_simple_query("SELECT pg_current_wal_insert_location()");
if (sscanf(val, "%X/%X", &hi, &lo) != 2)
pg_fatal("unrecognized result \"%s\" for current WAL insert location\n", val);
diff --git a/src/include/access/xlog_fn.h b/src/include/access/xlog_fn.h
index a013d047a2..d9f91c3f41 100644
--- a/src/include/access/xlog_fn.h
+++ b/src/include/access/xlog_fn.h
@@ -16,21 +16,21 @@
extern Datum pg_start_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup_v2(PG_FUNCTION_ARGS);
-extern Datum pg_switch_xlog(PG_FUNCTION_ARGS);
+extern Datum pg_switch_wal(PG_FUNCTION_ARGS);
extern Datum pg_create_restore_point(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_insert_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_flush_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_receive_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_replay_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_insert_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_flush_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_receive_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_replay_location(PG_FUNCTION_ARGS);
extern Datum pg_last_xact_replay_timestamp(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name_offset(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name_offset(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name(PG_FUNCTION_ARGS);
extern Datum pg_is_in_recovery(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_pause(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_resume(PG_FUNCTION_ARGS);
-extern Datum pg_is_xlog_replay_paused(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_location_diff(PG_FUNCTION_ARGS);
+extern Datum pg_wal_replay_pause(PG_FUNCTION_ARGS);
+extern Datum pg_wal_replay_resume(PG_FUNCTION_ARGS);
+extern Datum pg_is_wal_replay_paused(PG_FUNCTION_ARGS);
+extern Datum pg_wal_location_diff(PG_FUNCTION_ARGS);
extern Datum pg_is_in_backup(PG_FUNCTION_ARGS);
extern Datum pg_backup_start_time(PG_FUNCTION_ARGS);
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 37e022dc0d..5824c421ba 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -3127,37 +3127,51 @@ DESCR("get OID of current session's temp schema, if any");
DATA(insert OID = 2855 ( pg_is_other_temp_schema PGNSP PGUID 12 1 0 0 0 f f f f t f s s 1 0 16 "26" _null_ _null_ _null_ _null_ _null_ pg_is_other_temp_schema _null_ _null_ _null_ ));
DESCR("is schema another session's temp schema?");
-DATA(insert OID = 2171 ( pg_cancel_backend PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 16 "23" _null_ _null_ _null_ _null_ _null_ pg_cancel_backend _null_ _null_ _null_ ));
+DATA(insert OID = 2171 ( pg_cancel_backend PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 16 "23" _null_ _null_ _null_ _null_ _null_ pg_cancel_backend _null_ _null_ _null_ ));
DESCR("cancel a server process' current query");
-DATA(insert OID = 2096 ( pg_terminate_backend PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 16 "23" _null_ _null_ _null_ _null_ _null_ pg_terminate_backend _null_ _null_ _null_ ));
+DATA(insert OID = 2096 ( pg_terminate_backend PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 16 "23" _null_ _null_ _null_ _null_ _null_ pg_terminate_backend _null_ _null_ _null_ ));
DESCR("terminate a server process");
-DATA(insert OID = 2172 ( pg_start_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v r 3 0 3220 "25 16 16" _null_ _null_ _null_ _null_ _null_ pg_start_backup _null_ _null_ _null_ ));
+DATA(insert OID = 2172 ( pg_start_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v r 3 0 3220 "25 16 16" _null_ _null_ _null_ _null_ _null_ pg_start_backup _null_ _null_ _null_ ));
DESCR("prepare for taking an online backup");
-DATA(insert OID = 2173 ( pg_stop_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_stop_backup _null_ _null_ _null_ ));
+DATA(insert OID = 2173 ( pg_stop_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_stop_backup _null_ _null_ _null_ ));
DESCR("finish taking an online backup");
-DATA(insert OID = 2739 ( pg_stop_backup PGNSP PGUID 12 1 1 0 0 f f f f t t v s 1 0 2249 "16" "{16,3220,25,25}" "{i,o,o,o}" "{exclusive,lsn,labelfile,spcmapfile}" _null_ _null_ pg_stop_backup_v2 _null_ _null_ _null_ ));
+DATA(insert OID = 2739 ( pg_stop_backup PGNSP PGUID 12 1 1 0 0 f f f f t t v s 1 0 2249 "16" "{16,3220,25,25}" "{i,o,o,o}" "{exclusive,lsn,labelfile,spcmapfile}" _null_ _null_ pg_stop_backup_v2 _null_ _null_ _null_ ));
DESCR("finish taking an online backup");
-DATA(insert OID = 3813 ( pg_is_in_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_backup _null_ _null_ _null_ ));
+DATA(insert OID = 3813 ( pg_is_in_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_backup _null_ _null_ _null_ ));
DESCR("true if server is in online backup");
-DATA(insert OID = 3814 ( pg_backup_start_time PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_backup_start_time _null_ _null_ _null_ ));
+DATA(insert OID = 3814 ( pg_backup_start_time PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_backup_start_time _null_ _null_ _null_ ));
DESCR("start time of an online backup");
-DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_xlog _null_ _null_ _null_ ));
-DESCR("switch to new xlog file");
-DATA(insert OID = 3098 ( pg_create_restore_point PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 3220 "25" _null_ _null_ _null_ _null_ _null_ pg_create_restore_point _null_ _null_ _null_ ));
+DATA(insert OID = 3449 ( pg_switch_wal PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("switch to new WAL file");
+DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("historical alias for pg_switch_wal");
+DATA(insert OID = 3098 ( pg_create_restore_point PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 3220 "25" _null_ _null_ _null_ _null_ _null_ pg_create_restore_point _null_ _null_ _null_ ));
DESCR("create a named restore point");
-DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_location _null_ _null_ _null_ ));
-DESCR("current xlog write location");
-DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_insert_location _null_ _null_ _null_ ));
-DESCR("current xlog insert location");
-DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_flush_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_xlogfile_name_offset _null_ _null_ _null_ ));
-DESCR("xlog filename and byte offset, given an xlog location");
-DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_xlogfile_name _null_ _null_ _null_ ));
-DESCR("xlog filename, given an xlog location");
-
-DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_xlog_location_diff _null_ _null_ _null_ ));
-DESCR("difference in bytes, given two xlog locations");
+DATA(insert OID = 3800 ( pg_current_wal_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("current WAL write location");
+DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_xlog_location");
+DATA(insert OID = 3801 ( pg_current_wal_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("current WAL insert location");
+DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_wal_insert_location");
+DATA(insert OID = 6015 ( pg_current_wal_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("current WAL flush location");
+DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_wal_flush_location");
+DATA(insert OID = 3452 ( pg_wal_file_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("WAL filename and byte offset, given an WAL location");
+DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_file_name_offset");
+DATA(insert OID = 3453 ( pg_wal_file_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("WAL filename, given a WAL location");
+DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_file_name");
+
+DATA(insert OID = 3445 ( pg_wal_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("difference in bytes, given two WAL locations");
+DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_location_diff");
DATA(insert OID = 3809 ( pg_export_snapshot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 0 0 25 "" _null_ _null_ _null_ _null_ _null_ pg_export_snapshot _null_ _null_ _null_ ));
DESCR("export a snapshot");
@@ -3165,19 +3179,29 @@ DESCR("export a snapshot");
DATA(insert OID = 3810 ( pg_is_in_recovery PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_recovery _null_ _null_ _null_ ));
DESCR("true if server is in recovery");
-DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_receive_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_replay_location _null_ _null_ _null_ ));
-DESCR("last xlog replay location");
+DATA(insert OID = 3446 ( pg_last_wal_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("current wal flush location");
+DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_last_wal_receive_location");
+DATA(insert OID = 3447 ( pg_last_wal_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("last wal replay location");
+DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_last_wal_replay_location");
DATA(insert OID = 3830 ( pg_last_xact_replay_timestamp PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_last_xact_replay_timestamp _null_ _null_ _null_ ));
DESCR("timestamp of last replay xact");
-DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_pause _null_ _null_ _null_ ));
-DESCR("pause xlog replay");
-DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_resume _null_ _null_ _null_ ));
-DESCR("resume xlog replay, if it was paused");
-DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_xlog_replay_paused _null_ _null_ _null_ ));
-DESCR("true if xlog replay is paused");
+DATA(insert OID = 3450 ( pg_wal_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_pause _null_ _null_ _null_ ));
+DESCR("pause WAL replay");
+DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_pause _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_replay_pause");
+DATA(insert OID = 3451 ( pg_wal_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_resume _null_ _null_ _null_ ));
+DESCR("resume WAL replay, if it was paused");
+DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_resume _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_replay_resume");
+DATA(insert OID = 3448 ( pg_is_wal_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_wal_replay_paused _null_ _null_ _null_ ));
+DESCR("true if WAL replay for recovery is paused");
+DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_wal_replay_paused _null_ _null_ _null_ ));
+DESCR("historical alias for pg_is_wal_replay_paused");
DATA(insert OID = 2621 ( pg_reload_conf PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_reload_conf _null_ _null_ _null_ ));
DESCR("reload configuration files");
@@ -5345,6 +5369,8 @@ DESCR("pg_controldata recovery state information as a function");
DATA(insert OID = 3444 ( pg_control_init PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2249 "" "{23,23,23,23,23,23,23,23,23,16,16,16,23}" "{o,o,o,o,o,o,o,o,o,o,o,o,o}" "{max_data_alignment,database_block_size,blocks_per_segment,wal_block_size,bytes_per_wal_segment,max_identifier_length,max_index_columns,max_toast_chunk_size,large_object_chunk_size,bigint_timestamps,float4_pass_by_value,float8_pass_by_value,data_page_checksum_version}" _null_ _null_ pg_control_init _null_ _null_ _null_ ));
DESCR("pg_controldata init state information as a function");
+/* Next OID: 6016 */
+
/*
* Symbolic values for provolatile column: these indicate whether the result
* of a function is dependent *only* on the values of its explicit arguments,
diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl
index 4dbde2978e..3d43b3577c 100644
--- a/src/test/modules/commit_ts/t/002_standby.pl
+++ b/src/test/modules/commit_ts/t/002_standby.pl
@@ -32,9 +32,9 @@ my $master_ts = $master->safe_psql('postgres',
qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'}
);
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
my $standby_ts = $standby->safe_psql('postgres',
@@ -46,9 +46,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
$master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl
index d37ff182c4..8d4e438989 100644
--- a/src/test/modules/commit_ts/t/003_standby_2.pl
+++ b/src/test/modules/commit_ts/t/003_standby_2.pl
@@ -31,9 +31,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/recovery/t/002_archiving.pl b/src/test/recovery/t/002_archiving.pl
index fc2bf7ee1d..83b43bf84d 100644
--- a/src/test/recovery/t/002_archiving.pl
+++ b/src/test/recovery/t/002_archiving.pl
@@ -33,10 +33,10 @@ $node_standby->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $current_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Force archiving of WAL file to make it present on master
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Add some more content, it should not be present on standby
$node_master->safe_psql('postgres',
@@ -44,7 +44,7 @@ $node_master->safe_psql('postgres',
# Wait until necessary replay has been done on standby
my $caughtup_query =
- "SELECT '$current_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$current_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl
index a82545bf6f..b7b0caae68 100644
--- a/src/test/recovery/t/003_recovery_targets.pl
+++ b/src/test/recovery/t/003_recovery_targets.pl
@@ -32,7 +32,7 @@ sub test_recovery_standby
# Wait until standby has replayed enough data
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
@@ -57,7 +57,7 @@ $node_master->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $lsn1 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Take backup from which all operations will be run
$node_master->backup('my_backup');
@@ -67,14 +67,14 @@ $node_master->backup('my_backup');
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(1001,2000))");
my $ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), txid_current();");
+ "SELECT pg_current_wal_location(), txid_current();");
my ($lsn2, $recovery_txid) = split /\|/, $ret;
# More data, with recovery target timestamp
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(2001,3000))");
$ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), now();");
+ "SELECT pg_current_wal_location(), now();");
my ($lsn3, $recovery_time) = split /\|/, $ret;
# Even more data, this time with a recovery target name
@@ -82,22 +82,22 @@ $node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(3001,4000))");
my $recovery_name = "my_target";
my $lsn4 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"SELECT pg_create_restore_point('$recovery_name');");
# And now for a recovery target LSN
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(4001,5000))");
-my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $lsn5 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(5001,6000))");
# Force archiving of WAL file
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Test recovery targets
my @recovery_params = ("recovery_target = 'immediate'");
diff --git a/src/test/recovery/t/005_replay_delay.pl b/src/test/recovery/t/005_replay_delay.pl
index 640295bfa8..cd9e8f5c12 100644
--- a/src/test/recovery/t/005_replay_delay.pl
+++ b/src/test/recovery/t/005_replay_delay.pl
@@ -42,7 +42,7 @@ $node_master->safe_psql('postgres',
# Now wait for replay to complete on standby. We're done waiting when the
# slave has replayed up to the previously saved master LSN.
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $remaining = 90;
while ($remaining-- > 0)
@@ -50,7 +50,7 @@ while ($remaining-- > 0)
# Done waiting?
my $replay_status = $node_standby->safe_psql('postgres',
- "SELECT (pg_last_xlog_replay_location() - '$until_lsn'::pg_lsn) >= 0"
+ "SELECT (pg_last_wal_replay_location() - '$until_lsn'::pg_lsn) >= 0"
);
last if $replay_status eq 't';
diff --git a/src/test/recovery/t/008_fsm_truncation.pl b/src/test/recovery/t/008_fsm_truncation.pl
index 9f6bdb0b64..4419fc258c 100644
--- a/src/test/recovery/t/008_fsm_truncation.pl
+++ b/src/test/recovery/t/008_fsm_truncation.pl
@@ -69,11 +69,11 @@ vacuum verbose testtab;
$node_master->psql('postgres', 'checkpoint');
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Wait long enough for standby to receive and apply all WAL
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/regress/expected/hs_standby_functions.out b/src/test/regress/expected/hs_standby_functions.out
index 16d50a8285..e0af677ea1 100644
--- a/src/test/regress/expected/hs_standby_functions.out
+++ b/src/test/regress/expected/hs_standby_functions.out
@@ -15,7 +15,7 @@ select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
-select pg_switch_xlog();
+select pg_switch_wal();
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
select pg_stop_backup();
diff --git a/src/test/regress/sql/hs_primary_extremes.sql b/src/test/regress/sql/hs_primary_extremes.sql
index 629efb4be5..2051e2e5cf 100644
--- a/src/test/regress/sql/hs_primary_extremes.sql
+++ b/src/test/regress/sql/hs_primary_extremes.sql
@@ -70,4 +70,4 @@ SELECT count(*) > 257 FROM pg_locks;
COMMIT;
SELECT hs_locks_drop(257);
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_primary_setup.sql b/src/test/regress/sql/hs_primary_setup.sql
index a00b367cbc..eeb4421307 100644
--- a/src/test/regress/sql/hs_primary_setup.sql
+++ b/src/test/regress/sql/hs_primary_setup.sql
@@ -22,4 +22,4 @@ insert into hs3 values (115);
DROP sequence if exists hsseq;
create sequence hsseq;
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_standby_functions.sql b/src/test/regress/sql/hs_standby_functions.sql
index 7577045f11..251bac0a43 100644
--- a/src/test/regress/sql/hs_standby_functions.sql
+++ b/src/test/regress/sql/hs_standby_functions.sql
@@ -10,7 +10,7 @@ select txid_current();
select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
-select pg_switch_xlog();
+select pg_switch_wal();
select pg_stop_backup();
-- should return no rows
On Tue, Jan 10, 2017 at 1:53 AM, Vladimir Rusinov <vrusinov@google.com> wrote:
On Mon, Jan 9, 2017 at 4:14 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:pg_is_xlog_replay_paused | pg_is_recovery_paused
All the other xlog_replay names have been changed to wal_replay, so
making this one different is probably not so good.Oops, forgot about that one. Attached patch with this addressed as well.
- errhint("pg_xlogfile_name_offset() cannot be executed
during recovery.")));
+ errhint(
+ "pg_wal_file_name_offset() cannot be executed
during recovery.")));
I am not sure that there is any need to reformat this error hint.
Your patch includes useless diff noise in pg_proc.h. By that I mean
the lines of pg_start_backup, pg_stop_backup, etc.
+/* Next OID: 6016 */
+
I don't think you need that.
src/test/perl/PostgresNode.pm has added recently a new method called
lsn() that uses some of the WAL position functions. Their update is
necessary as well for this patch.
As there are two school of thoughts on this thread, keeping your patch
with the compatibility table is the best move for now. Even if we end
up by having a version without aliases, that will be just code to
remove in the final version.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Wed, Jan 4, 2017 at 4:32 PM, Andres Freund <andres@anarazel.de> wrote:
Hi,
On 2017-01-03 10:37:08 -0500, Stephen Frost wrote:
* Vladimir Rusinov (vrusinov@google.com) wrote:
I think I +1 on this.
I've did a github search on these function names and there is a lot of code
that use them. E.g. there is 8.5k hits for pg_last_xlog_location
<https://github.com/search?q=pg_last_xlog_replay_location&type=Code&utf8=%E2%9C%93>;
a lot of them a forks and copy-pastes, but still, that's quite a lot. Let's
keep the aliases around for couple of versions after which hopefully a lot
of the code will be updated.And there's 12k hits for pg_xlog.
If we do that, we'll just end up with exactly the same question about
removing them and the same amount of code breakage in a few years. I
don't see how that is really helping anyone.Meh^2. The cost of having pg_xlog was that people lost their
data. Hence their was motivation of changing things. The cost of having
some function aliases is, what, a pg_proc line? If we end up carrying
them forever, so what?If we really feel that this is the only thing between 9.6 and 10 that'll
cause problems for some serious amount of code and we don't expect to
change the function APIs anytime in the near future then perhaps we
could keep aliases, *document* them, and treat them as full functions
just like the regular ones.I think we've been far to cavalier lately about unnecessarily breaking
admin and monitoring tools. There's been pg_stat_activity backward
incompat changes in most of the last releases. It's a *PAIN* to develop
monitoring / admin tools that work with a number of releases. It's fine
to cause that pain if there's some considerable benefit (e.g. not
triggering data loss seems like a case for that, as imo is unifying
configuration), but I don't see how that justifying breaking things
gratuitously. Just renaming well known functions for a minor bit of
cleanliness seems not to survive a cost/benefit analysis.
+1
Regards,
--
Fujii Masao
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Tue, Jan 10, 2017 at 5:24 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:
- errhint("pg_xlogfile_name_offset() cannot be executed during recovery."))); + errhint( + "pg_wal_file_name_offset() cannot be executed during recovery."))); I am not sure that there is any need to reformat this error hint.Your patch includes useless diff noise in pg_proc.h. By that I mean
the lines of pg_start_backup, pg_stop_backup, etc.+/* Next OID: 6016 */ + I don't think you need that.
Reverted all of above.
src/test/perl/PostgresNode.pm has added recently a new method called
lsn() that uses some of the WAL position functions. Their update is
necessary as well for this patch.
Good catch. Changed those as well.
As there are two school of thoughts on this thread, keeping your patch
with the compatibility table is the best move for now. Even if we end
up by having a version without aliases, that will be just code to
remove in the final version.
Indeed, it is trivial to kill aliases.
New version of the patch attached.
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
0004-Remove-xlog-references-from-admin-functions.patchtext/x-patch; charset=US-ASCII; name=0004-Remove-xlog-references-from-admin-functions.patchDownload
diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl
index 56c6618d3d..dc907baf87 100644
--- a/contrib/bloom/t/001_wal.pl
+++ b/contrib/bloom/t/001_wal.pl
@@ -16,7 +16,7 @@ sub test_index_replay
# Wait for standby to catch up
my $applname = $node_standby->name;
my $caughtup_query =
-"SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
+"SELECT pg_current_wal_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
$node_master->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby 1 to catch up";
diff --git a/contrib/test_decoding/expected/ddl.out b/contrib/test_decoding/expected/ddl.out
index c104c4802d..275c84a450 100644
--- a/contrib/test_decoding/expected/ddl.out
+++ b/contrib/test_decoding/expected/ddl.out
@@ -58,7 +58,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
slot_name | plugin | slot_type | active | catalog_xmin_set | data_xmin_not_set | some_wal
-----------------+---------------+-----------+--------+------------------+-------------------+----------
diff --git a/contrib/test_decoding/sql/ddl.sql b/contrib/test_decoding/sql/ddl.sql
index 89b8b8f780..49dad39b50 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -29,7 +29,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
/*
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 6eaed1efbe..e37f101277 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -726,9 +726,9 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0
<para>
Also, you can force a segment switch manually with
- <function>pg_switch_xlog</> if you want to ensure that a
- just-finished transaction is archived as soon as possible. Other utility
- functions related to WAL management are listed in <xref
+ <function>pg_switch_wal</> if you want to ensure that a just-finished
+ transaction is archived as soon as possible. Other utility functions
+ related to WAL management are listed in <xref
linkend="functions-admin-backup-table">.
</para>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 10e31868ba..a5bfb4b306 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -17925,13 +17925,13 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_create_restore_point</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_flush_location</primary>
+ <primary>pg_current_wal_flush_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_insert_location</primary>
+ <primary>pg_current_wal_insert_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_location</primary>
+ <primary>pg_current_wal_location</primary>
</indexterm>
<indexterm>
<primary>pg_start_backup</primary>
@@ -17946,24 +17946,25 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_backup_start_time</primary>
</indexterm>
<indexterm>
- <primary>pg_switch_xlog</primary>
+ <primary>pg_switch_wal</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name</primary>
+ <primary>pg_wal_file_name</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name_offset</primary>
+ <primary>pg_wal_file_name_offset</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_location_diff</primary>
+ <primary>pg_wal_location_diff</primary>
</indexterm>
<para>
The functions shown in <xref
linkend="functions-admin-backup-table"> assist in making on-line backups.
These functions cannot be executed during recovery (except
- <function>pg_is_in_backup</function>, <function>pg_backup_start_time</function>
- and <function>pg_xlog_location_diff</function>).
+ <function>pg_is_in_backup</function>,
+ <function>pg_backup_start_time</function> and
+ <function>pg_wal_location_diff</function>).
</para>
<table id="functions-admin-backup-table">
@@ -17984,21 +17985,21 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_flush_location()</function></literal>
+ <literal><function>pg_current_wal_flush_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log flush location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_insert_location()</function></literal>
+ <literal><function>pg_current_wal_insert_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log insert location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_location()</function></literal>
+ <literal><function>pg_current_wal_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log write location</entry>
@@ -18040,28 +18041,28 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_switch_xlog()</function></literal>
+ <literal><function>pg_switch_wal()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Force switch to a new transaction log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</type></entry>
<entry>Convert transaction log location string to file name</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</>, <type>integer</></entry>
<entry>Convert transaction log location string to file name and decimal byte offset within file</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlog_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>numeric</></entry>
<entry>Calculate the difference between two transaction log locations</entry>
@@ -18119,11 +18120,11 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_switch_xlog</> moves to the next transaction log file, allowing the
+ <function>pg_switch_wal</> moves to the next transaction log file, allowing the
current file to be archived (assuming you are using continuous archiving).
The return value is the ending transaction log location + 1 within the just-completed transaction log file.
If there has been no transaction log activity since the last transaction log switch,
- <function>pg_switch_xlog</> does nothing and returns the start location
+ <function>pg_switch_wal</> does nothing and returns the start location
of the transaction log file currently in use.
</para>
@@ -18138,10 +18139,10 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_current_xlog_location</> displays the current transaction log write
+ <function>pg_current_wal_location</> displays the current transaction log write
location in the same format used by the above functions. Similarly,
- <function>pg_current_xlog_insert_location</> displays the current transaction log
- insertion point and <function>pg_current_xlog_flush_location</> displays the
+ <function>pg_current_wal_insert_location</> displays the current transaction log
+ insertion point and <function>pg_current_wal_flush_location</> displays the
current transaction log flush point. The insertion point is the <quote>logical</>
end of the transaction log at any instant, while the write location is the end of
what has actually been written out from the server's internal buffers and flush
@@ -18154,17 +18155,17 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- You can use <function>pg_xlogfile_name_offset</> to extract the
+ You can use <function>pg_wal_file_name_offset</> to extract the
corresponding transaction log file name and byte offset from the results of any of the
above functions. For example:
<programlisting>
-postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
+postgres=# SELECT * FROM pg_wal_file_name_offset(pg_stop_backup());
file_name | file_offset
--------------------------+-------------
00000001000000000000000D | 4039624
(1 row)
</programlisting>
- Similarly, <function>pg_xlogfile_name</> extracts just the transaction log file name.
+ Similarly, <function>pg_wal_file_name</> extracts just the transaction log file name.
When the given transaction log location is exactly at a transaction log file boundary, both
these functions return the name of the preceding transaction log file.
This is usually the desired behavior for managing transaction log archiving
@@ -18173,7 +18174,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</para>
<para>
- <function>pg_xlog_location_diff</> calculates the difference in bytes
+ <function>pg_wal_location_diff</> calculates the difference in bytes
between two transaction log locations. It can be used with
<structname>pg_stat_replication</structname> or some functions shown in
<xref linkend="functions-admin-backup-table"> to get the replication lag.
@@ -18193,10 +18194,10 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<primary>pg_is_in_recovery</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_receive_location</primary>
+ <primary>pg_last_wal_receive_location</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_replay_location</primary>
+ <primary>pg_last_wal_replay_location</primary>
</indexterm>
<indexterm>
<primary>pg_last_xact_replay_timestamp</primary>
@@ -18228,7 +18229,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_receive_location()</function></literal>
+ <literal><function>pg_last_wal_receive_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location received and synced to disk by
@@ -18242,7 +18243,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_replay_location()</function></literal>
+ <literal><function>pg_last_wal_replay_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location replayed during recovery.
@@ -18274,13 +18275,13 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</table>
<indexterm>
- <primary>pg_is_xlog_replay_paused</primary>
+ <primary>pg_is_recovery_paused</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_pause</primary>
+ <primary>pg_wal_replay_pause</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_resume</primary>
+ <primary>pg_wal_replay_resume</primary>
</indexterm>
<para>
@@ -18300,7 +18301,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<tbody>
<row>
<entry>
- <literal><function>pg_is_xlog_replay_paused()</function></literal>
+ <literal><function>pg_is_recovery_paused()</function></literal>
</entry>
<entry><type>bool</type></entry>
<entry>True if recovery is paused.
@@ -18308,7 +18309,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_pause()</function></literal>
+ <literal><function>pg_wal_replay_pause()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Pauses recovery immediately (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -18316,7 +18317,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_resume()</function></literal>
+ <literal><function>pg_wal_replay_resume()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Restarts recovery if it was paused (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -19670,6 +19671,160 @@ SELECT (pg_stat_file('filename')).modification;
</sect2>
+
+ <sect2 id="functions-admin-deprecated">
+ <title>Deprecated Functions</title>
+
+ <indexterm>
+ <primary>pg_current_xlog_flush_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_current_xlog_insert_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_current_xlog_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_is_xlog_replay_paused</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_last_xlog_receive_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_last_xlog_replay_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_switch_xlog</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_replay_pause</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_location_diff</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_replay_resume</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlogfile_name</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlogfile_name_offset</primary>
+ </indexterm>
+
+ <para>
+ The functions shown in <xref linkend="functions-admin-deprecated-table"> are
+ deprecated and will be removed in a future PostgreSQL release. It is highly
+ recommended to use new function names instead.
+ </para>
+
+ <table id="functions-admin-deprecated-table">
+ <title>Deprecated Administration Functions</title>
+ <tgroup cols="2">
+ <thead><row><entry>Name</entry> <entry>Replaced by</entry></row></thead>
+ <tbody>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_flush_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_flush_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_insert_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_insert_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_is_xlog_replay_paused</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_is_recovery_paused</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_last_xlog_receive_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_last_wal_receive_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_last_xlog_replay_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_last_wal_replay_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_switch_xlog</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_switch_wal</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_location_diff</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_location_diff</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_replay_pause</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_replay_pause</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_replay_resume</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_replay_resume</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlogfile_name</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_file_name</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlogfile_name_offset</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_file_name_offset</function></literal>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </sect2>
+
</sect1>
<sect1 id="functions-trigger">
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index a1a9532088..e1c08c6e94 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -853,8 +853,8 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
standby. You can calculate this lag by comparing the current WAL write
location on the primary with the last WAL location received by the
standby. They can be retrieved using
- <function>pg_current_xlog_location</> on the primary and the
- <function>pg_last_xlog_receive_location</> on the standby,
+ <function>pg_current_wal_location</> on the primary and the
+ <function>pg_last_wal_receive_location</> on the standby,
respectively (see <xref linkend="functions-admin-backup-table"> and
<xref linkend="functions-recovery-info-table"> for details).
The last WAL receive location in the standby is also displayed in the
@@ -865,10 +865,10 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
You can retrieve a list of WAL sender processes via the
<link linkend="monitoring-stats-views-table">
<literal>pg_stat_replication</></link> view. Large differences between
- <function>pg_current_xlog_location</> and <literal>sent_location</> field
+ <function>pg_current_wal_location</> and <literal>sent_location</> field
might indicate that the master server is under heavy load, while
differences between <literal>sent_location</> and
- <function>pg_last_xlog_receive_location</> on the standby might indicate
+ <function>pg_last_wal_receive_location</> on the standby might indicate
network delay, or that the standby is under heavy load.
</para>
</sect3>
@@ -1587,7 +1587,7 @@ if (!triggered)
</para>
<para>
- An external program can call the <function>pg_xlogfile_name_offset()</>
+ An external program can call the <function>pg_wal_file_name_offset()</>
function (see <xref linkend="functions-admin">)
to find out the file name and the exact byte offset within it of
the current end of WAL. It can then access the WAL file directly
@@ -2225,7 +2225,7 @@ LOG: database system is ready to accept read only connections
<para>
WAL file control commands will not work during recovery,
- e.g. <function>pg_start_backup</>, <function>pg_switch_xlog</> etc.
+ e.g. <function>pg_start_backup</>, <function>pg_switch_wal</> etc.
</para>
<para>
diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml
index 8c24ae2174..a91864bf62 100644
--- a/doc/src/sgml/recovery-config.sgml
+++ b/doc/src/sgml/recovery-config.sgml
@@ -321,7 +321,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
to be executed against the database to check if this recovery target
is the most desirable point for recovery.
The paused state can be resumed by
- using <function>pg_xlog_replay_resume()</> (see
+ using <function>pg_wal_replay_resume()</> (see
<xref linkend="functions-recovery-control-table">), which then
causes recovery to end. If this recovery target is not the
desired stopping point, then shut down the server, change the
diff --git a/src/backend/access/transam/recovery.conf.sample b/src/backend/access/transam/recovery.conf.sample
index 7a16751541..ace77df728 100644
--- a/src/backend/access/transam/recovery.conf.sample
+++ b/src/backend/access/transam/recovery.conf.sample
@@ -98,10 +98,9 @@
#
# If recovery_target_action = 'pause', recovery will pause when the
# recovery target is reached. The pause state will continue until
-# pg_xlog_replay_resume() is called. This setting has no effect if
-# no recovery target is set. If hot_standby is not enabled then the
-# server will shutdown instead, though you may request this in
-# any case by specifying 'shutdown'.
+# pg_wal_replay_resume() is called. This setting has no effect if no recovery
+# target is set. If hot_standby is not enabled then the server will shutdown
+# instead, though you may request this in any case by specifying 'shutdown'.
#
#recovery_target_action = 'pause'
#
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 70edafadff..6dd63a945f 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5740,7 +5740,7 @@ recoveryPausesHere(void)
ereport(LOG,
(errmsg("recovery has paused"),
- errhint("Execute pg_xlog_replay_resume() to continue.")));
+ errhint("Execute pg_wal_replay_resume() to continue.")));
while (RecoveryIsPaused())
{
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index 5cafb8b913..e5ac9272d0 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -277,13 +277,13 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS)
}
/*
- * pg_switch_xlog: switch to next xlog file
+ * pg_switch_wal: switch to next WAL file
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_switch_xlog(PG_FUNCTION_ARGS)
+pg_switch_wal(PG_FUNCTION_ARGS)
{
XLogRecPtr switchpoint;
@@ -349,7 +349,7 @@ pg_create_restore_point(PG_FUNCTION_ARGS)
* to the kernel, but is not necessarily synced to disk.
*/
Datum
-pg_current_xlog_location(PG_FUNCTION_ARGS)
+pg_current_wal_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -370,7 +370,7 @@ pg_current_xlog_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
+pg_current_wal_insert_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -391,7 +391,7 @@ pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
+pg_current_wal_flush_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -413,7 +413,7 @@ pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
* and synced to disk by walreceiver.
*/
Datum
-pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
+pg_last_wal_receive_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -432,7 +432,7 @@ pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
* connections during recovery.
*/
Datum
-pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
+pg_last_wal_replay_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -445,15 +445,15 @@ pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
}
/*
- * Compute an xlog file name and decimal byte offset given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * Compute an WAL file name and decimal byte offset given a WAL location,
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*
* Note that a location exactly at a segment boundary is taken to be in
* the previous segment. This is usually the right thing, since the
* expected usage is to determine which xlog file(s) are ready to archive.
*/
Datum
-pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
+pg_wal_file_name_offset(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
uint32 xrecoff;
@@ -469,7 +469,7 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name_offset() cannot be executed during recovery.")));
+ errhint("pg_wal_file_name_offset() cannot be executed during recovery.")));
/*
* Construct a tuple descriptor for the result row. This must match this
@@ -512,10 +512,10 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
/*
* Compute an xlog file name given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*/
Datum
-pg_xlogfile_name(PG_FUNCTION_ARGS)
+pg_wal_file_name(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
XLogRecPtr locationpoint = PG_GETARG_LSN(0);
@@ -525,7 +525,7 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name() cannot be executed during recovery.")));
+ errhint("pg_wal_file_name() cannot be executed during recovery.")));
XLByteToPrevSeg(locationpoint, xlogsegno);
XLogFileName(xlogfilename, ThisTimeLineID, xlogsegno);
@@ -534,13 +534,13 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_pause - pause recovery now
+ * pg_wal_replay_pause - pause recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_pause(PG_FUNCTION_ARGS)
+pg_wal_replay_pause(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -554,13 +554,13 @@ pg_xlog_replay_pause(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_resume - resume recovery now
+ * pg_wal_replay_resume - resume recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_resume(PG_FUNCTION_ARGS)
+pg_wal_replay_resume(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -574,10 +574,10 @@ pg_xlog_replay_resume(PG_FUNCTION_ARGS)
}
/*
- * pg_is_xlog_replay_paused
+ * pg_is_recovery_paused
*/
Datum
-pg_is_xlog_replay_paused(PG_FUNCTION_ARGS)
+pg_is_recovery_paused(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -619,7 +619,7 @@ pg_is_in_recovery(PG_FUNCTION_ARGS)
* Compute the difference in bytes between two WAL locations.
*/
Datum
-pg_xlog_location_diff(PG_FUNCTION_ARGS)
+pg_wal_location_diff(PG_FUNCTION_ARGS)
{
Datum result;
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index 31aade102b..93c9d13950 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -1050,8 +1050,11 @@ REVOKE EXECUTE ON FUNCTION pg_start_backup(text, boolean, boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup() FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup(boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_create_restore_point(text) FROM public;
+REVOKE EXECUTE ON FUNCTION pg_switch_wal() FROM public;
REVOKE EXECUTE ON FUNCTION pg_switch_xlog() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_pause() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_pause() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_rotate_logfile() FROM public;
REVOKE EXECUTE ON FUNCTION pg_reload_conf() FROM public;
diff --git a/src/backend/po/de.po b/src/backend/po/de.po
index 9ac21992a9..494d4a33f4 100644
--- a/src/backend/po/de.po
+++ b/src/backend/po/de.po
@@ -2052,8 +2052,8 @@ msgstr "Wiederherstellung wurde pausiert"
#: access/transam/xlog.c:5643
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "F��hren Sie pg_xlog_replay_resume() aus um fortzusetzen."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "F��hren Sie pg_wal_replay_resume() aus um fortzusetzen."
#: access/transam/xlog.c:5850
#, c-format
@@ -2789,13 +2789,13 @@ msgstr "Wert zu lang f��r Restore-Punkt (maximal %d Zeichen)"
#: access/transam/xlogfuncs.c:472
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
#: access/transam/xlogfuncs.c:528
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() kann nicht w��hrend der Wiederherstellung ausgef��hrt werden."
#: access/transam/xlogfuncs.c:548 access/transam/xlogfuncs.c:568
#: access/transam/xlogfuncs.c:585
diff --git a/src/backend/po/es.po b/src/backend/po/es.po
index 955531c295..6948c06fc4 100644
--- a/src/backend/po/es.po
+++ b/src/backend/po/es.po
@@ -2120,8 +2120,8 @@ msgstr "la recuperaci��n est�� en pausa"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Ejecute pg_xlog_replay_resume() para continuar."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Ejecute pg_wal_replay_resume() para continuar."
#: access/transam/xlog.c:5852
#, c-format
@@ -2873,13 +2873,13 @@ msgstr "el valor es demasiado largo para un punto de recuperaci��n (m��ximo %d c
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() no puede ejecutarse durante la recuperaci��n."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() no puede ejecutarse durante la recuperaci��n."
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() no puede ejecutarse durante la recuperaci��n."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() no puede ejecutarse durante la recuperaci��n."
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569
#: access/transam/xlogfuncs.c:586
diff --git a/src/backend/po/fr.po b/src/backend/po/fr.po
index af5ee56238..3a59504cac 100644
--- a/src/backend/po/fr.po
+++ b/src/backend/po/fr.po
@@ -2039,8 +2039,8 @@ msgstr "restauration en pause"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Ex�cuter pg_xlog_replay_resume() pour continuer."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Ex�cuter pg_wal_replay_resume() pour continuer."
#: access/transam/xlog.c:5852
#, c-format
@@ -2803,13 +2803,13 @@ msgstr "valeur trop longue pour le point de restauration (%d caract
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() ne peut pas �tre ex�cut� lors de la restauration."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() ne peut pas �tre ex�cut� lors de la restauration."
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() ne peut pas �tre ex�cut� lors de la restauration."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() ne peut pas �tre ex�cut� lors de la restauration."
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569 access/transam/xlogfuncs.c:586
#, c-format
diff --git a/src/backend/po/id.po b/src/backend/po/id.po
index d5d484132b..4e01aa989f 100644
--- a/src/backend/po/id.po
+++ b/src/backend/po/id.po
@@ -1259,8 +1259,8 @@ msgstr "pemulihan berhenti"
#: access/transam/xlog.c:4669
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Menjalankan pg_xlog_replay_resume() untuk melanjutan."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Menjalankan pg_wal_replay_resume() untuk melanjutan."
#: access/transam/xlog.c:4799
#, c-format
@@ -1911,8 +1911,8 @@ msgstr "nilai terlalu panjang untuk titik pemgembalian point (maksimal %d karakt
#: access/transam/xlogfuncs.c:300
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() tidak dapat dijalankan selama proses pemulihan."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() tidak dapat dijalankan selama proses pemulihan."
#: access/transam/xlogfuncs.c:312 access/transam/xlogfuncs.c:383 access/transam/xlogfuncs.c:540 access/transam/xlogfuncs.c:546
#, c-format
@@ -1921,8 +1921,8 @@ msgstr "tidak dapat menguraikan file log transaksi �� %s ��"
#: access/transam/xlogfuncs.c:374
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() tidak dapat menjalankan selama proses pemulihan."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() tidak dapat menjalankan selama proses pemulihan."
#: access/transam/xlogfuncs.c:402 access/transam/xlogfuncs.c:424 access/transam/xlogfuncs.c:446
#, c-format
diff --git a/src/backend/po/it.po b/src/backend/po/it.po
index 393ed954ae..39a8cab4b2 100644
--- a/src/backend/po/it.po
+++ b/src/backend/po/it.po
@@ -2069,8 +2069,8 @@ msgstr "ripristino in pausa"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Esegui pg_xlog_replay_resume() per continuare."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Esegui pg_wal_replay_resume() per continuare."
#: access/transam/xlog.c:5852
#, c-format
@@ -2812,13 +2812,13 @@ msgstr "il valore �� troppo lungo per un punto di ripristino (massimo %d caratte
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() non pu�� essere eseguito durante il recupero."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() non pu�� essere eseguito durante il recupero."
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() non pu�� essere eseguito durante il recupero."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() non pu�� essere eseguito durante il recupero."
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569
#: access/transam/xlogfuncs.c:586
diff --git a/src/backend/po/ja.po b/src/backend/po/ja.po
index 2fa5d48a82..f42b889656 100644
--- a/src/backend/po/ja.po
+++ b/src/backend/po/ja.po
@@ -1347,8 +1347,8 @@ msgstr "������������������������������������������������"
#: access/transam/xlog.c:5804
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "pg_xlog_replay_resume() ������������������������������������������������"
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "pg_wal_replay_resume() ������������������������������������������������"
#: access/transam/xlog.c:5934
#, c-format
@@ -2042,8 +2042,8 @@ msgstr "������������������������������������������������������������������ %d
#: access/transam/xlogfuncs.c:290
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "������������������ pg_xlogfile_name_offset() ������������������������"
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "������������������ pg_wal_file_name_offset() ������������������������"
#: access/transam/xlogfuncs.c:302 access/transam/xlogfuncs.c:373
#: access/transam/xlogfuncs.c:530 access/transam/xlogfuncs.c:536
@@ -2053,8 +2053,8 @@ msgstr "������������������������������������\"%s\"������������������������������
#: access/transam/xlogfuncs.c:364
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "������������������ pg_xlogfile_name() ������������������������"
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "������������������ pg_wal_file_name() ������������������������"
#: access/transam/xlogfuncs.c:392 access/transam/xlogfuncs.c:414
#: access/transam/xlogfuncs.c:436
diff --git a/src/backend/po/pl.po b/src/backend/po/pl.po
index 677badf5be..7c50e80229 100644
--- a/src/backend/po/pl.po
+++ b/src/backend/po/pl.po
@@ -2081,8 +2081,8 @@ msgstr "odzyskiwanie zosta��o wstrzymane"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Wykonaj pg_xlog_replay_resume() by kontynuowa��."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Wykonaj pg_wal_replay_resume() by kontynuowa��."
#: access/transam/xlog.c:5852
#, c-format
@@ -2834,13 +2834,13 @@ msgstr "warto���� zbyt d��uga punktu przywr��cenia (maksimum %d znak��w)"
#: access/transam/xlogfuncs.c:472
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() nie mo��e by�� uruchomiony podczas trwania odzyskiwania."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() nie mo��e by�� uruchomiony podczas trwania odzyskiwania."
#: access/transam/xlogfuncs.c:528
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() nie mo��e by�� uruchomiony podczas trwania."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() nie mo��e by�� uruchomiony podczas trwania."
#: access/transam/xlogfuncs.c:548 access/transam/xlogfuncs.c:568
#: access/transam/xlogfuncs.c:585
diff --git a/src/backend/po/pt_BR.po b/src/backend/po/pt_BR.po
index 37e4a28f07..438c4c2339 100644
--- a/src/backend/po/pt_BR.po
+++ b/src/backend/po/pt_BR.po
@@ -1480,8 +1480,8 @@ msgstr "recupera����o est�� em pausa"
#: access/transam/xlog.c:5699
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "Execute pg_xlog_replay_resume() para continuar."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "Execute pg_wal_replay_resume() para continuar."
#: access/transam/xlog.c:5914
#, c-format
@@ -2143,13 +2143,13 @@ msgstr "valor �� muito longo para ponto de restaura����o (m��ximo de %d caracter
#: access/transam/xlogfuncs.c:271
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "pg_xlogfile_name_offset() n��o pode ser executado durante recupera����o."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "pg_wal_file_name_offset() n��o pode ser executado durante recupera����o."
#: access/transam/xlogfuncs.c:327
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "pg_xlogfile_name() n��o pode ser executado durante recupera����o."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "pg_wal_file_name() n��o pode ser executado durante recupera����o."
#: access/transam/xlogfuncs.c:344 access/transam/xlogfuncs.c:366
#, c-format
diff --git a/src/backend/po/ru.po b/src/backend/po/ru.po
index 5bd8059a9d..f9d5a4731f 100644
--- a/src/backend/po/ru.po
+++ b/src/backend/po/ru.po
@@ -2401,8 +2401,8 @@ msgstr "���������������������������� ����������������������������"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "������������������ pg_xlog_replay_resume() ������ ����������������������."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "������������������ pg_wal_replay_resume() ������ ����������������������."
#: access/transam/xlog.c:5852
#, c-format
@@ -3265,14 +3265,14 @@ msgstr "���������������� ������ ���������� ���������������������������� ��������
#: access/transam/xlogfuncs.c:472
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
msgstr ""
-"�������������� pg_xlogfile_name_offset() ������������ ���������������� ���� ���������� ����������������������������."
+"�������������� pg_wal_file_name_offset() ������������ ���������������� ���� ���������� ����������������������������."
#: access/transam/xlogfuncs.c:528
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "�������������� pg_xlogfile_name() ������������ ���������������� �� ���������������� ����������������������������."
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "�������������� pg_wal_file_name() ������������ ���������������� �� ���������������� ����������������������������."
#: access/transam/xlogfuncs.c:548 access/transam/xlogfuncs.c:568
#: access/transam/xlogfuncs.c:585
diff --git a/src/backend/po/zh_CN.po b/src/backend/po/zh_CN.po
index 1e6934a7a5..7ac1690cb0 100644
--- a/src/backend/po/zh_CN.po
+++ b/src/backend/po/zh_CN.po
@@ -2229,8 +2229,8 @@ msgstr "���������������������"
#: access/transam/xlog.c:5645
#, c-format
-msgid "Execute pg_xlog_replay_resume() to continue."
-msgstr "������ pg_xlog_replay_resume() ���������."
+msgid "Execute pg_wal_replay_resume() to continue."
+msgstr "������ pg_wal_replay_resume() ���������."
#: access/transam/xlog.c:5852
#, c-format
@@ -3055,13 +3055,13 @@ msgstr "������������������(������%d���������)"
#: access/transam/xlogfuncs.c:473
#, c-format
-msgid "pg_xlogfile_name_offset() cannot be executed during recovery."
-msgstr "������������������������������pg_xlogfile_name_offset()"
+msgid "pg_wal_file_name_offset() cannot be executed during recovery."
+msgstr "������������������������������pg_wal_file_name_offset()"
#: access/transam/xlogfuncs.c:529
#, c-format
-msgid "pg_xlogfile_name() cannot be executed during recovery."
-msgstr "������������������������������pg_xlogfile_name() "
+msgid "pg_wal_file_name() cannot be executed during recovery."
+msgstr "������������������������������pg_wal_file_name() "
#: access/transam/xlogfuncs.c:549 access/transam/xlogfuncs.c:569
#: access/transam/xlogfuncs.c:586
diff --git a/src/bin/pg_rewind/RewindTest.pm b/src/bin/pg_rewind/RewindTest.pm
index 1c482617ad..c67212ff7a 100644
--- a/src/bin/pg_rewind/RewindTest.pm
+++ b/src/bin/pg_rewind/RewindTest.pm
@@ -156,7 +156,7 @@ sub promote_standby
# Wait for the standby to receive and write all WAL.
my $wal_received_query =
-"SELECT pg_current_xlog_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
+"SELECT pg_current_wal_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
$node_master->poll_query_until('postgres', $wal_received_query)
or die "Timed out while waiting for standby to receive and write WAL";
diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c
index a903849ee4..d2374201c6 100644
--- a/src/bin/pg_rewind/libpq_fetch.c
+++ b/src/bin/pg_rewind/libpq_fetch.c
@@ -121,7 +121,7 @@ run_simple_query(const char *sql)
}
/*
- * Calls pg_current_xlog_insert_location() function
+ * Calls pg_current_wal_insert_location() function
*/
XLogRecPtr
libpqGetCurrentXlogInsertLocation(void)
@@ -131,7 +131,7 @@ libpqGetCurrentXlogInsertLocation(void)
uint32 lo;
char *val;
- val = run_simple_query("SELECT pg_current_xlog_insert_location()");
+ val = run_simple_query("SELECT pg_current_wal_insert_location()");
if (sscanf(val, "%X/%X", &hi, &lo) != 2)
pg_fatal("unrecognized result \"%s\" for current WAL insert location\n", val);
diff --git a/src/include/access/xlog_fn.h b/src/include/access/xlog_fn.h
index a013d047a2..a46b2f995c 100644
--- a/src/include/access/xlog_fn.h
+++ b/src/include/access/xlog_fn.h
@@ -16,21 +16,21 @@
extern Datum pg_start_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup_v2(PG_FUNCTION_ARGS);
-extern Datum pg_switch_xlog(PG_FUNCTION_ARGS);
+extern Datum pg_switch_wal(PG_FUNCTION_ARGS);
extern Datum pg_create_restore_point(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_insert_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_flush_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_receive_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_replay_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_insert_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_flush_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_receive_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_replay_location(PG_FUNCTION_ARGS);
extern Datum pg_last_xact_replay_timestamp(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name_offset(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name_offset(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name(PG_FUNCTION_ARGS);
extern Datum pg_is_in_recovery(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_pause(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_resume(PG_FUNCTION_ARGS);
-extern Datum pg_is_xlog_replay_paused(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_location_diff(PG_FUNCTION_ARGS);
+extern Datum pg_wal_replay_pause(PG_FUNCTION_ARGS);
+extern Datum pg_wal_replay_resume(PG_FUNCTION_ARGS);
+extern Datum pg_is_recovery_paused(PG_FUNCTION_ARGS);
+extern Datum pg_wal_location_diff(PG_FUNCTION_ARGS);
extern Datum pg_is_in_backup(PG_FUNCTION_ARGS);
extern Datum pg_backup_start_time(PG_FUNCTION_ARGS);
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 37e022dc0d..17471b4199 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -3141,23 +3141,37 @@ DATA(insert OID = 3813 ( pg_is_in_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s
DESCR("true if server is in online backup");
DATA(insert OID = 3814 ( pg_backup_start_time PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_backup_start_time _null_ _null_ _null_ ));
DESCR("start time of an online backup");
-DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_xlog _null_ _null_ _null_ ));
-DESCR("switch to new xlog file");
+DATA(insert OID = 3449 ( pg_switch_wal PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("switch to new WAL file");
+DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("historical alias for pg_switch_wal");
DATA(insert OID = 3098 ( pg_create_restore_point PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 3220 "25" _null_ _null_ _null_ _null_ _null_ pg_create_restore_point _null_ _null_ _null_ ));
DESCR("create a named restore point");
-DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_location _null_ _null_ _null_ ));
-DESCR("current xlog write location");
-DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_insert_location _null_ _null_ _null_ ));
-DESCR("current xlog insert location");
-DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_flush_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_xlogfile_name_offset _null_ _null_ _null_ ));
-DESCR("xlog filename and byte offset, given an xlog location");
-DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_xlogfile_name _null_ _null_ _null_ ));
-DESCR("xlog filename, given an xlog location");
-
-DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_xlog_location_diff _null_ _null_ _null_ ));
-DESCR("difference in bytes, given two xlog locations");
+DATA(insert OID = 3800 ( pg_current_wal_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("current WAL write location");
+DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_xlog_location");
+DATA(insert OID = 3801 ( pg_current_wal_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("current WAL insert location");
+DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_wal_insert_location");
+DATA(insert OID = 6015 ( pg_current_wal_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("current WAL flush location");
+DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_wal_flush_location");
+DATA(insert OID = 3452 ( pg_wal_file_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("WAL filename and byte offset, given an WAL location");
+DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_file_name_offset");
+DATA(insert OID = 3453 ( pg_wal_file_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("WAL filename, given a WAL location");
+DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_file_name");
+
+DATA(insert OID = 3445 ( pg_wal_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("difference in bytes, given two WAL locations");
+DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_location_diff");
DATA(insert OID = 3809 ( pg_export_snapshot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 0 0 25 "" _null_ _null_ _null_ _null_ _null_ pg_export_snapshot _null_ _null_ _null_ ));
DESCR("export a snapshot");
@@ -3165,19 +3179,29 @@ DESCR("export a snapshot");
DATA(insert OID = 3810 ( pg_is_in_recovery PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_recovery _null_ _null_ _null_ ));
DESCR("true if server is in recovery");
-DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_receive_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_replay_location _null_ _null_ _null_ ));
-DESCR("last xlog replay location");
+DATA(insert OID = 3446 ( pg_last_wal_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("current wal flush location");
+DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_last_wal_receive_location");
+DATA(insert OID = 3447 ( pg_last_wal_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("last wal replay location");
+DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_last_wal_replay_location");
DATA(insert OID = 3830 ( pg_last_xact_replay_timestamp PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_last_xact_replay_timestamp _null_ _null_ _null_ ));
DESCR("timestamp of last replay xact");
-DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_pause _null_ _null_ _null_ ));
-DESCR("pause xlog replay");
-DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_resume _null_ _null_ _null_ ));
-DESCR("resume xlog replay, if it was paused");
-DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_xlog_replay_paused _null_ _null_ _null_ ));
-DESCR("true if xlog replay is paused");
+DATA(insert OID = 3450 ( pg_wal_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_pause _null_ _null_ _null_ ));
+DESCR("pause WAL replay");
+DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_pause _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_replay_pause");
+DATA(insert OID = 3451 ( pg_wal_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_resume _null_ _null_ _null_ ));
+DESCR("resume WAL replay, if it was paused");
+DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_resume _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_replay_resume");
+DATA(insert OID = 3448 ( pg_is_recovery_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_recovery_paused _null_ _null_ _null_ ));
+DESCR("true if WAL replay for recovery is paused");
+DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_recovery_paused _null_ _null_ _null_ ));
+DESCR("historical alias for pg_is_recovery_paused");
DATA(insert OID = 2621 ( pg_reload_conf PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_reload_conf _null_ _null_ _null_ ));
DESCR("reload configuration files");
diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl
index 4dbde2978e..3d43b3577c 100644
--- a/src/test/modules/commit_ts/t/002_standby.pl
+++ b/src/test/modules/commit_ts/t/002_standby.pl
@@ -32,9 +32,9 @@ my $master_ts = $master->safe_psql('postgres',
qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'}
);
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
my $standby_ts = $standby->safe_psql('postgres',
@@ -46,9 +46,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
$master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl
index d37ff182c4..8d4e438989 100644
--- a/src/test/modules/commit_ts/t/003_standby_2.pl
+++ b/src/test/modules/commit_ts/t/003_standby_2.pl
@@ -31,9 +31,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index 053c5ea787..d84b86105e 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -1343,11 +1343,11 @@ mode must be specified.
sub lsn
{
my ($self, $mode) = @_;
- my %modes = ('insert' => 'pg_current_xlog_insert_location()',
- 'flush' => 'pg_current_xlog_flush_location()',
- 'write' => 'pg_current_xlog_location()',
- 'receive' => 'pg_last_xlog_receive_location()',
- 'replay' => 'pg_last_xlog_replay_location()');
+ my %modes = ('insert' => 'pg_current_wal_insert_location()',
+ 'flush' => 'pg_current_wal_flush_location()',
+ 'write' => 'pg_current_wal_location()',
+ 'receive' => 'pg_last_wal_receive_location()',
+ 'replay' => 'pg_last_wal_replay_location()');
$mode = '<undef>' if !defined($mode);
die "unknown mode for 'lsn': '$mode', valid modes are " . join(', ', keys %modes)
diff --git a/src/test/recovery/t/002_archiving.pl b/src/test/recovery/t/002_archiving.pl
index fc2bf7ee1d..83b43bf84d 100644
--- a/src/test/recovery/t/002_archiving.pl
+++ b/src/test/recovery/t/002_archiving.pl
@@ -33,10 +33,10 @@ $node_standby->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $current_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Force archiving of WAL file to make it present on master
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Add some more content, it should not be present on standby
$node_master->safe_psql('postgres',
@@ -44,7 +44,7 @@ $node_master->safe_psql('postgres',
# Wait until necessary replay has been done on standby
my $caughtup_query =
- "SELECT '$current_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$current_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl
index a82545bf6f..b7b0caae68 100644
--- a/src/test/recovery/t/003_recovery_targets.pl
+++ b/src/test/recovery/t/003_recovery_targets.pl
@@ -32,7 +32,7 @@ sub test_recovery_standby
# Wait until standby has replayed enough data
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
@@ -57,7 +57,7 @@ $node_master->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $lsn1 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Take backup from which all operations will be run
$node_master->backup('my_backup');
@@ -67,14 +67,14 @@ $node_master->backup('my_backup');
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(1001,2000))");
my $ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), txid_current();");
+ "SELECT pg_current_wal_location(), txid_current();");
my ($lsn2, $recovery_txid) = split /\|/, $ret;
# More data, with recovery target timestamp
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(2001,3000))");
$ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), now();");
+ "SELECT pg_current_wal_location(), now();");
my ($lsn3, $recovery_time) = split /\|/, $ret;
# Even more data, this time with a recovery target name
@@ -82,22 +82,22 @@ $node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(3001,4000))");
my $recovery_name = "my_target";
my $lsn4 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"SELECT pg_create_restore_point('$recovery_name');");
# And now for a recovery target LSN
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(4001,5000))");
-my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $lsn5 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(5001,6000))");
# Force archiving of WAL file
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Test recovery targets
my @recovery_params = ("recovery_target = 'immediate'");
diff --git a/src/test/recovery/t/005_replay_delay.pl b/src/test/recovery/t/005_replay_delay.pl
index 640295bfa8..cd9e8f5c12 100644
--- a/src/test/recovery/t/005_replay_delay.pl
+++ b/src/test/recovery/t/005_replay_delay.pl
@@ -42,7 +42,7 @@ $node_master->safe_psql('postgres',
# Now wait for replay to complete on standby. We're done waiting when the
# slave has replayed up to the previously saved master LSN.
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $remaining = 90;
while ($remaining-- > 0)
@@ -50,7 +50,7 @@ while ($remaining-- > 0)
# Done waiting?
my $replay_status = $node_standby->safe_psql('postgres',
- "SELECT (pg_last_xlog_replay_location() - '$until_lsn'::pg_lsn) >= 0"
+ "SELECT (pg_last_wal_replay_location() - '$until_lsn'::pg_lsn) >= 0"
);
last if $replay_status eq 't';
diff --git a/src/test/recovery/t/008_fsm_truncation.pl b/src/test/recovery/t/008_fsm_truncation.pl
index 9f6bdb0b64..4419fc258c 100644
--- a/src/test/recovery/t/008_fsm_truncation.pl
+++ b/src/test/recovery/t/008_fsm_truncation.pl
@@ -69,11 +69,11 @@ vacuum verbose testtab;
$node_master->psql('postgres', 'checkpoint');
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Wait long enough for standby to receive and apply all WAL
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/regress/expected/hs_standby_functions.out b/src/test/regress/expected/hs_standby_functions.out
index 16d50a8285..e0af677ea1 100644
--- a/src/test/regress/expected/hs_standby_functions.out
+++ b/src/test/regress/expected/hs_standby_functions.out
@@ -15,7 +15,7 @@ select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
-select pg_switch_xlog();
+select pg_switch_wal();
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
select pg_stop_backup();
diff --git a/src/test/regress/sql/hs_primary_extremes.sql b/src/test/regress/sql/hs_primary_extremes.sql
index 629efb4be5..2051e2e5cf 100644
--- a/src/test/regress/sql/hs_primary_extremes.sql
+++ b/src/test/regress/sql/hs_primary_extremes.sql
@@ -70,4 +70,4 @@ SELECT count(*) > 257 FROM pg_locks;
COMMIT;
SELECT hs_locks_drop(257);
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_primary_setup.sql b/src/test/regress/sql/hs_primary_setup.sql
index a00b367cbc..eeb4421307 100644
--- a/src/test/regress/sql/hs_primary_setup.sql
+++ b/src/test/regress/sql/hs_primary_setup.sql
@@ -22,4 +22,4 @@ insert into hs3 values (115);
DROP sequence if exists hsseq;
create sequence hsseq;
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_standby_functions.sql b/src/test/regress/sql/hs_standby_functions.sql
index 7577045f11..251bac0a43 100644
--- a/src/test/regress/sql/hs_standby_functions.sql
+++ b/src/test/regress/sql/hs_standby_functions.sql
@@ -10,7 +10,7 @@ select txid_current();
select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
-select pg_switch_xlog();
+select pg_switch_wal();
select pg_stop_backup();
-- should return no rows
On Thu, Jan 12, 2017 at 2:00 AM, Vladimir Rusinov <vrusinov@google.com> wrote:
On Tue, Jan 10, 2017 at 5:24 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:As there are two school of thoughts on this thread, keeping your patch
with the compatibility table is the best move for now. Even if we end
up by having a version without aliases, that will be just code to
remove in the final version.Indeed, it is trivial to kill aliases.
New version of the patch attached.
The patch still updates a bunch of .po files. Those are normally
refreshed with the translation updates, so they had better be removed.
Other than that, the patch looks in good shape to me so switch to
"Ready for committer".
So, to sum up things on this thread, here are the votes about the use
of aliases or a pure breakage:
- No to aliases, shake the world: Stephen, Tom, David F, Vik, Bruce M => 5
- Yes to aliases: Michael P, Andres, Peter E., Cynthia S, Jim N,
Vladimir, Simon R, Fujii-san => 8
If I misunderstood things, please feel free to speak up.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 12, 2017 at 2:49 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
On Thu, Jan 12, 2017 at 2:00 AM, Vladimir Rusinov <vrusinov@google.com> wrote:
On Tue, Jan 10, 2017 at 5:24 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:As there are two school of thoughts on this thread, keeping your patch
with the compatibility table is the best move for now. Even if we end
up by having a version without aliases, that will be just code to
remove in the final version.Indeed, it is trivial to kill aliases.
New version of the patch attached.
The patch still updates a bunch of .po files. Those are normally
refreshed with the translation updates, so they had better be removed.
Other than that, the patch looks in good shape to me so switch to
"Ready for committer".So, to sum up things on this thread, here are the votes about the use
of aliases or a pure breakage:
- No to aliases, shake the world: Stephen, Tom, David F, Vik, Bruce M => 5
- Yes to aliases: Michael P, Andres, Peter E., Cynthia S, Jim N,
Vladimir, Simon R, Fujii-san => 8
If I misunderstood things, please feel free to speak up.
To be pricise, I'd like to avoid the renaming of the functions at all rather
than using aliases.
Regards,
--
Fujii Masao
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/12/17 12:49 AM, Michael Paquier wrote:
On Thu, Jan 12, 2017 at 2:00 AM, Vladimir Rusinov <vrusinov@google.com> wrote:
On Tue, Jan 10, 2017 at 5:24 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:As there are two school of thoughts on this thread, keeping your patch
with the compatibility table is the best move for now. Even if we end
up by having a version without aliases, that will be just code to
remove in the final version.Indeed, it is trivial to kill aliases.
New version of the patch attached.
The patch still updates a bunch of .po files. Those are normally
refreshed with the translation updates, so they had better be removed.
Other than that, the patch looks in good shape to me so switch to
"Ready for committer".So, to sum up things on this thread, here are the votes about the use
of aliases or a pure breakage:
- No to aliases, shake the world: Stephen, Tom, David F, Vik, Bruce M => 5
- Yes to aliases: Michael P, Andres, Peter E., Cynthia S, Jim N,
Vladimir, Simon R, Fujii-san => 8
If I misunderstood things, please feel free to speak up.
I'm also in the "no to aliases" camp.
--
-David
david@pgmasters.net
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 12, 2017 at 8:56 AM, David Steele <david@pgmasters.net> wrote:
So, to sum up things on this thread, here are the votes about the use
of aliases or a pure breakage:
- No to aliases, shake the world: Stephen, Tom, David F, Vik, Bruce M => 5
- Yes to aliases: Michael P, Andres, Peter E., Cynthia S, Jim N,
Vladimir, Simon R, Fujii-san => 8
If I misunderstood things, please feel free to speak up.I'm also in the "no to aliases" camp.
Me too.
I appreciate what people are saying about the pain that is involved
when we change administration interfaces. However, I suspect that
most of that pain falls on tool authors, who are disproportionately
represented in this forum, and on DBAs, who may not like it much but
can probably cope with it. It's not really going to affect
applications, because applications generally don't care about the
transaction log directly. What is really bad is when we break syntax
that might be used in queries, or in PL/pgsql functions. That's why
the 8.3 casting changes were so painful, and why the discussion about
changing PL/pgsql semantics is so dominated by people who don't want
to break what's worth now. When we change things in those areas,
people who know nothing and care nothing about PostgreSQL other than
that it's the underlying database have to update their SQL, and that
hurts adoption. Anyone who is affected by these proposed changes is
already deeply invested in PostgreSQL.
Also, I think it is absolutely wrong to suppose that there's no pain
involved in having these aliases around forever. I thought the idea
of stuffing the aliases in a contrib module was a rather good one,
actually, because then the people who need them can install them
easily and yet the burden on core to maintain them is largely removed.
Also, there's still positive pressure for tools that haven't been
updated to get themselves updated to work without that compatibility
extension, so eventually the need for it should go away. I have not
abandoned all hope of eventually removing contrib/tsearch2 from the
core distribution. When we keep things in the core system catalogs,
they just accumulate forever. There will not only be old code that
continues to use the old names; there will be new code that uses the
old names. There will be people who ask why we have two copies of the
function, or aren't sure which one to use. Somebody will have a
tab-completion fail that results from an irrelevant decision between
two names for the same thing. Individually, these things don't matter
very much, but over time they lead to a user experience that's full of
warts and a developer experience that is enslaved to historical
garbage that takes time and energy away from new feature development.
So, my order of preference is:
1. Rename everything and add an extension to create aliases for the old names.
2. Rename everything without adding a backward-compatibility extension.
3. Don't rename anything.
4. Stomach flu.
5. Put a second name for everything in pg_proc.h.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 12, 2017 at 5:49 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:
The patch still updates a bunch of .po files. Those are normally
refreshed with the translation updates, so they had better be removed.
Other than that, the patch looks in good shape to me so switch to
"Ready for committer".
Gotcha. Excluded these from the new version of the patch. It's actually
same as above but produced with some git :(exclude) magic.
So, to sum up things on this thread, here are the votes about the use
of aliases or a pure breakage:
- No to aliases, shake the world: Stephen, Tom, David F, Vik, Bruce M => 5
- Yes to aliases: Michael P, Andres, Peter E., Cynthia S, Jim N,
Vladimir, Simon R, Fujii-san => 8
If I misunderstood things, please feel free to speak up.
Counting amendments and more votes down the thread:
- no aliases: Stephen, Tom, David F, Vik, Bruce M, David Steele, Robert
Haas => 7
- yes to aliases: Michael P, Andres, Peter E., Cynthia S, Jim N, Vladimir,
Simon R => 7
- avoid renaming altogether: Fujii-san => 1
Duh. Folks, you are not making it easy. :) Looks like we need one more vote.
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
0005-Remove-xlog-references-from-admin-functions.patchtext/x-patch; charset=US-ASCII; name=0005-Remove-xlog-references-from-admin-functions.patchDownload
diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl
index 56c6618d3d..dc907baf87 100644
--- a/contrib/bloom/t/001_wal.pl
+++ b/contrib/bloom/t/001_wal.pl
@@ -16,7 +16,7 @@ sub test_index_replay
# Wait for standby to catch up
my $applname = $node_standby->name;
my $caughtup_query =
-"SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
+"SELECT pg_current_wal_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
$node_master->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby 1 to catch up";
diff --git a/contrib/test_decoding/expected/ddl.out b/contrib/test_decoding/expected/ddl.out
index c104c4802d..275c84a450 100644
--- a/contrib/test_decoding/expected/ddl.out
+++ b/contrib/test_decoding/expected/ddl.out
@@ -58,7 +58,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
slot_name | plugin | slot_type | active | catalog_xmin_set | data_xmin_not_set | some_wal
-----------------+---------------+-----------+--------+------------------+-------------------+----------
diff --git a/contrib/test_decoding/sql/ddl.sql b/contrib/test_decoding/sql/ddl.sql
index 89b8b8f780..49dad39b50 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -29,7 +29,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
/*
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 6eaed1efbe..e37f101277 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -726,9 +726,9 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0
<para>
Also, you can force a segment switch manually with
- <function>pg_switch_xlog</> if you want to ensure that a
- just-finished transaction is archived as soon as possible. Other utility
- functions related to WAL management are listed in <xref
+ <function>pg_switch_wal</> if you want to ensure that a just-finished
+ transaction is archived as soon as possible. Other utility functions
+ related to WAL management are listed in <xref
linkend="functions-admin-backup-table">.
</para>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 10e31868ba..a5bfb4b306 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -17925,13 +17925,13 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_create_restore_point</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_flush_location</primary>
+ <primary>pg_current_wal_flush_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_insert_location</primary>
+ <primary>pg_current_wal_insert_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_location</primary>
+ <primary>pg_current_wal_location</primary>
</indexterm>
<indexterm>
<primary>pg_start_backup</primary>
@@ -17946,24 +17946,25 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_backup_start_time</primary>
</indexterm>
<indexterm>
- <primary>pg_switch_xlog</primary>
+ <primary>pg_switch_wal</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name</primary>
+ <primary>pg_wal_file_name</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name_offset</primary>
+ <primary>pg_wal_file_name_offset</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_location_diff</primary>
+ <primary>pg_wal_location_diff</primary>
</indexterm>
<para>
The functions shown in <xref
linkend="functions-admin-backup-table"> assist in making on-line backups.
These functions cannot be executed during recovery (except
- <function>pg_is_in_backup</function>, <function>pg_backup_start_time</function>
- and <function>pg_xlog_location_diff</function>).
+ <function>pg_is_in_backup</function>,
+ <function>pg_backup_start_time</function> and
+ <function>pg_wal_location_diff</function>).
</para>
<table id="functions-admin-backup-table">
@@ -17984,21 +17985,21 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_flush_location()</function></literal>
+ <literal><function>pg_current_wal_flush_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log flush location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_insert_location()</function></literal>
+ <literal><function>pg_current_wal_insert_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log insert location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_location()</function></literal>
+ <literal><function>pg_current_wal_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log write location</entry>
@@ -18040,28 +18041,28 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_switch_xlog()</function></literal>
+ <literal><function>pg_switch_wal()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Force switch to a new transaction log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</type></entry>
<entry>Convert transaction log location string to file name</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</>, <type>integer</></entry>
<entry>Convert transaction log location string to file name and decimal byte offset within file</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlog_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>numeric</></entry>
<entry>Calculate the difference between two transaction log locations</entry>
@@ -18119,11 +18120,11 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_switch_xlog</> moves to the next transaction log file, allowing the
+ <function>pg_switch_wal</> moves to the next transaction log file, allowing the
current file to be archived (assuming you are using continuous archiving).
The return value is the ending transaction log location + 1 within the just-completed transaction log file.
If there has been no transaction log activity since the last transaction log switch,
- <function>pg_switch_xlog</> does nothing and returns the start location
+ <function>pg_switch_wal</> does nothing and returns the start location
of the transaction log file currently in use.
</para>
@@ -18138,10 +18139,10 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_current_xlog_location</> displays the current transaction log write
+ <function>pg_current_wal_location</> displays the current transaction log write
location in the same format used by the above functions. Similarly,
- <function>pg_current_xlog_insert_location</> displays the current transaction log
- insertion point and <function>pg_current_xlog_flush_location</> displays the
+ <function>pg_current_wal_insert_location</> displays the current transaction log
+ insertion point and <function>pg_current_wal_flush_location</> displays the
current transaction log flush point. The insertion point is the <quote>logical</>
end of the transaction log at any instant, while the write location is the end of
what has actually been written out from the server's internal buffers and flush
@@ -18154,17 +18155,17 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- You can use <function>pg_xlogfile_name_offset</> to extract the
+ You can use <function>pg_wal_file_name_offset</> to extract the
corresponding transaction log file name and byte offset from the results of any of the
above functions. For example:
<programlisting>
-postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
+postgres=# SELECT * FROM pg_wal_file_name_offset(pg_stop_backup());
file_name | file_offset
--------------------------+-------------
00000001000000000000000D | 4039624
(1 row)
</programlisting>
- Similarly, <function>pg_xlogfile_name</> extracts just the transaction log file name.
+ Similarly, <function>pg_wal_file_name</> extracts just the transaction log file name.
When the given transaction log location is exactly at a transaction log file boundary, both
these functions return the name of the preceding transaction log file.
This is usually the desired behavior for managing transaction log archiving
@@ -18173,7 +18174,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</para>
<para>
- <function>pg_xlog_location_diff</> calculates the difference in bytes
+ <function>pg_wal_location_diff</> calculates the difference in bytes
between two transaction log locations. It can be used with
<structname>pg_stat_replication</structname> or some functions shown in
<xref linkend="functions-admin-backup-table"> to get the replication lag.
@@ -18193,10 +18194,10 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<primary>pg_is_in_recovery</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_receive_location</primary>
+ <primary>pg_last_wal_receive_location</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_replay_location</primary>
+ <primary>pg_last_wal_replay_location</primary>
</indexterm>
<indexterm>
<primary>pg_last_xact_replay_timestamp</primary>
@@ -18228,7 +18229,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_receive_location()</function></literal>
+ <literal><function>pg_last_wal_receive_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location received and synced to disk by
@@ -18242,7 +18243,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_replay_location()</function></literal>
+ <literal><function>pg_last_wal_replay_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location replayed during recovery.
@@ -18274,13 +18275,13 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</table>
<indexterm>
- <primary>pg_is_xlog_replay_paused</primary>
+ <primary>pg_is_recovery_paused</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_pause</primary>
+ <primary>pg_wal_replay_pause</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_resume</primary>
+ <primary>pg_wal_replay_resume</primary>
</indexterm>
<para>
@@ -18300,7 +18301,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<tbody>
<row>
<entry>
- <literal><function>pg_is_xlog_replay_paused()</function></literal>
+ <literal><function>pg_is_recovery_paused()</function></literal>
</entry>
<entry><type>bool</type></entry>
<entry>True if recovery is paused.
@@ -18308,7 +18309,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_pause()</function></literal>
+ <literal><function>pg_wal_replay_pause()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Pauses recovery immediately (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -18316,7 +18317,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_resume()</function></literal>
+ <literal><function>pg_wal_replay_resume()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Restarts recovery if it was paused (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -19670,6 +19671,160 @@ SELECT (pg_stat_file('filename')).modification;
</sect2>
+
+ <sect2 id="functions-admin-deprecated">
+ <title>Deprecated Functions</title>
+
+ <indexterm>
+ <primary>pg_current_xlog_flush_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_current_xlog_insert_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_current_xlog_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_is_xlog_replay_paused</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_last_xlog_receive_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_last_xlog_replay_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_switch_xlog</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_replay_pause</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_location_diff</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_replay_resume</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlogfile_name</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlogfile_name_offset</primary>
+ </indexterm>
+
+ <para>
+ The functions shown in <xref linkend="functions-admin-deprecated-table"> are
+ deprecated and will be removed in a future PostgreSQL release. It is highly
+ recommended to use new function names instead.
+ </para>
+
+ <table id="functions-admin-deprecated-table">
+ <title>Deprecated Administration Functions</title>
+ <tgroup cols="2">
+ <thead><row><entry>Name</entry> <entry>Replaced by</entry></row></thead>
+ <tbody>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_flush_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_flush_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_insert_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_insert_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_is_xlog_replay_paused</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_is_recovery_paused</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_last_xlog_receive_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_last_wal_receive_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_last_xlog_replay_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_last_wal_replay_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_switch_xlog</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_switch_wal</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_location_diff</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_location_diff</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_replay_pause</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_replay_pause</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_replay_resume</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_replay_resume</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlogfile_name</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_file_name</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlogfile_name_offset</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_file_name_offset</function></literal>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </sect2>
+
</sect1>
<sect1 id="functions-trigger">
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index a1a9532088..e1c08c6e94 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -853,8 +853,8 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
standby. You can calculate this lag by comparing the current WAL write
location on the primary with the last WAL location received by the
standby. They can be retrieved using
- <function>pg_current_xlog_location</> on the primary and the
- <function>pg_last_xlog_receive_location</> on the standby,
+ <function>pg_current_wal_location</> on the primary and the
+ <function>pg_last_wal_receive_location</> on the standby,
respectively (see <xref linkend="functions-admin-backup-table"> and
<xref linkend="functions-recovery-info-table"> for details).
The last WAL receive location in the standby is also displayed in the
@@ -865,10 +865,10 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
You can retrieve a list of WAL sender processes via the
<link linkend="monitoring-stats-views-table">
<literal>pg_stat_replication</></link> view. Large differences between
- <function>pg_current_xlog_location</> and <literal>sent_location</> field
+ <function>pg_current_wal_location</> and <literal>sent_location</> field
might indicate that the master server is under heavy load, while
differences between <literal>sent_location</> and
- <function>pg_last_xlog_receive_location</> on the standby might indicate
+ <function>pg_last_wal_receive_location</> on the standby might indicate
network delay, or that the standby is under heavy load.
</para>
</sect3>
@@ -1587,7 +1587,7 @@ if (!triggered)
</para>
<para>
- An external program can call the <function>pg_xlogfile_name_offset()</>
+ An external program can call the <function>pg_wal_file_name_offset()</>
function (see <xref linkend="functions-admin">)
to find out the file name and the exact byte offset within it of
the current end of WAL. It can then access the WAL file directly
@@ -2225,7 +2225,7 @@ LOG: database system is ready to accept read only connections
<para>
WAL file control commands will not work during recovery,
- e.g. <function>pg_start_backup</>, <function>pg_switch_xlog</> etc.
+ e.g. <function>pg_start_backup</>, <function>pg_switch_wal</> etc.
</para>
<para>
diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml
index 8c24ae2174..a91864bf62 100644
--- a/doc/src/sgml/recovery-config.sgml
+++ b/doc/src/sgml/recovery-config.sgml
@@ -321,7 +321,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
to be executed against the database to check if this recovery target
is the most desirable point for recovery.
The paused state can be resumed by
- using <function>pg_xlog_replay_resume()</> (see
+ using <function>pg_wal_replay_resume()</> (see
<xref linkend="functions-recovery-control-table">), which then
causes recovery to end. If this recovery target is not the
desired stopping point, then shut down the server, change the
diff --git a/src/backend/access/transam/recovery.conf.sample b/src/backend/access/transam/recovery.conf.sample
index 7a16751541..ace77df728 100644
--- a/src/backend/access/transam/recovery.conf.sample
+++ b/src/backend/access/transam/recovery.conf.sample
@@ -98,10 +98,9 @@
#
# If recovery_target_action = 'pause', recovery will pause when the
# recovery target is reached. The pause state will continue until
-# pg_xlog_replay_resume() is called. This setting has no effect if
-# no recovery target is set. If hot_standby is not enabled then the
-# server will shutdown instead, though you may request this in
-# any case by specifying 'shutdown'.
+# pg_wal_replay_resume() is called. This setting has no effect if no recovery
+# target is set. If hot_standby is not enabled then the server will shutdown
+# instead, though you may request this in any case by specifying 'shutdown'.
#
#recovery_target_action = 'pause'
#
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 70edafadff..6dd63a945f 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5740,7 +5740,7 @@ recoveryPausesHere(void)
ereport(LOG,
(errmsg("recovery has paused"),
- errhint("Execute pg_xlog_replay_resume() to continue.")));
+ errhint("Execute pg_wal_replay_resume() to continue.")));
while (RecoveryIsPaused())
{
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index 5cafb8b913..e5ac9272d0 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -277,13 +277,13 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS)
}
/*
- * pg_switch_xlog: switch to next xlog file
+ * pg_switch_wal: switch to next WAL file
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_switch_xlog(PG_FUNCTION_ARGS)
+pg_switch_wal(PG_FUNCTION_ARGS)
{
XLogRecPtr switchpoint;
@@ -349,7 +349,7 @@ pg_create_restore_point(PG_FUNCTION_ARGS)
* to the kernel, but is not necessarily synced to disk.
*/
Datum
-pg_current_xlog_location(PG_FUNCTION_ARGS)
+pg_current_wal_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -370,7 +370,7 @@ pg_current_xlog_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
+pg_current_wal_insert_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -391,7 +391,7 @@ pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
+pg_current_wal_flush_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -413,7 +413,7 @@ pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
* and synced to disk by walreceiver.
*/
Datum
-pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
+pg_last_wal_receive_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -432,7 +432,7 @@ pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
* connections during recovery.
*/
Datum
-pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
+pg_last_wal_replay_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -445,15 +445,15 @@ pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
}
/*
- * Compute an xlog file name and decimal byte offset given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * Compute an WAL file name and decimal byte offset given a WAL location,
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*
* Note that a location exactly at a segment boundary is taken to be in
* the previous segment. This is usually the right thing, since the
* expected usage is to determine which xlog file(s) are ready to archive.
*/
Datum
-pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
+pg_wal_file_name_offset(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
uint32 xrecoff;
@@ -469,7 +469,7 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name_offset() cannot be executed during recovery.")));
+ errhint("pg_wal_file_name_offset() cannot be executed during recovery.")));
/*
* Construct a tuple descriptor for the result row. This must match this
@@ -512,10 +512,10 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
/*
* Compute an xlog file name given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*/
Datum
-pg_xlogfile_name(PG_FUNCTION_ARGS)
+pg_wal_file_name(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
XLogRecPtr locationpoint = PG_GETARG_LSN(0);
@@ -525,7 +525,7 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name() cannot be executed during recovery.")));
+ errhint("pg_wal_file_name() cannot be executed during recovery.")));
XLByteToPrevSeg(locationpoint, xlogsegno);
XLogFileName(xlogfilename, ThisTimeLineID, xlogsegno);
@@ -534,13 +534,13 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_pause - pause recovery now
+ * pg_wal_replay_pause - pause recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_pause(PG_FUNCTION_ARGS)
+pg_wal_replay_pause(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -554,13 +554,13 @@ pg_xlog_replay_pause(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_resume - resume recovery now
+ * pg_wal_replay_resume - resume recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_resume(PG_FUNCTION_ARGS)
+pg_wal_replay_resume(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -574,10 +574,10 @@ pg_xlog_replay_resume(PG_FUNCTION_ARGS)
}
/*
- * pg_is_xlog_replay_paused
+ * pg_is_recovery_paused
*/
Datum
-pg_is_xlog_replay_paused(PG_FUNCTION_ARGS)
+pg_is_recovery_paused(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -619,7 +619,7 @@ pg_is_in_recovery(PG_FUNCTION_ARGS)
* Compute the difference in bytes between two WAL locations.
*/
Datum
-pg_xlog_location_diff(PG_FUNCTION_ARGS)
+pg_wal_location_diff(PG_FUNCTION_ARGS)
{
Datum result;
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index 31aade102b..93c9d13950 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -1050,8 +1050,11 @@ REVOKE EXECUTE ON FUNCTION pg_start_backup(text, boolean, boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup() FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup(boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_create_restore_point(text) FROM public;
+REVOKE EXECUTE ON FUNCTION pg_switch_wal() FROM public;
REVOKE EXECUTE ON FUNCTION pg_switch_xlog() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_pause() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_pause() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_rotate_logfile() FROM public;
REVOKE EXECUTE ON FUNCTION pg_reload_conf() FROM public;
diff --git a/src/bin/pg_rewind/RewindTest.pm b/src/bin/pg_rewind/RewindTest.pm
index 1c482617ad..c67212ff7a 100644
--- a/src/bin/pg_rewind/RewindTest.pm
+++ b/src/bin/pg_rewind/RewindTest.pm
@@ -156,7 +156,7 @@ sub promote_standby
# Wait for the standby to receive and write all WAL.
my $wal_received_query =
-"SELECT pg_current_xlog_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
+"SELECT pg_current_wal_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
$node_master->poll_query_until('postgres', $wal_received_query)
or die "Timed out while waiting for standby to receive and write WAL";
diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c
index a903849ee4..d2374201c6 100644
--- a/src/bin/pg_rewind/libpq_fetch.c
+++ b/src/bin/pg_rewind/libpq_fetch.c
@@ -121,7 +121,7 @@ run_simple_query(const char *sql)
}
/*
- * Calls pg_current_xlog_insert_location() function
+ * Calls pg_current_wal_insert_location() function
*/
XLogRecPtr
libpqGetCurrentXlogInsertLocation(void)
@@ -131,7 +131,7 @@ libpqGetCurrentXlogInsertLocation(void)
uint32 lo;
char *val;
- val = run_simple_query("SELECT pg_current_xlog_insert_location()");
+ val = run_simple_query("SELECT pg_current_wal_insert_location()");
if (sscanf(val, "%X/%X", &hi, &lo) != 2)
pg_fatal("unrecognized result \"%s\" for current WAL insert location\n", val);
diff --git a/src/include/access/xlog_fn.h b/src/include/access/xlog_fn.h
index a013d047a2..a46b2f995c 100644
--- a/src/include/access/xlog_fn.h
+++ b/src/include/access/xlog_fn.h
@@ -16,21 +16,21 @@
extern Datum pg_start_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup_v2(PG_FUNCTION_ARGS);
-extern Datum pg_switch_xlog(PG_FUNCTION_ARGS);
+extern Datum pg_switch_wal(PG_FUNCTION_ARGS);
extern Datum pg_create_restore_point(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_insert_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_flush_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_receive_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_replay_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_insert_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_flush_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_receive_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_replay_location(PG_FUNCTION_ARGS);
extern Datum pg_last_xact_replay_timestamp(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name_offset(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name_offset(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name(PG_FUNCTION_ARGS);
extern Datum pg_is_in_recovery(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_pause(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_resume(PG_FUNCTION_ARGS);
-extern Datum pg_is_xlog_replay_paused(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_location_diff(PG_FUNCTION_ARGS);
+extern Datum pg_wal_replay_pause(PG_FUNCTION_ARGS);
+extern Datum pg_wal_replay_resume(PG_FUNCTION_ARGS);
+extern Datum pg_is_recovery_paused(PG_FUNCTION_ARGS);
+extern Datum pg_wal_location_diff(PG_FUNCTION_ARGS);
extern Datum pg_is_in_backup(PG_FUNCTION_ARGS);
extern Datum pg_backup_start_time(PG_FUNCTION_ARGS);
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 37e022dc0d..17471b4199 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -3141,23 +3141,37 @@ DATA(insert OID = 3813 ( pg_is_in_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s
DESCR("true if server is in online backup");
DATA(insert OID = 3814 ( pg_backup_start_time PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_backup_start_time _null_ _null_ _null_ ));
DESCR("start time of an online backup");
-DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_xlog _null_ _null_ _null_ ));
-DESCR("switch to new xlog file");
+DATA(insert OID = 3449 ( pg_switch_wal PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("switch to new WAL file");
+DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("historical alias for pg_switch_wal");
DATA(insert OID = 3098 ( pg_create_restore_point PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 3220 "25" _null_ _null_ _null_ _null_ _null_ pg_create_restore_point _null_ _null_ _null_ ));
DESCR("create a named restore point");
-DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_location _null_ _null_ _null_ ));
-DESCR("current xlog write location");
-DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_insert_location _null_ _null_ _null_ ));
-DESCR("current xlog insert location");
-DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_flush_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_xlogfile_name_offset _null_ _null_ _null_ ));
-DESCR("xlog filename and byte offset, given an xlog location");
-DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_xlogfile_name _null_ _null_ _null_ ));
-DESCR("xlog filename, given an xlog location");
-
-DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_xlog_location_diff _null_ _null_ _null_ ));
-DESCR("difference in bytes, given two xlog locations");
+DATA(insert OID = 3800 ( pg_current_wal_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("current WAL write location");
+DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_xlog_location");
+DATA(insert OID = 3801 ( pg_current_wal_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("current WAL insert location");
+DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_wal_insert_location");
+DATA(insert OID = 6015 ( pg_current_wal_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("current WAL flush location");
+DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_wal_flush_location");
+DATA(insert OID = 3452 ( pg_wal_file_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("WAL filename and byte offset, given an WAL location");
+DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_file_name_offset");
+DATA(insert OID = 3453 ( pg_wal_file_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("WAL filename, given a WAL location");
+DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_file_name");
+
+DATA(insert OID = 3445 ( pg_wal_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("difference in bytes, given two WAL locations");
+DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_location_diff");
DATA(insert OID = 3809 ( pg_export_snapshot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 0 0 25 "" _null_ _null_ _null_ _null_ _null_ pg_export_snapshot _null_ _null_ _null_ ));
DESCR("export a snapshot");
@@ -3165,19 +3179,29 @@ DESCR("export a snapshot");
DATA(insert OID = 3810 ( pg_is_in_recovery PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_recovery _null_ _null_ _null_ ));
DESCR("true if server is in recovery");
-DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_receive_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_replay_location _null_ _null_ _null_ ));
-DESCR("last xlog replay location");
+DATA(insert OID = 3446 ( pg_last_wal_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("current wal flush location");
+DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_last_wal_receive_location");
+DATA(insert OID = 3447 ( pg_last_wal_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("last wal replay location");
+DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_last_wal_replay_location");
DATA(insert OID = 3830 ( pg_last_xact_replay_timestamp PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_last_xact_replay_timestamp _null_ _null_ _null_ ));
DESCR("timestamp of last replay xact");
-DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_pause _null_ _null_ _null_ ));
-DESCR("pause xlog replay");
-DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_resume _null_ _null_ _null_ ));
-DESCR("resume xlog replay, if it was paused");
-DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_xlog_replay_paused _null_ _null_ _null_ ));
-DESCR("true if xlog replay is paused");
+DATA(insert OID = 3450 ( pg_wal_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_pause _null_ _null_ _null_ ));
+DESCR("pause WAL replay");
+DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_pause _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_replay_pause");
+DATA(insert OID = 3451 ( pg_wal_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_resume _null_ _null_ _null_ ));
+DESCR("resume WAL replay, if it was paused");
+DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_resume _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_replay_resume");
+DATA(insert OID = 3448 ( pg_is_recovery_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_recovery_paused _null_ _null_ _null_ ));
+DESCR("true if WAL replay for recovery is paused");
+DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_recovery_paused _null_ _null_ _null_ ));
+DESCR("historical alias for pg_is_recovery_paused");
DATA(insert OID = 2621 ( pg_reload_conf PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_reload_conf _null_ _null_ _null_ ));
DESCR("reload configuration files");
diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl
index 4dbde2978e..3d43b3577c 100644
--- a/src/test/modules/commit_ts/t/002_standby.pl
+++ b/src/test/modules/commit_ts/t/002_standby.pl
@@ -32,9 +32,9 @@ my $master_ts = $master->safe_psql('postgres',
qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'}
);
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
my $standby_ts = $standby->safe_psql('postgres',
@@ -46,9 +46,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
$master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl
index d37ff182c4..8d4e438989 100644
--- a/src/test/modules/commit_ts/t/003_standby_2.pl
+++ b/src/test/modules/commit_ts/t/003_standby_2.pl
@@ -31,9 +31,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index 053c5ea787..d84b86105e 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -1343,11 +1343,11 @@ mode must be specified.
sub lsn
{
my ($self, $mode) = @_;
- my %modes = ('insert' => 'pg_current_xlog_insert_location()',
- 'flush' => 'pg_current_xlog_flush_location()',
- 'write' => 'pg_current_xlog_location()',
- 'receive' => 'pg_last_xlog_receive_location()',
- 'replay' => 'pg_last_xlog_replay_location()');
+ my %modes = ('insert' => 'pg_current_wal_insert_location()',
+ 'flush' => 'pg_current_wal_flush_location()',
+ 'write' => 'pg_current_wal_location()',
+ 'receive' => 'pg_last_wal_receive_location()',
+ 'replay' => 'pg_last_wal_replay_location()');
$mode = '<undef>' if !defined($mode);
die "unknown mode for 'lsn': '$mode', valid modes are " . join(', ', keys %modes)
diff --git a/src/test/recovery/t/002_archiving.pl b/src/test/recovery/t/002_archiving.pl
index fc2bf7ee1d..83b43bf84d 100644
--- a/src/test/recovery/t/002_archiving.pl
+++ b/src/test/recovery/t/002_archiving.pl
@@ -33,10 +33,10 @@ $node_standby->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $current_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Force archiving of WAL file to make it present on master
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Add some more content, it should not be present on standby
$node_master->safe_psql('postgres',
@@ -44,7 +44,7 @@ $node_master->safe_psql('postgres',
# Wait until necessary replay has been done on standby
my $caughtup_query =
- "SELECT '$current_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$current_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl
index a82545bf6f..b7b0caae68 100644
--- a/src/test/recovery/t/003_recovery_targets.pl
+++ b/src/test/recovery/t/003_recovery_targets.pl
@@ -32,7 +32,7 @@ sub test_recovery_standby
# Wait until standby has replayed enough data
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
@@ -57,7 +57,7 @@ $node_master->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $lsn1 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Take backup from which all operations will be run
$node_master->backup('my_backup');
@@ -67,14 +67,14 @@ $node_master->backup('my_backup');
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(1001,2000))");
my $ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), txid_current();");
+ "SELECT pg_current_wal_location(), txid_current();");
my ($lsn2, $recovery_txid) = split /\|/, $ret;
# More data, with recovery target timestamp
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(2001,3000))");
$ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), now();");
+ "SELECT pg_current_wal_location(), now();");
my ($lsn3, $recovery_time) = split /\|/, $ret;
# Even more data, this time with a recovery target name
@@ -82,22 +82,22 @@ $node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(3001,4000))");
my $recovery_name = "my_target";
my $lsn4 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"SELECT pg_create_restore_point('$recovery_name');");
# And now for a recovery target LSN
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(4001,5000))");
-my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $lsn5 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(5001,6000))");
# Force archiving of WAL file
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Test recovery targets
my @recovery_params = ("recovery_target = 'immediate'");
diff --git a/src/test/recovery/t/005_replay_delay.pl b/src/test/recovery/t/005_replay_delay.pl
index 640295bfa8..cd9e8f5c12 100644
--- a/src/test/recovery/t/005_replay_delay.pl
+++ b/src/test/recovery/t/005_replay_delay.pl
@@ -42,7 +42,7 @@ $node_master->safe_psql('postgres',
# Now wait for replay to complete on standby. We're done waiting when the
# slave has replayed up to the previously saved master LSN.
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $remaining = 90;
while ($remaining-- > 0)
@@ -50,7 +50,7 @@ while ($remaining-- > 0)
# Done waiting?
my $replay_status = $node_standby->safe_psql('postgres',
- "SELECT (pg_last_xlog_replay_location() - '$until_lsn'::pg_lsn) >= 0"
+ "SELECT (pg_last_wal_replay_location() - '$until_lsn'::pg_lsn) >= 0"
);
last if $replay_status eq 't';
diff --git a/src/test/recovery/t/008_fsm_truncation.pl b/src/test/recovery/t/008_fsm_truncation.pl
index 9f6bdb0b64..4419fc258c 100644
--- a/src/test/recovery/t/008_fsm_truncation.pl
+++ b/src/test/recovery/t/008_fsm_truncation.pl
@@ -69,11 +69,11 @@ vacuum verbose testtab;
$node_master->psql('postgres', 'checkpoint');
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Wait long enough for standby to receive and apply all WAL
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/regress/expected/hs_standby_functions.out b/src/test/regress/expected/hs_standby_functions.out
index 16d50a8285..e0af677ea1 100644
--- a/src/test/regress/expected/hs_standby_functions.out
+++ b/src/test/regress/expected/hs_standby_functions.out
@@ -15,7 +15,7 @@ select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
-select pg_switch_xlog();
+select pg_switch_wal();
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
select pg_stop_backup();
diff --git a/src/test/regress/sql/hs_primary_extremes.sql b/src/test/regress/sql/hs_primary_extremes.sql
index 629efb4be5..2051e2e5cf 100644
--- a/src/test/regress/sql/hs_primary_extremes.sql
+++ b/src/test/regress/sql/hs_primary_extremes.sql
@@ -70,4 +70,4 @@ SELECT count(*) > 257 FROM pg_locks;
COMMIT;
SELECT hs_locks_drop(257);
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_primary_setup.sql b/src/test/regress/sql/hs_primary_setup.sql
index a00b367cbc..eeb4421307 100644
--- a/src/test/regress/sql/hs_primary_setup.sql
+++ b/src/test/regress/sql/hs_primary_setup.sql
@@ -22,4 +22,4 @@ insert into hs3 values (115);
DROP sequence if exists hsseq;
create sequence hsseq;
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_standby_functions.sql b/src/test/regress/sql/hs_standby_functions.sql
index 7577045f11..251bac0a43 100644
--- a/src/test/regress/sql/hs_standby_functions.sql
+++ b/src/test/regress/sql/hs_standby_functions.sql
@@ -10,7 +10,7 @@ select txid_current();
select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
-select pg_switch_xlog();
+select pg_switch_wal();
select pg_stop_backup();
-- should return no rows
On 12-01-2017 10:56, David Steele wrote:
So, to sum up things on this thread, here are the votes about the use
of aliases or a pure breakage:
- No to aliases, shake the world: Stephen, Tom, David F, Vik, Bruce M => 5
- Yes to aliases: Michael P, Andres, Peter E., Cynthia S, Jim N,
Vladimir, Simon R, Fujii-san => 8
If I misunderstood things, please feel free to speak up.I'm also in the "no to aliases" camp.
+1. Even if we don't document aliases, one day some applications will
break when someone decided to clean up this code. Let's do it smoothly.
As Robert suggested in the other email: extension to create old names.
--
Euler Taveira Timbira - http://www.timbira.com.br/
PostgreSQL: Consultoria, Desenvolvimento, Suporte 24x7 e Treinamento
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 12, 2017 at 4:57 PM, Euler Taveira <euler@timbira.com.br> wrote:
As Robert suggested in the other email: extension to create old names.
I don't follow the reasoning for the extension. It seem to have downsides
of both alternatives combined: we still break people's code, and we add
even more maintenance burden than just keeping aliases.
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
Vladimir Rusinov <vrusinov@google.com> writes:
On Thu, Jan 12, 2017 at 4:57 PM, Euler Taveira <euler@timbira.com.br> wrote:
As Robert suggested in the other email: extension to create old names.
I don't follow the reasoning for the extension. It seem to have downsides
of both alternatives combined: we still break people's code, and we add
even more maintenance burden than just keeping aliases.
Yeah, I'm not terribly for the extension idea. Robert cited the precedent
of contrib/tsearch2, but I think the history of that is a good argument
against this: tsearch2 is still there 9 years later and there's no
indication that we'll ever get rid of it. We can let things rot
indefinitely in core too. If we do ever agree to get rid of the aliases,
stripping them out of pg_proc.h will not be any harder than removing
a contrib directory would be.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/12/17 10:12 AM, Tom Lane wrote:
Yeah, I'm not terribly for the extension idea. Robert cited the precedent
of contrib/tsearch2, but I think the history of that is a good argument
against this: tsearch2 is still there 9 years later and there's no
indication that we'll ever get rid of it. We can let things rot
indefinitely in core too. If we do ever agree to get rid of the aliases,
stripping them out of pg_proc.h will not be any harder than removing
a contrib directory would be.
Is there any burden to carrying tsearch2 around? Have we formally marked
it as deprecated?
The way I see it, either one person can spend an hour or whatever
creating an extension once, or every postgres install that's using any
of these functions now has yet another hurdle to upgrading.
If PGXN was better supported by the community maybe the answer would be
to just throw an extension up there. But that's certainly not the case.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 12, 2017 at 12:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Vladimir Rusinov <vrusinov@google.com> writes:
On Thu, Jan 12, 2017 at 4:57 PM, Euler Taveira <euler@timbira.com.br> wrote:
As Robert suggested in the other email: extension to create old names.
I don't follow the reasoning for the extension. It seem to have downsides
of both alternatives combined: we still break people's code, and we add
even more maintenance burden than just keeping aliases.Yeah, I'm not terribly for the extension idea. Robert cited the precedent
of contrib/tsearch2, but I think the history of that is a good argument
against this: tsearch2 is still there 9 years later and there's no
indication that we'll ever get rid of it. We can let things rot
indefinitely in core too. If we do ever agree to get rid of the aliases,
stripping them out of pg_proc.h will not be any harder than removing
a contrib directory would be.
How about just leaving it to someone who cares about the aliases to
post such an extension at pgxn.org (or anywhere else they like).
It can be around as long as someone cares enough to maintain it.
I guess that makes my vote -1 on aliases by the project.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Jim,
* Jim Nasby (Jim.Nasby@BlueTreble.com) wrote:
The way I see it, either one person can spend an hour or whatever
creating an extension once, or every postgres install that's using
any of these functions now has yet another hurdle to upgrading.
I just don't buy this argument, at all. These functions names are
certainly not the only things we're changing with PG10 and serious
monitoring/backup/administration tools are almost certainly going to
have quite a bit to adjust to with the new release, and that isn't news
to anyone who works with PG.
Thanks!
Stephen
On 2017-01-12 13:40:50 -0500, Stephen Frost wrote:
Jim,
* Jim Nasby (Jim.Nasby@BlueTreble.com) wrote:
The way I see it, either one person can spend an hour or whatever
creating an extension once, or every postgres install that's using
any of these functions now has yet another hurdle to upgrading.I just don't buy this argument, at all. These functions names are
certainly not the only things we're changing with PG10 and serious
monitoring/backup/administration tools are almost certainly going to
have quite a bit to adjust to with the new release, and that isn't news
to anyone who works with PG.
By that argument we can just do arbitrary backward incompat changes. We
should aspire to be better than we've been in the past, not use that
past as an excuse for not even trying.
Greetings,
Andres Freund
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
I just don't buy this argument, at all. These functions names are
certainly not the only things we're changing with PG10 and serious
monitoring/backup/administration tools are almost certainly going to
have quite a bit to adjust to with the new release, and that isn't news
to anyone who works with PG.
Hmm --- we've been conducting this argument in a vacuum, but you're right,
we should consider what else is changing in v10. If you can point to
already-committed changes that mean that code using these functions will
almost certainly need changes anyway for v10, then that would greatly
weaken the argument for providing aliases.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Andres Freund (andres@anarazel.de) wrote:
On 2017-01-12 13:40:50 -0500, Stephen Frost wrote:
* Jim Nasby (Jim.Nasby@BlueTreble.com) wrote:
The way I see it, either one person can spend an hour or whatever
creating an extension once, or every postgres install that's using
any of these functions now has yet another hurdle to upgrading.I just don't buy this argument, at all. These functions names are
certainly not the only things we're changing with PG10 and serious
monitoring/backup/administration tools are almost certainly going to
have quite a bit to adjust to with the new release, and that isn't news
to anyone who works with PG.By that argument we can just do arbitrary backward incompat changes. We
should aspire to be better than we've been in the past, not use that
past as an excuse for not even trying.
When they're changes that are primairly going to affect
monitoring/backup/administration tools, yes, I do think we can make just
about arbitrary backward-incompatible changes.
As Robert mentioned, and I agree with, changing things which will impact
regular application usage of PG is a different story and one we should
be more cautious about.
Thanks!
Stephen
On January 12, 2017 10:50:18 AM PST, Stephen Frost <sfrost@snowman.net> wrote:
* Andres Freund (andres@anarazel.de) wrote:
On 2017-01-12 13:40:50 -0500, Stephen Frost wrote:
* Jim Nasby (Jim.Nasby@BlueTreble.com) wrote:
The way I see it, either one person can spend an hour or whatever
creating an extension once, or every postgres install that'susing
any of these functions now has yet another hurdle to upgrading.
I just don't buy this argument, at all. These functions names are
certainly not the only things we're changing with PG10 and serious
monitoring/backup/administration tools are almost certainly goingto
have quite a bit to adjust to with the new release, and that isn't
news
to anyone who works with PG.
By that argument we can just do arbitrary backward incompat changes.
We
should aspire to be better than we've been in the past, not use that
past as an excuse for not even trying.When they're changes that are primairly going to affect
monitoring/backup/administration tools, yes, I do think we can make
just
about arbitrary backward-incompatible changes.As Robert mentioned, and I agree with, changing things which will
impact
regular application usage of PG is a different story and one we should
be more cautious about.
I find it very hard to understand the justification for that, besides that it's strengthening external projects providing monitoring, backup, etc in a compatible way.
Andres
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
Stephen Frost <sfrost@snowman.net> writes:
I just don't buy this argument, at all. These functions names are
certainly not the only things we're changing with PG10 and serious
monitoring/backup/administration tools are almost certainly going to
have quite a bit to adjust to with the new release, and that isn't news
to anyone who works with PG.Hmm --- we've been conducting this argument in a vacuum, but you're right,
we should consider what else is changing in v10. If you can point to
already-committed changes that mean that code using these functions will
almost certainly need changes anyway for v10, then that would greatly
weaken the argument for providing aliases.
We changed the pg_xlog directory to be pg_wal, that's certainly going to
have an impact on monitoring and backup tools.
We've also made changes in, at least, what's reported in
pg_stat_activity and there's been discussions about changing it further
(list background workers or not, etc), and in pg_stat_replication (with
the addition of quorum-based sync rep). In fact, these kinds of changes
are almost certainly going to require more work for tool authors to deal
with than just a simple function name change.
And that's only with a few minutes of looking at the commit log and I
don't doubt that there's more and that we're going to have even more
before feature freeze that a serious monitoring tool will have to be
updated for.
As long as we properly include these changes in the release notes for
tool authors, I really don't see any of them as a big deal.
Thanks!
Stephen
Andres,
* Andres Freund (andres@anarazel.de) wrote:
On January 12, 2017 10:50:18 AM PST, Stephen Frost <sfrost@snowman.net> wrote:
* Andres Freund (andres@anarazel.de) wrote:
On 2017-01-12 13:40:50 -0500, Stephen Frost wrote:
* Jim Nasby (Jim.Nasby@BlueTreble.com) wrote:
The way I see it, either one person can spend an hour or whatever
creating an extension once, or every postgres install that'susing
any of these functions now has yet another hurdle to upgrading.
I just don't buy this argument, at all. These functions names are
certainly not the only things we're changing with PG10 and serious
monitoring/backup/administration tools are almost certainly goingto
have quite a bit to adjust to with the new release, and that isn't
news
to anyone who works with PG.
By that argument we can just do arbitrary backward incompat changes.
We
should aspire to be better than we've been in the past, not use that
past as an excuse for not even trying.When they're changes that are primairly going to affect
monitoring/backup/administration tools, yes, I do think we can make
just
about arbitrary backward-incompatible changes.As Robert mentioned, and I agree with, changing things which will
impact
regular application usage of PG is a different story and one we should
be more cautious about.I find it very hard to understand the justification for that, besides that it's strengthening external projects providing monitoring, backup, etc in a compatible way.
That might be understandable if these were entirely arbitrary changes
(which isn't actually what I'm talking about above), but they aren't.
These changes aren't being made just for the sake of making them and are
not entirely arbitrary, as I've already pointed out up-thread.
The point I was making above is that the only reason to not make such
changes is if they really are entirely arbitrary, but I don't think
we'd even be having this discussion if that was the case or that we'd
be split about the question. We already moved forward with the real
change here- pg_xlog -> pg_wal, it really astounds me that we're having
to argue about what is primairly just clean-up from that change, at
least in my view.
Also, frankly, I don't agree with the notion that this is seriously
going to "strengthen" external projects any more than the regular set of
changes that we're making as we move forward. Changing these functions
certainly isn't likely to change pgbackrest or barman or check_postgres
uptake any more than the pg_xlog -> pg_wal rename is going to. Maybe if
we *reverted* that change and then didn't make any other changes then
various hand-written tools would be able to work with PG10 without being
changed, but we might as well call it PG 9.6.2 then.
Thanks!
Stephen
On 1/12/17 1:40 PM, Stephen Frost wrote:
I just don't buy this argument, at all. These functions names are
certainly not the only things we're changing with PG10 and serious
monitoring/backup/administration tools are almost certainly going to
have quite a bit to adjust to with the new release, and that isn't news
to anyone who works with PG.
I in turn don't buy this argument. ;-)
I have checked a variety of WAL-related monitoring scripts,
graphing/trending scripts, switchover/failover scripts, and the like,
and of course they all make ample use of a variety of *xlog* functions,
but as far as I can tell, they don't care about the pg_xlog renaming and
would continue to work just fine if the functions were not renamed.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/12/17 1:50 PM, Stephen Frost wrote:
When they're changes that are primairly going to affect
monitoring/backup/administration tools, yes, I do think we can make just
about arbitrary backward-incompatible changes.
I don't agree with that.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/12/17 2:22 PM, Stephen Frost wrote:
The point I was making above is that the only reason to not make such
changes is if they really are entirely arbitrary, but I don't think
we'd even be having this discussion if that was the case or that we'd
be split about the question. We already moved forward with the real
change here- pg_xlog -> pg_wal, it really astounds me that we're having
to argue about what is primairly just clean-up from that change, at
least in my view.
I don't agree with the reasoning. The change of the directory name was
because some people erroneously delete the directory. There is little
to no risk that people accidentally delete built-in functions. It was
not agreed that because we rename the directory that all other uses of
"xlog" have to be removed as well. All those subsequent changes need to
stand on their own.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote:
On 1/12/17 1:40 PM, Stephen Frost wrote:
I just don't buy this argument, at all. These functions names are
certainly not the only things we're changing with PG10 and serious
monitoring/backup/administration tools are almost certainly going to
have quite a bit to adjust to with the new release, and that isn't news
to anyone who works with PG.I in turn don't buy this argument. ;-)
I have checked a variety of WAL-related monitoring scripts,
graphing/trending scripts, switchover/failover scripts, and the like,
and of course they all make ample use of a variety of *xlog* functions,
but as far as I can tell, they don't care about the pg_xlog renaming and
would continue to work just fine if the functions were not renamed.
The point I was making was that serious montioring systems would have to
be changed and I stand by that. Sure, there are simple scripts out
there that could, individually, continue to work fine using the old
function names (unless and until we change some behavior of those- which
I'm sure will end up happening at some point), but the argument being
presented is that we shouldn't make people have to change and the only
way to do that would be to revert the pg_xlog -> pg_wal change.
Anything beyond that and we're into arguing about how *much* we should
ask people to change, and for my 2c, that's barely even useful to
discuss because once they have to make any change at all then the
question will come up if it's "worth it" to move to the next version or
the complaint about PG being too difficult to live with will be raised.
I'm not terribly worried about such arguments because, put simply, PG10
is going to have enough awesome features that it's an easy question to
answer.
The argument being presented here is that users won't mind that we
changed the name of a critical directory for every PG system in
existence, but they're going to be upset that we change a few function
names to go along with that change. Really?
Certainly, check_postgres is going to have to be changed to address this
and, unsurprisingly, it's already had to address a variety of major
version differences that have been introduced over the years.
Thanks!
Stephen
* Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote:
On 1/12/17 2:22 PM, Stephen Frost wrote:
The point I was making above is that the only reason to not make such
changes is if they really are entirely arbitrary, but I don't think
we'd even be having this discussion if that was the case or that we'd
be split about the question. We already moved forward with the real
change here- pg_xlog -> pg_wal, it really astounds me that we're having
to argue about what is primairly just clean-up from that change, at
least in my view.I don't agree with the reasoning. The change of the directory name was
because some people erroneously delete the directory. There is little
to no risk that people accidentally delete built-in functions. It was
not agreed that because we rename the directory that all other uses of
"xlog" have to be removed as well. All those subsequent changes need to
stand on their own.
The subsequent discussion about what to call the directory lead to a
pretty clear winner that a better name is "wal", which fits in pretty
nicely with things like "wal_level", "wal_sync_method", "wal_log_hints",
section 19.5 of our documentation. Try finding 'xlog' or even
'transaction log' anywhere in our sample postgresql.conf, in fact.
Look at our docs too, we talk about WAL a *great* deal more than we talk
about 'xlog'. Almost all utilization of 'xlog' that I see is due to
some function or program name which was derived from the directory name,
and half of those end up, confusingly, going back and forth between
"WAL" and "transaction log" (the description of pg_receivexlog is a
great example of this).
In the end, while I don't agree that they really need to, it seems
pretty clear to me that these changes can certainly stand on their own.
The only reason they were ever called 'xlog' was because of the
directory name and without that link, there's really no reason to keep
mis-calling these functions 'xlog' *except* this claim that we don't
want to break things, even though we're changing the directory name.
Thanks!
Stephen
On Thu, Jan 12, 2017 at 1:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Vladimir Rusinov <vrusinov@google.com> writes:
On Thu, Jan 12, 2017 at 4:57 PM, Euler Taveira <euler@timbira.com.br> wrote:
As Robert suggested in the other email: extension to create old names.
I don't follow the reasoning for the extension. It seem to have downsides
of both alternatives combined: we still break people's code, and we add
even more maintenance burden than just keeping aliases.Yeah, I'm not terribly for the extension idea. Robert cited the precedent
of contrib/tsearch2, but I think the history of that is a good argument
against this: tsearch2 is still there 9 years later and there's no
indication that we'll ever get rid of it. We can let things rot
indefinitely in core too. If we do ever agree to get rid of the aliases,
stripping them out of pg_proc.h will not be any harder than removing
a contrib directory would be.
From a technical point of view, that is pretty much true. But from a
user perspective, I don't think it is. If the old names live in an
extension, then they will not be there by default. Tools and scripts
will break. If that's a problem for a particular user, they an
install the extension to unbreak those things, but tool authors will
probably be motivated to upgrade their tools so that the extension is
no longer needed. Therefore, if we eventually drop the extension,
there will probably be few users relying on it at that point. On the
other hand, if we install aliases that are present in every install -
and that are not even optionally removable - a lot of people are not
going to bother using the new names at all. They'll just keep on
using the old ones so that their tools work with both old and new
versions, and if we eventually rip the stuff out of pg_proc.h it will
cause almost as much howling as if we'd done it right at the
beginning.
In other words, adding an extension is the only option that I see
which will give tool authors a strong incentive to support the new
names without making it a hard requirement on day one.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Attached are two new version of the patch: one keeps aliases, one don't.
Also, remove stray reference to xlog function in one of the tests.
I've lost vote count. Should we create a form to calculate which one of the
patches should be commited?
If we decide to go the extension way, perhaps it can be maintained outside
of core Postgres?
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
0006-Remove-xlog-references-from-admin-functions-no-aliases.patchtext/x-patch; charset=US-ASCII; name=0006-Remove-xlog-references-from-admin-functions-no-aliases.patchDownload
diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl
index 56c6618d3d..dc907baf87 100644
--- a/contrib/bloom/t/001_wal.pl
+++ b/contrib/bloom/t/001_wal.pl
@@ -16,7 +16,7 @@ sub test_index_replay
# Wait for standby to catch up
my $applname = $node_standby->name;
my $caughtup_query =
-"SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
+"SELECT pg_current_wal_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
$node_master->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby 1 to catch up";
diff --git a/contrib/test_decoding/expected/ddl.out b/contrib/test_decoding/expected/ddl.out
index c104c4802d..275c84a450 100644
--- a/contrib/test_decoding/expected/ddl.out
+++ b/contrib/test_decoding/expected/ddl.out
@@ -58,7 +58,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
slot_name | plugin | slot_type | active | catalog_xmin_set | data_xmin_not_set | some_wal
-----------------+---------------+-----------+--------+------------------+-------------------+----------
diff --git a/contrib/test_decoding/sql/ddl.sql b/contrib/test_decoding/sql/ddl.sql
index 89b8b8f780..49dad39b50 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -29,7 +29,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
/*
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 6eaed1efbe..e37f101277 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -726,9 +726,9 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0
<para>
Also, you can force a segment switch manually with
- <function>pg_switch_xlog</> if you want to ensure that a
- just-finished transaction is archived as soon as possible. Other utility
- functions related to WAL management are listed in <xref
+ <function>pg_switch_wal</> if you want to ensure that a just-finished
+ transaction is archived as soon as possible. Other utility functions
+ related to WAL management are listed in <xref
linkend="functions-admin-backup-table">.
</para>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 10e31868ba..fbc0ae79af 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -17925,13 +17925,13 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_create_restore_point</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_flush_location</primary>
+ <primary>pg_current_wal_flush_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_insert_location</primary>
+ <primary>pg_current_wal_insert_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_location</primary>
+ <primary>pg_current_wal_location</primary>
</indexterm>
<indexterm>
<primary>pg_start_backup</primary>
@@ -17946,24 +17946,25 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_backup_start_time</primary>
</indexterm>
<indexterm>
- <primary>pg_switch_xlog</primary>
+ <primary>pg_switch_wal</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name</primary>
+ <primary>pg_wal_file_name</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name_offset</primary>
+ <primary>pg_wal_file_name_offset</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_location_diff</primary>
+ <primary>pg_wal_location_diff</primary>
</indexterm>
<para>
The functions shown in <xref
linkend="functions-admin-backup-table"> assist in making on-line backups.
These functions cannot be executed during recovery (except
- <function>pg_is_in_backup</function>, <function>pg_backup_start_time</function>
- and <function>pg_xlog_location_diff</function>).
+ <function>pg_is_in_backup</function>,
+ <function>pg_backup_start_time</function> and
+ <function>pg_wal_location_diff</function>).
</para>
<table id="functions-admin-backup-table">
@@ -17984,21 +17985,21 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_flush_location()</function></literal>
+ <literal><function>pg_current_wal_flush_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log flush location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_insert_location()</function></literal>
+ <literal><function>pg_current_wal_insert_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log insert location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_location()</function></literal>
+ <literal><function>pg_current_wal_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log write location</entry>
@@ -18040,28 +18041,28 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_switch_xlog()</function></literal>
+ <literal><function>pg_switch_wal()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Force switch to a new transaction log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</type></entry>
<entry>Convert transaction log location string to file name</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</>, <type>integer</></entry>
<entry>Convert transaction log location string to file name and decimal byte offset within file</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlog_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>numeric</></entry>
<entry>Calculate the difference between two transaction log locations</entry>
@@ -18119,11 +18120,11 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_switch_xlog</> moves to the next transaction log file, allowing the
+ <function>pg_switch_wal</> moves to the next transaction log file, allowing the
current file to be archived (assuming you are using continuous archiving).
The return value is the ending transaction log location + 1 within the just-completed transaction log file.
If there has been no transaction log activity since the last transaction log switch,
- <function>pg_switch_xlog</> does nothing and returns the start location
+ <function>pg_switch_wal</> does nothing and returns the start location
of the transaction log file currently in use.
</para>
@@ -18138,10 +18139,10 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_current_xlog_location</> displays the current transaction log write
+ <function>pg_current_wal_location</> displays the current transaction log write
location in the same format used by the above functions. Similarly,
- <function>pg_current_xlog_insert_location</> displays the current transaction log
- insertion point and <function>pg_current_xlog_flush_location</> displays the
+ <function>pg_current_wal_insert_location</> displays the current transaction log
+ insertion point and <function>pg_current_wal_flush_location</> displays the
current transaction log flush point. The insertion point is the <quote>logical</>
end of the transaction log at any instant, while the write location is the end of
what has actually been written out from the server's internal buffers and flush
@@ -18154,17 +18155,17 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- You can use <function>pg_xlogfile_name_offset</> to extract the
+ You can use <function>pg_wal_file_name_offset</> to extract the
corresponding transaction log file name and byte offset from the results of any of the
above functions. For example:
<programlisting>
-postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
+postgres=# SELECT * FROM pg_wal_file_name_offset(pg_stop_backup());
file_name | file_offset
--------------------------+-------------
00000001000000000000000D | 4039624
(1 row)
</programlisting>
- Similarly, <function>pg_xlogfile_name</> extracts just the transaction log file name.
+ Similarly, <function>pg_wal_file_name</> extracts just the transaction log file name.
When the given transaction log location is exactly at a transaction log file boundary, both
these functions return the name of the preceding transaction log file.
This is usually the desired behavior for managing transaction log archiving
@@ -18173,7 +18174,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</para>
<para>
- <function>pg_xlog_location_diff</> calculates the difference in bytes
+ <function>pg_wal_location_diff</> calculates the difference in bytes
between two transaction log locations. It can be used with
<structname>pg_stat_replication</structname> or some functions shown in
<xref linkend="functions-admin-backup-table"> to get the replication lag.
@@ -18193,10 +18194,10 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<primary>pg_is_in_recovery</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_receive_location</primary>
+ <primary>pg_last_wal_receive_location</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_replay_location</primary>
+ <primary>pg_last_wal_replay_location</primary>
</indexterm>
<indexterm>
<primary>pg_last_xact_replay_timestamp</primary>
@@ -18228,7 +18229,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_receive_location()</function></literal>
+ <literal><function>pg_last_wal_receive_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location received and synced to disk by
@@ -18242,7 +18243,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_replay_location()</function></literal>
+ <literal><function>pg_last_wal_replay_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location replayed during recovery.
@@ -18274,13 +18275,13 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</table>
<indexterm>
- <primary>pg_is_xlog_replay_paused</primary>
+ <primary>pg_is_recovery_paused</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_pause</primary>
+ <primary>pg_wal_replay_pause</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_resume</primary>
+ <primary>pg_wal_replay_resume</primary>
</indexterm>
<para>
@@ -18300,7 +18301,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<tbody>
<row>
<entry>
- <literal><function>pg_is_xlog_replay_paused()</function></literal>
+ <literal><function>pg_is_recovery_paused()</function></literal>
</entry>
<entry><type>bool</type></entry>
<entry>True if recovery is paused.
@@ -18308,7 +18309,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_pause()</function></literal>
+ <literal><function>pg_wal_replay_pause()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Pauses recovery immediately (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -18316,7 +18317,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_resume()</function></literal>
+ <literal><function>pg_wal_replay_resume()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Restarts recovery if it was paused (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -19669,7 +19670,6 @@ SELECT (pg_stat_file('filename')).modification;
</para>
</sect2>
-
</sect1>
<sect1 id="functions-trigger">
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index a1a9532088..e1c08c6e94 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -853,8 +853,8 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
standby. You can calculate this lag by comparing the current WAL write
location on the primary with the last WAL location received by the
standby. They can be retrieved using
- <function>pg_current_xlog_location</> on the primary and the
- <function>pg_last_xlog_receive_location</> on the standby,
+ <function>pg_current_wal_location</> on the primary and the
+ <function>pg_last_wal_receive_location</> on the standby,
respectively (see <xref linkend="functions-admin-backup-table"> and
<xref linkend="functions-recovery-info-table"> for details).
The last WAL receive location in the standby is also displayed in the
@@ -865,10 +865,10 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
You can retrieve a list of WAL sender processes via the
<link linkend="monitoring-stats-views-table">
<literal>pg_stat_replication</></link> view. Large differences between
- <function>pg_current_xlog_location</> and <literal>sent_location</> field
+ <function>pg_current_wal_location</> and <literal>sent_location</> field
might indicate that the master server is under heavy load, while
differences between <literal>sent_location</> and
- <function>pg_last_xlog_receive_location</> on the standby might indicate
+ <function>pg_last_wal_receive_location</> on the standby might indicate
network delay, or that the standby is under heavy load.
</para>
</sect3>
@@ -1587,7 +1587,7 @@ if (!triggered)
</para>
<para>
- An external program can call the <function>pg_xlogfile_name_offset()</>
+ An external program can call the <function>pg_wal_file_name_offset()</>
function (see <xref linkend="functions-admin">)
to find out the file name and the exact byte offset within it of
the current end of WAL. It can then access the WAL file directly
@@ -2225,7 +2225,7 @@ LOG: database system is ready to accept read only connections
<para>
WAL file control commands will not work during recovery,
- e.g. <function>pg_start_backup</>, <function>pg_switch_xlog</> etc.
+ e.g. <function>pg_start_backup</>, <function>pg_switch_wal</> etc.
</para>
<para>
diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml
index 8c24ae2174..a91864bf62 100644
--- a/doc/src/sgml/recovery-config.sgml
+++ b/doc/src/sgml/recovery-config.sgml
@@ -321,7 +321,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
to be executed against the database to check if this recovery target
is the most desirable point for recovery.
The paused state can be resumed by
- using <function>pg_xlog_replay_resume()</> (see
+ using <function>pg_wal_replay_resume()</> (see
<xref linkend="functions-recovery-control-table">), which then
causes recovery to end. If this recovery target is not the
desired stopping point, then shut down the server, change the
diff --git a/src/backend/access/transam/recovery.conf.sample b/src/backend/access/transam/recovery.conf.sample
index 7a16751541..ace77df728 100644
--- a/src/backend/access/transam/recovery.conf.sample
+++ b/src/backend/access/transam/recovery.conf.sample
@@ -98,10 +98,9 @@
#
# If recovery_target_action = 'pause', recovery will pause when the
# recovery target is reached. The pause state will continue until
-# pg_xlog_replay_resume() is called. This setting has no effect if
-# no recovery target is set. If hot_standby is not enabled then the
-# server will shutdown instead, though you may request this in
-# any case by specifying 'shutdown'.
+# pg_wal_replay_resume() is called. This setting has no effect if no recovery
+# target is set. If hot_standby is not enabled then the server will shutdown
+# instead, though you may request this in any case by specifying 'shutdown'.
#
#recovery_target_action = 'pause'
#
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 70edafadff..6dd63a945f 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5740,7 +5740,7 @@ recoveryPausesHere(void)
ereport(LOG,
(errmsg("recovery has paused"),
- errhint("Execute pg_xlog_replay_resume() to continue.")));
+ errhint("Execute pg_wal_replay_resume() to continue.")));
while (RecoveryIsPaused())
{
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index 5cafb8b913..e5ac9272d0 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -277,13 +277,13 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS)
}
/*
- * pg_switch_xlog: switch to next xlog file
+ * pg_switch_wal: switch to next WAL file
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_switch_xlog(PG_FUNCTION_ARGS)
+pg_switch_wal(PG_FUNCTION_ARGS)
{
XLogRecPtr switchpoint;
@@ -349,7 +349,7 @@ pg_create_restore_point(PG_FUNCTION_ARGS)
* to the kernel, but is not necessarily synced to disk.
*/
Datum
-pg_current_xlog_location(PG_FUNCTION_ARGS)
+pg_current_wal_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -370,7 +370,7 @@ pg_current_xlog_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
+pg_current_wal_insert_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -391,7 +391,7 @@ pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
+pg_current_wal_flush_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -413,7 +413,7 @@ pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
* and synced to disk by walreceiver.
*/
Datum
-pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
+pg_last_wal_receive_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -432,7 +432,7 @@ pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
* connections during recovery.
*/
Datum
-pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
+pg_last_wal_replay_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -445,15 +445,15 @@ pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
}
/*
- * Compute an xlog file name and decimal byte offset given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * Compute an WAL file name and decimal byte offset given a WAL location,
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*
* Note that a location exactly at a segment boundary is taken to be in
* the previous segment. This is usually the right thing, since the
* expected usage is to determine which xlog file(s) are ready to archive.
*/
Datum
-pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
+pg_wal_file_name_offset(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
uint32 xrecoff;
@@ -469,7 +469,7 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name_offset() cannot be executed during recovery.")));
+ errhint("pg_wal_file_name_offset() cannot be executed during recovery.")));
/*
* Construct a tuple descriptor for the result row. This must match this
@@ -512,10 +512,10 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
/*
* Compute an xlog file name given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*/
Datum
-pg_xlogfile_name(PG_FUNCTION_ARGS)
+pg_wal_file_name(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
XLogRecPtr locationpoint = PG_GETARG_LSN(0);
@@ -525,7 +525,7 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name() cannot be executed during recovery.")));
+ errhint("pg_wal_file_name() cannot be executed during recovery.")));
XLByteToPrevSeg(locationpoint, xlogsegno);
XLogFileName(xlogfilename, ThisTimeLineID, xlogsegno);
@@ -534,13 +534,13 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_pause - pause recovery now
+ * pg_wal_replay_pause - pause recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_pause(PG_FUNCTION_ARGS)
+pg_wal_replay_pause(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -554,13 +554,13 @@ pg_xlog_replay_pause(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_resume - resume recovery now
+ * pg_wal_replay_resume - resume recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_resume(PG_FUNCTION_ARGS)
+pg_wal_replay_resume(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -574,10 +574,10 @@ pg_xlog_replay_resume(PG_FUNCTION_ARGS)
}
/*
- * pg_is_xlog_replay_paused
+ * pg_is_recovery_paused
*/
Datum
-pg_is_xlog_replay_paused(PG_FUNCTION_ARGS)
+pg_is_recovery_paused(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -619,7 +619,7 @@ pg_is_in_recovery(PG_FUNCTION_ARGS)
* Compute the difference in bytes between two WAL locations.
*/
Datum
-pg_xlog_location_diff(PG_FUNCTION_ARGS)
+pg_wal_location_diff(PG_FUNCTION_ARGS)
{
Datum result;
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index 31aade102b..d357743fa3 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -1050,9 +1050,9 @@ REVOKE EXECUTE ON FUNCTION pg_start_backup(text, boolean, boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup() FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup(boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_create_restore_point(text) FROM public;
-REVOKE EXECUTE ON FUNCTION pg_switch_xlog() FROM public;
-REVOKE EXECUTE ON FUNCTION pg_xlog_replay_pause() FROM public;
-REVOKE EXECUTE ON FUNCTION pg_xlog_replay_resume() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_switch_wal() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_pause() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_rotate_logfile() FROM public;
REVOKE EXECUTE ON FUNCTION pg_reload_conf() FROM public;
diff --git a/src/bin/pg_basebackup/t/030_pg_recvlogical.pl b/src/bin/pg_basebackup/t/030_pg_recvlogical.pl
index dca5ef2181..b43176fdc6 100644
--- a/src/bin/pg_basebackup/t/030_pg_recvlogical.pl
+++ b/src/bin/pg_basebackup/t/030_pg_recvlogical.pl
@@ -39,7 +39,7 @@ isnt($slot->{'restart_lsn'}, '', 'restart lsn is defined for new slot');
$node->psql('postgres', 'CREATE TABLE test_table(x integer)');
$node->psql('postgres', 'INSERT INTO test_table(x) SELECT y FROM generate_series(1, 10) a(y);');
-my $nextlsn = $node->safe_psql('postgres', 'SELECT pg_current_xlog_insert_location()');
+my $nextlsn = $node->safe_psql('postgres', 'SELECT pg_current_wal_insert_location()');
chomp($nextlsn);
$node->command_ok(['pg_recvlogical', '-S', 'test', '-d', $node->connstr('postgres'), '--start', '--endpos', "$nextlsn", '--no-loop', '-f', '-'],
diff --git a/src/bin/pg_rewind/RewindTest.pm b/src/bin/pg_rewind/RewindTest.pm
index 1c482617ad..c67212ff7a 100644
--- a/src/bin/pg_rewind/RewindTest.pm
+++ b/src/bin/pg_rewind/RewindTest.pm
@@ -156,7 +156,7 @@ sub promote_standby
# Wait for the standby to receive and write all WAL.
my $wal_received_query =
-"SELECT pg_current_xlog_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
+"SELECT pg_current_wal_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
$node_master->poll_query_until('postgres', $wal_received_query)
or die "Timed out while waiting for standby to receive and write WAL";
diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c
index a903849ee4..d2374201c6 100644
--- a/src/bin/pg_rewind/libpq_fetch.c
+++ b/src/bin/pg_rewind/libpq_fetch.c
@@ -121,7 +121,7 @@ run_simple_query(const char *sql)
}
/*
- * Calls pg_current_xlog_insert_location() function
+ * Calls pg_current_wal_insert_location() function
*/
XLogRecPtr
libpqGetCurrentXlogInsertLocation(void)
@@ -131,7 +131,7 @@ libpqGetCurrentXlogInsertLocation(void)
uint32 lo;
char *val;
- val = run_simple_query("SELECT pg_current_xlog_insert_location()");
+ val = run_simple_query("SELECT pg_current_wal_insert_location()");
if (sscanf(val, "%X/%X", &hi, &lo) != 2)
pg_fatal("unrecognized result \"%s\" for current WAL insert location\n", val);
diff --git a/src/include/access/xlog_fn.h b/src/include/access/xlog_fn.h
index a013d047a2..a46b2f995c 100644
--- a/src/include/access/xlog_fn.h
+++ b/src/include/access/xlog_fn.h
@@ -16,21 +16,21 @@
extern Datum pg_start_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup_v2(PG_FUNCTION_ARGS);
-extern Datum pg_switch_xlog(PG_FUNCTION_ARGS);
+extern Datum pg_switch_wal(PG_FUNCTION_ARGS);
extern Datum pg_create_restore_point(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_insert_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_flush_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_receive_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_replay_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_insert_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_flush_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_receive_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_replay_location(PG_FUNCTION_ARGS);
extern Datum pg_last_xact_replay_timestamp(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name_offset(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name_offset(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name(PG_FUNCTION_ARGS);
extern Datum pg_is_in_recovery(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_pause(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_resume(PG_FUNCTION_ARGS);
-extern Datum pg_is_xlog_replay_paused(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_location_diff(PG_FUNCTION_ARGS);
+extern Datum pg_wal_replay_pause(PG_FUNCTION_ARGS);
+extern Datum pg_wal_replay_resume(PG_FUNCTION_ARGS);
+extern Datum pg_is_recovery_paused(PG_FUNCTION_ARGS);
+extern Datum pg_wal_location_diff(PG_FUNCTION_ARGS);
extern Datum pg_is_in_backup(PG_FUNCTION_ARGS);
extern Datum pg_backup_start_time(PG_FUNCTION_ARGS);
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 37e022dc0d..555aae238f 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -3141,23 +3141,23 @@ DATA(insert OID = 3813 ( pg_is_in_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s
DESCR("true if server is in online backup");
DATA(insert OID = 3814 ( pg_backup_start_time PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_backup_start_time _null_ _null_ _null_ ));
DESCR("start time of an online backup");
-DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_xlog _null_ _null_ _null_ ));
-DESCR("switch to new xlog file");
+DATA(insert OID = 3449 ( pg_switch_wal PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("switch to new WAL file");
DATA(insert OID = 3098 ( pg_create_restore_point PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 3220 "25" _null_ _null_ _null_ _null_ _null_ pg_create_restore_point _null_ _null_ _null_ ));
DESCR("create a named restore point");
-DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_location _null_ _null_ _null_ ));
-DESCR("current xlog write location");
-DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_insert_location _null_ _null_ _null_ ));
-DESCR("current xlog insert location");
-DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_flush_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_xlogfile_name_offset _null_ _null_ _null_ ));
-DESCR("xlog filename and byte offset, given an xlog location");
-DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_xlogfile_name _null_ _null_ _null_ ));
-DESCR("xlog filename, given an xlog location");
-
-DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_xlog_location_diff _null_ _null_ _null_ ));
-DESCR("difference in bytes, given two xlog locations");
+DATA(insert OID = 3800 ( pg_current_wal_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("current WAL write location");
+DATA(insert OID = 3801 ( pg_current_wal_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("current WAL insert location");
+DATA(insert OID = 6015 ( pg_current_wal_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("current WAL flush location");
+DATA(insert OID = 3452 ( pg_wal_file_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("WAL filename and byte offset, given an WAL location");
+DATA(insert OID = 3453 ( pg_wal_file_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("WAL filename, given a WAL location");
+
+DATA(insert OID = 3445 ( pg_wal_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("difference in bytes, given two WAL locations");
DATA(insert OID = 3809 ( pg_export_snapshot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 0 0 25 "" _null_ _null_ _null_ _null_ _null_ pg_export_snapshot _null_ _null_ _null_ ));
DESCR("export a snapshot");
@@ -3165,19 +3165,19 @@ DESCR("export a snapshot");
DATA(insert OID = 3810 ( pg_is_in_recovery PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_recovery _null_ _null_ _null_ ));
DESCR("true if server is in recovery");
-DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_receive_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_replay_location _null_ _null_ _null_ ));
-DESCR("last xlog replay location");
+DATA(insert OID = 3446 ( pg_last_wal_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("current wal flush location");
+DATA(insert OID = 3447 ( pg_last_wal_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("last wal replay location");
DATA(insert OID = 3830 ( pg_last_xact_replay_timestamp PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_last_xact_replay_timestamp _null_ _null_ _null_ ));
DESCR("timestamp of last replay xact");
-DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_pause _null_ _null_ _null_ ));
-DESCR("pause xlog replay");
-DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_resume _null_ _null_ _null_ ));
-DESCR("resume xlog replay, if it was paused");
-DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_xlog_replay_paused _null_ _null_ _null_ ));
-DESCR("true if xlog replay is paused");
+DATA(insert OID = 3450 ( pg_wal_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_pause _null_ _null_ _null_ ));
+DESCR("pause WAL replay");
+DATA(insert OID = 3451 ( pg_wal_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_resume _null_ _null_ _null_ ));
+DESCR("resume WAL replay, if it was paused");
+DATA(insert OID = 3448 ( pg_is_recovery_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_recovery_paused _null_ _null_ _null_ ));
+DESCR("true if WAL replay for recovery is paused");
DATA(insert OID = 2621 ( pg_reload_conf PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_reload_conf _null_ _null_ _null_ ));
DESCR("reload configuration files");
diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl
index 4dbde2978e..3d43b3577c 100644
--- a/src/test/modules/commit_ts/t/002_standby.pl
+++ b/src/test/modules/commit_ts/t/002_standby.pl
@@ -32,9 +32,9 @@ my $master_ts = $master->safe_psql('postgres',
qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'}
);
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
my $standby_ts = $standby->safe_psql('postgres',
@@ -46,9 +46,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
$master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl
index d37ff182c4..8d4e438989 100644
--- a/src/test/modules/commit_ts/t/003_standby_2.pl
+++ b/src/test/modules/commit_ts/t/003_standby_2.pl
@@ -31,9 +31,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index 053c5ea787..d84b86105e 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -1343,11 +1343,11 @@ mode must be specified.
sub lsn
{
my ($self, $mode) = @_;
- my %modes = ('insert' => 'pg_current_xlog_insert_location()',
- 'flush' => 'pg_current_xlog_flush_location()',
- 'write' => 'pg_current_xlog_location()',
- 'receive' => 'pg_last_xlog_receive_location()',
- 'replay' => 'pg_last_xlog_replay_location()');
+ my %modes = ('insert' => 'pg_current_wal_insert_location()',
+ 'flush' => 'pg_current_wal_flush_location()',
+ 'write' => 'pg_current_wal_location()',
+ 'receive' => 'pg_last_wal_receive_location()',
+ 'replay' => 'pg_last_wal_replay_location()');
$mode = '<undef>' if !defined($mode);
die "unknown mode for 'lsn': '$mode', valid modes are " . join(', ', keys %modes)
diff --git a/src/test/recovery/t/002_archiving.pl b/src/test/recovery/t/002_archiving.pl
index fc2bf7ee1d..83b43bf84d 100644
--- a/src/test/recovery/t/002_archiving.pl
+++ b/src/test/recovery/t/002_archiving.pl
@@ -33,10 +33,10 @@ $node_standby->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $current_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Force archiving of WAL file to make it present on master
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Add some more content, it should not be present on standby
$node_master->safe_psql('postgres',
@@ -44,7 +44,7 @@ $node_master->safe_psql('postgres',
# Wait until necessary replay has been done on standby
my $caughtup_query =
- "SELECT '$current_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$current_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl
index a82545bf6f..b7b0caae68 100644
--- a/src/test/recovery/t/003_recovery_targets.pl
+++ b/src/test/recovery/t/003_recovery_targets.pl
@@ -32,7 +32,7 @@ sub test_recovery_standby
# Wait until standby has replayed enough data
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
@@ -57,7 +57,7 @@ $node_master->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $lsn1 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Take backup from which all operations will be run
$node_master->backup('my_backup');
@@ -67,14 +67,14 @@ $node_master->backup('my_backup');
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(1001,2000))");
my $ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), txid_current();");
+ "SELECT pg_current_wal_location(), txid_current();");
my ($lsn2, $recovery_txid) = split /\|/, $ret;
# More data, with recovery target timestamp
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(2001,3000))");
$ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), now();");
+ "SELECT pg_current_wal_location(), now();");
my ($lsn3, $recovery_time) = split /\|/, $ret;
# Even more data, this time with a recovery target name
@@ -82,22 +82,22 @@ $node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(3001,4000))");
my $recovery_name = "my_target";
my $lsn4 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"SELECT pg_create_restore_point('$recovery_name');");
# And now for a recovery target LSN
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(4001,5000))");
-my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $lsn5 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(5001,6000))");
# Force archiving of WAL file
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Test recovery targets
my @recovery_params = ("recovery_target = 'immediate'");
diff --git a/src/test/recovery/t/005_replay_delay.pl b/src/test/recovery/t/005_replay_delay.pl
index 640295bfa8..cd9e8f5c12 100644
--- a/src/test/recovery/t/005_replay_delay.pl
+++ b/src/test/recovery/t/005_replay_delay.pl
@@ -42,7 +42,7 @@ $node_master->safe_psql('postgres',
# Now wait for replay to complete on standby. We're done waiting when the
# slave has replayed up to the previously saved master LSN.
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $remaining = 90;
while ($remaining-- > 0)
@@ -50,7 +50,7 @@ while ($remaining-- > 0)
# Done waiting?
my $replay_status = $node_standby->safe_psql('postgres',
- "SELECT (pg_last_xlog_replay_location() - '$until_lsn'::pg_lsn) >= 0"
+ "SELECT (pg_last_wal_replay_location() - '$until_lsn'::pg_lsn) >= 0"
);
last if $replay_status eq 't';
diff --git a/src/test/recovery/t/008_fsm_truncation.pl b/src/test/recovery/t/008_fsm_truncation.pl
index 9f6bdb0b64..4419fc258c 100644
--- a/src/test/recovery/t/008_fsm_truncation.pl
+++ b/src/test/recovery/t/008_fsm_truncation.pl
@@ -69,11 +69,11 @@ vacuum verbose testtab;
$node_master->psql('postgres', 'checkpoint');
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Wait long enough for standby to receive and apply all WAL
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/regress/expected/hs_standby_functions.out b/src/test/regress/expected/hs_standby_functions.out
index 16d50a8285..e0af677ea1 100644
--- a/src/test/regress/expected/hs_standby_functions.out
+++ b/src/test/regress/expected/hs_standby_functions.out
@@ -15,7 +15,7 @@ select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
-select pg_switch_xlog();
+select pg_switch_wal();
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
select pg_stop_backup();
diff --git a/src/test/regress/sql/hs_primary_extremes.sql b/src/test/regress/sql/hs_primary_extremes.sql
index 629efb4be5..2051e2e5cf 100644
--- a/src/test/regress/sql/hs_primary_extremes.sql
+++ b/src/test/regress/sql/hs_primary_extremes.sql
@@ -70,4 +70,4 @@ SELECT count(*) > 257 FROM pg_locks;
COMMIT;
SELECT hs_locks_drop(257);
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_primary_setup.sql b/src/test/regress/sql/hs_primary_setup.sql
index a00b367cbc..eeb4421307 100644
--- a/src/test/regress/sql/hs_primary_setup.sql
+++ b/src/test/regress/sql/hs_primary_setup.sql
@@ -22,4 +22,4 @@ insert into hs3 values (115);
DROP sequence if exists hsseq;
create sequence hsseq;
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_standby_functions.sql b/src/test/regress/sql/hs_standby_functions.sql
index 7577045f11..251bac0a43 100644
--- a/src/test/regress/sql/hs_standby_functions.sql
+++ b/src/test/regress/sql/hs_standby_functions.sql
@@ -10,7 +10,7 @@ select txid_current();
select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
-select pg_switch_xlog();
+select pg_switch_wal();
select pg_stop_backup();
-- should return no rows
0006-Remove-xlog-references-from-admin-functions-with-aliases.patchtext/x-patch; charset=US-ASCII; name=0006-Remove-xlog-references-from-admin-functions-with-aliases.patchDownload
diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl
index 56c6618d3d..dc907baf87 100644
--- a/contrib/bloom/t/001_wal.pl
+++ b/contrib/bloom/t/001_wal.pl
@@ -16,7 +16,7 @@ sub test_index_replay
# Wait for standby to catch up
my $applname = $node_standby->name;
my $caughtup_query =
-"SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
+"SELECT pg_current_wal_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
$node_master->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby 1 to catch up";
diff --git a/contrib/test_decoding/expected/ddl.out b/contrib/test_decoding/expected/ddl.out
index c104c4802d..275c84a450 100644
--- a/contrib/test_decoding/expected/ddl.out
+++ b/contrib/test_decoding/expected/ddl.out
@@ -58,7 +58,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
slot_name | plugin | slot_type | active | catalog_xmin_set | data_xmin_not_set | some_wal
-----------------+---------------+-----------+--------+------------------+-------------------+----------
diff --git a/contrib/test_decoding/sql/ddl.sql b/contrib/test_decoding/sql/ddl.sql
index 89b8b8f780..49dad39b50 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -29,7 +29,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
/*
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 6eaed1efbe..e37f101277 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -726,9 +726,9 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0
<para>
Also, you can force a segment switch manually with
- <function>pg_switch_xlog</> if you want to ensure that a
- just-finished transaction is archived as soon as possible. Other utility
- functions related to WAL management are listed in <xref
+ <function>pg_switch_wal</> if you want to ensure that a just-finished
+ transaction is archived as soon as possible. Other utility functions
+ related to WAL management are listed in <xref
linkend="functions-admin-backup-table">.
</para>
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 10e31868ba..a5bfb4b306 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -17925,13 +17925,13 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_create_restore_point</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_flush_location</primary>
+ <primary>pg_current_wal_flush_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_insert_location</primary>
+ <primary>pg_current_wal_insert_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_location</primary>
+ <primary>pg_current_wal_location</primary>
</indexterm>
<indexterm>
<primary>pg_start_backup</primary>
@@ -17946,24 +17946,25 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_backup_start_time</primary>
</indexterm>
<indexterm>
- <primary>pg_switch_xlog</primary>
+ <primary>pg_switch_wal</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name</primary>
+ <primary>pg_wal_file_name</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name_offset</primary>
+ <primary>pg_wal_file_name_offset</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_location_diff</primary>
+ <primary>pg_wal_location_diff</primary>
</indexterm>
<para>
The functions shown in <xref
linkend="functions-admin-backup-table"> assist in making on-line backups.
These functions cannot be executed during recovery (except
- <function>pg_is_in_backup</function>, <function>pg_backup_start_time</function>
- and <function>pg_xlog_location_diff</function>).
+ <function>pg_is_in_backup</function>,
+ <function>pg_backup_start_time</function> and
+ <function>pg_wal_location_diff</function>).
</para>
<table id="functions-admin-backup-table">
@@ -17984,21 +17985,21 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_flush_location()</function></literal>
+ <literal><function>pg_current_wal_flush_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log flush location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_insert_location()</function></literal>
+ <literal><function>pg_current_wal_insert_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log insert location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_location()</function></literal>
+ <literal><function>pg_current_wal_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log write location</entry>
@@ -18040,28 +18041,28 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_switch_xlog()</function></literal>
+ <literal><function>pg_switch_wal()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Force switch to a new transaction log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</type></entry>
<entry>Convert transaction log location string to file name</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_file_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</>, <type>integer</></entry>
<entry>Convert transaction log location string to file name and decimal byte offset within file</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlog_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>numeric</></entry>
<entry>Calculate the difference between two transaction log locations</entry>
@@ -18119,11 +18120,11 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_switch_xlog</> moves to the next transaction log file, allowing the
+ <function>pg_switch_wal</> moves to the next transaction log file, allowing the
current file to be archived (assuming you are using continuous archiving).
The return value is the ending transaction log location + 1 within the just-completed transaction log file.
If there has been no transaction log activity since the last transaction log switch,
- <function>pg_switch_xlog</> does nothing and returns the start location
+ <function>pg_switch_wal</> does nothing and returns the start location
of the transaction log file currently in use.
</para>
@@ -18138,10 +18139,10 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_current_xlog_location</> displays the current transaction log write
+ <function>pg_current_wal_location</> displays the current transaction log write
location in the same format used by the above functions. Similarly,
- <function>pg_current_xlog_insert_location</> displays the current transaction log
- insertion point and <function>pg_current_xlog_flush_location</> displays the
+ <function>pg_current_wal_insert_location</> displays the current transaction log
+ insertion point and <function>pg_current_wal_flush_location</> displays the
current transaction log flush point. The insertion point is the <quote>logical</>
end of the transaction log at any instant, while the write location is the end of
what has actually been written out from the server's internal buffers and flush
@@ -18154,17 +18155,17 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- You can use <function>pg_xlogfile_name_offset</> to extract the
+ You can use <function>pg_wal_file_name_offset</> to extract the
corresponding transaction log file name and byte offset from the results of any of the
above functions. For example:
<programlisting>
-postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
+postgres=# SELECT * FROM pg_wal_file_name_offset(pg_stop_backup());
file_name | file_offset
--------------------------+-------------
00000001000000000000000D | 4039624
(1 row)
</programlisting>
- Similarly, <function>pg_xlogfile_name</> extracts just the transaction log file name.
+ Similarly, <function>pg_wal_file_name</> extracts just the transaction log file name.
When the given transaction log location is exactly at a transaction log file boundary, both
these functions return the name of the preceding transaction log file.
This is usually the desired behavior for managing transaction log archiving
@@ -18173,7 +18174,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</para>
<para>
- <function>pg_xlog_location_diff</> calculates the difference in bytes
+ <function>pg_wal_location_diff</> calculates the difference in bytes
between two transaction log locations. It can be used with
<structname>pg_stat_replication</structname> or some functions shown in
<xref linkend="functions-admin-backup-table"> to get the replication lag.
@@ -18193,10 +18194,10 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<primary>pg_is_in_recovery</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_receive_location</primary>
+ <primary>pg_last_wal_receive_location</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_replay_location</primary>
+ <primary>pg_last_wal_replay_location</primary>
</indexterm>
<indexterm>
<primary>pg_last_xact_replay_timestamp</primary>
@@ -18228,7 +18229,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_receive_location()</function></literal>
+ <literal><function>pg_last_wal_receive_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location received and synced to disk by
@@ -18242,7 +18243,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_replay_location()</function></literal>
+ <literal><function>pg_last_wal_replay_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location replayed during recovery.
@@ -18274,13 +18275,13 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</table>
<indexterm>
- <primary>pg_is_xlog_replay_paused</primary>
+ <primary>pg_is_recovery_paused</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_pause</primary>
+ <primary>pg_wal_replay_pause</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_resume</primary>
+ <primary>pg_wal_replay_resume</primary>
</indexterm>
<para>
@@ -18300,7 +18301,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<tbody>
<row>
<entry>
- <literal><function>pg_is_xlog_replay_paused()</function></literal>
+ <literal><function>pg_is_recovery_paused()</function></literal>
</entry>
<entry><type>bool</type></entry>
<entry>True if recovery is paused.
@@ -18308,7 +18309,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_pause()</function></literal>
+ <literal><function>pg_wal_replay_pause()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Pauses recovery immediately (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -18316,7 +18317,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_resume()</function></literal>
+ <literal><function>pg_wal_replay_resume()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Restarts recovery if it was paused (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -19670,6 +19671,160 @@ SELECT (pg_stat_file('filename')).modification;
</sect2>
+
+ <sect2 id="functions-admin-deprecated">
+ <title>Deprecated Functions</title>
+
+ <indexterm>
+ <primary>pg_current_xlog_flush_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_current_xlog_insert_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_current_xlog_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_is_xlog_replay_paused</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_last_xlog_receive_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_last_xlog_replay_location</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_switch_xlog</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_replay_pause</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_location_diff</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlog_replay_resume</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlogfile_name</primary>
+ </indexterm>
+ <indexterm>
+ <primary>pg_xlogfile_name_offset</primary>
+ </indexterm>
+
+ <para>
+ The functions shown in <xref linkend="functions-admin-deprecated-table"> are
+ deprecated and will be removed in a future PostgreSQL release. It is highly
+ recommended to use new function names instead.
+ </para>
+
+ <table id="functions-admin-deprecated-table">
+ <title>Deprecated Administration Functions</title>
+ <tgroup cols="2">
+ <thead><row><entry>Name</entry> <entry>Replaced by</entry></row></thead>
+ <tbody>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_flush_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_flush_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_insert_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_insert_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_current_xlog_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_current_wal_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_is_xlog_replay_paused</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_is_recovery_paused</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_last_xlog_receive_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_last_wal_receive_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_last_xlog_replay_location</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_last_wal_replay_location</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_switch_xlog</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_switch_wal</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_location_diff</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_location_diff</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_replay_pause</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_replay_pause</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlog_replay_resume</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_replay_resume</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlogfile_name</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_file_name</function></literal>
+ </entry>
+ </row>
+ <row>
+ <entry>
+ <literal><function>pg_xlogfile_name_offset</function></literal>
+ </entry>
+ <entry>
+ <literal><function>pg_wal_file_name_offset</function></literal>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
+
+ </sect2>
+
</sect1>
<sect1 id="functions-trigger">
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index a1a9532088..e1c08c6e94 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -853,8 +853,8 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
standby. You can calculate this lag by comparing the current WAL write
location on the primary with the last WAL location received by the
standby. They can be retrieved using
- <function>pg_current_xlog_location</> on the primary and the
- <function>pg_last_xlog_receive_location</> on the standby,
+ <function>pg_current_wal_location</> on the primary and the
+ <function>pg_last_wal_receive_location</> on the standby,
respectively (see <xref linkend="functions-admin-backup-table"> and
<xref linkend="functions-recovery-info-table"> for details).
The last WAL receive location in the standby is also displayed in the
@@ -865,10 +865,10 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
You can retrieve a list of WAL sender processes via the
<link linkend="monitoring-stats-views-table">
<literal>pg_stat_replication</></link> view. Large differences between
- <function>pg_current_xlog_location</> and <literal>sent_location</> field
+ <function>pg_current_wal_location</> and <literal>sent_location</> field
might indicate that the master server is under heavy load, while
differences between <literal>sent_location</> and
- <function>pg_last_xlog_receive_location</> on the standby might indicate
+ <function>pg_last_wal_receive_location</> on the standby might indicate
network delay, or that the standby is under heavy load.
</para>
</sect3>
@@ -1587,7 +1587,7 @@ if (!triggered)
</para>
<para>
- An external program can call the <function>pg_xlogfile_name_offset()</>
+ An external program can call the <function>pg_wal_file_name_offset()</>
function (see <xref linkend="functions-admin">)
to find out the file name and the exact byte offset within it of
the current end of WAL. It can then access the WAL file directly
@@ -2225,7 +2225,7 @@ LOG: database system is ready to accept read only connections
<para>
WAL file control commands will not work during recovery,
- e.g. <function>pg_start_backup</>, <function>pg_switch_xlog</> etc.
+ e.g. <function>pg_start_backup</>, <function>pg_switch_wal</> etc.
</para>
<para>
diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml
index 8c24ae2174..a91864bf62 100644
--- a/doc/src/sgml/recovery-config.sgml
+++ b/doc/src/sgml/recovery-config.sgml
@@ -321,7 +321,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
to be executed against the database to check if this recovery target
is the most desirable point for recovery.
The paused state can be resumed by
- using <function>pg_xlog_replay_resume()</> (see
+ using <function>pg_wal_replay_resume()</> (see
<xref linkend="functions-recovery-control-table">), which then
causes recovery to end. If this recovery target is not the
desired stopping point, then shut down the server, change the
diff --git a/src/backend/access/transam/recovery.conf.sample b/src/backend/access/transam/recovery.conf.sample
index 7a16751541..ace77df728 100644
--- a/src/backend/access/transam/recovery.conf.sample
+++ b/src/backend/access/transam/recovery.conf.sample
@@ -98,10 +98,9 @@
#
# If recovery_target_action = 'pause', recovery will pause when the
# recovery target is reached. The pause state will continue until
-# pg_xlog_replay_resume() is called. This setting has no effect if
-# no recovery target is set. If hot_standby is not enabled then the
-# server will shutdown instead, though you may request this in
-# any case by specifying 'shutdown'.
+# pg_wal_replay_resume() is called. This setting has no effect if no recovery
+# target is set. If hot_standby is not enabled then the server will shutdown
+# instead, though you may request this in any case by specifying 'shutdown'.
#
#recovery_target_action = 'pause'
#
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 70edafadff..6dd63a945f 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5740,7 +5740,7 @@ recoveryPausesHere(void)
ereport(LOG,
(errmsg("recovery has paused"),
- errhint("Execute pg_xlog_replay_resume() to continue.")));
+ errhint("Execute pg_wal_replay_resume() to continue.")));
while (RecoveryIsPaused())
{
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index 5cafb8b913..e5ac9272d0 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -277,13 +277,13 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS)
}
/*
- * pg_switch_xlog: switch to next xlog file
+ * pg_switch_wal: switch to next WAL file
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_switch_xlog(PG_FUNCTION_ARGS)
+pg_switch_wal(PG_FUNCTION_ARGS)
{
XLogRecPtr switchpoint;
@@ -349,7 +349,7 @@ pg_create_restore_point(PG_FUNCTION_ARGS)
* to the kernel, but is not necessarily synced to disk.
*/
Datum
-pg_current_xlog_location(PG_FUNCTION_ARGS)
+pg_current_wal_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -370,7 +370,7 @@ pg_current_xlog_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
+pg_current_wal_insert_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -391,7 +391,7 @@ pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
+pg_current_wal_flush_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -413,7 +413,7 @@ pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
* and synced to disk by walreceiver.
*/
Datum
-pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
+pg_last_wal_receive_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -432,7 +432,7 @@ pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
* connections during recovery.
*/
Datum
-pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
+pg_last_wal_replay_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -445,15 +445,15 @@ pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
}
/*
- * Compute an xlog file name and decimal byte offset given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * Compute an WAL file name and decimal byte offset given a WAL location,
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*
* Note that a location exactly at a segment boundary is taken to be in
* the previous segment. This is usually the right thing, since the
* expected usage is to determine which xlog file(s) are ready to archive.
*/
Datum
-pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
+pg_wal_file_name_offset(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
uint32 xrecoff;
@@ -469,7 +469,7 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name_offset() cannot be executed during recovery.")));
+ errhint("pg_wal_file_name_offset() cannot be executed during recovery.")));
/*
* Construct a tuple descriptor for the result row. This must match this
@@ -512,10 +512,10 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
/*
* Compute an xlog file name given a WAL location,
- * such as is returned by pg_stop_backup() or pg_xlog_switch().
+ * such as is returned by pg_stop_backup() or pg_switch_wal().
*/
Datum
-pg_xlogfile_name(PG_FUNCTION_ARGS)
+pg_wal_file_name(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
XLogRecPtr locationpoint = PG_GETARG_LSN(0);
@@ -525,7 +525,7 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name() cannot be executed during recovery.")));
+ errhint("pg_wal_file_name() cannot be executed during recovery.")));
XLByteToPrevSeg(locationpoint, xlogsegno);
XLogFileName(xlogfilename, ThisTimeLineID, xlogsegno);
@@ -534,13 +534,13 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_pause - pause recovery now
+ * pg_wal_replay_pause - pause recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_pause(PG_FUNCTION_ARGS)
+pg_wal_replay_pause(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -554,13 +554,13 @@ pg_xlog_replay_pause(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_resume - resume recovery now
+ * pg_wal_replay_resume - resume recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_resume(PG_FUNCTION_ARGS)
+pg_wal_replay_resume(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -574,10 +574,10 @@ pg_xlog_replay_resume(PG_FUNCTION_ARGS)
}
/*
- * pg_is_xlog_replay_paused
+ * pg_is_recovery_paused
*/
Datum
-pg_is_xlog_replay_paused(PG_FUNCTION_ARGS)
+pg_is_recovery_paused(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -619,7 +619,7 @@ pg_is_in_recovery(PG_FUNCTION_ARGS)
* Compute the difference in bytes between two WAL locations.
*/
Datum
-pg_xlog_location_diff(PG_FUNCTION_ARGS)
+pg_wal_location_diff(PG_FUNCTION_ARGS)
{
Datum result;
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index 31aade102b..93c9d13950 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -1050,8 +1050,11 @@ REVOKE EXECUTE ON FUNCTION pg_start_backup(text, boolean, boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup() FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup(boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_create_restore_point(text) FROM public;
+REVOKE EXECUTE ON FUNCTION pg_switch_wal() FROM public;
REVOKE EXECUTE ON FUNCTION pg_switch_xlog() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_pause() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_pause() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_xlog_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_rotate_logfile() FROM public;
REVOKE EXECUTE ON FUNCTION pg_reload_conf() FROM public;
diff --git a/src/bin/pg_basebackup/t/030_pg_recvlogical.pl b/src/bin/pg_basebackup/t/030_pg_recvlogical.pl
index dca5ef2181..b43176fdc6 100644
--- a/src/bin/pg_basebackup/t/030_pg_recvlogical.pl
+++ b/src/bin/pg_basebackup/t/030_pg_recvlogical.pl
@@ -39,7 +39,7 @@ isnt($slot->{'restart_lsn'}, '', 'restart lsn is defined for new slot');
$node->psql('postgres', 'CREATE TABLE test_table(x integer)');
$node->psql('postgres', 'INSERT INTO test_table(x) SELECT y FROM generate_series(1, 10) a(y);');
-my $nextlsn = $node->safe_psql('postgres', 'SELECT pg_current_xlog_insert_location()');
+my $nextlsn = $node->safe_psql('postgres', 'SELECT pg_current_wal_insert_location()');
chomp($nextlsn);
$node->command_ok(['pg_recvlogical', '-S', 'test', '-d', $node->connstr('postgres'), '--start', '--endpos', "$nextlsn", '--no-loop', '-f', '-'],
diff --git a/src/bin/pg_rewind/RewindTest.pm b/src/bin/pg_rewind/RewindTest.pm
index 1c482617ad..c67212ff7a 100644
--- a/src/bin/pg_rewind/RewindTest.pm
+++ b/src/bin/pg_rewind/RewindTest.pm
@@ -156,7 +156,7 @@ sub promote_standby
# Wait for the standby to receive and write all WAL.
my $wal_received_query =
-"SELECT pg_current_xlog_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
+"SELECT pg_current_wal_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
$node_master->poll_query_until('postgres', $wal_received_query)
or die "Timed out while waiting for standby to receive and write WAL";
diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c
index a903849ee4..d2374201c6 100644
--- a/src/bin/pg_rewind/libpq_fetch.c
+++ b/src/bin/pg_rewind/libpq_fetch.c
@@ -121,7 +121,7 @@ run_simple_query(const char *sql)
}
/*
- * Calls pg_current_xlog_insert_location() function
+ * Calls pg_current_wal_insert_location() function
*/
XLogRecPtr
libpqGetCurrentXlogInsertLocation(void)
@@ -131,7 +131,7 @@ libpqGetCurrentXlogInsertLocation(void)
uint32 lo;
char *val;
- val = run_simple_query("SELECT pg_current_xlog_insert_location()");
+ val = run_simple_query("SELECT pg_current_wal_insert_location()");
if (sscanf(val, "%X/%X", &hi, &lo) != 2)
pg_fatal("unrecognized result \"%s\" for current WAL insert location\n", val);
diff --git a/src/include/access/xlog_fn.h b/src/include/access/xlog_fn.h
index a013d047a2..a46b2f995c 100644
--- a/src/include/access/xlog_fn.h
+++ b/src/include/access/xlog_fn.h
@@ -16,21 +16,21 @@
extern Datum pg_start_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup(PG_FUNCTION_ARGS);
extern Datum pg_stop_backup_v2(PG_FUNCTION_ARGS);
-extern Datum pg_switch_xlog(PG_FUNCTION_ARGS);
+extern Datum pg_switch_wal(PG_FUNCTION_ARGS);
extern Datum pg_create_restore_point(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_insert_location(PG_FUNCTION_ARGS);
-extern Datum pg_current_xlog_flush_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_receive_location(PG_FUNCTION_ARGS);
-extern Datum pg_last_xlog_replay_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_insert_location(PG_FUNCTION_ARGS);
+extern Datum pg_current_wal_flush_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_receive_location(PG_FUNCTION_ARGS);
+extern Datum pg_last_wal_replay_location(PG_FUNCTION_ARGS);
extern Datum pg_last_xact_replay_timestamp(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name_offset(PG_FUNCTION_ARGS);
-extern Datum pg_xlogfile_name(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name_offset(PG_FUNCTION_ARGS);
+extern Datum pg_wal_file_name(PG_FUNCTION_ARGS);
extern Datum pg_is_in_recovery(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_pause(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_replay_resume(PG_FUNCTION_ARGS);
-extern Datum pg_is_xlog_replay_paused(PG_FUNCTION_ARGS);
-extern Datum pg_xlog_location_diff(PG_FUNCTION_ARGS);
+extern Datum pg_wal_replay_pause(PG_FUNCTION_ARGS);
+extern Datum pg_wal_replay_resume(PG_FUNCTION_ARGS);
+extern Datum pg_is_recovery_paused(PG_FUNCTION_ARGS);
+extern Datum pg_wal_location_diff(PG_FUNCTION_ARGS);
extern Datum pg_is_in_backup(PG_FUNCTION_ARGS);
extern Datum pg_backup_start_time(PG_FUNCTION_ARGS);
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index 37e022dc0d..17471b4199 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -3141,23 +3141,37 @@ DATA(insert OID = 3813 ( pg_is_in_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s
DESCR("true if server is in online backup");
DATA(insert OID = 3814 ( pg_backup_start_time PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_backup_start_time _null_ _null_ _null_ ));
DESCR("start time of an online backup");
-DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_xlog _null_ _null_ _null_ ));
-DESCR("switch to new xlog file");
+DATA(insert OID = 3449 ( pg_switch_wal PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("switch to new WAL file");
+DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("historical alias for pg_switch_wal");
DATA(insert OID = 3098 ( pg_create_restore_point PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 3220 "25" _null_ _null_ _null_ _null_ _null_ pg_create_restore_point _null_ _null_ _null_ ));
DESCR("create a named restore point");
-DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_location _null_ _null_ _null_ ));
-DESCR("current xlog write location");
-DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_insert_location _null_ _null_ _null_ ));
-DESCR("current xlog insert location");
-DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_flush_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_xlogfile_name_offset _null_ _null_ _null_ ));
-DESCR("xlog filename and byte offset, given an xlog location");
-DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_xlogfile_name _null_ _null_ _null_ ));
-DESCR("xlog filename, given an xlog location");
-
-DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_xlog_location_diff _null_ _null_ _null_ ));
-DESCR("difference in bytes, given two xlog locations");
+DATA(insert OID = 3800 ( pg_current_wal_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("current WAL write location");
+DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_xlog_location");
+DATA(insert OID = 3801 ( pg_current_wal_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("current WAL insert location");
+DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_wal_insert_location");
+DATA(insert OID = 6015 ( pg_current_wal_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("current WAL flush location");
+DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_current_wal_flush_location");
+DATA(insert OID = 3452 ( pg_wal_file_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("WAL filename and byte offset, given an WAL location");
+DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_wal_file_name_offset _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_file_name_offset");
+DATA(insert OID = 3453 ( pg_wal_file_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("WAL filename, given a WAL location");
+DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_wal_file_name _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_file_name");
+
+DATA(insert OID = 3445 ( pg_wal_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("difference in bytes, given two WAL locations");
+DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_location_diff");
DATA(insert OID = 3809 ( pg_export_snapshot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 0 0 25 "" _null_ _null_ _null_ _null_ _null_ pg_export_snapshot _null_ _null_ _null_ ));
DESCR("export a snapshot");
@@ -3165,19 +3179,29 @@ DESCR("export a snapshot");
DATA(insert OID = 3810 ( pg_is_in_recovery PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_recovery _null_ _null_ _null_ ));
DESCR("true if server is in recovery");
-DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_receive_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_replay_location _null_ _null_ _null_ ));
-DESCR("last xlog replay location");
+DATA(insert OID = 3446 ( pg_last_wal_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("current wal flush location");
+DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_last_wal_receive_location");
+DATA(insert OID = 3447 ( pg_last_wal_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("last wal replay location");
+DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("historical alias for pg_last_wal_replay_location");
DATA(insert OID = 3830 ( pg_last_xact_replay_timestamp PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_last_xact_replay_timestamp _null_ _null_ _null_ ));
DESCR("timestamp of last replay xact");
-DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_pause _null_ _null_ _null_ ));
-DESCR("pause xlog replay");
-DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_resume _null_ _null_ _null_ ));
-DESCR("resume xlog replay, if it was paused");
-DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_xlog_replay_paused _null_ _null_ _null_ ));
-DESCR("true if xlog replay is paused");
+DATA(insert OID = 3450 ( pg_wal_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_pause _null_ _null_ _null_ ));
+DESCR("pause WAL replay");
+DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_pause _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_replay_pause");
+DATA(insert OID = 3451 ( pg_wal_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_resume _null_ _null_ _null_ ));
+DESCR("resume WAL replay, if it was paused");
+DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_resume _null_ _null_ _null_ ));
+DESCR("historical alias for pg_wal_replay_resume");
+DATA(insert OID = 3448 ( pg_is_recovery_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_recovery_paused _null_ _null_ _null_ ));
+DESCR("true if WAL replay for recovery is paused");
+DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_recovery_paused _null_ _null_ _null_ ));
+DESCR("historical alias for pg_is_recovery_paused");
DATA(insert OID = 2621 ( pg_reload_conf PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_reload_conf _null_ _null_ _null_ ));
DESCR("reload configuration files");
diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl
index 4dbde2978e..3d43b3577c 100644
--- a/src/test/modules/commit_ts/t/002_standby.pl
+++ b/src/test/modules/commit_ts/t/002_standby.pl
@@ -32,9 +32,9 @@ my $master_ts = $master->safe_psql('postgres',
qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'}
);
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
my $standby_ts = $standby->safe_psql('postgres',
@@ -46,9 +46,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
$master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl
index d37ff182c4..8d4e438989 100644
--- a/src/test/modules/commit_ts/t/003_standby_2.pl
+++ b/src/test/modules/commit_ts/t/003_standby_2.pl
@@ -31,9 +31,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index 053c5ea787..d84b86105e 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -1343,11 +1343,11 @@ mode must be specified.
sub lsn
{
my ($self, $mode) = @_;
- my %modes = ('insert' => 'pg_current_xlog_insert_location()',
- 'flush' => 'pg_current_xlog_flush_location()',
- 'write' => 'pg_current_xlog_location()',
- 'receive' => 'pg_last_xlog_receive_location()',
- 'replay' => 'pg_last_xlog_replay_location()');
+ my %modes = ('insert' => 'pg_current_wal_insert_location()',
+ 'flush' => 'pg_current_wal_flush_location()',
+ 'write' => 'pg_current_wal_location()',
+ 'receive' => 'pg_last_wal_receive_location()',
+ 'replay' => 'pg_last_wal_replay_location()');
$mode = '<undef>' if !defined($mode);
die "unknown mode for 'lsn': '$mode', valid modes are " . join(', ', keys %modes)
diff --git a/src/test/recovery/t/002_archiving.pl b/src/test/recovery/t/002_archiving.pl
index fc2bf7ee1d..83b43bf84d 100644
--- a/src/test/recovery/t/002_archiving.pl
+++ b/src/test/recovery/t/002_archiving.pl
@@ -33,10 +33,10 @@ $node_standby->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $current_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Force archiving of WAL file to make it present on master
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Add some more content, it should not be present on standby
$node_master->safe_psql('postgres',
@@ -44,7 +44,7 @@ $node_master->safe_psql('postgres',
# Wait until necessary replay has been done on standby
my $caughtup_query =
- "SELECT '$current_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$current_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl
index a82545bf6f..b7b0caae68 100644
--- a/src/test/recovery/t/003_recovery_targets.pl
+++ b/src/test/recovery/t/003_recovery_targets.pl
@@ -32,7 +32,7 @@ sub test_recovery_standby
# Wait until standby has replayed enough data
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
@@ -57,7 +57,7 @@ $node_master->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $lsn1 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Take backup from which all operations will be run
$node_master->backup('my_backup');
@@ -67,14 +67,14 @@ $node_master->backup('my_backup');
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(1001,2000))");
my $ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), txid_current();");
+ "SELECT pg_current_wal_location(), txid_current();");
my ($lsn2, $recovery_txid) = split /\|/, $ret;
# More data, with recovery target timestamp
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(2001,3000))");
$ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), now();");
+ "SELECT pg_current_wal_location(), now();");
my ($lsn3, $recovery_time) = split /\|/, $ret;
# Even more data, this time with a recovery target name
@@ -82,22 +82,22 @@ $node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(3001,4000))");
my $recovery_name = "my_target";
my $lsn4 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"SELECT pg_create_restore_point('$recovery_name');");
# And now for a recovery target LSN
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(4001,5000))");
-my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $lsn5 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(5001,6000))");
# Force archiving of WAL file
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Test recovery targets
my @recovery_params = ("recovery_target = 'immediate'");
diff --git a/src/test/recovery/t/005_replay_delay.pl b/src/test/recovery/t/005_replay_delay.pl
index 640295bfa8..cd9e8f5c12 100644
--- a/src/test/recovery/t/005_replay_delay.pl
+++ b/src/test/recovery/t/005_replay_delay.pl
@@ -42,7 +42,7 @@ $node_master->safe_psql('postgres',
# Now wait for replay to complete on standby. We're done waiting when the
# slave has replayed up to the previously saved master LSN.
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $remaining = 90;
while ($remaining-- > 0)
@@ -50,7 +50,7 @@ while ($remaining-- > 0)
# Done waiting?
my $replay_status = $node_standby->safe_psql('postgres',
- "SELECT (pg_last_xlog_replay_location() - '$until_lsn'::pg_lsn) >= 0"
+ "SELECT (pg_last_wal_replay_location() - '$until_lsn'::pg_lsn) >= 0"
);
last if $replay_status eq 't';
diff --git a/src/test/recovery/t/008_fsm_truncation.pl b/src/test/recovery/t/008_fsm_truncation.pl
index 9f6bdb0b64..4419fc258c 100644
--- a/src/test/recovery/t/008_fsm_truncation.pl
+++ b/src/test/recovery/t/008_fsm_truncation.pl
@@ -69,11 +69,11 @@ vacuum verbose testtab;
$node_master->psql('postgres', 'checkpoint');
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Wait long enough for standby to receive and apply all WAL
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/regress/expected/hs_standby_functions.out b/src/test/regress/expected/hs_standby_functions.out
index 16d50a8285..e0af677ea1 100644
--- a/src/test/regress/expected/hs_standby_functions.out
+++ b/src/test/regress/expected/hs_standby_functions.out
@@ -15,7 +15,7 @@ select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
-select pg_switch_xlog();
+select pg_switch_wal();
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
select pg_stop_backup();
diff --git a/src/test/regress/sql/hs_primary_extremes.sql b/src/test/regress/sql/hs_primary_extremes.sql
index 629efb4be5..2051e2e5cf 100644
--- a/src/test/regress/sql/hs_primary_extremes.sql
+++ b/src/test/regress/sql/hs_primary_extremes.sql
@@ -70,4 +70,4 @@ SELECT count(*) > 257 FROM pg_locks;
COMMIT;
SELECT hs_locks_drop(257);
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_primary_setup.sql b/src/test/regress/sql/hs_primary_setup.sql
index a00b367cbc..eeb4421307 100644
--- a/src/test/regress/sql/hs_primary_setup.sql
+++ b/src/test/regress/sql/hs_primary_setup.sql
@@ -22,4 +22,4 @@ insert into hs3 values (115);
DROP sequence if exists hsseq;
create sequence hsseq;
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_standby_functions.sql b/src/test/regress/sql/hs_standby_functions.sql
index 7577045f11..251bac0a43 100644
--- a/src/test/regress/sql/hs_standby_functions.sql
+++ b/src/test/regress/sql/hs_standby_functions.sql
@@ -10,7 +10,7 @@ select txid_current();
select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
-select pg_switch_xlog();
+select pg_switch_wal();
select pg_stop_backup();
-- should return no rows
smime.p7sapplication/pkcs7-signature; name=smime.p7sDownload
0�� *�H��
���0��10
`�He 0 *�H��
��Q0�\0�D�Hjn���D���0
*�H��
0d10 UBE10U
GlobalSign nv-sa1:08U1GlobalSign PersonalSign Partners CA - SHA256 - G20
160615000000Z
210615000000Z0L10 UBE10U
GlobalSign nv-sa1"0 UGlobalSign HV S/MIME CA 10�"0
*�H��
� 0�
� �v�R��VV�^���p��(X2��8��#~�66cmy
Q���/
_�� [�>����{��<PR1~[I^��?`��K��j(�Ox����4b����y���8���Q��w��,\l�Do`8f����n�w�_�c�T[�,R�2O$����,�L:u/�ul I7��lE7�E.�
��'"������:�|����)Nf
Z��
Kb[�������������8�������2��?������I&k(�����b"P� ��"0�0U�0U%0++0U�0� 0U�8����x���!���&b��?0U#0�&$���D���m��t��x 0KUD0B0@�>�<�:http://crl.globalsign.com/gs/gspersonalsignptnrssha2g2.crl0LU E0C0A +�2(0402+&https://www.globalsign.com/repository/0
*�H��
�
��!� ���Nic�As}���0z-^�xek����S`Y?t�A��W�Z�����jh@C"�����s�$J���
����hQ�D0� ��f�X��x�W8q����.��{D���Qz��UC��02>����5��H�V�A}�}p�w
�3���~a�����zj�t��*�,[����dKVY>�]�&�����i`$��C���CQ�����h 5-K���"����Zx�e���������)s�����0�m��G0�0�� 1��@�0
*�H��
0L1 0UGlobalSign Root CA - R310U
GlobalSign10U
GlobalSign0
110802100000Z
290329100000Z0d10 UBE10U
GlobalSign nv-sa1:08U1GlobalSign PersonalSign Partners CA - SHA256 - G20�"0
*�H��
� 0�
� ��J�� ���b��A*����>�S�NX)�^��'��u�K��#� ��u�F��q4�E
E�=��ZWX�~J����^�q���i����\n��������������Z7O\�����?���g2c� /���i��L��v��>�p-������v�����w���@C^Z�w}�`�=[�.������1{�z��-^`vj4�6�>)��� $y�����G����A>�Q1r�a������D �`~����7
���W��� ���0��0U�0U�0�0U&$���D���m��t��x 0GU @0>0<U 0402+&https://www.globalsign.com/repository/06U/0-0+�)�'�%http://crl.globalsign.net/root-r3.crl0U#0���K�.E$�MP�c������0
*�H��
� Uc(Y _���-�������4vk��F`�VY��p�������� �o%k@��3�N�J������)�����|��q�)��+!�������������L(�b�w^��������; ���uS����
i�b���>l,% �)~|^c�1�u�n��$^�@��a����J"��A@-bsi7�.gx�_�p��m^�l���O�������\-=��`�8Us c�w��?�
��s��|)dY���-��H���HTww0�_0�G� !XS�0
*�H��
0L1 0UGlobalSign Root CA - R310U
GlobalSign10U
GlobalSign0
090318100000Z
290318100000Z0L1 0UGlobalSign Root CA - R310U
GlobalSign10U
GlobalSign0�"0
*�H��
� 0�
� �%v�yx"������(��v���r�FC����_$�.K�`�F�R��Gpl�d���,��=+�����y�;�w��I�jb/^��h��'�8��>��&Y
s����&���[��`�I�(�i;���(����aW7�t�t�:�r/.������= �3��+�S�:s��A :������O�.2`�W���hh�8&`u��w���� I��@H�1a^����w�d�z�_���b�
l�Ti��n���qv�i�� �B0@0U�0U�0�0U��K�.E$�MP�c������0
*�H��
� K@��P������TEI�� A����(3�k�t�� -��
������sgJ��D{x��nlo)�39E����Wl����S�-�$l��c��ShgV>���5!��h����S������]F���zX(/�� 7A��Dm�S(�~�g������L'�Lssv���z�-�
,�<�U�~6��WI��.-|`��AQ#���2k����,3:;%��@�;,�x�a/���Uo��� M�(�r��bPe����1����GX?_0�h0�P�q��KO��F���0
*�H��
0L10 UBE10U
GlobalSign nv-sa1"0 UGlobalSign HV S/MIME CA 10
161122184556Z
170521184556Z0$1"0 *�H��
vrusinov@google.com0�"0
*�H��
� 0�
� �FZ9UI���nzd�A
�P������vD^2s����N����4�i����������zUhp7�R�E2��lGm����x>>�y� Z*�#�X��$��������"P2����
J�kVe��j4!�u����� �
{sJ���Se��c`��������Xc"'j����3G�^�'�I{�JD��U� VR�<I��zI�E���3���,��]\�� �B�<-�b�?����Zv)m/+���2���= F3=EW���� ��p0�l0U0�vrusinov@google.com0P+D0B0@+0�4http://secure.globalsign.com/cacert/gshvsmimeca1.crt0U�^��'�����7%�����0U#0��8����x���!���&b��?0LU E0C0A +�2(0402+&https://www.globalsign.com/repository/0;U40200�.�,�*http://crl.globalsign.com/gshvsmimeca1.crl0U��0U%0++0
*�H��
� �����q��J����k[�]B�����J9-��e3��
����P��5k���T�����j������� ���&w��0�y��g�^��c�?� �H��K^<q]�jM�o#V�\r�@SW��
�P|ny��Y���M
G���/B�C6�d2�4����8�(�t�4>�-�PPZ ���d�/�0F��-�&�����: _3e��iu�i��:`���x��!�Y�9�Z�m�����Y������D8`E���N"� ?�1�^0�Z0\0L10 UBE10U
GlobalSign nv-sa1"0 UGlobalSign HV S/MIME CA 1q��KO��F���0
`�He ���0/ *�H��
1" �\}���?�%=W�Z.P����u����7z�B�B0 *�H��
1 *�H��
0 *�H��
1
170113181002Z0i *�H��
1\0Z0 `�He*0 `�He0 `�He0
*�H��
0 *�H��
0 *�H��
0 `�He0
*�H��
� o%������]�Y�x���#n�l��} �l���@@�]���m���� -�~�����?���� ���l5]�� ����+�U2�}+����J3�q;�m����V|Z>i����S����S���F���U}/G@�m��)cU7�(�v\���%z^gy���j�Ytp|�{�e�;����������A�2�=����2�����c�51�����Xn���O�*������e7��6�ohF4Sp��L+�Robert Haas wrote:
From a technical point of view, that is pretty much true. But from a
user perspective, I don't think it is. If the old names live in an
extension, then they will not be there by default. Tools and scripts
will break. If that's a problem for a particular user, they an
install the extension to unbreak those things, but tool authors will
probably be motivated to upgrade their tools so that the extension is
no longer needed. Therefore, if we eventually drop the extension,
there will probably be few users relying on it at that point. On the
other hand, if we install aliases that are present in every install -
and that are not even optionally removable - a lot of people are not
going to bother using the new names at all. They'll just keep on
using the old ones so that their tools work with both old and new
versions, and if we eventually rip the stuff out of pg_proc.h it will
cause almost as much howling as if we'd done it right at the
beginning.In other words, adding an extension is the only option that I see
which will give tool authors a strong incentive to support the new
names without making it a hard requirement on day one.
A compatibility extension sounds like a pretty decent idea to me,
considering this point. I think breakage without a workaround will
cause people to defer migration more than they otherwise would; the
extension gives them an easy way forward while they set up their
internal code to the new reality, to test the other new things in pg10.
If we keep the extension forever, so what? It's not like tsearch2
causes us too much of a maintenance pain. It's been patched a few
times, but only to change things that wouldn't need changes in a
xlog->wal aliases-only module. Anyway, I would mark the module as
deprecated with an intent of removing it in half a dozen releases or so.
--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Sat, Jan 14, 2017 at 3:10 AM, Vladimir Rusinov <vrusinov@google.com> wrote:
Attached are two new version of the patch: one keeps aliases, one don't.
Also, remove stray reference to xlog function in one of the tests.I've lost vote count. Should we create a form to calculate which one of the
patches should be commited?
If we do that, we should vote on all the "renaming" stuff, i.e., not only
function names but also program names like pg_receivexlog, directory names
like clog, option names like xlogdir option of initdb, return value names of
the functions like xlog_position in pg_create_physical_replication_slot, etc.
Regards,
--
Fujii Masao
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/13/17 10:18 AM, Stephen Frost wrote:
The point I was making was that serious montioring systems would have to
be changed and I stand by that.
I don't think my monitoring systems are any less serious than yours.
Certainly, check_postgres is going to have to be changed to address this
and, unsurprisingly, it's already had to address a variety of major
version differences that have been introduced over the years.
check_postgres will not need to be changed except for the actions that
check the disk, which you don't need unless you are using archiving.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Peter,
* Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote:
On 1/13/17 10:18 AM, Stephen Frost wrote:
Certainly, check_postgres is going to have to be changed to address this
and, unsurprisingly, it's already had to address a variety of major
version differences that have been introduced over the years.check_postgres will not need to be changed except for the actions that
check the disk, which you don't need unless you are using archiving.
That isn't really the point though, is it? check_postgres will need to
be changed because there are actions which check the pg_xlog directory.
That'll cause a new release, which will be the "release that works with
PG10."
Perhaps if you're following along with -hackers and know how
check_postgres works then you'll realize that you might not *have* to
upgrade your check_postgres installation if only the directory is
changed and nothing else is, but I've got a pretty hard time seeing that
as a very common user use-case.
The implication here seems to be that because the older version of
check_postgres might appear to continue working for *some* set of
actions (but not all) that we should encouarge users to keep using that
older version with PG10. That doesn't make any sense to me and I
certainly don't agree with it.
Thanks!
Stephen
On Mon, Jan 16, 2017 at 10:48 PM, Fujii Masao <masao.fujii@gmail.com> wrote:
If we do that, we should vote on all the "renaming" stuff, i.e., not only
function names but also program names like pg_receivexlog, directory names
like clog, option names like xlogdir option of initdb, return value names of
the functions like xlog_position in pg_create_physical_replication_slot, etc.
Right. I think a lot of that stuff should also be changed. If we
weren't OK with breaking compatibility, why'd we change pg_xlog ->
pg_wal? If we're not willing to change other things to match, let's
revert that change and be done with it. It's undeniable that there's
going to be some pain here and I'm not committed to incurring that
pain, but I don't really understand the the theory that saying that a
half-renaming will save us pain vs. a more through renaming. If we
change some things and not others, people will have to try to remember
in which cases they now have to say xlog instead of wal and in which
cases they still have to say xlog and (perhaps) in which cases they
can choose either. I think "xlog" is terrible naming; there is no
universe in which "x" is a reasonable short-hand for either
"transaction" or "write-ahead".
Q: OK, where is my WAL stored?
A: pg_wal
Q: How do I reset it?
A: pg_resetxlog
Q: Why is it called pg_resetxlog?
A: Because we call the transaction log "xlog".
Q: Evidently you don't.
A: Well, it used to be called pg_xlog prior to version 10, but then we
renamed it, but the tool has still got the old name.
Q: Are you kidding me?
A: No.
Q: Do you guys suck at picking names for things?
A: Yes.
Q: Wouldn't it at least be better to settle on ONE incomprehensible
abbreviation for any given concept instead of having TWO DIFFERENT
ONES?
A: Hey, look at the time.
If we don't make this all consistent, we'll be having that
conversation -- or some variant of it -- forever. There will be
constant arguments about whether to give in and rename some more
things. The people who are now saying that we shouldn't break
compatibility for this change (as if we haven't already) will be even
less happy when they keep having to argue against breaking
compatibility for the same thing a second time.
I'm OK with continuing to use "xlog" as the user-facing name for the
write-ahead log, and I am OK with switching to wal. But leaving
things in the halfway in-between state where they are right now seems
like a mess. It conveniences the people who happen to care about the
names of the parts we haven't renamed yet but not the part we already
did rename at the price of a permanent inconsistency in naming
conventions that can't ever eliminate. Yuck.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Robert Haas (robertmhaas@gmail.com) wrote:
I'm OK with continuing to use "xlog" as the user-facing name for the
write-ahead log, and I am OK with switching to wal. But leaving
things in the halfway in-between state where they are right now seems
like a mess. It conveniences the people who happen to care about the
names of the parts we haven't renamed yet but not the part we already
did rename at the price of a permanent inconsistency in naming
conventions that can't ever eliminate. Yuck.
I'm more of a '-1' when it comes to keeping everything called "xlog",
and a '+1' on renaming everything to be WAL, since that's what we
usually refer to this thing as, but I agree with Robert that only doing
a half-way renaming is about a -1000.
Thanks!
Stephen
On Tue, Jan 17, 2017 at 10:03 PM, Robert Haas <robertmhaas@gmail.com> wrote:
Q: OK, where is my WAL stored?
A: pg_wal
Q: How do I reset it?
A: pg_resetxlog
On the topic of binaries, there's going to be another patch renaming them.
Those will have no aliases as it's trivial to work-around (symlinks, shell
scripts, etc) and not so trivial to implement in a portable way.
I'm used to workflows with lots of small commits, so I was not able to
force myself to include all of the renames in one diff.
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
On Wed, Jan 18, 2017 at 8:15 PM, Vladimir Rusinov <vrusinov@google.com> wrote:
On the topic of binaries, there's going to be another patch renaming them.
Those will have no aliases as it's trivial to work-around (symlinks, shell
scripts, etc) and not so trivial to implement in a portable way.
On Windows that would be a pain... So let's not use symlinks for binaries.
I'm used to workflows with lots of small commits, so I was not able to force
myself to include all of the renames in one diff.
That's a good habit IMO.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Wed, Jan 18, 2017 at 12:28 PM, Michael Paquier <michael.paquier@gmail.com
wrote:
On Wed, Jan 18, 2017 at 8:15 PM, Vladimir Rusinov <vrusinov@google.com>
wrote:On the topic of binaries, there's going to be another patch renaming
them.
Those will have no aliases as it's trivial to work-around (symlinks,
shell
scripts, etc) and not so trivial to implement in a portable way.
On Windows that would be a pain... So let's not use symlinks for binaries.
Just to be clear, I'm not proposing that we use symlinks. Just pointing out
that workarounds are trivial for the end users.
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
On Sat, Jan 14, 2017 at 5:10 AM, Vladimir Rusinov <vrusinov@google.com>
wrote:
Attached are two new version of the patch: one keeps aliases, one don't.
Both the patches (with and without aliases) are not getting applied to the
latest master. Below is the error -
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/include/access/xlog_fn.h b/src/include/access/xlog_fn.h
|index a013d047a2..a46b2f995c 100644
|--- a/src/include/access/xlog_fn.h
|+++ b/src/include/access/xlog_fn.h
--------------------------
File to patch:
Also, remove stray reference to xlog function in one of the tests.
I've lost vote count. Should we create a form to calculate which one of
the patches should be commited?If we decide to go the extension way, perhaps it can be maintained outside
of core Postgres?
My take on having aliases to the functions :
In my opinion as a DBA, I agree with having no-aliases. Having functions
doing the same thing with two different names could be confusing. I have
been doing quite a number of PostgreSQL upgrades since few years, i do not
see, the function name changes as a major issue or a road-blocker in the
upgrade exercise. If the function name has changed, it has changed. It
would be a serious thing to consider during the upgrade if there is a
change in the functionality of a particular function as it needs testing. I
think, changing of the function names in the scripts and custom-tools has
to be executed and might take up a bit of extra time.
IMHO, It is not a good idea to keep aliases as this would make the DBAs
lazier to change the function names on priority in the automated
scripts/jobs/tools during the upgrades. Especially, in bigger and complex
environments where-in database environments are handled by different
multiple groups of DBAs, it could be possible that both *xlog* functions
and *wal* functions will be used up in the scripts and all of them will be
working fine and once the *xlog* functions names are completely removed,
then some of the jobs/scripts start failing.
I would vote for "no-aliases".
Regards,
Venkata Balaji N
Database Consultant
On Mon, Jan 23, 2017 at 2:06 PM, Venkata B Nagothi <nag1010@gmail.com> wrote:
On Sat, Jan 14, 2017 at 5:10 AM, Vladimir Rusinov <vrusinov@google.com>
wrote:Attached are two new version of the patch: one keeps aliases, one don't.
Both the patches (with and without aliases) are not getting applied to the
latest master. Below is the error -Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/src/include/access/xlog_fn.h b/src/include/access/xlog_fn.h
|index a013d047a2..a46b2f995c 100644
|--- a/src/include/access/xlog_fn.h
|+++ b/src/include/access/xlog_fn.h
--------------------------
File to patch:
xlog_fn.h is not necessary anymore as all the declarations of
functions defined in pg_proc.h are now generated automatically, so the
conflict is simple enough to resolve.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/17/17 5:03 PM, Robert Haas wrote:
Right. I think a lot of that stuff should also be changed. If we
weren't OK with breaking compatibility, why'd we change pg_xlog ->
pg_wal? If we're not willing to change other things to match, let's
revert that change and be done with it.
For the record, I don't like the name "xlog" either. It would be nice
if we could have more consistent and intuitive naming.
But I don't see any proposals to actually change all uses of "xlog" to
"wal". What about program names, command line options, etc.? If the
argument is, we changed one thing, we should change the rest, then let's
see that. I think that argument itself is flawed, but if that's what
we're going with, let's see the whole plan.
Moreover, I see we still have the pg_clog directory. I thought that was
supposed to be renamed as well, to avoid confusing it with a "log"
directory. Surely, we should at least conclude that original chapter
before going further.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Peter,
* Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote:
On 1/17/17 5:03 PM, Robert Haas wrote:
Right. I think a lot of that stuff should also be changed. If we
weren't OK with breaking compatibility, why'd we change pg_xlog ->
pg_wal? If we're not willing to change other things to match, let's
revert that change and be done with it.For the record, I don't like the name "xlog" either. It would be nice
if we could have more consistent and intuitive naming.But I don't see any proposals to actually change all uses of "xlog" to
"wal". What about program names, command line options, etc.? If the
argument is, we changed one thing, we should change the rest, then let's
see that. I think that argument itself is flawed, but if that's what
we're going with, let's see the whole plan.
That is the proposal and what Vladimir is working towards, as I
understand it, but one piece at a time rather than one big huge patch,
as he's already stated elsewhere on this thread.
I don't have any problem with asking for a summary of the exact set of
changes that he's planning to make though. My understanding is that it
includes changing program names, command line options, etc.
Moreover, I see we still have the pg_clog directory. I thought that was
supposed to be renamed as well, to avoid confusing it with a "log"
directory. Surely, we should at least conclude that original chapter
before going further.
My understanding is that it is planned to be changed also, but it's
backed up behind the sudden hang-up with making progress on the xlog ->
WAL changes.
I agree that we could probably just go ahead and switch over to starting
on the clog changes (there was agreement somewhere about the new name
for that too), but, well, if I was someone watching all of this
discussion, I have to admit I probably wouldn't be too excited starting
on another set of name changes with all of this going on. Admittedly,
the clog rename is a lot less user-facing and perhaps we should have
started with it, but this is where we're at now.
Thanks!
Stephen
On Tue, Jan 24, 2017 at 3:59 AM, Stephen Frost <sfrost@snowman.net> wrote:
I agree that we could probably just go ahead and switch over to starting
on the clog changes (there was agreement somewhere about the new name
for that too), but, well, if I was someone watching all of this
discussion, I have to admit I probably wouldn't be too excited starting
on another set of name changes with all of this going on. Admittedly,
the clog rename is a lot less user-facing and perhaps we should have
started with it, but this is where we're at now.
There are no SQL-level functions and no binaries using the naming clog
or subtrans, so that's a good anti-complain start.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Mon, Jan 23, 2017 at 6:59 PM, Stephen Frost <sfrost@snowman.net> wrote:
For the record, I don't like the name "xlog" either. It would be nice
if we could have more consistent and intuitive naming.But I don't see any proposals to actually change all uses of "xlog" to
"wal". What about program names, command line options, etc.? If the
argument is, we changed one thing, we should change the rest, then let's
see that. I think that argument itself is flawed, but if that's what
we're going with, let's see the whole plan.That is the proposal and what Vladimir is working towards, as I
understand it, but one piece at a time rather than one big huge patch,
as he's already stated elsewhere on this thread.
Correct. Since fate of this patch is not fully decided I've paused my work
on other things until this goes in in some form.
I don't have any problem with asking for a summary of the exact set of
changes that he's planning to make though. My understanding is that it
includes changing program names, command line options, etc.
Here's what I currently have in mind:
- sql function names (current patch)
- binaries in bin: pg_receivexlog, pg_xlogdump, pg_resetxlog
- (maybe) public/exported symbols from libpq,
e.g. libpqGetCurrentXlogInsertLocation
- at this time I don't target internal function and filenames, but that
could also be done if there's desire for this.
I'd like to have most user-visible changed checked in earlier. Stuff like
internal refactoring can be done pretty much at any point in development
cycle.
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
* Vladimir Rusinov (vrusinov@google.com) wrote:
On Mon, Jan 23, 2017 at 6:59 PM, Stephen Frost <sfrost@snowman.net> wrote:
I don't have any problem with asking for a summary of the exact set of
changes that he's planning to make though. My understanding is that it
includes changing program names, command line options, etc.Here's what I currently have in mind:
- sql function names (current patch)
- binaries in bin: pg_receivexlog, pg_xlogdump, pg_resetxlog
Command-line options for other binaries in bin should also be changed
(eg: initdb's --xlogdir).
Looking at the other binaries in src/bin:
pg_archivecleanup - seems ok as-is (I'll note that it's Usage mentioned
'OLDESTKEPTWALFILE' ...)
pg_basebackup - --xlog/--xlog-method/--xlogdir
pgbench - looks fine
pg_config - looks fine
pg_controldata - looks fine
pg_ctl - looks fine
pgevent - DLL, not a binary, looks ok
pg_rewind - looks fine
pg_test_fsync - looks fine
pg_test_timing - looks fine
pg_upgrade - looks fine
psql - looks fine
- (maybe) public/exported symbols from libpq,
e.g. libpqGetCurrentXlogInsertLocation
Hm..? That function is just a local function in pg_rewind. I'd be kind
of surprised if we actually had anything in libpq that needed changing
due to this and I don't see anything there in a quick look.
- at this time I don't target internal function and filenames, but that
could also be done if there's desire for this.
No, I don't think that'll be necessary.
Thanks!
Stephen
On Mon, Jan 23, 2017 at 1:55 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
For the record, I don't like the name "xlog" either. It would be nice
if we could have more consistent and intuitive naming.
Great!
But I don't see any proposals to actually change all uses of "xlog" to
"wal". What about program names, command line options, etc.? If the
argument is, we changed one thing, we should change the rest, then let's
see that. I think that argument itself is flawed, but if that's what
we're going with, let's see the whole plan.
I'm happy to go change every last bit of it. I was expecting after I
committed the initial rename that somebody would provide a follow-on
patch to do the rest of it in short order. Instead, months went by
and we still don't have a complete patch. But I don't see why that
has to take more than a day's work, probably just a few hours. I'd
like to do that and move on.
Moreover, I see we still have the pg_clog directory. I thought that was
supposed to be renamed as well, to avoid confusing it with a "log"
directory. Surely, we should at least conclude that original chapter
before going further.
I'm not excited about starting to change pg_clog before we finish with
xlog -> wal. Then we just have two half-done things, IMO. But I'm
also not the only one with a commit bit.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Tue, Jan 24, 2017 at 4:47 PM, Robert Haas <robertmhaas@gmail.com> wrote:
But I don't see any proposals to actually change all uses of "xlog" to
"wal". What about program names, command line options, etc.? If the
argument is, we changed one thing, we should change the rest, then let's
see that. I think that argument itself is flawed, but if that's what
we're going with, let's see the whole plan.I'm happy to go change every last bit of it. I was expecting after I
committed the initial rename that somebody would provide a follow-on
patch to do the rest of it in short order. Instead, months went by
and we still don't have a complete patch. But I don't see why that
has to take more than a day's work, probably just a few hours. I'd
like to do that and move on.
And here are patches for that.
0001 renames everything that contains "xlog" in pg_proc.h to refer to "wal".
0002 renames programs whose names contains "xlog".
0003 renames the dtrace probes whose names contain "xlog".
0004 renames command line options which contain "xlog".
There are probably a few more things that could be done afterwards to
clean up other odds and ends, but I think this gets the vast bulk of
the user-visible references to xlog.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachments:
0001-Remove-all-references-to-xlog-from-SQL-callable-func.patchinvalid/octet-stream; name=0001-Remove-all-references-to-xlog-from-SQL-callable-func.patchDownload
From 00cf7ceaa91bc234a58bc7b60cf393c5524c8e3c Mon Sep 17 00:00:00 2001
From: Robert Haas <rhaas@postgresql.org>
Date: Thu, 26 Jan 2017 10:25:34 -0500
Subject: [PATCH 1/4] Remove all references to "xlog" from SQL-callable
functions in pg_proc.
Commit f82ec32ac30ae7e3ec7c84067192535b2ff8ec0e renamed the pg_xlog
directory to pg_wal. To make things consistent, and because "xlog" is
terrible terminology for either "transaction log" or "write-ahead log"
rename all SQL-callable functions that contain "xlog" in the name to
instead contain "wal". (Note that this may pose an upgrade hazard for
some users.)
Similarly, rename the xlog_position argument of the functions that
create slots to be called wal_position.
---
contrib/bloom/t/001_wal.pl | 2 +-
contrib/test_decoding/expected/ddl.out | 2 +-
contrib/test_decoding/sql/ddl.sql | 2 +-
doc/src/sgml/backup.sgml | 2 +-
doc/src/sgml/func.sgml | 72 +++++++++++-----------
doc/src/sgml/high-availability.sgml | 14 ++---
doc/src/sgml/logicaldecoding.sgml | 2 +-
doc/src/sgml/recovery-config.sgml | 2 +-
src/backend/access/transam/recovery.conf.sample | 2 +-
src/backend/access/transam/xlog.c | 2 +-
src/backend/access/transam/xlogfuncs.c | 36 +++++------
src/backend/catalog/system_views.sql | 10 +--
src/bin/pg_basebackup/t/030_pg_recvlogical.pl | 2 +-
src/bin/pg_rewind/RewindTest.pm | 2 +-
src/bin/pg_rewind/libpq_fetch.c | 4 +-
src/include/catalog/pg_proc.h | 54 ++++++++--------
src/test/modules/commit_ts/t/002_standby.pl | 8 +--
src/test/modules/commit_ts/t/003_standby_2.pl | 4 +-
src/test/perl/PostgresNode.pm | 10 +--
src/test/recovery/t/002_archiving.pl | 6 +-
src/test/recovery/t/003_recovery_targets.pl | 16 ++---
src/test/recovery/t/005_replay_delay.pl | 4 +-
src/test/recovery/t/008_fsm_truncation.pl | 4 +-
src/test/regress/expected/hs_standby_functions.out | 2 +-
src/test/regress/sql/hs_primary_extremes.sql | 2 +-
src/test/regress/sql/hs_primary_setup.sql | 2 +-
src/test/regress/sql/hs_standby_functions.sql | 2 +-
src/test/subscription/t/001_rep_changes.pl | 2 +-
src/test/subscription/t/002_types.pl | 2 +-
29 files changed, 137 insertions(+), 137 deletions(-)
diff --git a/contrib/bloom/t/001_wal.pl b/contrib/bloom/t/001_wal.pl
index 56c6618..dc907ba 100644
--- a/contrib/bloom/t/001_wal.pl
+++ b/contrib/bloom/t/001_wal.pl
@@ -16,7 +16,7 @@ sub test_index_replay
# Wait for standby to catch up
my $applname = $node_standby->name;
my $caughtup_query =
-"SELECT pg_current_xlog_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
+"SELECT pg_current_wal_location() <= write_location FROM pg_stat_replication WHERE application_name = '$applname';";
$node_master->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby 1 to catch up";
diff --git a/contrib/test_decoding/expected/ddl.out b/contrib/test_decoding/expected/ddl.out
index c104c48..275c84a 100644
--- a/contrib/test_decoding/expected/ddl.out
+++ b/contrib/test_decoding/expected/ddl.out
@@ -58,7 +58,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
slot_name | plugin | slot_type | active | catalog_xmin_set | data_xmin_not_set | some_wal
-----------------+---------------+-----------+--------+------------------+-------------------+----------
diff --git a/contrib/test_decoding/sql/ddl.sql b/contrib/test_decoding/sql/ddl.sql
index 89b8b8f..49dad39 100644
--- a/contrib/test_decoding/sql/ddl.sql
+++ b/contrib/test_decoding/sql/ddl.sql
@@ -29,7 +29,7 @@ SELECT 'init' FROM pg_create_logical_replication_slot('regression_slot', 'test_d
SELECT slot_name, plugin, slot_type, active,
NOT catalog_xmin IS NULL AS catalog_xmin_set,
xmin IS NULl AS data_xmin_not_set,
- pg_xlog_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
+ pg_wal_location_diff(restart_lsn, '0/01000000') > 0 AS some_wal
FROM pg_replication_slots;
/*
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index d7df910..5f009ee 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -726,7 +726,7 @@ test ! -f /mnt/server/archivedir/00000001000000A900000065 && cp pg_wal/0
<para>
Also, you can force a segment switch manually with
- <function>pg_switch_xlog</> if you want to ensure that a
+ <function>pg_switch_wal</> if you want to ensure that a
just-finished transaction is archived as soon as possible. Other utility
functions related to WAL management are listed in <xref
linkend="functions-admin-backup-table">.
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index b214218..36d4091 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -17933,13 +17933,13 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_create_restore_point</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_flush_location</primary>
+ <primary>pg_current_wal_flush_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_insert_location</primary>
+ <primary>pg_current_wal_insert_location</primary>
</indexterm>
<indexterm>
- <primary>pg_current_xlog_location</primary>
+ <primary>pg_current_wal_location</primary>
</indexterm>
<indexterm>
<primary>pg_start_backup</primary>
@@ -17954,16 +17954,16 @@ SELECT set_config('log_statement_stats', 'off', false);
<primary>pg_backup_start_time</primary>
</indexterm>
<indexterm>
- <primary>pg_switch_xlog</primary>
+ <primary>pg_switch_wal</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name</primary>
+ <primary>pg_walfile_name</primary>
</indexterm>
<indexterm>
- <primary>pg_xlogfile_name_offset</primary>
+ <primary>pg_walfile_name_offset</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_location_diff</primary>
+ <primary>pg_wal_location_diff</primary>
</indexterm>
<para>
@@ -17971,7 +17971,7 @@ SELECT set_config('log_statement_stats', 'off', false);
linkend="functions-admin-backup-table"> assist in making on-line backups.
These functions cannot be executed during recovery (except
<function>pg_is_in_backup</function>, <function>pg_backup_start_time</function>
- and <function>pg_xlog_location_diff</function>).
+ and <function>pg_wal_location_diff</function>).
</para>
<table id="functions-admin-backup-table">
@@ -17992,21 +17992,21 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_flush_location()</function></literal>
+ <literal><function>pg_current_wal_flush_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log flush location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_insert_location()</function></literal>
+ <literal><function>pg_current_wal_insert_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log insert location</entry>
</row>
<row>
<entry>
- <literal><function>pg_current_xlog_location()</function></literal>
+ <literal><function>pg_current_wal_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get current transaction log write location</entry>
@@ -18048,28 +18048,28 @@ SELECT set_config('log_statement_stats', 'off', false);
</row>
<row>
<entry>
- <literal><function>pg_switch_xlog()</function></literal>
+ <literal><function>pg_switch_wal()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Force switch to a new transaction log file (restricted to superusers by default, but other users can be granted EXECUTE to run the function)</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_walfile_name(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</type></entry>
<entry>Convert transaction log location string to file name</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlogfile_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_walfile_name_offset(<parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>text</>, <type>integer</></entry>
<entry>Convert transaction log location string to file name and decimal byte offset within file</entry>
</row>
<row>
<entry>
- <literal><function>pg_xlog_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
+ <literal><function>pg_wal_location_diff(<parameter>location</> <type>pg_lsn</>, <parameter>location</> <type>pg_lsn</>)</function></literal>
</entry>
<entry><type>numeric</></entry>
<entry>Calculate the difference between two transaction log locations</entry>
@@ -18127,11 +18127,11 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_switch_xlog</> moves to the next transaction log file, allowing the
+ <function>pg_switch_wal</> moves to the next transaction log file, allowing the
current file to be archived (assuming you are using continuous archiving).
The return value is the ending transaction log location + 1 within the just-completed transaction log file.
If there has been no transaction log activity since the last transaction log switch,
- <function>pg_switch_xlog</> does nothing and returns the start location
+ <function>pg_switch_wal</> does nothing and returns the start location
of the transaction log file currently in use.
</para>
@@ -18146,10 +18146,10 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- <function>pg_current_xlog_location</> displays the current transaction log write
+ <function>pg_current_wal_location</> displays the current transaction log write
location in the same format used by the above functions. Similarly,
- <function>pg_current_xlog_insert_location</> displays the current transaction log
- insertion point and <function>pg_current_xlog_flush_location</> displays the
+ <function>pg_current_wal_insert_location</> displays the current transaction log
+ insertion point and <function>pg_current_wal_flush_location</> displays the
current transaction log flush point. The insertion point is the <quote>logical</>
end of the transaction log at any instant, while the write location is the end of
what has actually been written out from the server's internal buffers and flush
@@ -18162,17 +18162,17 @@ postgres=# select pg_start_backup('label_goes_here');
</para>
<para>
- You can use <function>pg_xlogfile_name_offset</> to extract the
+ You can use <function>pg_walfile_name_offset</> to extract the
corresponding transaction log file name and byte offset from the results of any of the
above functions. For example:
<programlisting>
-postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
+postgres=# SELECT * FROM pg_walfile_name_offset(pg_stop_backup());
file_name | file_offset
--------------------------+-------------
00000001000000000000000D | 4039624
(1 row)
</programlisting>
- Similarly, <function>pg_xlogfile_name</> extracts just the transaction log file name.
+ Similarly, <function>pg_walfile_name</> extracts just the transaction log file name.
When the given transaction log location is exactly at a transaction log file boundary, both
these functions return the name of the preceding transaction log file.
This is usually the desired behavior for managing transaction log archiving
@@ -18181,7 +18181,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</para>
<para>
- <function>pg_xlog_location_diff</> calculates the difference in bytes
+ <function>pg_wal_location_diff</> calculates the difference in bytes
between two transaction log locations. It can be used with
<structname>pg_stat_replication</structname> or some functions shown in
<xref linkend="functions-admin-backup-table"> to get the replication lag.
@@ -18201,10 +18201,10 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<primary>pg_is_in_recovery</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_receive_location</primary>
+ <primary>pg_last_wal_receive_location</primary>
</indexterm>
<indexterm>
- <primary>pg_last_xlog_replay_location</primary>
+ <primary>pg_last_wal_replay_location</primary>
</indexterm>
<indexterm>
<primary>pg_last_xact_replay_timestamp</primary>
@@ -18236,7 +18236,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_receive_location()</function></literal>
+ <literal><function>pg_last_wal_receive_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location received and synced to disk by
@@ -18250,7 +18250,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_last_xlog_replay_location()</function></literal>
+ <literal><function>pg_last_wal_replay_location()</function></literal>
</entry>
<entry><type>pg_lsn</type></entry>
<entry>Get last transaction log location replayed during recovery.
@@ -18282,13 +18282,13 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</table>
<indexterm>
- <primary>pg_is_xlog_replay_paused</primary>
+ <primary>pg_is_wal_replay_paused</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_pause</primary>
+ <primary>pg_wal_replay_pause</primary>
</indexterm>
<indexterm>
- <primary>pg_xlog_replay_resume</primary>
+ <primary>pg_wal_replay_resume</primary>
</indexterm>
<para>
@@ -18308,7 +18308,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<tbody>
<row>
<entry>
- <literal><function>pg_is_xlog_replay_paused()</function></literal>
+ <literal><function>pg_is_wal_replay_paused()</function></literal>
</entry>
<entry><type>bool</type></entry>
<entry>True if recovery is paused.
@@ -18316,7 +18316,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_pause()</function></literal>
+ <literal><function>pg_wal_replay_pause()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Pauses recovery immediately (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -18324,7 +18324,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
</row>
<row>
<entry>
- <literal><function>pg_xlog_replay_resume()</function></literal>
+ <literal><function>pg_wal_replay_resume()</function></literal>
</entry>
<entry><type>void</type></entry>
<entry>Restarts recovery if it was paused (restricted to superusers by default, but other users can be granted EXECUTE to run the function).
@@ -18473,7 +18473,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<literal><function>pg_create_physical_replication_slot(<parameter>slot_name</parameter> <type>name</type> <optional>, <parameter>immediately_reserve</> <type>boolean</>, <parameter>temporary</> <type>boolean</></optional>)</function></literal>
</entry>
<entry>
- (<parameter>slot_name</parameter> <type>name</type>, <parameter>xlog_position</parameter> <type>pg_lsn</type>)
+ (<parameter>slot_name</parameter> <type>name</type>, <parameter>wal_position</parameter> <type>pg_lsn</type>)
</entry>
<entry>
Creates a new physical replication slot named
@@ -18517,7 +18517,7 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
<literal><function>pg_create_logical_replication_slot(<parameter>slot_name</parameter> <type>name</type>, <parameter>plugin</parameter> <type>name</type> <optional>, <parameter>temporary</> <type>boolean</></optional>)</function></literal>
</entry>
<entry>
- (<parameter>slot_name</parameter> <type>name</type>, <parameter>xlog_position</parameter> <type>pg_lsn</type>)
+ (<parameter>slot_name</parameter> <type>name</type>, <parameter>wal_position</parameter> <type>pg_lsn</type>)
</entry>
<entry>
Creates a new logical (decoding) replication slot named
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index a1a9532..48de2ce 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -853,8 +853,8 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
standby. You can calculate this lag by comparing the current WAL write
location on the primary with the last WAL location received by the
standby. They can be retrieved using
- <function>pg_current_xlog_location</> on the primary and the
- <function>pg_last_xlog_receive_location</> on the standby,
+ <function>pg_current_wal_location</> on the primary and the
+ <function>pg_last_wal_receive_location</> on the standby,
respectively (see <xref linkend="functions-admin-backup-table"> and
<xref linkend="functions-recovery-info-table"> for details).
The last WAL receive location in the standby is also displayed in the
@@ -865,10 +865,10 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
You can retrieve a list of WAL sender processes via the
<link linkend="monitoring-stats-views-table">
<literal>pg_stat_replication</></link> view. Large differences between
- <function>pg_current_xlog_location</> and <literal>sent_location</> field
+ <function>pg_current_wal_location</> and <literal>sent_location</> field
might indicate that the master server is under heavy load, while
differences between <literal>sent_location</> and
- <function>pg_last_xlog_receive_location</> on the standby might indicate
+ <function>pg_last_wal_receive_location</> on the standby might indicate
network delay, or that the standby is under heavy load.
</para>
</sect3>
@@ -929,7 +929,7 @@ primary_conninfo = 'host=192.168.1.50 port=5432 user=foo password=foopass'
You can create a replication slot like this:
<programlisting>
postgres=# SELECT * FROM pg_create_physical_replication_slot('node_a_slot');
- slot_name | xlog_position
+ slot_name | wal_position
-------------+---------------
node_a_slot |
@@ -1587,7 +1587,7 @@ if (!triggered)
</para>
<para>
- An external program can call the <function>pg_xlogfile_name_offset()</>
+ An external program can call the <function>pg_walfile_name_offset()</>
function (see <xref linkend="functions-admin">)
to find out the file name and the exact byte offset within it of
the current end of WAL. It can then access the WAL file directly
@@ -2225,7 +2225,7 @@ LOG: database system is ready to accept read only connections
<para>
WAL file control commands will not work during recovery,
- e.g. <function>pg_start_backup</>, <function>pg_switch_xlog</> etc.
+ e.g. <function>pg_start_backup</>, <function>pg_switch_wal</> etc.
</para>
<para>
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index 484915d..c4dff3b 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -56,7 +56,7 @@
<programlisting>
postgres=# -- Create a slot named 'regression_slot' using the output plugin 'test_decoding'
postgres=# SELECT * FROM pg_create_logical_replication_slot('regression_slot', 'test_decoding');
- slot_name | xlog_position
+ slot_name | wal_position
-----------------+---------------
regression_slot | 0/16B1970
(1 row)
diff --git a/doc/src/sgml/recovery-config.sgml b/doc/src/sgml/recovery-config.sgml
index 8c24ae2..a91864b 100644
--- a/doc/src/sgml/recovery-config.sgml
+++ b/doc/src/sgml/recovery-config.sgml
@@ -321,7 +321,7 @@ restore_command = 'copy "C:\\server\\archivedir\\%f" "%p"' # Windows
to be executed against the database to check if this recovery target
is the most desirable point for recovery.
The paused state can be resumed by
- using <function>pg_xlog_replay_resume()</> (see
+ using <function>pg_wal_replay_resume()</> (see
<xref linkend="functions-recovery-control-table">), which then
causes recovery to end. If this recovery target is not the
desired stopping point, then shut down the server, change the
diff --git a/src/backend/access/transam/recovery.conf.sample b/src/backend/access/transam/recovery.conf.sample
index 7a16751..d5cb437 100644
--- a/src/backend/access/transam/recovery.conf.sample
+++ b/src/backend/access/transam/recovery.conf.sample
@@ -98,7 +98,7 @@
#
# If recovery_target_action = 'pause', recovery will pause when the
# recovery target is reached. The pause state will continue until
-# pg_xlog_replay_resume() is called. This setting has no effect if
+# pg_wal_replay_resume() is called. This setting has no effect if
# no recovery target is set. If hot_standby is not enabled then the
# server will shutdown instead, though you may request this in
# any case by specifying 'shutdown'.
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 2f5d603..29e0b88 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -5766,7 +5766,7 @@ recoveryPausesHere(void)
ereport(LOG,
(errmsg("recovery has paused"),
- errhint("Execute pg_xlog_replay_resume() to continue.")));
+ errhint("Execute pg_wal_replay_resume() to continue.")));
while (RecoveryIsPaused())
{
diff --git a/src/backend/access/transam/xlogfuncs.c b/src/backend/access/transam/xlogfuncs.c
index 63e6552..27c0c56 100644
--- a/src/backend/access/transam/xlogfuncs.c
+++ b/src/backend/access/transam/xlogfuncs.c
@@ -276,13 +276,13 @@ pg_stop_backup_v2(PG_FUNCTION_ARGS)
}
/*
- * pg_switch_xlog: switch to next xlog file
+ * pg_switch_wal: switch to next xlog file
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_switch_xlog(PG_FUNCTION_ARGS)
+pg_switch_wal(PG_FUNCTION_ARGS)
{
XLogRecPtr switchpoint;
@@ -348,7 +348,7 @@ pg_create_restore_point(PG_FUNCTION_ARGS)
* to the kernel, but is not necessarily synced to disk.
*/
Datum
-pg_current_xlog_location(PG_FUNCTION_ARGS)
+pg_current_wal_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -369,7 +369,7 @@ pg_current_xlog_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
+pg_current_wal_insert_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -390,7 +390,7 @@ pg_current_xlog_insert_location(PG_FUNCTION_ARGS)
* This function is mostly for debugging purposes.
*/
Datum
-pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
+pg_current_wal_flush_location(PG_FUNCTION_ARGS)
{
XLogRecPtr current_recptr;
@@ -412,7 +412,7 @@ pg_current_xlog_flush_location(PG_FUNCTION_ARGS)
* and synced to disk by walreceiver.
*/
Datum
-pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
+pg_last_wal_receive_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -431,7 +431,7 @@ pg_last_xlog_receive_location(PG_FUNCTION_ARGS)
* connections during recovery.
*/
Datum
-pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
+pg_last_wal_replay_location(PG_FUNCTION_ARGS)
{
XLogRecPtr recptr;
@@ -452,7 +452,7 @@ pg_last_xlog_replay_location(PG_FUNCTION_ARGS)
* expected usage is to determine which xlog file(s) are ready to archive.
*/
Datum
-pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
+pg_walfile_name_offset(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
uint32 xrecoff;
@@ -468,7 +468,7 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name_offset() cannot be executed during recovery.")));
+ errhint("pg_walfile_name_offset() cannot be executed during recovery.")));
/*
* Construct a tuple descriptor for the result row. This must match this
@@ -514,7 +514,7 @@ pg_xlogfile_name_offset(PG_FUNCTION_ARGS)
* such as is returned by pg_stop_backup() or pg_xlog_switch().
*/
Datum
-pg_xlogfile_name(PG_FUNCTION_ARGS)
+pg_walfile_name(PG_FUNCTION_ARGS)
{
XLogSegNo xlogsegno;
XLogRecPtr locationpoint = PG_GETARG_LSN(0);
@@ -524,7 +524,7 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),
errmsg("recovery is in progress"),
- errhint("pg_xlogfile_name() cannot be executed during recovery.")));
+ errhint("pg_walfile_name() cannot be executed during recovery.")));
XLByteToPrevSeg(locationpoint, xlogsegno);
XLogFileName(xlogfilename, ThisTimeLineID, xlogsegno);
@@ -533,13 +533,13 @@ pg_xlogfile_name(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_pause - pause recovery now
+ * pg_wal_replay_pause - pause recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_pause(PG_FUNCTION_ARGS)
+pg_wal_replay_pause(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -553,13 +553,13 @@ pg_xlog_replay_pause(PG_FUNCTION_ARGS)
}
/*
- * pg_xlog_replay_resume - resume recovery now
+ * pg_wal_replay_resume - resume recovery now
*
* Permission checking for this function is managed through the normal
* GRANT system.
*/
Datum
-pg_xlog_replay_resume(PG_FUNCTION_ARGS)
+pg_wal_replay_resume(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -573,10 +573,10 @@ pg_xlog_replay_resume(PG_FUNCTION_ARGS)
}
/*
- * pg_is_xlog_replay_paused
+ * pg_is_wal_replay_paused
*/
Datum
-pg_is_xlog_replay_paused(PG_FUNCTION_ARGS)
+pg_is_wal_replay_paused(PG_FUNCTION_ARGS)
{
if (!RecoveryInProgress())
ereport(ERROR,
@@ -618,7 +618,7 @@ pg_is_in_recovery(PG_FUNCTION_ARGS)
* Compute the difference in bytes between two WAL locations.
*/
Datum
-pg_xlog_location_diff(PG_FUNCTION_ARGS)
+pg_wal_location_diff(PG_FUNCTION_ARGS)
{
Datum result;
diff --git a/src/backend/catalog/system_views.sql b/src/backend/catalog/system_views.sql
index 4dfedf8..a057be2 100644
--- a/src/backend/catalog/system_views.sql
+++ b/src/backend/catalog/system_views.sql
@@ -1018,7 +1018,7 @@ AS 'pg_logical_slot_peek_binary_changes';
CREATE OR REPLACE FUNCTION pg_create_physical_replication_slot(
IN slot_name name, IN immediately_reserve boolean DEFAULT false,
IN temporary boolean DEFAULT false,
- OUT slot_name name, OUT xlog_position pg_lsn)
+ OUT slot_name name, OUT wal_position pg_lsn)
RETURNS RECORD
LANGUAGE INTERNAL
STRICT VOLATILE
@@ -1027,7 +1027,7 @@ AS 'pg_create_physical_replication_slot';
CREATE OR REPLACE FUNCTION pg_create_logical_replication_slot(
IN slot_name name, IN plugin name,
IN temporary boolean DEFAULT false,
- OUT slot_name text, OUT xlog_position pg_lsn)
+ OUT slot_name text, OUT wal_position pg_lsn)
RETURNS RECORD
LANGUAGE INTERNAL
STRICT VOLATILE
@@ -1075,9 +1075,9 @@ REVOKE EXECUTE ON FUNCTION pg_start_backup(text, boolean, boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup() FROM public;
REVOKE EXECUTE ON FUNCTION pg_stop_backup(boolean) FROM public;
REVOKE EXECUTE ON FUNCTION pg_create_restore_point(text) FROM public;
-REVOKE EXECUTE ON FUNCTION pg_switch_xlog() FROM public;
-REVOKE EXECUTE ON FUNCTION pg_xlog_replay_pause() FROM public;
-REVOKE EXECUTE ON FUNCTION pg_xlog_replay_resume() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_switch_wal() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_pause() FROM public;
+REVOKE EXECUTE ON FUNCTION pg_wal_replay_resume() FROM public;
REVOKE EXECUTE ON FUNCTION pg_rotate_logfile() FROM public;
REVOKE EXECUTE ON FUNCTION pg_reload_conf() FROM public;
diff --git a/src/bin/pg_basebackup/t/030_pg_recvlogical.pl b/src/bin/pg_basebackup/t/030_pg_recvlogical.pl
index dca5ef2..b43176f 100644
--- a/src/bin/pg_basebackup/t/030_pg_recvlogical.pl
+++ b/src/bin/pg_basebackup/t/030_pg_recvlogical.pl
@@ -39,7 +39,7 @@ isnt($slot->{'restart_lsn'}, '', 'restart lsn is defined for new slot');
$node->psql('postgres', 'CREATE TABLE test_table(x integer)');
$node->psql('postgres', 'INSERT INTO test_table(x) SELECT y FROM generate_series(1, 10) a(y);');
-my $nextlsn = $node->safe_psql('postgres', 'SELECT pg_current_xlog_insert_location()');
+my $nextlsn = $node->safe_psql('postgres', 'SELECT pg_current_wal_insert_location()');
chomp($nextlsn);
$node->command_ok(['pg_recvlogical', '-S', 'test', '-d', $node->connstr('postgres'), '--start', '--endpos', "$nextlsn", '--no-loop', '-f', '-'],
diff --git a/src/bin/pg_rewind/RewindTest.pm b/src/bin/pg_rewind/RewindTest.pm
index 1c48261..c67212f 100644
--- a/src/bin/pg_rewind/RewindTest.pm
+++ b/src/bin/pg_rewind/RewindTest.pm
@@ -156,7 +156,7 @@ sub promote_standby
# Wait for the standby to receive and write all WAL.
my $wal_received_query =
-"SELECT pg_current_xlog_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
+"SELECT pg_current_wal_location() = write_location FROM pg_stat_replication WHERE application_name = 'rewind_standby';";
$node_master->poll_query_until('postgres', $wal_received_query)
or die "Timed out while waiting for standby to receive and write WAL";
diff --git a/src/bin/pg_rewind/libpq_fetch.c b/src/bin/pg_rewind/libpq_fetch.c
index a903849..d237420 100644
--- a/src/bin/pg_rewind/libpq_fetch.c
+++ b/src/bin/pg_rewind/libpq_fetch.c
@@ -121,7 +121,7 @@ run_simple_query(const char *sql)
}
/*
- * Calls pg_current_xlog_insert_location() function
+ * Calls pg_current_wal_insert_location() function
*/
XLogRecPtr
libpqGetCurrentXlogInsertLocation(void)
@@ -131,7 +131,7 @@ libpqGetCurrentXlogInsertLocation(void)
uint32 lo;
char *val;
- val = run_simple_query("SELECT pg_current_xlog_insert_location()");
+ val = run_simple_query("SELECT pg_current_wal_insert_location()");
if (sscanf(val, "%X/%X", &hi, &lo) != 2)
pg_fatal("unrecognized result \"%s\" for current WAL insert location\n", val);
diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h
index c1f492b..2724f55 100644
--- a/src/include/catalog/pg_proc.h
+++ b/src/include/catalog/pg_proc.h
@@ -3147,23 +3147,23 @@ DATA(insert OID = 3813 ( pg_is_in_backup PGNSP PGUID 12 1 0 0 0 f f f f t f v s
DESCR("true if server is in online backup");
DATA(insert OID = 3814 ( pg_backup_start_time PGNSP PGUID 12 1 0 0 0 f f f f t f s s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_backup_start_time _null_ _null_ _null_ ));
DESCR("start time of an online backup");
-DATA(insert OID = 2848 ( pg_switch_xlog PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_xlog _null_ _null_ _null_ ));
-DESCR("switch to new xlog file");
+DATA(insert OID = 2848 ( pg_switch_wal PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_switch_wal _null_ _null_ _null_ ));
+DESCR("switch to new wal file");
DATA(insert OID = 3098 ( pg_create_restore_point PGNSP PGUID 12 1 0 0 0 f f f f t f v s 1 0 3220 "25" _null_ _null_ _null_ _null_ _null_ pg_create_restore_point _null_ _null_ _null_ ));
DESCR("create a named restore point");
-DATA(insert OID = 2849 ( pg_current_xlog_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_location _null_ _null_ _null_ ));
-DESCR("current xlog write location");
-DATA(insert OID = 2852 ( pg_current_xlog_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_insert_location _null_ _null_ _null_ ));
-DESCR("current xlog insert location");
-DATA(insert OID = 3330 ( pg_current_xlog_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_xlog_flush_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 2850 ( pg_xlogfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_xlogfile_name_offset _null_ _null_ _null_ ));
-DESCR("xlog filename and byte offset, given an xlog location");
-DATA(insert OID = 2851 ( pg_xlogfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_xlogfile_name _null_ _null_ _null_ ));
-DESCR("xlog filename, given an xlog location");
-
-DATA(insert OID = 3165 ( pg_xlog_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_xlog_location_diff _null_ _null_ _null_ ));
-DESCR("difference in bytes, given two xlog locations");
+DATA(insert OID = 2849 ( pg_current_wal_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_location _null_ _null_ _null_ ));
+DESCR("current wal write location");
+DATA(insert OID = 2852 ( pg_current_wal_insert_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_insert_location _null_ _null_ _null_ ));
+DESCR("current wal insert location");
+DATA(insert OID = 3330 ( pg_current_wal_flush_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_current_wal_flush_location _null_ _null_ _null_ ));
+DESCR("current wal flush location");
+DATA(insert OID = 2850 ( pg_walfile_name_offset PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 2249 "3220" "{3220,25,23}" "{i,o,o}" "{wal_location,file_name,file_offset}" _null_ _null_ pg_walfile_name_offset _null_ _null_ _null_ ));
+DESCR("wal filename and byte offset, given an wal location");
+DATA(insert OID = 2851 ( pg_walfile_name PGNSP PGUID 12 1 0 0 0 f f f f t f i s 1 0 25 "3220" _null_ _null_ _null_ _null_ _null_ pg_walfile_name _null_ _null_ _null_ ));
+DESCR("wal filename, given an wal location");
+
+DATA(insert OID = 3165 ( pg_wal_location_diff PGNSP PGUID 12 1 0 0 0 f f f f t f i s 2 0 1700 "3220 3220" _null_ _null_ _null_ _null_ _null_ pg_wal_location_diff _null_ _null_ _null_ ));
+DESCR("difference in bytes, given two wal locations");
DATA(insert OID = 3809 ( pg_export_snapshot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 0 0 25 "" _null_ _null_ _null_ _null_ _null_ pg_export_snapshot _null_ _null_ _null_ ));
DESCR("export a snapshot");
@@ -3171,19 +3171,19 @@ DESCR("export a snapshot");
DATA(insert OID = 3810 ( pg_is_in_recovery PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_in_recovery _null_ _null_ _null_ ));
DESCR("true if server is in recovery");
-DATA(insert OID = 3820 ( pg_last_xlog_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_receive_location _null_ _null_ _null_ ));
-DESCR("current xlog flush location");
-DATA(insert OID = 3821 ( pg_last_xlog_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_xlog_replay_location _null_ _null_ _null_ ));
-DESCR("last xlog replay location");
+DATA(insert OID = 3820 ( pg_last_wal_receive_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_receive_location _null_ _null_ _null_ ));
+DESCR("current wal flush location");
+DATA(insert OID = 3821 ( pg_last_wal_replay_location PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 3220 "" _null_ _null_ _null_ _null_ _null_ pg_last_wal_replay_location _null_ _null_ _null_ ));
+DESCR("last wal replay location");
DATA(insert OID = 3830 ( pg_last_xact_replay_timestamp PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 1184 "" _null_ _null_ _null_ _null_ _null_ pg_last_xact_replay_timestamp _null_ _null_ _null_ ));
DESCR("timestamp of last replay xact");
-DATA(insert OID = 3071 ( pg_xlog_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_pause _null_ _null_ _null_ ));
-DESCR("pause xlog replay");
-DATA(insert OID = 3072 ( pg_xlog_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_xlog_replay_resume _null_ _null_ _null_ ));
-DESCR("resume xlog replay, if it was paused");
-DATA(insert OID = 3073 ( pg_is_xlog_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_xlog_replay_paused _null_ _null_ _null_ ));
-DESCR("true if xlog replay is paused");
+DATA(insert OID = 3071 ( pg_wal_replay_pause PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_pause _null_ _null_ _null_ ));
+DESCR("pause wal replay");
+DATA(insert OID = 3072 ( pg_wal_replay_resume PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 2278 "" _null_ _null_ _null_ _null_ _null_ pg_wal_replay_resume _null_ _null_ _null_ ));
+DESCR("resume wal replay, if it was paused");
+DATA(insert OID = 3073 ( pg_is_wal_replay_paused PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_is_wal_replay_paused _null_ _null_ _null_ ));
+DESCR("true if wal replay is paused");
DATA(insert OID = 2621 ( pg_reload_conf PGNSP PGUID 12 1 0 0 0 f f f f t f v s 0 0 16 "" _null_ _null_ _null_ _null_ _null_ pg_reload_conf _null_ _null_ _null_ ));
DESCR("reload configuration files");
@@ -5185,13 +5185,13 @@ DATA(insert OID = 5016 ( spg_box_quad_leaf_consistent PGNSP PGUID 12 1 0 0 0 f
DESCR("SP-GiST support for quad tree over box");
/* replication slots */
-DATA(insert OID = 3779 ( pg_create_physical_replication_slot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 3 0 2249 "19 16 16" "{19,16,16,19,3220}" "{i,i,i,o,o}" "{slot_name,immediately_reserve,temporary,slot_name,xlog_position}" _null_ _null_ pg_create_physical_replication_slot _null_ _null_ _null_ ));
+DATA(insert OID = 3779 ( pg_create_physical_replication_slot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 3 0 2249 "19 16 16" "{19,16,16,19,3220}" "{i,i,i,o,o}" "{slot_name,immediately_reserve,temporary,slot_name,wal_position}" _null_ _null_ pg_create_physical_replication_slot _null_ _null_ _null_ ));
DESCR("create a physical replication slot");
DATA(insert OID = 3780 ( pg_drop_replication_slot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 1 0 2278 "19" _null_ _null_ _null_ _null_ _null_ pg_drop_replication_slot _null_ _null_ _null_ ));
DESCR("drop a replication slot");
DATA(insert OID = 3781 ( pg_get_replication_slots PGNSP PGUID 12 1 10 0 0 f f f f f t s s 0 0 2249 "" "{19,19,25,26,16,16,23,28,28,3220,3220}" "{o,o,o,o,o,o,o,o,o,o,o}" "{slot_name,plugin,slot_type,datoid,temporary,active,active_pid,xmin,catalog_xmin,restart_lsn,confirmed_flush_lsn}" _null_ _null_ pg_get_replication_slots _null_ _null_ _null_ ));
DESCR("information about replication slots currently in use");
-DATA(insert OID = 3786 ( pg_create_logical_replication_slot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 3 0 2249 "19 19 16" "{19,19,16,25,3220}" "{i,i,i,o,o}" "{slot_name,plugin,temporary,slot_name,xlog_position}" _null_ _null_ pg_create_logical_replication_slot _null_ _null_ _null_ ));
+DATA(insert OID = 3786 ( pg_create_logical_replication_slot PGNSP PGUID 12 1 0 0 0 f f f f t f v u 3 0 2249 "19 19 16" "{19,19,16,25,3220}" "{i,i,i,o,o}" "{slot_name,plugin,temporary,slot_name,wal_position}" _null_ _null_ pg_create_logical_replication_slot _null_ _null_ _null_ ));
DESCR("set up a logical replication slot");
DATA(insert OID = 3782 ( pg_logical_slot_get_changes PGNSP PGUID 12 1000 1000 25 0 f f f f f t v u 4 0 2249 "19 3220 23 1009" "{19,3220,23,1009,3220,28,25}" "{i,i,i,v,o,o,o}" "{slot_name,upto_lsn,upto_nchanges,options,location,xid,data}" _null_ _null_ pg_logical_slot_get_changes _null_ _null_ _null_ ));
DESCR("get changes from replication slot");
diff --git a/src/test/modules/commit_ts/t/002_standby.pl b/src/test/modules/commit_ts/t/002_standby.pl
index ff60044..203b75d 100644
--- a/src/test/modules/commit_ts/t/002_standby.pl
+++ b/src/test/modules/commit_ts/t/002_standby.pl
@@ -31,9 +31,9 @@ my $master_ts = $master->safe_psql('postgres',
qq{SELECT ts.* FROM pg_class, pg_xact_commit_timestamp(xmin) AS ts WHERE relname = 't10'}
);
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
my $standby_ts = $standby->safe_psql('postgres',
@@ -45,9 +45,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
$master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/modules/commit_ts/t/003_standby_2.pl b/src/test/modules/commit_ts/t/003_standby_2.pl
index 1775b22..d7898b8 100644
--- a/src/test/modules/commit_ts/t/003_standby_2.pl
+++ b/src/test/modules/commit_ts/t/003_standby_2.pl
@@ -30,9 +30,9 @@ $master->append_conf('postgresql.conf', 'track_commit_timestamp = off');
$master->restart;
$master->safe_psql('postgres', 'checkpoint');
my $master_lsn =
- $master->safe_psql('postgres', 'select pg_current_xlog_location()');
+ $master->safe_psql('postgres', 'select pg_current_wal_location()');
$standby->poll_query_until('postgres',
- qq{SELECT '$master_lsn'::pg_lsn <= pg_last_xlog_replay_location()})
+ qq{SELECT '$master_lsn'::pg_lsn <= pg_last_wal_replay_location()})
or die "slave never caught up";
$standby->safe_psql('postgres', 'checkpoint');
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index 18d5d12..4018f0a 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -1358,11 +1358,11 @@ mode must be specified.
sub lsn
{
my ($self, $mode) = @_;
- my %modes = ('insert' => 'pg_current_xlog_insert_location()',
- 'flush' => 'pg_current_xlog_flush_location()',
- 'write' => 'pg_current_xlog_location()',
- 'receive' => 'pg_last_xlog_receive_location()',
- 'replay' => 'pg_last_xlog_replay_location()');
+ my %modes = ('insert' => 'pg_current_wal_insert_location()',
+ 'flush' => 'pg_current_wal_flush_location()',
+ 'write' => 'pg_current_wal_location()',
+ 'receive' => 'pg_last_wal_receive_location()',
+ 'replay' => 'pg_last_wal_replay_location()');
$mode = '<undef>' if !defined($mode);
die "unknown mode for 'lsn': '$mode', valid modes are " . join(', ', keys %modes)
diff --git a/src/test/recovery/t/002_archiving.pl b/src/test/recovery/t/002_archiving.pl
index fc2bf7e..83b43bf 100644
--- a/src/test/recovery/t/002_archiving.pl
+++ b/src/test/recovery/t/002_archiving.pl
@@ -33,10 +33,10 @@ $node_standby->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $current_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Force archiving of WAL file to make it present on master
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Add some more content, it should not be present on standby
$node_master->safe_psql('postgres',
@@ -44,7 +44,7 @@ $node_master->safe_psql('postgres',
# Wait until necessary replay has been done on standby
my $caughtup_query =
- "SELECT '$current_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$current_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl
index a82545b..b7b0caa 100644
--- a/src/test/recovery/t/003_recovery_targets.pl
+++ b/src/test/recovery/t/003_recovery_targets.pl
@@ -32,7 +32,7 @@ sub test_recovery_standby
# Wait until standby has replayed enough data
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
@@ -57,7 +57,7 @@ $node_master->start;
$node_master->safe_psql('postgres',
"CREATE TABLE tab_int AS SELECT generate_series(1,1000) AS a");
my $lsn1 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Take backup from which all operations will be run
$node_master->backup('my_backup');
@@ -67,14 +67,14 @@ $node_master->backup('my_backup');
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(1001,2000))");
my $ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), txid_current();");
+ "SELECT pg_current_wal_location(), txid_current();");
my ($lsn2, $recovery_txid) = split /\|/, $ret;
# More data, with recovery target timestamp
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(2001,3000))");
$ret = $node_master->safe_psql('postgres',
- "SELECT pg_current_xlog_location(), now();");
+ "SELECT pg_current_wal_location(), now();");
my ($lsn3, $recovery_time) = split /\|/, $ret;
# Even more data, this time with a recovery target name
@@ -82,22 +82,22 @@ $node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(3001,4000))");
my $recovery_name = "my_target";
my $lsn4 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"SELECT pg_create_restore_point('$recovery_name');");
# And now for a recovery target LSN
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(4001,5000))");
-my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+my $recovery_lsn = $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $lsn5 =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
$node_master->safe_psql('postgres',
"INSERT INTO tab_int VALUES (generate_series(5001,6000))");
# Force archiving of WAL file
-$node_master->safe_psql('postgres', "SELECT pg_switch_xlog()");
+$node_master->safe_psql('postgres', "SELECT pg_switch_wal()");
# Test recovery targets
my @recovery_params = ("recovery_target = 'immediate'");
diff --git a/src/test/recovery/t/005_replay_delay.pl b/src/test/recovery/t/005_replay_delay.pl
index 640295b..cd9e8f5 100644
--- a/src/test/recovery/t/005_replay_delay.pl
+++ b/src/test/recovery/t/005_replay_delay.pl
@@ -42,7 +42,7 @@ $node_master->safe_psql('postgres',
# Now wait for replay to complete on standby. We're done waiting when the
# slave has replayed up to the previously saved master LSN.
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location()");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location()");
my $remaining = 90;
while ($remaining-- > 0)
@@ -50,7 +50,7 @@ while ($remaining-- > 0)
# Done waiting?
my $replay_status = $node_standby->safe_psql('postgres',
- "SELECT (pg_last_xlog_replay_location() - '$until_lsn'::pg_lsn) >= 0"
+ "SELECT (pg_last_wal_replay_location() - '$until_lsn'::pg_lsn) >= 0"
);
last if $replay_status eq 't';
diff --git a/src/test/recovery/t/008_fsm_truncation.pl b/src/test/recovery/t/008_fsm_truncation.pl
index 5220611..8aa8a4f 100644
--- a/src/test/recovery/t/008_fsm_truncation.pl
+++ b/src/test/recovery/t/008_fsm_truncation.pl
@@ -68,11 +68,11 @@ vacuum verbose testtab;
$node_master->psql('postgres', 'checkpoint');
my $until_lsn =
- $node_master->safe_psql('postgres', "SELECT pg_current_xlog_location();");
+ $node_master->safe_psql('postgres', "SELECT pg_current_wal_location();");
# Wait long enough for standby to receive and apply all WAL
my $caughtup_query =
- "SELECT '$until_lsn'::pg_lsn <= pg_last_xlog_replay_location()";
+ "SELECT '$until_lsn'::pg_lsn <= pg_last_wal_replay_location()";
$node_standby->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for standby to catch up";
diff --git a/src/test/regress/expected/hs_standby_functions.out b/src/test/regress/expected/hs_standby_functions.out
index 16d50a8..e0af677 100644
--- a/src/test/regress/expected/hs_standby_functions.out
+++ b/src/test/regress/expected/hs_standby_functions.out
@@ -15,7 +15,7 @@ select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
-select pg_switch_xlog();
+select pg_switch_wal();
ERROR: recovery is in progress
HINT: WAL control functions cannot be executed during recovery.
select pg_stop_backup();
diff --git a/src/test/regress/sql/hs_primary_extremes.sql b/src/test/regress/sql/hs_primary_extremes.sql
index 629efb4..2051e2e 100644
--- a/src/test/regress/sql/hs_primary_extremes.sql
+++ b/src/test/regress/sql/hs_primary_extremes.sql
@@ -70,4 +70,4 @@ SELECT count(*) > 257 FROM pg_locks;
COMMIT;
SELECT hs_locks_drop(257);
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_primary_setup.sql b/src/test/regress/sql/hs_primary_setup.sql
index a00b367..eeb4421 100644
--- a/src/test/regress/sql/hs_primary_setup.sql
+++ b/src/test/regress/sql/hs_primary_setup.sql
@@ -22,4 +22,4 @@ insert into hs3 values (115);
DROP sequence if exists hsseq;
create sequence hsseq;
-SELECT pg_switch_xlog();
+SELECT pg_switch_wal();
diff --git a/src/test/regress/sql/hs_standby_functions.sql b/src/test/regress/sql/hs_standby_functions.sql
index 7577045..251bac0 100644
--- a/src/test/regress/sql/hs_standby_functions.sql
+++ b/src/test/regress/sql/hs_standby_functions.sql
@@ -10,7 +10,7 @@ select txid_current();
select length(txid_current_snapshot()::text) >= 4;
select pg_start_backup('should fail');
-select pg_switch_xlog();
+select pg_switch_wal();
select pg_stop_backup();
-- should return no rows
diff --git a/src/test/subscription/t/001_rep_changes.pl b/src/test/subscription/t/001_rep_changes.pl
index b51740b..fa50e49 100644
--- a/src/test/subscription/t/001_rep_changes.pl
+++ b/src/test/subscription/t/001_rep_changes.pl
@@ -52,7 +52,7 @@ $node_subscriber->safe_psql('postgres',
# Wait for subscriber to finish initialization
my $caughtup_query =
-"SELECT pg_current_xlog_location() <= replay_location FROM pg_stat_replication WHERE application_name = '$appname';";
+"SELECT pg_current_wal_location() <= replay_location FROM pg_stat_replication WHERE application_name = '$appname';";
$node_publisher->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for subscriber to catch up";
diff --git a/src/test/subscription/t/002_types.pl b/src/test/subscription/t/002_types.pl
index 9064eb4..f44e1e6 100644
--- a/src/test/subscription/t/002_types.pl
+++ b/src/test/subscription/t/002_types.pl
@@ -107,7 +107,7 @@ $node_subscriber->safe_psql('postgres',
# Wait for subscriber to finish initialization
my $caughtup_query =
-"SELECT pg_current_xlog_location() <= replay_location FROM pg_stat_replication WHERE application_name = '$appname';";
+"SELECT pg_current_wal_location() <= replay_location FROM pg_stat_replication WHERE application_name = '$appname';";
$node_publisher->poll_query_until('postgres', $caughtup_query)
or die "Timed out while waiting for subscriber to catch up";
--
2.5.4 (Apple Git-61)
0002-Rename-user-facing-tools-with-xlog-in-the-name-to-sa.patchinvalid/octet-stream; name=0002-Rename-user-facing-tools-with-xlog-in-the-name-to-sa.patchDownload
From 73782518331f83279bbea950b6bd4a5cd44ec610 Mon Sep 17 00:00:00 2001
From: Robert Haas <rhaas@postgresql.org>
Date: Thu, 26 Jan 2017 11:24:46 -0500
Subject: [PATCH 2/4] Rename user-facing tools with "xlog" in the name to say
"wal".
This means pg_receivexlog because pg_receivewal, pg_resetxlog
becomes pg_resetwal, and pg_xlogdump becomes pg_waldump.
---
doc/src/sgml/protocol.sgml | 2 +-
doc/src/sgml/ref/allfiles.sgml | 6 +-
doc/src/sgml/ref/pg_receivewal.sgml | 399 +++++++++
doc/src/sgml/ref/pg_receivexlog.sgml | 399 ---------
doc/src/sgml/ref/pg_recvlogical.sgml | 6 +-
doc/src/sgml/ref/pg_resetwal.sgml | 293 ++++++
doc/src/sgml/ref/pg_resetxlog.sgml | 293 ------
doc/src/sgml/ref/pg_waldump.sgml | 237 +++++
doc/src/sgml/ref/pg_xlogdump.sgml | 237 -----
doc/src/sgml/reference.sgml | 6 +-
doc/src/sgml/release-9.2.sgml | 4 +-
doc/src/sgml/release-9.3.sgml | 8 +-
doc/src/sgml/release-9.4.sgml | 10 +-
doc/src/sgml/release-9.5.sgml | 8 +-
src/backend/access/rmgrdesc/xactdesc.c | 2 +-
src/backend/access/transam/varsup.c | 2 +-
src/backend/access/transam/xlogutils.c | 2 +-
src/backend/replication/logical/snapbuild.c | 2 +-
src/backend/replication/walsender.c | 2 +-
src/backend/utils/misc/guc.c | 2 +-
src/bin/Makefile | 4 +-
src/bin/pg_basebackup/.gitignore | 2 +-
src/bin/pg_basebackup/Makefile | 16 +-
src/bin/pg_basebackup/nls.mk | 2 +-
src/bin/pg_basebackup/pg_receivewal.c | 738 +++++++++++++++
src/bin/pg_basebackup/pg_receivexlog.c | 738 ---------------
src/bin/pg_basebackup/t/020_pg_receivewal.pl | 8 +
src/bin/pg_basebackup/t/020_pg_receivexlog.pl | 8 -
src/bin/pg_basebackup/walmethods.h | 2 +-
src/bin/pg_resetwal/.gitignore | 1 +
src/bin/pg_resetwal/Makefile | 35 +
src/bin/pg_resetwal/nls.mk | 4 +
src/bin/pg_resetwal/pg_resetwal.c | 1184 +++++++++++++++++++++++++
src/bin/pg_resetwal/po/cs.po | 498 +++++++++++
src/bin/pg_resetwal/po/de.po | 605 +++++++++++++
src/bin/pg_resetwal/po/es.po | 611 +++++++++++++
src/bin/pg_resetwal/po/fr.po | 644 ++++++++++++++
src/bin/pg_resetwal/po/it.po | 620 +++++++++++++
src/bin/pg_resetwal/po/ja.po | 490 ++++++++++
src/bin/pg_resetwal/po/ko.po | 616 +++++++++++++
src/bin/pg_resetwal/po/pl.po | 626 +++++++++++++
src/bin/pg_resetwal/po/pt_BR.po | 603 +++++++++++++
src/bin/pg_resetwal/po/ru.po | 677 ++++++++++++++
src/bin/pg_resetwal/po/sv.po | 550 ++++++++++++
src/bin/pg_resetwal/po/zh_CN.po | 661 ++++++++++++++
src/bin/pg_resetxlog/.gitignore | 1 -
src/bin/pg_resetxlog/Makefile | 35 -
src/bin/pg_resetxlog/nls.mk | 4 -
src/bin/pg_resetxlog/pg_resetxlog.c | 1184 -------------------------
src/bin/pg_resetxlog/po/cs.po | 498 -----------
src/bin/pg_resetxlog/po/de.po | 605 -------------
src/bin/pg_resetxlog/po/es.po | 611 -------------
src/bin/pg_resetxlog/po/fr.po | 644 --------------
src/bin/pg_resetxlog/po/it.po | 620 -------------
src/bin/pg_resetxlog/po/ja.po | 490 ----------
src/bin/pg_resetxlog/po/ko.po | 616 -------------
src/bin/pg_resetxlog/po/pl.po | 626 -------------
src/bin/pg_resetxlog/po/pt_BR.po | 603 -------------
src/bin/pg_resetxlog/po/ru.po | 677 --------------
src/bin/pg_resetxlog/po/sv.po | 550 ------------
src/bin/pg_resetxlog/po/zh_CN.po | 661 --------------
src/bin/pg_upgrade/controldata.c | 16 +-
src/bin/pg_upgrade/exec.c | 2 +-
src/bin/pg_upgrade/pg_upgrade.c | 14 +-
src/bin/pg_waldump/.gitignore | 4 +
src/bin/pg_waldump/Makefile | 40 +
src/bin/pg_waldump/compat.c | 99 +++
src/bin/pg_waldump/nls.mk | 6 +
src/bin/pg_waldump/pg_waldump.c | 1064 ++++++++++++++++++++++
src/bin/pg_waldump/rmgrdesc.c | 40 +
src/bin/pg_waldump/rmgrdesc.h | 22 +
src/bin/pg_xlogdump/.gitignore | 4 -
src/bin/pg_xlogdump/Makefile | 40 -
src/bin/pg_xlogdump/compat.c | 99 ---
src/bin/pg_xlogdump/nls.mk | 6 -
src/bin/pg_xlogdump/pg_xlogdump.c | 1064 ----------------------
src/bin/pg_xlogdump/rmgrdesc.c | 40 -
src/bin/pg_xlogdump/rmgrdesc.h | 22 -
src/include/access/xlog_internal.h | 4 +-
src/include/storage/bufmgr.h | 2 +-
src/tools/msvc/Install.pm | 2 +-
src/tools/msvc/Mkvcbuild.pm | 24 +-
82 files changed, 11452 insertions(+), 11450 deletions(-)
create mode 100644 doc/src/sgml/ref/pg_receivewal.sgml
delete mode 100644 doc/src/sgml/ref/pg_receivexlog.sgml
create mode 100644 doc/src/sgml/ref/pg_resetwal.sgml
delete mode 100644 doc/src/sgml/ref/pg_resetxlog.sgml
create mode 100644 doc/src/sgml/ref/pg_waldump.sgml
delete mode 100644 doc/src/sgml/ref/pg_xlogdump.sgml
create mode 100644 src/bin/pg_basebackup/pg_receivewal.c
delete mode 100644 src/bin/pg_basebackup/pg_receivexlog.c
create mode 100644 src/bin/pg_basebackup/t/020_pg_receivewal.pl
delete mode 100644 src/bin/pg_basebackup/t/020_pg_receivexlog.pl
create mode 100644 src/bin/pg_resetwal/.gitignore
create mode 100644 src/bin/pg_resetwal/Makefile
create mode 100644 src/bin/pg_resetwal/nls.mk
create mode 100644 src/bin/pg_resetwal/pg_resetwal.c
create mode 100644 src/bin/pg_resetwal/po/cs.po
create mode 100644 src/bin/pg_resetwal/po/de.po
create mode 100644 src/bin/pg_resetwal/po/es.po
create mode 100644 src/bin/pg_resetwal/po/fr.po
create mode 100644 src/bin/pg_resetwal/po/it.po
create mode 100644 src/bin/pg_resetwal/po/ja.po
create mode 100644 src/bin/pg_resetwal/po/ko.po
create mode 100644 src/bin/pg_resetwal/po/pl.po
create mode 100644 src/bin/pg_resetwal/po/pt_BR.po
create mode 100644 src/bin/pg_resetwal/po/ru.po
create mode 100644 src/bin/pg_resetwal/po/sv.po
create mode 100644 src/bin/pg_resetwal/po/zh_CN.po
delete mode 100644 src/bin/pg_resetxlog/.gitignore
delete mode 100644 src/bin/pg_resetxlog/Makefile
delete mode 100644 src/bin/pg_resetxlog/nls.mk
delete mode 100644 src/bin/pg_resetxlog/pg_resetxlog.c
delete mode 100644 src/bin/pg_resetxlog/po/cs.po
delete mode 100644 src/bin/pg_resetxlog/po/de.po
delete mode 100644 src/bin/pg_resetxlog/po/es.po
delete mode 100644 src/bin/pg_resetxlog/po/fr.po
delete mode 100644 src/bin/pg_resetxlog/po/it.po
delete mode 100644 src/bin/pg_resetxlog/po/ja.po
delete mode 100644 src/bin/pg_resetxlog/po/ko.po
delete mode 100644 src/bin/pg_resetxlog/po/pl.po
delete mode 100644 src/bin/pg_resetxlog/po/pt_BR.po
delete mode 100644 src/bin/pg_resetxlog/po/ru.po
delete mode 100644 src/bin/pg_resetxlog/po/sv.po
delete mode 100644 src/bin/pg_resetxlog/po/zh_CN.po
create mode 100644 src/bin/pg_waldump/.gitignore
create mode 100644 src/bin/pg_waldump/Makefile
create mode 100644 src/bin/pg_waldump/compat.c
create mode 100644 src/bin/pg_waldump/nls.mk
create mode 100644 src/bin/pg_waldump/pg_waldump.c
create mode 100644 src/bin/pg_waldump/rmgrdesc.c
create mode 100644 src/bin/pg_waldump/rmgrdesc.h
delete mode 100644 src/bin/pg_xlogdump/.gitignore
delete mode 100644 src/bin/pg_xlogdump/Makefile
delete mode 100644 src/bin/pg_xlogdump/compat.c
delete mode 100644 src/bin/pg_xlogdump/nls.mk
delete mode 100644 src/bin/pg_xlogdump/pg_xlogdump.c
delete mode 100644 src/bin/pg_xlogdump/rmgrdesc.c
delete mode 100644 src/bin/pg_xlogdump/rmgrdesc.h
diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml
index 9f054ad..3f06016 100644
--- a/doc/src/sgml/protocol.sgml
+++ b/doc/src/sgml/protocol.sgml
@@ -1321,7 +1321,7 @@ the connection to be used for logical replication from that database.
psql "dbname=postgres replication=database" -c "IDENTIFY_SYSTEM;"
</programlisting>
However, it is often more useful to use
- <xref linkend="app-pgreceivexlog"> (for physical replication) or
+ <xref linkend="app-pgreceivewal"> (for physical replication) or
<xref linkend="app-pgrecvlogical"> (for logical replication).
</para>
diff --git a/doc/src/sgml/ref/allfiles.sgml b/doc/src/sgml/ref/allfiles.sgml
index 0d09f81..2bc4d9f 100644
--- a/doc/src/sgml/ref/allfiles.sgml
+++ b/doc/src/sgml/ref/allfiles.sgml
@@ -198,15 +198,15 @@ Complete list of usable sgml source files in this directory.
<!ENTITY pgDump SYSTEM "pg_dump.sgml">
<!ENTITY pgDumpall SYSTEM "pg_dumpall.sgml">
<!ENTITY pgIsready SYSTEM "pg_isready.sgml">
-<!ENTITY pgReceivexlog SYSTEM "pg_receivexlog.sgml">
+<!ENTITY pgReceivewal SYSTEM "pg_receivewal.sgml">
<!ENTITY pgRecvlogical SYSTEM "pg_recvlogical.sgml">
-<!ENTITY pgResetxlog SYSTEM "pg_resetxlog.sgml">
+<!ENTITY pgResetwal SYSTEM "pg_resetwal.sgml">
<!ENTITY pgRestore SYSTEM "pg_restore.sgml">
<!ENTITY pgRewind SYSTEM "pg_rewind.sgml">
<!ENTITY pgtestfsync SYSTEM "pgtestfsync.sgml">
<!ENTITY pgtesttiming SYSTEM "pgtesttiming.sgml">
<!ENTITY pgupgrade SYSTEM "pgupgrade.sgml">
-<!ENTITY pgxlogdump SYSTEM "pg_xlogdump.sgml">
+<!ENTITY pgwaldump SYSTEM "pg_waldump.sgml">
<!ENTITY postgres SYSTEM "postgres-ref.sgml">
<!ENTITY postmaster SYSTEM "postmaster.sgml">
<!ENTITY psqlRef SYSTEM "psql-ref.sgml">
diff --git a/doc/src/sgml/ref/pg_receivewal.sgml b/doc/src/sgml/ref/pg_receivewal.sgml
new file mode 100644
index 0000000..0e6b636
--- /dev/null
+++ b/doc/src/sgml/ref/pg_receivewal.sgml
@@ -0,0 +1,399 @@
+<!--
+doc/src/sgml/ref/pg_receivewal.sgml
+PostgreSQL documentation
+-->
+
+<refentry id="app-pgreceivewal">
+ <indexterm zone="app-pgreceivewal">
+ <primary>pg_receivewal</primary>
+ </indexterm>
+
+ <refmeta>
+ <refentrytitle>pg_receivewal</refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo>Application</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>pg_receivewal</refname>
+ <refpurpose>stream transaction logs from a <productname>PostgreSQL</productname> server</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>pg_receivewal</command>
+ <arg rep="repeat"><replaceable>option</></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1>
+ <title>
+ Description
+ </title>
+ <para>
+ <application>pg_receivewal</application> is used to stream the transaction log
+ from a running <productname>PostgreSQL</productname> cluster. The transaction
+ log is streamed using the streaming replication protocol, and is written
+ to a local directory of files. This directory can be used as the archive
+ location for doing a restore using point-in-time recovery (see
+ <xref linkend="continuous-archiving">).
+ </para>
+
+ <para>
+ <application>pg_receivewal</application> streams the transaction
+ log in real time as it's being generated on the server, and does not wait
+ for segments to complete like <xref linkend="guc-archive-command"> does.
+ For this reason, it is not necessary to set
+ <xref linkend="guc-archive-timeout"> when using
+ <application>pg_receivewal</application>.
+ </para>
+
+ <para>
+ Unlike the WAL receiver of a PostgreSQL standby server, <application>pg_receivewal</>
+ by default flushes WAL data only when a WAL file is closed.
+ The option <option>--synchronous</> must be specified to flush WAL data
+ in real time.
+ </para>
+
+ <para>
+ The transaction log is streamed over a regular
+ <productname>PostgreSQL</productname> connection and uses the replication
+ protocol. The connection must be made with a superuser or a user
+ having <literal>REPLICATION</literal> permissions (see
+ <xref linkend="role-attributes">), and <filename>pg_hba.conf</filename>
+ must permit the replication connection. The server must also be
+ configured with <xref linkend="guc-max-wal-senders"> set high enough to
+ leave at least one session available for the stream.
+ </para>
+
+ <para>
+ If the connection is lost, or if it cannot be initially established,
+ with a non-fatal error, <application>pg_receivewal</application> will
+ retry the connection indefinitely, and reestablish streaming as soon
+ as possible. To avoid this behavior, use the <literal>-n</literal>
+ parameter.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Options</title>
+
+ <variablelist>
+ <varlistentry>
+ <term><option>-D <replaceable class="parameter">directory</replaceable></option></term>
+ <term><option>--directory=<replaceable class="parameter">directory</replaceable></option></term>
+ <listitem>
+ <para>
+ Directory to write the output to.
+ </para>
+ <para>
+ This parameter is required.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--if-not-exists</option></term>
+ <listitem>
+ <para>
+ Do not error out when <option>--create-slot</option> is specified
+ and a slot with the specified name already exists.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-n</option></term>
+ <term><option>--no-loop</option></term>
+ <listitem>
+ <para>
+ Don't loop on connection errors. Instead, exit right away with
+ an error.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-s <replaceable class="parameter">interval</replaceable></option></term>
+ <term><option>--status-interval=<replaceable class="parameter">interval</replaceable></option></term>
+ <listitem>
+ <para>
+ Specifies the number of seconds between status packets sent back to the
+ server. This allows for easier monitoring of the progress from server.
+ A value of zero disables the periodic status updates completely,
+ although an update will still be sent when requested by the server, to
+ avoid timeout disconnect. The default value is 10 seconds.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-S <replaceable>slotname</replaceable></option></term>
+ <term><option>--slot=<replaceable class="parameter">slotname</replaceable></option></term>
+ <listitem>
+ <para>
+ Require <application>pg_receivewal</application> to use an existing
+ replication slot (see <xref linkend="streaming-replication-slots">).
+ When this option is used, <application>pg_receivewal</> will report
+ a flush position to the server, indicating when each segment has been
+ synchronized to disk so that the server can remove that segment if it
+ is not otherwise needed.
+ </para>
+
+ <para>
+ When the replication client
+ of <application>pg_receivewal</application> is configured on the
+ server as a synchronous standby, then using a replication slot will
+ report the flush position to the server, but only when a WAL file is
+ closed. Therefore, that configuration will cause transactions on the
+ primary to wait for a long time and effectively not work
+ satisfactorily. The option <literal>--synchronous</literal> (see
+ below) must be specified in addition to make this work correctly.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--synchronous</option></term>
+ <listitem>
+ <para>
+ Flush the WAL data to disk immediately after it has been received. Also
+ send a status packet back to the server immediately after flushing,
+ regardless of <literal>--status-interval</>.
+ </para>
+
+ <para>
+ This option should be specified if the replication client
+ of <application>pg_receivewal</application> is configured on the
+ server as a synchronous standby, to ensure that timely feedback is
+ sent to the server.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-v</option></term>
+ <term><option>--verbose</option></term>
+ <listitem>
+ <para>
+ Enables verbose mode.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-Z <replaceable class="parameter">level</replaceable></option></term>
+ <term><option>--compress=<replaceable class="parameter">level</replaceable></option></term>
+ <listitem>
+ <para>
+ Enables gzip compression of transaction logs, and specifies the
+ compression level (0 through 9, 0 being no compression and 9 being best
+ compression). The suffix <filename>.gz</filename> will
+ automatically be added to all filenames.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The following command-line options control the database connection parameters.
+
+ <variablelist>
+ <varlistentry>
+ <term><option>-d <replaceable class="parameter">connstr</replaceable></option></term>
+ <term><option>--dbname=<replaceable class="parameter">connstr</replaceable></option></term>
+ <listitem>
+ <para>
+ Specifies parameters used to connect to the server, as a connection
+ string. See <xref linkend="libpq-connstring"> for more information.
+ </para>
+ <para>
+ The option is called <literal>--dbname</> for consistency with other
+ client applications, but because <application>pg_receivewal</application>
+ doesn't connect to any particular database in the cluster, database
+ name in the connection string will be ignored.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-h <replaceable class="parameter">host</replaceable></option></term>
+ <term><option>--host=<replaceable class="parameter">host</replaceable></option></term>
+ <listitem>
+ <para>
+ Specifies the host name of the machine on which the server is
+ running. If the value begins with a slash, it is used as the
+ directory for the Unix domain socket. The default is taken
+ from the <envar>PGHOST</envar> environment variable, if set,
+ else a Unix domain socket connection is attempted.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-p <replaceable class="parameter">port</replaceable></option></term>
+ <term><option>--port=<replaceable class="parameter">port</replaceable></option></term>
+ <listitem>
+ <para>
+ Specifies the TCP port or local Unix domain socket file
+ extension on which the server is listening for connections.
+ Defaults to the <envar>PGPORT</envar> environment variable, if
+ set, or a compiled-in default.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-U <replaceable>username</replaceable></option></term>
+ <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
+ <listitem>
+ <para>
+ User name to connect as.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-w</></term>
+ <term><option>--no-password</></term>
+ <listitem>
+ <para>
+ Never issue a password prompt. If the server requires
+ password authentication and a password is not available by
+ other means such as a <filename>.pgpass</filename> file, the
+ connection attempt will fail. This option can be useful in
+ batch jobs and scripts where no user is present to enter a
+ password.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-W</option></term>
+ <term><option>--password</option></term>
+ <listitem>
+ <para>
+ Force <application>pg_receivewal</application> to prompt for a
+ password before connecting to a database.
+ </para>
+
+ <para>
+ This option is never essential, since
+ <application>pg_receivewal</application> will automatically prompt
+ for a password if the server demands password authentication.
+ However, <application>pg_receivewal</application> will waste a
+ connection attempt finding out that the server wants a password.
+ In some cases it is worth typing <option>-W</> to avoid the extra
+ connection attempt.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+
+ <para>
+ <application>pg_receivewal</application> can perform one of the two
+ following actions in order to control physical replication slots:
+
+ <variablelist>
+ <varlistentry>
+ <term><option>--create-slot</option></term>
+ <listitem>
+ <para>
+ Create a new physical replication slot with the name specified in
+ <option>--slot</option>, then exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>--drop-slot</option></term>
+ <listitem>
+ <para>
+ Drop the replication slot with the name specified in
+ <option>--slot</option>, then exit.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+
+ <para>
+ Other options are also available:
+
+ <variablelist>
+ <varlistentry>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
+ <listitem>
+ <para>
+ Print the <application>pg_receivewal</application> version and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
+ <listitem>
+ <para>
+ Show help about <application>pg_receivewal</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Environment</title>
+
+ <para>
+ This utility, like most other <productname>PostgreSQL</> utilities,
+ uses the environment variables supported by <application>libpq</>
+ (see <xref linkend="libpq-envars">).
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Notes</title>
+
+ <para>
+ When using <application>pg_receivewal</application> instead of
+ <xref linkend="guc-archive-command"> as the main WAL backup method, it is
+ strongly recommended to use replication slots. Otherwise, the server is
+ free to recycle or remove transaction log files before they are backed up,
+ because it does not have any information, either
+ from <xref linkend="guc-archive-command"> or the replication slots, about
+ how far the WAL stream has been archived. Note, however, that a
+ replication slot will fill up the server's disk space if the receiver does
+ not keep up with fetching the WAL data.
+ </para>
+
+ </refsect1>
+
+ <refsect1>
+ <title>Examples</title>
+
+ <para>
+ To stream the transaction log from the server at
+ <literal>mydbserver</literal> and store it in the local directory
+ <filename>/usr/local/pgsql/archive</filename>:
+<screen>
+<prompt>$</prompt> <userinput>pg_receivewal -h mydbserver -D /usr/local/pgsql/archive</userinput>
+</screen></para>
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+
+ <simplelist type="inline">
+ <member><xref linkend="APP-PGBASEBACKUP"></member>
+ </simplelist>
+ </refsect1>
+
+</refentry>
diff --git a/doc/src/sgml/ref/pg_receivexlog.sgml b/doc/src/sgml/ref/pg_receivexlog.sgml
deleted file mode 100644
index 8c1ea9a..0000000
--- a/doc/src/sgml/ref/pg_receivexlog.sgml
+++ /dev/null
@@ -1,399 +0,0 @@
-<!--
-doc/src/sgml/ref/pg_receivexlog.sgml
-PostgreSQL documentation
--->
-
-<refentry id="app-pgreceivexlog">
- <indexterm zone="app-pgreceivexlog">
- <primary>pg_receivexlog</primary>
- </indexterm>
-
- <refmeta>
- <refentrytitle>pg_receivexlog</refentrytitle>
- <manvolnum>1</manvolnum>
- <refmiscinfo>Application</refmiscinfo>
- </refmeta>
-
- <refnamediv>
- <refname>pg_receivexlog</refname>
- <refpurpose>stream transaction logs from a <productname>PostgreSQL</productname> server</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>pg_receivexlog</command>
- <arg rep="repeat"><replaceable>option</></arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1>
- <title>
- Description
- </title>
- <para>
- <application>pg_receivexlog</application> is used to stream the transaction log
- from a running <productname>PostgreSQL</productname> cluster. The transaction
- log is streamed using the streaming replication protocol, and is written
- to a local directory of files. This directory can be used as the archive
- location for doing a restore using point-in-time recovery (see
- <xref linkend="continuous-archiving">).
- </para>
-
- <para>
- <application>pg_receivexlog</application> streams the transaction
- log in real time as it's being generated on the server, and does not wait
- for segments to complete like <xref linkend="guc-archive-command"> does.
- For this reason, it is not necessary to set
- <xref linkend="guc-archive-timeout"> when using
- <application>pg_receivexlog</application>.
- </para>
-
- <para>
- Unlike the WAL receiver of a PostgreSQL standby server, <application>pg_receivexlog</>
- by default flushes WAL data only when a WAL file is closed.
- The option <option>--synchronous</> must be specified to flush WAL data
- in real time.
- </para>
-
- <para>
- The transaction log is streamed over a regular
- <productname>PostgreSQL</productname> connection and uses the replication
- protocol. The connection must be made with a superuser or a user
- having <literal>REPLICATION</literal> permissions (see
- <xref linkend="role-attributes">), and <filename>pg_hba.conf</filename>
- must permit the replication connection. The server must also be
- configured with <xref linkend="guc-max-wal-senders"> set high enough to
- leave at least one session available for the stream.
- </para>
-
- <para>
- If the connection is lost, or if it cannot be initially established,
- with a non-fatal error, <application>pg_receivexlog</application> will
- retry the connection indefinitely, and reestablish streaming as soon
- as possible. To avoid this behavior, use the <literal>-n</literal>
- parameter.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Options</title>
-
- <variablelist>
- <varlistentry>
- <term><option>-D <replaceable class="parameter">directory</replaceable></option></term>
- <term><option>--directory=<replaceable class="parameter">directory</replaceable></option></term>
- <listitem>
- <para>
- Directory to write the output to.
- </para>
- <para>
- This parameter is required.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--if-not-exists</option></term>
- <listitem>
- <para>
- Do not error out when <option>--create-slot</option> is specified
- and a slot with the specified name already exists.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-n</option></term>
- <term><option>--no-loop</option></term>
- <listitem>
- <para>
- Don't loop on connection errors. Instead, exit right away with
- an error.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-s <replaceable class="parameter">interval</replaceable></option></term>
- <term><option>--status-interval=<replaceable class="parameter">interval</replaceable></option></term>
- <listitem>
- <para>
- Specifies the number of seconds between status packets sent back to the
- server. This allows for easier monitoring of the progress from server.
- A value of zero disables the periodic status updates completely,
- although an update will still be sent when requested by the server, to
- avoid timeout disconnect. The default value is 10 seconds.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-S <replaceable>slotname</replaceable></option></term>
- <term><option>--slot=<replaceable class="parameter">slotname</replaceable></option></term>
- <listitem>
- <para>
- Require <application>pg_receivexlog</application> to use an existing
- replication slot (see <xref linkend="streaming-replication-slots">).
- When this option is used, <application>pg_receivexlog</> will report
- a flush position to the server, indicating when each segment has been
- synchronized to disk so that the server can remove that segment if it
- is not otherwise needed.
- </para>
-
- <para>
- When the replication client
- of <application>pg_receivexlog</application> is configured on the
- server as a synchronous standby, then using a replication slot will
- report the flush position to the server, but only when a WAL file is
- closed. Therefore, that configuration will cause transactions on the
- primary to wait for a long time and effectively not work
- satisfactorily. The option <literal>--synchronous</literal> (see
- below) must be specified in addition to make this work correctly.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--synchronous</option></term>
- <listitem>
- <para>
- Flush the WAL data to disk immediately after it has been received. Also
- send a status packet back to the server immediately after flushing,
- regardless of <literal>--status-interval</>.
- </para>
-
- <para>
- This option should be specified if the replication client
- of <application>pg_receivexlog</application> is configured on the
- server as a synchronous standby, to ensure that timely feedback is
- sent to the server.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-v</option></term>
- <term><option>--verbose</option></term>
- <listitem>
- <para>
- Enables verbose mode.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-Z <replaceable class="parameter">level</replaceable></option></term>
- <term><option>--compress=<replaceable class="parameter">level</replaceable></option></term>
- <listitem>
- <para>
- Enables gzip compression of transaction logs, and specifies the
- compression level (0 through 9, 0 being no compression and 9 being best
- compression). The suffix <filename>.gz</filename> will
- automatically be added to all filenames.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The following command-line options control the database connection parameters.
-
- <variablelist>
- <varlistentry>
- <term><option>-d <replaceable class="parameter">connstr</replaceable></option></term>
- <term><option>--dbname=<replaceable class="parameter">connstr</replaceable></option></term>
- <listitem>
- <para>
- Specifies parameters used to connect to the server, as a connection
- string. See <xref linkend="libpq-connstring"> for more information.
- </para>
- <para>
- The option is called <literal>--dbname</> for consistency with other
- client applications, but because <application>pg_receivexlog</application>
- doesn't connect to any particular database in the cluster, database
- name in the connection string will be ignored.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-h <replaceable class="parameter">host</replaceable></option></term>
- <term><option>--host=<replaceable class="parameter">host</replaceable></option></term>
- <listitem>
- <para>
- Specifies the host name of the machine on which the server is
- running. If the value begins with a slash, it is used as the
- directory for the Unix domain socket. The default is taken
- from the <envar>PGHOST</envar> environment variable, if set,
- else a Unix domain socket connection is attempted.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-p <replaceable class="parameter">port</replaceable></option></term>
- <term><option>--port=<replaceable class="parameter">port</replaceable></option></term>
- <listitem>
- <para>
- Specifies the TCP port or local Unix domain socket file
- extension on which the server is listening for connections.
- Defaults to the <envar>PGPORT</envar> environment variable, if
- set, or a compiled-in default.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-U <replaceable>username</replaceable></option></term>
- <term><option>--username=<replaceable class="parameter">username</replaceable></option></term>
- <listitem>
- <para>
- User name to connect as.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-w</></term>
- <term><option>--no-password</></term>
- <listitem>
- <para>
- Never issue a password prompt. If the server requires
- password authentication and a password is not available by
- other means such as a <filename>.pgpass</filename> file, the
- connection attempt will fail. This option can be useful in
- batch jobs and scripts where no user is present to enter a
- password.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-W</option></term>
- <term><option>--password</option></term>
- <listitem>
- <para>
- Force <application>pg_receivexlog</application> to prompt for a
- password before connecting to a database.
- </para>
-
- <para>
- This option is never essential, since
- <application>pg_receivexlog</application> will automatically prompt
- for a password if the server demands password authentication.
- However, <application>pg_receivexlog</application> will waste a
- connection attempt finding out that the server wants a password.
- In some cases it is worth typing <option>-W</> to avoid the extra
- connection attempt.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para>
- <application>pg_receivexlog</application> can perform one of the two
- following actions in order to control physical replication slots:
-
- <variablelist>
- <varlistentry>
- <term><option>--create-slot</option></term>
- <listitem>
- <para>
- Create a new physical replication slot with the name specified in
- <option>--slot</option>, then exit.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>--drop-slot</option></term>
- <listitem>
- <para>
- Drop the replication slot with the name specified in
- <option>--slot</option>, then exit.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
-
- <para>
- Other options are also available:
-
- <variablelist>
- <varlistentry>
- <term><option>-V</></term>
- <term><option>--version</></term>
- <listitem>
- <para>
- Print the <application>pg_receivexlog</application> version and exit.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-?</></term>
- <term><option>--help</></term>
- <listitem>
- <para>
- Show help about <application>pg_receivexlog</application> command line
- arguments, and exit.
- </para>
- </listitem>
- </varlistentry>
-
- </variablelist>
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Environment</title>
-
- <para>
- This utility, like most other <productname>PostgreSQL</> utilities,
- uses the environment variables supported by <application>libpq</>
- (see <xref linkend="libpq-envars">).
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Notes</title>
-
- <para>
- When using <application>pg_receivexlog</application> instead of
- <xref linkend="guc-archive-command"> as the main WAL backup method, it is
- strongly recommended to use replication slots. Otherwise, the server is
- free to recycle or remove transaction log files before they are backed up,
- because it does not have any information, either
- from <xref linkend="guc-archive-command"> or the replication slots, about
- how far the WAL stream has been archived. Note, however, that a
- replication slot will fill up the server's disk space if the receiver does
- not keep up with fetching the WAL data.
- </para>
-
- </refsect1>
-
- <refsect1>
- <title>Examples</title>
-
- <para>
- To stream the transaction log from the server at
- <literal>mydbserver</literal> and store it in the local directory
- <filename>/usr/local/pgsql/archive</filename>:
-<screen>
-<prompt>$</prompt> <userinput>pg_receivexlog -h mydbserver -D /usr/local/pgsql/archive</userinput>
-</screen></para>
- </refsect1>
-
- <refsect1>
- <title>See Also</title>
-
- <simplelist type="inline">
- <member><xref linkend="APP-PGBASEBACKUP"></member>
- </simplelist>
- </refsect1>
-
-</refentry>
diff --git a/doc/src/sgml/ref/pg_recvlogical.sgml b/doc/src/sgml/ref/pg_recvlogical.sgml
index d066ce8..eaea94d 100644
--- a/doc/src/sgml/ref/pg_recvlogical.sgml
+++ b/doc/src/sgml/ref/pg_recvlogical.sgml
@@ -35,7 +35,7 @@ PostgreSQL documentation
<para>
It creates a replication-mode connection, so it is subject to the same
- constraints as <xref linkend="app-pgreceivexlog">, plus those for logical
+ constraints as <xref linkend="app-pgreceivewal">, plus those for logical
replication (see <xref linkend="logicaldecoding">).
</para>
@@ -238,7 +238,7 @@ PostgreSQL documentation
<listitem>
<para>
This option has the same effect as the option of the same name
- in <xref linkend="app-pgreceivexlog">. See the description there.
+ in <xref linkend="app-pgreceivewal">. See the description there.
</para>
</listitem>
</varlistentry>
@@ -411,7 +411,7 @@ PostgreSQL documentation
<title>See Also</title>
<simplelist type="inline">
- <member><xref linkend="app-pgreceivexlog"></member>
+ <member><xref linkend="app-pgreceivewal"></member>
</simplelist>
</refsect1>
</refentry>
diff --git a/doc/src/sgml/ref/pg_resetwal.sgml b/doc/src/sgml/ref/pg_resetwal.sgml
new file mode 100644
index 0000000..0cc6fb4
--- /dev/null
+++ b/doc/src/sgml/ref/pg_resetwal.sgml
@@ -0,0 +1,293 @@
+<!--
+doc/src/sgml/ref/pg_resetwal.sgml
+PostgreSQL documentation
+-->
+
+<refentry id="APP-PGRESETWAL">
+ <indexterm zone="app-pgresetwal">
+ <primary>pg_resetwal</primary>
+ </indexterm>
+
+ <refmeta>
+ <refentrytitle><application>pg_resetwal</application></refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo>Application</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>pg_resetwal</refname>
+ <refpurpose>reset the write-ahead log and other control information of a <productname>PostgreSQL</productname> database cluster</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>pg_resetwal</command>
+ <arg choice="opt"><option>-f</option></arg>
+ <arg choice="opt"><option>-n</option></arg>
+ <arg rep="repeat"><replaceable>option</replaceable></arg>
+ <arg choice="req"><arg choice="opt"><option>-D</option></arg> <replaceable class="parameter">datadir</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="R1-APP-PGRESETWAL-1">
+ <title>Description</title>
+ <para>
+ <command>pg_resetwal</command> clears the write-ahead log (WAL) and
+ optionally resets some other control information stored in the
+ <filename>pg_control</> file. This function is sometimes needed
+ if these files have become corrupted. It should be used only as a
+ last resort, when the server will not start due to such corruption.
+ </para>
+
+ <para>
+ After running this command, it should be possible to start the server,
+ but bear in mind that the database might contain inconsistent data due to
+ partially-committed transactions. You should immediately dump your data,
+ run <command>initdb</>, and reload. After reload, check for
+ inconsistencies and repair as needed.
+ </para>
+
+ <para>
+ This utility can only be run by the user who installed the server, because
+ it requires read/write access to the data directory.
+ For safety reasons, you must specify the data directory on the command line.
+ <command>pg_resetwal</command> does not use the environment variable
+ <envar>PGDATA</>.
+ </para>
+
+ <para>
+ If <command>pg_resetwal</command> complains that it cannot determine
+ valid data for <filename>pg_control</>, you can force it to proceed anyway
+ by specifying the <option>-f</> (force) option. In this case plausible
+ values will be substituted for the missing data. Most of the fields can be
+ expected to match, but manual assistance might be needed for the next OID,
+ next transaction ID and epoch, next multitransaction ID and offset, and
+ WAL starting address fields. These fields can be set using the options
+ discussed below. If you are not able to determine correct values for all
+ these fields, <option>-f</> can still be used, but
+ the recovered database must be treated with even more suspicion than
+ usual: an immediate dump and reload is imperative. <emphasis>Do not</>
+ execute any data-modifying operations in the database before you dump,
+ as any such action is likely to make the corruption worse.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Options</title>
+
+ <variablelist>
+ <varlistentry>
+ <term><option>-f</option></term>
+ <listitem>
+ <para>
+ Force <command>pg_resetwal</command> to proceed even if it cannot determine
+ valid data for <filename>pg_control</>, as explained above.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-n</option></term>
+ <listitem>
+ <para>
+ The <option>-n</> (no operation) option instructs
+ <command>pg_resetwal</command> to print the values reconstructed from
+ <filename>pg_control</> and values about to be changed, and then exit
+ without modifying anything. This is mainly a debugging tool, but can be
+ useful as a sanity check before allowing <command>pg_resetwal</command>
+ to proceed for real.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-V</option></term>
+ <term><option>--version</option></term>
+ <listitem><para>Display version information, then exit.</para></listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-?</option></term>
+ <term><option>--help</option></term>
+ <listitem><para>Show help, then exit.</para></listitem>
+ </varlistentry>
+ </variablelist>
+
+ <para>
+ The following options are only needed when
+ <command>pg_resetwal</command> is unable to determine appropriate values
+ by reading <filename>pg_control</>. Safe values can be determined as
+ described below. For values that take numeric arguments, hexadecimal
+ values can be specified by using the prefix <literal>0x</literal>.
+ </para>
+
+ <variablelist>
+ <varlistentry>
+ <term><option>-c</option> <replaceable class="parameter">xid</replaceable>,<replaceable class="parameter">xid</replaceable></term>
+ <listitem>
+ <para>
+ Manually set the oldest and newest transaction IDs for which the commit
+ time can be retrieved.
+ </para>
+
+ <para>
+ A safe value for the oldest transaction ID for which the commit time can
+ be retrieved (first part) can be determined by looking
+ for the numerically smallest file name in the directory
+ <filename>pg_commit_ts</> under the data directory. Conversely, a safe
+ value for the newest transaction ID for which the commit time can be
+ retrieved (second part) can be determined by looking for the numerically
+ greatest file name in the same directory. The file names are in
+ hexadecimal.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-e</option> <replaceable class="parameter">xid_epoch</replaceable></term>
+ <listitem>
+ <para>
+ Manually set the next transaction ID's epoch.
+ </para>
+
+ <para>
+ The transaction ID epoch is not actually stored anywhere in the database
+ except in the field that is set by <command>pg_resetwal</command>,
+ so any value will work so far as the database itself is concerned.
+ You might need to adjust this value to ensure that replication
+ systems such as <application>Slony-I</> and
+ <application>Skytools</> work correctly —
+ if so, an appropriate value should be obtainable from the state of
+ the downstream replicated database.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-l</option> <replaceable class="parameter">walfile</replaceable></term>
+ <listitem>
+ <para>
+ Manually set the WAL starting address.
+ </para>
+
+ <para>
+ The WAL starting address should be
+ larger than any WAL segment file name currently existing in
+ the directory <filename>pg_wal</> under the data directory.
+ These names are also in hexadecimal and have three parts. The first
+ part is the <quote>timeline ID</> and should usually be kept the same.
+ For example, if <filename>00000001000000320000004A</> is the
+ largest entry in <filename>pg_wal</>, use <literal>-l 00000001000000320000004B</> or higher.
+ </para>
+
+ <note>
+ <para>
+ <command>pg_resetwal</command> itself looks at the files in
+ <filename>pg_wal</> and chooses a default <option>-l</> setting
+ beyond the last existing file name. Therefore, manual adjustment of
+ <option>-l</> should only be needed if you are aware of WAL segment
+ files that are not currently present in <filename>pg_wal</>, such as
+ entries in an offline archive; or if the contents of
+ <filename>pg_wal</> have been lost entirely.
+ </para>
+ </note>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-m</option> <replaceable class="parameter">mxid</replaceable>,<replaceable class="parameter">mxid</replaceable></term>
+ <listitem>
+ <para>
+ Manually set the next and oldest multitransaction ID.
+ </para>
+
+ <para>
+ A safe value for the next multitransaction ID (first part) can be
+ determined by looking for the numerically largest file name in the
+ directory <filename>pg_multixact/offsets</> under the data directory,
+ adding one, and then multiplying by 65536 (0x10000). Conversely, a safe
+ value for the oldest multitransaction ID (second part of
+ <option>-m</>) can be determined by looking for the numerically smallest
+ file name in the same directory and multiplying by 65536. The file
+ names are in hexadecimal, so the easiest way to do this is to specify
+ the option value in hexadecimal and append four zeroes.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-o</option> <replaceable class="parameter">oid</replaceable></term>
+ <listitem>
+ <para>
+ Manually set the next OID.
+ </para>
+
+ <para>
+ There is no comparably easy way to determine a next OID that's beyond
+ the largest one in the database, but fortunately it is not critical to
+ get the next-OID setting right.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-O</option> <replaceable class="parameter">mxoff</replaceable></term>
+ <listitem>
+ <para>
+ Manually set the next multitransaction offset.
+ </para>
+
+ <para>
+ A safe value can be determined by looking for the numerically largest
+ file name in the directory <filename>pg_multixact/members</> under the
+ data directory, adding one, and then multiplying by 52352 (0xCC80).
+ The file names are in hexadecimal. There is no simple recipe such as
+ the ones for other options of appending zeroes.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-x</option> <replaceable class="parameter">xid</replaceable></term>
+ <listitem>
+ <para>
+ Manually set the next transaction ID.
+ </para>
+
+ <para>
+ A safe value can be determined by looking for the numerically largest
+ file name in the directory <filename>pg_clog</> under the data directory,
+ adding one,
+ and then multiplying by 1048576 (0x100000). Note that the file names are in
+ hexadecimal. It is usually easiest to specify the option value in
+ hexadecimal too. For example, if <filename>0011</> is the largest entry
+ in <filename>pg_clog</>, <literal>-x 0x1200000</> will work (five
+ trailing zeroes provide the proper multiplier).
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+
+ <refsect1>
+ <title>Notes</title>
+
+ <para>
+ This command must not be used when the server is
+ running. <command>pg_resetwal</command> will refuse to start up if
+ it finds a server lock file in the data directory. If the
+ server crashed then a lock file might have been left
+ behind; in that case you can remove the lock file to allow
+ <command>pg_resetwal</command> to run. But before you do
+ so, make doubly certain that there is no server process still alive.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+
+ <simplelist type="inline">
+ <member><xref linkend="app-pgcontroldata"></member>
+ </simplelist>
+ </refsect1>
+</refentry>
diff --git a/doc/src/sgml/ref/pg_resetxlog.sgml b/doc/src/sgml/ref/pg_resetxlog.sgml
deleted file mode 100644
index c949c5e..0000000
--- a/doc/src/sgml/ref/pg_resetxlog.sgml
+++ /dev/null
@@ -1,293 +0,0 @@
-<!--
-doc/src/sgml/ref/pg_resetxlog.sgml
-PostgreSQL documentation
--->
-
-<refentry id="APP-PGRESETXLOG">
- <indexterm zone="app-pgresetxlog">
- <primary>pg_resetxlog</primary>
- </indexterm>
-
- <refmeta>
- <refentrytitle><application>pg_resetxlog</application></refentrytitle>
- <manvolnum>1</manvolnum>
- <refmiscinfo>Application</refmiscinfo>
- </refmeta>
-
- <refnamediv>
- <refname>pg_resetxlog</refname>
- <refpurpose>reset the write-ahead log and other control information of a <productname>PostgreSQL</productname> database cluster</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>pg_resetxlog</command>
- <arg choice="opt"><option>-f</option></arg>
- <arg choice="opt"><option>-n</option></arg>
- <arg rep="repeat"><replaceable>option</replaceable></arg>
- <arg choice="req"><arg choice="opt"><option>-D</option></arg> <replaceable class="parameter">datadir</replaceable></arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="R1-APP-PGRESETXLOG-1">
- <title>Description</title>
- <para>
- <command>pg_resetxlog</command> clears the write-ahead log (WAL) and
- optionally resets some other control information stored in the
- <filename>pg_control</> file. This function is sometimes needed
- if these files have become corrupted. It should be used only as a
- last resort, when the server will not start due to such corruption.
- </para>
-
- <para>
- After running this command, it should be possible to start the server,
- but bear in mind that the database might contain inconsistent data due to
- partially-committed transactions. You should immediately dump your data,
- run <command>initdb</>, and reload. After reload, check for
- inconsistencies and repair as needed.
- </para>
-
- <para>
- This utility can only be run by the user who installed the server, because
- it requires read/write access to the data directory.
- For safety reasons, you must specify the data directory on the command line.
- <command>pg_resetxlog</command> does not use the environment variable
- <envar>PGDATA</>.
- </para>
-
- <para>
- If <command>pg_resetxlog</command> complains that it cannot determine
- valid data for <filename>pg_control</>, you can force it to proceed anyway
- by specifying the <option>-f</> (force) option. In this case plausible
- values will be substituted for the missing data. Most of the fields can be
- expected to match, but manual assistance might be needed for the next OID,
- next transaction ID and epoch, next multitransaction ID and offset, and
- WAL starting address fields. These fields can be set using the options
- discussed below. If you are not able to determine correct values for all
- these fields, <option>-f</> can still be used, but
- the recovered database must be treated with even more suspicion than
- usual: an immediate dump and reload is imperative. <emphasis>Do not</>
- execute any data-modifying operations in the database before you dump,
- as any such action is likely to make the corruption worse.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Options</title>
-
- <variablelist>
- <varlistentry>
- <term><option>-f</option></term>
- <listitem>
- <para>
- Force <command>pg_resetxlog</command> to proceed even if it cannot determine
- valid data for <filename>pg_control</>, as explained above.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-n</option></term>
- <listitem>
- <para>
- The <option>-n</> (no operation) option instructs
- <command>pg_resetxlog</command> to print the values reconstructed from
- <filename>pg_control</> and values about to be changed, and then exit
- without modifying anything. This is mainly a debugging tool, but can be
- useful as a sanity check before allowing <command>pg_resetxlog</command>
- to proceed for real.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-V</option></term>
- <term><option>--version</option></term>
- <listitem><para>Display version information, then exit.</para></listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-?</option></term>
- <term><option>--help</option></term>
- <listitem><para>Show help, then exit.</para></listitem>
- </varlistentry>
- </variablelist>
-
- <para>
- The following options are only needed when
- <command>pg_resetxlog</command> is unable to determine appropriate values
- by reading <filename>pg_control</>. Safe values can be determined as
- described below. For values that take numeric arguments, hexadecimal
- values can be specified by using the prefix <literal>0x</literal>.
- </para>
-
- <variablelist>
- <varlistentry>
- <term><option>-c</option> <replaceable class="parameter">xid</replaceable>,<replaceable class="parameter">xid</replaceable></term>
- <listitem>
- <para>
- Manually set the oldest and newest transaction IDs for which the commit
- time can be retrieved.
- </para>
-
- <para>
- A safe value for the oldest transaction ID for which the commit time can
- be retrieved (first part) can be determined by looking
- for the numerically smallest file name in the directory
- <filename>pg_commit_ts</> under the data directory. Conversely, a safe
- value for the newest transaction ID for which the commit time can be
- retrieved (second part) can be determined by looking for the numerically
- greatest file name in the same directory. The file names are in
- hexadecimal.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-e</option> <replaceable class="parameter">xid_epoch</replaceable></term>
- <listitem>
- <para>
- Manually set the next transaction ID's epoch.
- </para>
-
- <para>
- The transaction ID epoch is not actually stored anywhere in the database
- except in the field that is set by <command>pg_resetxlog</command>,
- so any value will work so far as the database itself is concerned.
- You might need to adjust this value to ensure that replication
- systems such as <application>Slony-I</> and
- <application>Skytools</> work correctly —
- if so, an appropriate value should be obtainable from the state of
- the downstream replicated database.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-l</option> <replaceable class="parameter">xlogfile</replaceable></term>
- <listitem>
- <para>
- Manually set the WAL starting address.
- </para>
-
- <para>
- The WAL starting address should be
- larger than any WAL segment file name currently existing in
- the directory <filename>pg_wal</> under the data directory.
- These names are also in hexadecimal and have three parts. The first
- part is the <quote>timeline ID</> and should usually be kept the same.
- For example, if <filename>00000001000000320000004A</> is the
- largest entry in <filename>pg_wal</>, use <literal>-l 00000001000000320000004B</> or higher.
- </para>
-
- <note>
- <para>
- <command>pg_resetxlog</command> itself looks at the files in
- <filename>pg_wal</> and chooses a default <option>-l</> setting
- beyond the last existing file name. Therefore, manual adjustment of
- <option>-l</> should only be needed if you are aware of WAL segment
- files that are not currently present in <filename>pg_wal</>, such as
- entries in an offline archive; or if the contents of
- <filename>pg_wal</> have been lost entirely.
- </para>
- </note>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-m</option> <replaceable class="parameter">mxid</replaceable>,<replaceable class="parameter">mxid</replaceable></term>
- <listitem>
- <para>
- Manually set the next and oldest multitransaction ID.
- </para>
-
- <para>
- A safe value for the next multitransaction ID (first part) can be
- determined by looking for the numerically largest file name in the
- directory <filename>pg_multixact/offsets</> under the data directory,
- adding one, and then multiplying by 65536 (0x10000). Conversely, a safe
- value for the oldest multitransaction ID (second part of
- <option>-m</>) can be determined by looking for the numerically smallest
- file name in the same directory and multiplying by 65536. The file
- names are in hexadecimal, so the easiest way to do this is to specify
- the option value in hexadecimal and append four zeroes.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-o</option> <replaceable class="parameter">oid</replaceable></term>
- <listitem>
- <para>
- Manually set the next OID.
- </para>
-
- <para>
- There is no comparably easy way to determine a next OID that's beyond
- the largest one in the database, but fortunately it is not critical to
- get the next-OID setting right.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-O</option> <replaceable class="parameter">mxoff</replaceable></term>
- <listitem>
- <para>
- Manually set the next multitransaction offset.
- </para>
-
- <para>
- A safe value can be determined by looking for the numerically largest
- file name in the directory <filename>pg_multixact/members</> under the
- data directory, adding one, and then multiplying by 52352 (0xCC80).
- The file names are in hexadecimal. There is no simple recipe such as
- the ones for other options of appending zeroes.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-x</option> <replaceable class="parameter">xid</replaceable></term>
- <listitem>
- <para>
- Manually set the next transaction ID.
- </para>
-
- <para>
- A safe value can be determined by looking for the numerically largest
- file name in the directory <filename>pg_clog</> under the data directory,
- adding one,
- and then multiplying by 1048576 (0x100000). Note that the file names are in
- hexadecimal. It is usually easiest to specify the option value in
- hexadecimal too. For example, if <filename>0011</> is the largest entry
- in <filename>pg_clog</>, <literal>-x 0x1200000</> will work (five
- trailing zeroes provide the proper multiplier).
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </refsect1>
-
- <refsect1>
- <title>Notes</title>
-
- <para>
- This command must not be used when the server is
- running. <command>pg_resetxlog</command> will refuse to start up if
- it finds a server lock file in the data directory. If the
- server crashed then a lock file might have been left
- behind; in that case you can remove the lock file to allow
- <command>pg_resetxlog</command> to run. But before you do
- so, make doubly certain that there is no server process still alive.
- </para>
- </refsect1>
-
- <refsect1>
- <title>See Also</title>
-
- <simplelist type="inline">
- <member><xref linkend="app-pgcontroldata"></member>
- </simplelist>
- </refsect1>
-</refentry>
diff --git a/doc/src/sgml/ref/pg_waldump.sgml b/doc/src/sgml/ref/pg_waldump.sgml
new file mode 100644
index 0000000..4c92eee
--- /dev/null
+++ b/doc/src/sgml/ref/pg_waldump.sgml
@@ -0,0 +1,237 @@
+<!--
+doc/src/sgml/ref/pg_waldump.sgml
+PostgreSQL documentation
+-->
+
+<refentry id="pgwaldump">
+ <indexterm zone="pgwaldump">
+ <primary>pg_waldump</primary>
+ </indexterm>
+
+ <refmeta>
+ <refentrytitle><application>pg_waldump</application></refentrytitle>
+ <manvolnum>1</manvolnum>
+ <refmiscinfo>Application</refmiscinfo>
+ </refmeta>
+
+ <refnamediv>
+ <refname>pg_waldump</refname>
+ <refpurpose>display a human-readable rendering of the write-ahead log of a <productname>PostgreSQL</productname> database cluster</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>pg_waldump</command>
+ <arg rep="repeat" choice="opt"><option>option</option></arg>
+ <arg choice="opt"><option>startseg</option>
+ <arg choice="opt"><option>endseg</option></arg>
+ </arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsect1 id="R1-APP-PGWALDUMP-1">
+ <title>Description</title>
+ <para>
+ <command>pg_waldump</command> displays the write-ahead log (WAL) and is mainly
+ useful for debugging or educational purposes.
+ </para>
+
+ <para>
+ This utility can only be run by the user who installed the server, because
+ it requires read-only access to the data directory.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Options</title>
+
+ <para>
+ The following command-line options control the location and format of the
+ output:
+
+ <variablelist>
+
+ <varlistentry>
+ <term><replaceable class="parameter">startseg</replaceable></term>
+ <listitem>
+ <para>
+ Start reading at the specified log segment file. This implicitly determines
+ the path in which files will be searched for, and the timeline to use.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><replaceable class="parameter">endseg</replaceable></term>
+ <listitem>
+ <para>
+ Stop after reading the specified log segment file.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-b</option></term>
+ <term><option>--bkp-details</option></term>
+ <listitem>
+ <para>
+ Output detailed information about backup blocks.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-e <replaceable>end</replaceable></option></term>
+ <term><option>--end=<replaceable>end</replaceable></option></term>
+ <listitem>
+ <para>
+ Stop reading at the specified log position, instead of reading to the
+ end of the log stream.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-f</option></term>
+ <term><option>--follow</option></term>
+ <listitem>
+ <para>
+ After reaching the end of valid WAL, keep polling once per second for
+ new WAL to appear.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-n <replaceable>limit</replaceable></option></term>
+ <term><option>--limit=<replaceable>limit</replaceable></option></term>
+ <listitem>
+ <para>
+ Display the specified number of records, then stop.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-p <replaceable>path</replaceable></option></term>
+ <term><option>--path=<replaceable>path</replaceable></option></term>
+ <listitem>
+ <para>
+ Specifies a directory to search for log segment files or a
+ directory with a <literal>pg_wal</literal> subdirectory that
+ contains such files. The default is to search in the current
+ directory, the <literal>pg_wal</literal> subdirectory of the
+ current directory, and the <literal>pg_wal</literal> subdirectory
+ of <envar>PGDATA</envar>.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-r <replaceable>rmgr</replaceable></option></term>
+ <term><option>--rmgr=<replaceable>rmgr</replaceable></option></term>
+ <listitem>
+ <para>
+ Only display records generated by the specified resource manager.
+ If <literal>list</> is passed as name, print a list of valid resource manager
+ names, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-s <replaceable>start</replaceable></option></term>
+ <term><option>--start=<replaceable>start</replaceable></option></term>
+ <listitem>
+ <para>
+ Log position at which to start reading. The default is to start reading
+ the first valid log record found in the earliest file found.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-t <replaceable>timeline</replaceable></option></term>
+ <term><option>--timeline=<replaceable>timeline</replaceable></option></term>
+ <listitem>
+ <para>
+ Timeline from which to read log records. The default is to use the
+ value in <replaceable>startseg</>, if that is specified; otherwise, the
+ default is 1.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-V</></term>
+ <term><option>--version</></term>
+ <listitem>
+ <para>
+ Print the <application>pg_waldump</application> version and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-x <replaceable>xid</replaceable></option></term>
+ <term><option>--xid=<replaceable>xid</replaceable></option></term>
+ <listitem>
+ <para>
+ Only display records marked with the given transaction ID.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-z</option></term>
+ <term><option>--stats[=record]</option></term>
+ <listitem>
+ <para>
+ Display summary statistics (number and size of records and
+ full-page images) instead of individual records. Optionally
+ generate statistics per-record instead of per-rmgr.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term><option>-?</></term>
+ <term><option>--help</></term>
+ <listitem>
+ <para>
+ Show help about <application>pg_waldump</application> command line
+ arguments, and exit.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>Notes</title>
+ <para>
+ Can give wrong results when the server is running.
+ </para>
+
+ <para>
+ Only the specified timeline is displayed (or the default, if none is
+ specified). Records in other timelines are ignored.
+ </para>
+
+ <para>
+ <application>pg_waldump</> cannot read WAL files with suffix
+ <literal>.partial</>. If those files need to be read, <literal>.partial</>
+ suffix needs to be removed from the file name.
+ </para>
+ </refsect1>
+
+ <refsect1>
+ <title>See Also</title>
+
+ <simplelist type="inline">
+ <member><xref linkend="wal-internals"></member>
+ </simplelist>
+ </refsect1>
+
+</refentry>
diff --git a/doc/src/sgml/ref/pg_xlogdump.sgml b/doc/src/sgml/ref/pg_xlogdump.sgml
deleted file mode 100644
index 078b08e..0000000
--- a/doc/src/sgml/ref/pg_xlogdump.sgml
+++ /dev/null
@@ -1,237 +0,0 @@
-<!--
-doc/src/sgml/ref/pg_xlogdump.sgml
-PostgreSQL documentation
--->
-
-<refentry id="pgxlogdump">
- <indexterm zone="pgxlogdump">
- <primary>pg_xlogdump</primary>
- </indexterm>
-
- <refmeta>
- <refentrytitle><application>pg_xlogdump</application></refentrytitle>
- <manvolnum>1</manvolnum>
- <refmiscinfo>Application</refmiscinfo>
- </refmeta>
-
- <refnamediv>
- <refname>pg_xlogdump</refname>
- <refpurpose>display a human-readable rendering of the write-ahead log of a <productname>PostgreSQL</productname> database cluster</refpurpose>
- </refnamediv>
-
- <refsynopsisdiv>
- <cmdsynopsis>
- <command>pg_xlogdump</command>
- <arg rep="repeat" choice="opt"><option>option</option></arg>
- <arg choice="opt"><option>startseg</option>
- <arg choice="opt"><option>endseg</option></arg>
- </arg>
- </cmdsynopsis>
- </refsynopsisdiv>
-
- <refsect1 id="R1-APP-PGXLOGDUMP-1">
- <title>Description</title>
- <para>
- <command>pg_xlogdump</command> displays the write-ahead log (WAL) and is mainly
- useful for debugging or educational purposes.
- </para>
-
- <para>
- This utility can only be run by the user who installed the server, because
- it requires read-only access to the data directory.
- </para>
- </refsect1>
-
- <refsect1>
- <title>Options</title>
-
- <para>
- The following command-line options control the location and format of the
- output:
-
- <variablelist>
-
- <varlistentry>
- <term><replaceable class="parameter">startseg</replaceable></term>
- <listitem>
- <para>
- Start reading at the specified log segment file. This implicitly determines
- the path in which files will be searched for, and the timeline to use.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><replaceable class="parameter">endseg</replaceable></term>
- <listitem>
- <para>
- Stop after reading the specified log segment file.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-b</option></term>
- <term><option>--bkp-details</option></term>
- <listitem>
- <para>
- Output detailed information about backup blocks.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-e <replaceable>end</replaceable></option></term>
- <term><option>--end=<replaceable>end</replaceable></option></term>
- <listitem>
- <para>
- Stop reading at the specified log position, instead of reading to the
- end of the log stream.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-f</option></term>
- <term><option>--follow</option></term>
- <listitem>
- <para>
- After reaching the end of valid WAL, keep polling once per second for
- new WAL to appear.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-n <replaceable>limit</replaceable></option></term>
- <term><option>--limit=<replaceable>limit</replaceable></option></term>
- <listitem>
- <para>
- Display the specified number of records, then stop.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-p <replaceable>path</replaceable></option></term>
- <term><option>--path=<replaceable>path</replaceable></option></term>
- <listitem>
- <para>
- Specifies a directory to search for log segment files or a
- directory with a <literal>pg_wal</literal> subdirectory that
- contains such files. The default is to search in the current
- directory, the <literal>pg_wal</literal> subdirectory of the
- current directory, and the <literal>pg_wal</literal> subdirectory
- of <envar>PGDATA</envar>.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-r <replaceable>rmgr</replaceable></option></term>
- <term><option>--rmgr=<replaceable>rmgr</replaceable></option></term>
- <listitem>
- <para>
- Only display records generated by the specified resource manager.
- If <literal>list</> is passed as name, print a list of valid resource manager
- names, and exit.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-s <replaceable>start</replaceable></option></term>
- <term><option>--start=<replaceable>start</replaceable></option></term>
- <listitem>
- <para>
- Log position at which to start reading. The default is to start reading
- the first valid log record found in the earliest file found.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-t <replaceable>timeline</replaceable></option></term>
- <term><option>--timeline=<replaceable>timeline</replaceable></option></term>
- <listitem>
- <para>
- Timeline from which to read log records. The default is to use the
- value in <replaceable>startseg</>, if that is specified; otherwise, the
- default is 1.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-V</></term>
- <term><option>--version</></term>
- <listitem>
- <para>
- Print the <application>pg_xlogdump</application> version and exit.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-x <replaceable>xid</replaceable></option></term>
- <term><option>--xid=<replaceable>xid</replaceable></option></term>
- <listitem>
- <para>
- Only display records marked with the given transaction ID.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-z</option></term>
- <term><option>--stats[=record]</option></term>
- <listitem>
- <para>
- Display summary statistics (number and size of records and
- full-page images) instead of individual records. Optionally
- generate statistics per-record instead of per-rmgr.
- </para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term><option>-?</></term>
- <term><option>--help</></term>
- <listitem>
- <para>
- Show help about <application>pg_xlogdump</application> command line
- arguments, and exit.
- </para>
- </listitem>
- </varlistentry>
- </variablelist>
- </para>
- </refsect1>
-
- <refsect1>
- <title>Notes</title>
- <para>
- Can give wrong results when the server is running.
- </para>
-
- <para>
- Only the specified timeline is displayed (or the default, if none is
- specified). Records in other timelines are ignored.
- </para>
-
- <para>
- <application>pg_xlogdump</> cannot read WAL files with suffix
- <literal>.partial</>. If those files need to be read, <literal>.partial</>
- suffix needs to be removed from the file name.
- </para>
- </refsect1>
-
- <refsect1>
- <title>See Also</title>
-
- <simplelist type="inline">
- <member><xref linkend="wal-internals"></member>
- </simplelist>
- </refsect1>
-
-</refentry>
diff --git a/doc/src/sgml/reference.sgml b/doc/src/sgml/reference.sgml
index 34007d3..c8191de 100644
--- a/doc/src/sgml/reference.sgml
+++ b/doc/src/sgml/reference.sgml
@@ -245,7 +245,7 @@
&pgDump;
&pgDumpall;
&pgIsready;
- &pgReceivexlog;
+ &pgReceivewal;
&pgRecvlogical;
&pgRestore;
&psqlRef;
@@ -271,12 +271,12 @@
&pgarchivecleanup;
&pgControldata;
&pgCtl;
- &pgResetxlog;
+ &pgResetwal;
&pgRewind;
&pgtestfsync;
&pgtesttiming;
&pgupgrade;
- &pgxlogdump;
+ &pgwaldump;
&postgres;
&postmaster;
diff --git a/doc/src/sgml/release-9.2.sgml b/doc/src/sgml/release-9.2.sgml
index 4943038..b26e1b4 100644
--- a/doc/src/sgml/release-9.2.sgml
+++ b/doc/src/sgml/release-9.2.sgml
@@ -7657,7 +7657,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100
<listitem>
<para>
Add a <link
- linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
+ linkend="app-pgreceivewal"><application>pg_receivexlog</></link>
tool to archive WAL file changes as they are written
</para>
</listitem>
@@ -8819,7 +8819,7 @@ Branch: REL9_2_STABLE [6b700301c] 2015-02-17 16:03:00 +0100
<listitem>
<para>
Add a <link
- linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
+ linkend="app-pgreceivewal"><application>pg_receivexlog</></link>
tool to archive WAL file changes as they are written, rather
than waiting for completed WAL files (Magnus Hagander)
</para>
diff --git a/doc/src/sgml/release-9.3.sgml b/doc/src/sgml/release-9.3.sgml
index 81205a4..7c236ca 100644
--- a/doc/src/sgml/release-9.3.sgml
+++ b/doc/src/sgml/release-9.3.sgml
@@ -9632,7 +9632,7 @@ ALTER EXTENSION hstore UPDATE;
<listitem>
<para>
Allow tools like <link
- linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
+ linkend="app-pgreceivewal"><application>pg_receivexlog</></link>
to run on computers with different architectures (Heikki
Linnakangas)
</para>
@@ -9662,7 +9662,7 @@ ALTER EXTENSION hstore UPDATE;
<listitem>
<para>
Allow <link
- linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
+ linkend="app-pgreceivewal"><application>pg_receivexlog</></link>
and <link
linkend="app-pgbasebackup"><application>pg_basebackup</></link>
<option>--xlog-method</> to handle streaming timeline switches
@@ -10265,7 +10265,7 @@ ALTER EXTENSION hstore UPDATE;
linkend="APP-PG-DUMPALL"><application>pg_dumpall</></link>, <link
linkend="app-pgbasebackup"><application>pg_basebackup</></link>, and
<link
- linkend="app-pgreceivexlog"><application>pg_receivexlog</></link>
+ linkend="app-pgreceivewal"><application>pg_receivexlog</></link>
to allow specifying a connection string (Amit Kapila)
</para>
</listitem>
@@ -10802,7 +10802,7 @@ ALTER EXTENSION hstore UPDATE;
<listitem>
<para>
- Add <link linkend="pgxlogdump"><application>pg_xlogdump</></link>
+ Add <link linkend="pgwaldump"><application>pg_xlogdump</></link>
contrib program (Andres Freund)
</para>
</listitem>
diff --git a/doc/src/sgml/release-9.4.sgml b/doc/src/sgml/release-9.4.sgml
index 94b028a..92605f7 100644
--- a/doc/src/sgml/release-9.4.sgml
+++ b/doc/src/sgml/release-9.4.sgml
@@ -8384,8 +8384,9 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500
<listitem>
<para>
- Make <xref linkend="APP-PGRESETXLOG"> with option <option>-n</>
- output current and potentially changed values (Rajeev Rastogi)
+ Make <link linkend="app-pgresetwal"><application>pg_resetxlog</></>
+ with option <option>-n</> output current and potentially changed
+ values (Rajeev Rastogi)
</para>
</listitem>
@@ -8985,8 +8986,9 @@ Branch: REL9_4_STABLE [c2b06ab17] 2015-01-30 22:45:58 -0500
<listitem>
<para>
- Allow <xref linkend="pgxlogdump"> to report a live log stream
- with <option>--follow</> (Heikki Linnakangas)
+ Allow <link linkend="pgwaldump"><application>pg_xlogdump</></>
+ to report a live log stream with <option>--follow</>
+ (Heikki Linnakangas)
</para>
</listitem>
diff --git a/doc/src/sgml/release-9.5.sgml b/doc/src/sgml/release-9.5.sgml
index abc0337..73469af 100644
--- a/doc/src/sgml/release-9.5.sgml
+++ b/doc/src/sgml/release-9.5.sgml
@@ -5603,7 +5603,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list.
linkend="pgarchivecleanup"><application>pg_archivecleanup</></>,
<link linkend="pgtestfsync"><application>pg_test_fsync</></>,
<link linkend="pgtesttiming"><application>pg_test_timing</></>,
- and <link linkend="pgxlogdump"><application>pg_xlogdump</></>
+ and <link linkend="pgwaldump"><application>pg_xlogdump</></>
from <filename>contrib</> to <filename>src/bin</> (Peter Eisentraut)
</para>
@@ -5630,7 +5630,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list.
-->
<para>
Allow <link
- linkend="app-pgreceivexlog"><application>pg_receivexlog</></>
+ linkend="app-pgreceivewal"><application>pg_receivexlog</></>
to manage physical replication slots (Michael Paquier)
</para>
@@ -5646,7 +5646,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list.
-->
<para>
Allow <link
- linkend="app-pgreceivexlog"><application>pg_receivexlog</></>
+ linkend="app-pgreceivewal"><application>pg_receivexlog</></>
to synchronously flush <acronym>WAL</> to storage using new
<option>--synchronous</> option (Furuya Osamu, Fujii Masao)
</para>
@@ -5706,7 +5706,7 @@ Add GUC and storage parameter to set the maximum size of GIN pending list.
2014-09-19 [bdd5726] Andres..: Add the capability to display summary statistic..
-->
<para>
- Add <link linkend="pgxlogdump"><application>pg_xlogdump</></> option
+ Add <link linkend="pgwaldump"><application>pg_xlogdump</></> option
<option>--stats</> to display summary statistics (Abhijit Menon-Sen)
</para>
</listitem>
diff --git a/src/backend/access/rmgrdesc/xactdesc.c b/src/backend/access/rmgrdesc/xactdesc.c
index c91ca03..735f8c5 100644
--- a/src/backend/access/rmgrdesc/xactdesc.c
+++ b/src/backend/access/rmgrdesc/xactdesc.c
@@ -26,7 +26,7 @@
* understand format.
*
* This routines are in xactdesc.c because they're accessed in backend (when
- * replaying WAL) and frontend (pg_xlogdump) code. This file is the only xact
+ * replaying WAL) and frontend (pg_waldump) code. This file is the only xact
* specific one shared between both. They're complicated enough that
* duplication would be bothersome.
*/
diff --git a/src/backend/access/transam/varsup.c b/src/backend/access/transam/varsup.c
index fc084c5..42fc351 100644
--- a/src/backend/access/transam/varsup.c
+++ b/src/backend/access/transam/varsup.c
@@ -399,7 +399,7 @@ SetTransactionIdLimit(TransactionId oldest_datfrozenxid, Oid oldest_datoid)
*
* We primarily check whether oldestXidDB is valid. The cases we have in
* mind are that that database was dropped, or the field was reset to zero
- * by pg_resetxlog. In either case we should force recalculation of the
+ * by pg_resetwal. In either case we should force recalculation of the
* wrap limit. Also do it if oldestXid is old enough to be forcing
* autovacuums or other actions; this ensures we update our state as soon
* as possible once extra overhead is being incurred.
diff --git a/src/backend/access/transam/xlogutils.c b/src/backend/access/transam/xlogutils.c
index 0de2419..672d7d1 100644
--- a/src/backend/access/transam/xlogutils.c
+++ b/src/backend/access/transam/xlogutils.c
@@ -646,7 +646,7 @@ XLogTruncateRelation(RelFileNode rnode, ForkNumber forkNum,
* always be one descriptor left open until the process ends, but never
* more than one.
*
- * XXX This is very similar to pg_xlogdump's XLogDumpXLogRead and to XLogRead
+ * XXX This is very similar to pg_waldump's XLogDumpXLogRead and to XLogRead
* in walsender.c but for small differences (such as lack of elog() in
* frontend). Probably these should be merged at some point.
*/
diff --git a/src/backend/replication/logical/snapbuild.c b/src/backend/replication/logical/snapbuild.c
index 1e02aa9..11966ea 100644
--- a/src/backend/replication/logical/snapbuild.c
+++ b/src/backend/replication/logical/snapbuild.c
@@ -1473,7 +1473,7 @@ SnapBuildSerialize(SnapBuild *builder, XLogRecPtr lsn)
/*
* We identify snapshots by the LSN they are valid for. We don't need to
* include timelines in the name as each LSN maps to exactly one timeline
- * unless the user used pg_resetxlog or similar. If a user did so, there's
+ * unless the user used pg_resetwal or similar. If a user did so, there's
* no hope continuing to decode anyway.
*/
sprintf(path, "pg_logical/snapshots/%X-%X.snap",
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 5909b7d..1d3b351 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -2512,7 +2512,7 @@ WalSndDone(WalSndSendDataCallback send_data)
/*
* To figure out whether all WAL has successfully been replicated, check
- * flush location if valid, write otherwise. Tools like pg_receivexlog
+ * flush location if valid, write otherwise. Tools like pg_receivewal
* will usually (unless in synchronous mode) return an invalid flush
* location.
*/
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 74ca4e7..f7da90f 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -2633,7 +2633,7 @@ static struct config_int ConfigureNamesInt[] =
NULL
},
&autovacuum_freeze_max_age,
- /* see pg_resetxlog if you change the upper-limit value */
+ /* see pg_resetwal if you change the upper-limit value */
200000000, 100000, 2000000000,
NULL, NULL, NULL
},
diff --git a/src/bin/Makefile b/src/bin/Makefile
index e0a5d92..bc96f37 100644
--- a/src/bin/Makefile
+++ b/src/bin/Makefile
@@ -21,12 +21,12 @@ SUBDIRS = \
pg_controldata \
pg_ctl \
pg_dump \
- pg_resetxlog \
+ pg_resetwal \
pg_rewind \
pg_test_fsync \
pg_test_timing \
pg_upgrade \
- pg_xlogdump \
+ pg_waldump \
pgbench \
psql \
scripts
diff --git a/src/bin/pg_basebackup/.gitignore b/src/bin/pg_basebackup/.gitignore
index 36a2f12..26048bd 100644
--- a/src/bin/pg_basebackup/.gitignore
+++ b/src/bin/pg_basebackup/.gitignore
@@ -1,5 +1,5 @@
/pg_basebackup
-/pg_receivexlog
+/pg_receivewal
/pg_recvlogical
/tmp_check/
diff --git a/src/bin/pg_basebackup/Makefile b/src/bin/pg_basebackup/Makefile
index a6c3074..f0c3be8 100644
--- a/src/bin/pg_basebackup/Makefile
+++ b/src/bin/pg_basebackup/Makefile
@@ -9,7 +9,7 @@
#
#-------------------------------------------------------------------------
-PGFILEDESC = "pg_basebackup/pg_receivexlog/pg_recvlogical - streaming WAL and backup receivers"
+PGFILEDESC = "pg_basebackup/pg_receivewal/pg_recvlogical - streaming WAL and backup receivers"
PGAPPICON=win32
EXTRA_INSTALL=contrib/test_decoding
@@ -23,20 +23,20 @@ LDFLAGS += -L$(top_builddir)/src/fe_utils -lpgfeutils -lpq
OBJS=receivelog.o streamutil.o walmethods.o $(WIN32RES)
-all: pg_basebackup pg_receivexlog pg_recvlogical
+all: pg_basebackup pg_receivewal pg_recvlogical
pg_basebackup: pg_basebackup.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
$(CC) $(CFLAGS) pg_basebackup.o $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
-pg_receivexlog: pg_receivexlog.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
- $(CC) $(CFLAGS) pg_receivexlog.o $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+pg_receivewal: pg_receivewal.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
+ $(CC) $(CFLAGS) pg_receivewal.o $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
pg_recvlogical: pg_recvlogical.o $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
$(CC) $(CFLAGS) pg_recvlogical.o $(OBJS) $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
install: all installdirs
$(INSTALL_PROGRAM) pg_basebackup$(X) '$(DESTDIR)$(bindir)/pg_basebackup$(X)'
- $(INSTALL_PROGRAM) pg_receivexlog$(X) '$(DESTDIR)$(bindir)/pg_receivexlog$(X)'
+ $(INSTALL_PROGRAM) pg_receivewal$(X) '$(DESTDIR)$(bindir)/pg_receivewal$(X)'
$(INSTALL_PROGRAM) pg_recvlogical$(X) '$(DESTDIR)$(bindir)/pg_recvlogical$(X)'
installdirs:
@@ -44,12 +44,12 @@ installdirs:
uninstall:
rm -f '$(DESTDIR)$(bindir)/pg_basebackup$(X)'
- rm -f '$(DESTDIR)$(bindir)/pg_receivexlog$(X)'
+ rm -f '$(DESTDIR)$(bindir)/pg_receivewal$(X)'
rm -f '$(DESTDIR)$(bindir)/pg_recvlogical$(X)'
clean distclean maintainer-clean:
- rm -f pg_basebackup$(X) pg_receivexlog$(X) pg_recvlogical$(X) \
- pg_basebackup.o pg_receivexlog.o pg_recvlogical.o \
+ rm -f pg_basebackup$(X) pg_receivewal$(X) pg_recvlogical$(X) \
+ pg_basebackup.o pg_receivewal.o pg_recvlogical.o \
$(OBJS)
rm -rf tmp_check
diff --git a/src/bin/pg_basebackup/nls.mk b/src/bin/pg_basebackup/nls.mk
index dba43b8..2a6de08 100644
--- a/src/bin/pg_basebackup/nls.mk
+++ b/src/bin/pg_basebackup/nls.mk
@@ -1,5 +1,5 @@
# src/bin/pg_basebackup/nls.mk
CATALOG_NAME = pg_basebackup
AVAIL_LANGUAGES = de es fr it ko pl pt_BR ru zh_CN
-GETTEXT_FILES = pg_basebackup.c pg_receivexlog.c pg_recvlogical.c receivelog.c streamutil.c ../../common/fe_memutils.c ../../common/file_utils.c
+GETTEXT_FILES = pg_basebackup.c pg_receivewal.c pg_recvlogical.c receivelog.c streamutil.c ../../common/fe_memutils.c ../../common/file_utils.c
GETTEXT_TRIGGERS = simple_prompt
diff --git a/src/bin/pg_basebackup/pg_receivewal.c b/src/bin/pg_basebackup/pg_receivewal.c
new file mode 100644
index 0000000..e8d0e89
--- /dev/null
+++ b/src/bin/pg_basebackup/pg_receivewal.c
@@ -0,0 +1,738 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_receivewal.c - receive streaming transaction log data and write it
+ * to a local file.
+ *
+ * Author: Magnus Hagander <magnus@hagander.net>
+ *
+ * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_basebackup/pg_receivewal.c
+ *-------------------------------------------------------------------------
+ */
+
+#include "postgres_fe.h"
+
+#include <dirent.h>
+#include <signal.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include "libpq-fe.h"
+#include "access/xlog_internal.h"
+#include "getopt_long.h"
+
+#include "receivelog.h"
+#include "streamutil.h"
+
+
+/* Time to sleep between reconnection attempts */
+#define RECONNECT_SLEEP_TIME 5
+
+/* Global options */
+static char *basedir = NULL;
+static int verbose = 0;
+static int compresslevel = 0;
+static int noloop = 0;
+static int standby_message_timeout = 10 * 1000; /* 10 sec = default */
+static volatile bool time_to_abort = false;
+static bool do_create_slot = false;
+static bool slot_exists_ok = false;
+static bool do_drop_slot = false;
+static bool synchronous = false;
+static char *replication_slot = NULL;
+
+
+static void usage(void);
+static DIR *get_destination_dir(char *dest_folder);
+static void close_destination_dir(DIR *dest_dir, char *dest_folder);
+static XLogRecPtr FindStreamingStart(uint32 *tli);
+static void StreamLog(void);
+static bool stop_streaming(XLogRecPtr segendpos, uint32 timeline,
+ bool segment_finished);
+
+#define disconnect_and_exit(code) \
+ { \
+ if (conn != NULL) PQfinish(conn); \
+ exit(code); \
+ }
+
+/* Routines to evaluate segment file format */
+#define IsCompressXLogFileName(fname) \
+ (strlen(fname) == XLOG_FNAME_LEN + strlen(".gz") && \
+ strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN && \
+ strcmp((fname) + XLOG_FNAME_LEN, ".gz") == 0)
+#define IsPartialCompressXLogFileName(fname) \
+ (strlen(fname) == XLOG_FNAME_LEN + strlen(".gz.partial") && \
+ strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN && \
+ strcmp((fname) + XLOG_FNAME_LEN, ".gz.partial") == 0)
+
+static void
+usage(void)
+{
+ printf(_("%s receives PostgreSQL streaming transaction logs.\n\n"),
+ progname);
+ printf(_("Usage:\n"));
+ printf(_(" %s [OPTION]...\n"), progname);
+ printf(_("\nOptions:\n"));
+ printf(_(" -D, --directory=DIR receive transaction log files into this directory\n"));
+ printf(_(" --if-not-exists do not error if slot already exists when creating a slot\n"));
+ printf(_(" -n, --no-loop do not loop on connection lost\n"));
+ printf(_(" -s, --status-interval=SECS\n"
+ " time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000));
+ printf(_(" -S, --slot=SLOTNAME replication slot to use\n"));
+ printf(_(" --synchronous flush transaction log immediately after writing\n"));
+ printf(_(" -v, --verbose output verbose messages\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -Z, --compress=0-9 compress logs with given compression level\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
+ printf(_("\nConnection options:\n"));
+ printf(_(" -d, --dbname=CONNSTR connection string\n"));
+ printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
+ printf(_(" -p, --port=PORT database server port number\n"));
+ printf(_(" -U, --username=NAME connect as specified database user\n"));
+ printf(_(" -w, --no-password never prompt for password\n"));
+ printf(_(" -W, --password force password prompt (should happen automatically)\n"));
+ printf(_("\nOptional actions:\n"));
+ printf(_(" --create-slot create a new replication slot (for the slot's name see --slot)\n"));
+ printf(_(" --drop-slot drop the replication slot (for the slot's name see --slot)\n"));
+ printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
+}
+
+static bool
+stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished)
+{
+ static uint32 prevtimeline = 0;
+ static XLogRecPtr prevpos = InvalidXLogRecPtr;
+
+ /* we assume that we get called once at the end of each segment */
+ if (verbose && segment_finished)
+ fprintf(stderr, _("%s: finished segment at %X/%X (timeline %u)\n"),
+ progname, (uint32) (xlogpos >> 32), (uint32) xlogpos,
+ timeline);
+
+ /*
+ * Note that we report the previous, not current, position here. After a
+ * timeline switch, xlogpos points to the beginning of the segment because
+ * that's where we always begin streaming. Reporting the end of previous
+ * timeline isn't totally accurate, because the next timeline can begin
+ * slightly before the end of the WAL that we received on the previous
+ * timeline, but it's close enough for reporting purposes.
+ */
+ if (prevtimeline != 0 && prevtimeline != timeline)
+ fprintf(stderr, _("%s: switched to timeline %u at %X/%X\n"),
+ progname, timeline,
+ (uint32) (prevpos >> 32), (uint32) prevpos);
+
+ prevtimeline = timeline;
+ prevpos = xlogpos;
+
+ if (time_to_abort)
+ {
+ fprintf(stderr, _("%s: received interrupt signal, exiting\n"),
+ progname);
+ return true;
+ }
+ return false;
+}
+
+
+/*
+ * Get destination directory.
+ */
+static DIR *
+get_destination_dir(char *dest_folder)
+{
+ DIR *dir;
+
+ Assert(dest_folder != NULL);
+ dir = opendir(dest_folder);
+ if (dir == NULL)
+ {
+ fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
+ progname, basedir, strerror(errno));
+ disconnect_and_exit(1);
+ }
+
+ return dir;
+}
+
+
+/*
+ * Close existing directory.
+ */
+static void
+close_destination_dir(DIR *dest_dir, char *dest_folder)
+{
+ Assert(dest_dir != NULL && dest_folder != NULL);
+ if (closedir(dest_dir))
+ {
+ fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
+ progname, dest_folder, strerror(errno));
+ disconnect_and_exit(1);
+ }
+}
+
+
+/*
+ * Determine starting location for streaming, based on any existing xlog
+ * segments in the directory. We start at the end of the last one that is
+ * complete (size matches XLogSegSize), on the timeline with highest ID.
+ *
+ * If there are no WAL files in the directory, returns InvalidXLogRecPtr.
+ */
+static XLogRecPtr
+FindStreamingStart(uint32 *tli)
+{
+ DIR *dir;
+ struct dirent *dirent;
+ XLogSegNo high_segno = 0;
+ uint32 high_tli = 0;
+ bool high_ispartial = false;
+
+ dir = get_destination_dir(basedir);
+
+ while (errno = 0, (dirent = readdir(dir)) != NULL)
+ {
+ uint32 tli;
+ XLogSegNo segno;
+ bool ispartial;
+ bool iscompress;
+
+ /*
+ * Check if the filename looks like an xlog file, or a .partial file.
+ */
+ if (IsXLogFileName(dirent->d_name))
+ {
+ ispartial = false;
+ iscompress = false;
+ }
+ else if (IsPartialXLogFileName(dirent->d_name))
+ {
+ ispartial = true;
+ iscompress = false;
+ }
+ else if (IsCompressXLogFileName(dirent->d_name))
+ {
+ ispartial = false;
+ iscompress = true;
+ }
+ else if (IsPartialCompressXLogFileName(dirent->d_name))
+ {
+ ispartial = true;
+ iscompress = true;
+ }
+ else
+ continue;
+
+ /*
+ * Looks like an xlog file. Parse its position.
+ */
+ XLogFromFileName(dirent->d_name, &tli, &segno);
+
+ /*
+ * Check that the segment has the right size, if it's supposed to be
+ * completed. For non-compressed segments just check the on-disk size
+ * and see if it matches a completed segment.
+ * For compressed segments, look at the last 4 bytes of the compressed
+ * file, which is where the uncompressed size is located for gz files
+ * with a size lower than 4GB, and then compare it to the size of a
+ * completed segment. The 4 last bytes correspond to the ISIZE member
+ * according to http://www.zlib.org/rfc-gzip.html.
+ */
+ if (!ispartial && !iscompress)
+ {
+ struct stat statbuf;
+ char fullpath[MAXPGPATH];
+
+ snprintf(fullpath, sizeof(fullpath), "%s/%s", basedir, dirent->d_name);
+ if (stat(fullpath, &statbuf) != 0)
+ {
+ fprintf(stderr, _("%s: could not stat file \"%s\": %s\n"),
+ progname, fullpath, strerror(errno));
+ disconnect_and_exit(1);
+ }
+
+ if (statbuf.st_size != XLOG_SEG_SIZE)
+ {
+ fprintf(stderr,
+ _("%s: segment file \"%s\" has incorrect size %d, skipping\n"),
+ progname, dirent->d_name, (int) statbuf.st_size);
+ continue;
+ }
+ }
+ else if (!ispartial && iscompress)
+ {
+ int fd;
+ char buf[4];
+ int bytes_out;
+ char fullpath[MAXPGPATH];
+
+ snprintf(fullpath, sizeof(fullpath), "%s/%s", basedir, dirent->d_name);
+
+ fd = open(fullpath, O_RDONLY | PG_BINARY);
+ if (fd < 0)
+ {
+ fprintf(stderr, _("%s: could not open compressed file \"%s\": %s\n"),
+ progname, fullpath, strerror(errno));
+ disconnect_and_exit(1);
+ }
+ if (lseek(fd, (off_t)(-4), SEEK_END) < 0)
+ {
+ fprintf(stderr, _("%s: could not seek compressed file \"%s\": %s\n"),
+ progname, fullpath, strerror(errno));
+ disconnect_and_exit(1);
+ }
+ if (read(fd, (char *) buf, sizeof(buf)) != sizeof(buf))
+ {
+ fprintf(stderr, _("%s: could not read compressed file \"%s\": %s\n"),
+ progname, fullpath, strerror(errno));
+ disconnect_and_exit(1);
+ }
+
+ close(fd);
+ bytes_out = (buf[3] << 24) | (buf[2] << 16) |
+ (buf[1] << 8) | buf[0];
+
+ if (bytes_out != XLOG_SEG_SIZE)
+ {
+ fprintf(stderr,
+ _("%s: compressed segment file \"%s\" has incorrect uncompressed size %d, skipping\n"),
+ progname, dirent->d_name, bytes_out);
+ continue;
+ }
+ }
+
+ /* Looks like a valid segment. Remember that we saw it. */
+ if ((segno > high_segno) ||
+ (segno == high_segno && tli > high_tli) ||
+ (segno == high_segno && tli == high_tli && high_ispartial && !ispartial))
+ {
+ high_segno = segno;
+ high_tli = tli;
+ high_ispartial = ispartial;
+ }
+ }
+
+ if (errno)
+ {
+ fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
+ progname, basedir, strerror(errno));
+ disconnect_and_exit(1);
+ }
+
+ close_destination_dir(dir, basedir);
+
+ if (high_segno > 0)
+ {
+ XLogRecPtr high_ptr;
+
+ /*
+ * Move the starting pointer to the start of the next segment, if the
+ * highest one we saw was completed. Otherwise start streaming from
+ * the beginning of the .partial segment.
+ */
+ if (!high_ispartial)
+ high_segno++;
+
+ XLogSegNoOffsetToRecPtr(high_segno, 0, high_ptr);
+
+ *tli = high_tli;
+ return high_ptr;
+ }
+ else
+ return InvalidXLogRecPtr;
+}
+
+/*
+ * Start the log streaming
+ */
+static void
+StreamLog(void)
+{
+ XLogRecPtr serverpos;
+ TimeLineID servertli;
+ StreamCtl stream;
+
+ MemSet(&stream, 0, sizeof(stream));
+
+ /*
+ * Connect in replication mode to the server
+ */
+ if (conn == NULL)
+ conn = GetConnection();
+ if (!conn)
+ /* Error message already written in GetConnection() */
+ return;
+
+ if (!CheckServerVersionForStreaming(conn))
+ {
+ /*
+ * Error message already written in CheckServerVersionForStreaming().
+ * There's no hope of recovering from a version mismatch, so don't
+ * retry.
+ */
+ disconnect_and_exit(1);
+ }
+
+ /*
+ * Identify server, obtaining start LSN position and current timeline ID
+ * at the same time, necessary if not valid data can be found in the
+ * existing output directory.
+ */
+ if (!RunIdentifySystem(conn, NULL, &servertli, &serverpos, NULL))
+ disconnect_and_exit(1);
+
+ /*
+ * Figure out where to start streaming.
+ */
+ stream.startpos = FindStreamingStart(&stream.timeline);
+ if (stream.startpos == InvalidXLogRecPtr)
+ {
+ stream.startpos = serverpos;
+ stream.timeline = servertli;
+ }
+
+ /*
+ * Always start streaming at the beginning of a segment
+ */
+ stream.startpos -= stream.startpos % XLOG_SEG_SIZE;
+
+ /*
+ * Start the replication
+ */
+ if (verbose)
+ fprintf(stderr,
+ _("%s: starting log streaming at %X/%X (timeline %u)\n"),
+ progname, (uint32) (stream.startpos >> 32), (uint32) stream.startpos,
+ stream.timeline);
+
+ stream.stream_stop = stop_streaming;
+ stream.standby_message_timeout = standby_message_timeout;
+ stream.synchronous = synchronous;
+ stream.do_sync = true;
+ stream.mark_done = false;
+ stream.walmethod = CreateWalDirectoryMethod(basedir, compresslevel,
+ stream.do_sync);
+ stream.partial_suffix = ".partial";
+ stream.replication_slot = replication_slot;
+ stream.temp_slot = false;
+
+ ReceiveXlogStream(conn, &stream);
+
+ if (!stream.walmethod->finish())
+ {
+ fprintf(stderr,
+ _("%s: could not finish writing WAL files: %s\n"),
+ progname, strerror(errno));
+ return;
+ }
+
+ PQfinish(conn);
+
+ FreeWalDirectoryMethod();
+ pg_free(stream.walmethod);
+
+ conn = NULL;
+}
+
+/*
+ * When sigint is called, just tell the system to exit at the next possible
+ * moment.
+ */
+#ifndef WIN32
+
+static void
+sigint_handler(int signum)
+{
+ time_to_abort = true;
+}
+#endif
+
+int
+main(int argc, char **argv)
+{
+ static struct option long_options[] = {
+ {"help", no_argument, NULL, '?'},
+ {"version", no_argument, NULL, 'V'},
+ {"directory", required_argument, NULL, 'D'},
+ {"dbname", required_argument, NULL, 'd'},
+ {"host", required_argument, NULL, 'h'},
+ {"port", required_argument, NULL, 'p'},
+ {"username", required_argument, NULL, 'U'},
+ {"no-loop", no_argument, NULL, 'n'},
+ {"no-password", no_argument, NULL, 'w'},
+ {"password", no_argument, NULL, 'W'},
+ {"status-interval", required_argument, NULL, 's'},
+ {"slot", required_argument, NULL, 'S'},
+ {"verbose", no_argument, NULL, 'v'},
+ {"compress", required_argument, NULL, 'Z'},
+/* action */
+ {"create-slot", no_argument, NULL, 1},
+ {"drop-slot", no_argument, NULL, 2},
+ {"if-not-exists", no_argument, NULL, 3},
+ {"synchronous", no_argument, NULL, 4},
+ {NULL, 0, NULL, 0}
+ };
+
+ int c;
+ int option_index;
+ char *db_name;
+
+ progname = get_progname(argv[0]);
+ set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_basebackup"));
+
+ if (argc > 1)
+ {
+ if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
+ {
+ usage();
+ exit(0);
+ }
+ else if (strcmp(argv[1], "-V") == 0 ||
+ strcmp(argv[1], "--version") == 0)
+ {
+ puts("pg_receivewal (PostgreSQL) " PG_VERSION);
+ exit(0);
+ }
+ }
+
+ while ((c = getopt_long(argc, argv, "D:d:h:p:U:s:S:nwWvZ:",
+ long_options, &option_index)) != -1)
+ {
+ switch (c)
+ {
+ case 'D':
+ basedir = pg_strdup(optarg);
+ break;
+ case 'd':
+ connection_string = pg_strdup(optarg);
+ break;
+ case 'h':
+ dbhost = pg_strdup(optarg);
+ break;
+ case 'p':
+ if (atoi(optarg) <= 0)
+ {
+ fprintf(stderr, _("%s: invalid port number \"%s\"\n"),
+ progname, optarg);
+ exit(1);
+ }
+ dbport = pg_strdup(optarg);
+ break;
+ case 'U':
+ dbuser = pg_strdup(optarg);
+ break;
+ case 'w':
+ dbgetpassword = -1;
+ break;
+ case 'W':
+ dbgetpassword = 1;
+ break;
+ case 's':
+ standby_message_timeout = atoi(optarg) * 1000;
+ if (standby_message_timeout < 0)
+ {
+ fprintf(stderr, _("%s: invalid status interval \"%s\"\n"),
+ progname, optarg);
+ exit(1);
+ }
+ break;
+ case 'S':
+ replication_slot = pg_strdup(optarg);
+ break;
+ case 'n':
+ noloop = 1;
+ break;
+ case 'v':
+ verbose++;
+ break;
+ case 'Z':
+ compresslevel = atoi(optarg);
+ if (compresslevel < 0 || compresslevel > 9)
+ {
+ fprintf(stderr, _("%s: invalid compression level \"%s\"\n"),
+ progname, optarg);
+ exit(1);
+ }
+ break;
+/* action */
+ case 1:
+ do_create_slot = true;
+ break;
+ case 2:
+ do_drop_slot = true;
+ break;
+ case 3:
+ slot_exists_ok = true;
+ break;
+ case 4:
+ synchronous = true;
+ break;
+ default:
+
+ /*
+ * getopt_long already emitted a complaint
+ */
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+ }
+
+ /*
+ * Any non-option arguments?
+ */
+ if (optind < argc)
+ {
+ fprintf(stderr,
+ _("%s: too many command-line arguments (first is \"%s\")\n"),
+ progname, argv[optind]);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (do_drop_slot && do_create_slot)
+ {
+ fprintf(stderr, _("%s: cannot use --create-slot together with --drop-slot\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (replication_slot == NULL && (do_drop_slot || do_create_slot))
+ {
+ /* translator: second %s is an option name */
+ fprintf(stderr, _("%s: %s needs a slot to be specified using --slot\n"), progname,
+ do_drop_slot ? "--drop-slot" : "--create-slot");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ /*
+ * Required arguments
+ */
+ if (basedir == NULL && !do_drop_slot && !do_create_slot)
+ {
+ fprintf(stderr, _("%s: no target directory specified\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+#ifndef HAVE_LIBZ
+ if (compresslevel != 0)
+ {
+ fprintf(stderr,
+ _("%s: this build does not support compression\n"),
+ progname);
+ exit(1);
+ }
+#endif
+
+ /*
+ * Check existence of destination folder.
+ */
+ if (!do_drop_slot && !do_create_slot)
+ {
+ DIR *dir = get_destination_dir(basedir);
+
+ close_destination_dir(dir, basedir);
+ }
+
+#ifndef WIN32
+ pqsignal(SIGINT, sigint_handler);
+#endif
+
+ /*
+ * Obtain a connection before doing anything.
+ */
+ conn = GetConnection();
+ if (!conn)
+ /* error message already written in GetConnection() */
+ exit(1);
+
+ /*
+ * Run IDENTIFY_SYSTEM to make sure we've successfully have established a
+ * replication connection and haven't connected using a database specific
+ * connection.
+ */
+ if (!RunIdentifySystem(conn, NULL, NULL, NULL, &db_name))
+ disconnect_and_exit(1);
+
+ /*
+ * Check that there is a database associated with connection, none should
+ * be defined in this context.
+ */
+ if (db_name)
+ {
+ fprintf(stderr,
+ _("%s: replication connection using slot \"%s\" is unexpectedly database specific\n"),
+ progname, replication_slot);
+ disconnect_and_exit(1);
+ }
+
+ /*
+ * Drop a replication slot.
+ */
+ if (do_drop_slot)
+ {
+ if (verbose)
+ fprintf(stderr,
+ _("%s: dropping replication slot \"%s\"\n"),
+ progname, replication_slot);
+
+ if (!DropReplicationSlot(conn, replication_slot))
+ disconnect_and_exit(1);
+ disconnect_and_exit(0);
+ }
+
+ /* Create a replication slot */
+ if (do_create_slot)
+ {
+ if (verbose)
+ fprintf(stderr,
+ _("%s: creating replication slot \"%s\"\n"),
+ progname, replication_slot);
+
+ if (!CreateReplicationSlot(conn, replication_slot, NULL, true,
+ slot_exists_ok))
+ disconnect_and_exit(1);
+ disconnect_and_exit(0);
+ }
+
+ /*
+ * Don't close the connection here so that subsequent StreamLog() can
+ * reuse it.
+ */
+
+ while (true)
+ {
+ StreamLog();
+ if (time_to_abort)
+ {
+ /*
+ * We've been Ctrl-C'ed. That's not an error, so exit without an
+ * errorcode.
+ */
+ exit(0);
+ }
+ else if (noloop)
+ {
+ fprintf(stderr, _("%s: disconnected\n"), progname);
+ exit(1);
+ }
+ else
+ {
+ fprintf(stderr,
+ /* translator: check source for value for %d */
+ _("%s: disconnected; waiting %d seconds to try again\n"),
+ progname, RECONNECT_SLEEP_TIME);
+ pg_usleep(RECONNECT_SLEEP_TIME * 1000000);
+ }
+ }
+}
diff --git a/src/bin/pg_basebackup/pg_receivexlog.c b/src/bin/pg_basebackup/pg_receivexlog.c
deleted file mode 100644
index 135e207..0000000
--- a/src/bin/pg_basebackup/pg_receivexlog.c
+++ /dev/null
@@ -1,738 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_receivexlog.c - receive streaming transaction log data and write it
- * to a local file.
- *
- * Author: Magnus Hagander <magnus@hagander.net>
- *
- * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- * src/bin/pg_basebackup/pg_receivexlog.c
- *-------------------------------------------------------------------------
- */
-
-#include "postgres_fe.h"
-
-#include <dirent.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "libpq-fe.h"
-#include "access/xlog_internal.h"
-#include "getopt_long.h"
-
-#include "receivelog.h"
-#include "streamutil.h"
-
-
-/* Time to sleep between reconnection attempts */
-#define RECONNECT_SLEEP_TIME 5
-
-/* Global options */
-static char *basedir = NULL;
-static int verbose = 0;
-static int compresslevel = 0;
-static int noloop = 0;
-static int standby_message_timeout = 10 * 1000; /* 10 sec = default */
-static volatile bool time_to_abort = false;
-static bool do_create_slot = false;
-static bool slot_exists_ok = false;
-static bool do_drop_slot = false;
-static bool synchronous = false;
-static char *replication_slot = NULL;
-
-
-static void usage(void);
-static DIR *get_destination_dir(char *dest_folder);
-static void close_destination_dir(DIR *dest_dir, char *dest_folder);
-static XLogRecPtr FindStreamingStart(uint32 *tli);
-static void StreamLog(void);
-static bool stop_streaming(XLogRecPtr segendpos, uint32 timeline,
- bool segment_finished);
-
-#define disconnect_and_exit(code) \
- { \
- if (conn != NULL) PQfinish(conn); \
- exit(code); \
- }
-
-/* Routines to evaluate segment file format */
-#define IsCompressXLogFileName(fname) \
- (strlen(fname) == XLOG_FNAME_LEN + strlen(".gz") && \
- strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN && \
- strcmp((fname) + XLOG_FNAME_LEN, ".gz") == 0)
-#define IsPartialCompressXLogFileName(fname) \
- (strlen(fname) == XLOG_FNAME_LEN + strlen(".gz.partial") && \
- strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN && \
- strcmp((fname) + XLOG_FNAME_LEN, ".gz.partial") == 0)
-
-static void
-usage(void)
-{
- printf(_("%s receives PostgreSQL streaming transaction logs.\n\n"),
- progname);
- printf(_("Usage:\n"));
- printf(_(" %s [OPTION]...\n"), progname);
- printf(_("\nOptions:\n"));
- printf(_(" -D, --directory=DIR receive transaction log files into this directory\n"));
- printf(_(" --if-not-exists do not error if slot already exists when creating a slot\n"));
- printf(_(" -n, --no-loop do not loop on connection lost\n"));
- printf(_(" -s, --status-interval=SECS\n"
- " time between status packets sent to server (default: %d)\n"), (standby_message_timeout / 1000));
- printf(_(" -S, --slot=SLOTNAME replication slot to use\n"));
- printf(_(" --synchronous flush transaction log immediately after writing\n"));
- printf(_(" -v, --verbose output verbose messages\n"));
- printf(_(" -V, --version output version information, then exit\n"));
- printf(_(" -Z, --compress=0-9 compress logs with given compression level\n"));
- printf(_(" -?, --help show this help, then exit\n"));
- printf(_("\nConnection options:\n"));
- printf(_(" -d, --dbname=CONNSTR connection string\n"));
- printf(_(" -h, --host=HOSTNAME database server host or socket directory\n"));
- printf(_(" -p, --port=PORT database server port number\n"));
- printf(_(" -U, --username=NAME connect as specified database user\n"));
- printf(_(" -w, --no-password never prompt for password\n"));
- printf(_(" -W, --password force password prompt (should happen automatically)\n"));
- printf(_("\nOptional actions:\n"));
- printf(_(" --create-slot create a new replication slot (for the slot's name see --slot)\n"));
- printf(_(" --drop-slot drop the replication slot (for the slot's name see --slot)\n"));
- printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
-}
-
-static bool
-stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished)
-{
- static uint32 prevtimeline = 0;
- static XLogRecPtr prevpos = InvalidXLogRecPtr;
-
- /* we assume that we get called once at the end of each segment */
- if (verbose && segment_finished)
- fprintf(stderr, _("%s: finished segment at %X/%X (timeline %u)\n"),
- progname, (uint32) (xlogpos >> 32), (uint32) xlogpos,
- timeline);
-
- /*
- * Note that we report the previous, not current, position here. After a
- * timeline switch, xlogpos points to the beginning of the segment because
- * that's where we always begin streaming. Reporting the end of previous
- * timeline isn't totally accurate, because the next timeline can begin
- * slightly before the end of the WAL that we received on the previous
- * timeline, but it's close enough for reporting purposes.
- */
- if (prevtimeline != 0 && prevtimeline != timeline)
- fprintf(stderr, _("%s: switched to timeline %u at %X/%X\n"),
- progname, timeline,
- (uint32) (prevpos >> 32), (uint32) prevpos);
-
- prevtimeline = timeline;
- prevpos = xlogpos;
-
- if (time_to_abort)
- {
- fprintf(stderr, _("%s: received interrupt signal, exiting\n"),
- progname);
- return true;
- }
- return false;
-}
-
-
-/*
- * Get destination directory.
- */
-static DIR *
-get_destination_dir(char *dest_folder)
-{
- DIR *dir;
-
- Assert(dest_folder != NULL);
- dir = opendir(dest_folder);
- if (dir == NULL)
- {
- fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
- progname, basedir, strerror(errno));
- disconnect_and_exit(1);
- }
-
- return dir;
-}
-
-
-/*
- * Close existing directory.
- */
-static void
-close_destination_dir(DIR *dest_dir, char *dest_folder)
-{
- Assert(dest_dir != NULL && dest_folder != NULL);
- if (closedir(dest_dir))
- {
- fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
- progname, dest_folder, strerror(errno));
- disconnect_and_exit(1);
- }
-}
-
-
-/*
- * Determine starting location for streaming, based on any existing xlog
- * segments in the directory. We start at the end of the last one that is
- * complete (size matches XLogSegSize), on the timeline with highest ID.
- *
- * If there are no WAL files in the directory, returns InvalidXLogRecPtr.
- */
-static XLogRecPtr
-FindStreamingStart(uint32 *tli)
-{
- DIR *dir;
- struct dirent *dirent;
- XLogSegNo high_segno = 0;
- uint32 high_tli = 0;
- bool high_ispartial = false;
-
- dir = get_destination_dir(basedir);
-
- while (errno = 0, (dirent = readdir(dir)) != NULL)
- {
- uint32 tli;
- XLogSegNo segno;
- bool ispartial;
- bool iscompress;
-
- /*
- * Check if the filename looks like an xlog file, or a .partial file.
- */
- if (IsXLogFileName(dirent->d_name))
- {
- ispartial = false;
- iscompress = false;
- }
- else if (IsPartialXLogFileName(dirent->d_name))
- {
- ispartial = true;
- iscompress = false;
- }
- else if (IsCompressXLogFileName(dirent->d_name))
- {
- ispartial = false;
- iscompress = true;
- }
- else if (IsPartialCompressXLogFileName(dirent->d_name))
- {
- ispartial = true;
- iscompress = true;
- }
- else
- continue;
-
- /*
- * Looks like an xlog file. Parse its position.
- */
- XLogFromFileName(dirent->d_name, &tli, &segno);
-
- /*
- * Check that the segment has the right size, if it's supposed to be
- * completed. For non-compressed segments just check the on-disk size
- * and see if it matches a completed segment.
- * For compressed segments, look at the last 4 bytes of the compressed
- * file, which is where the uncompressed size is located for gz files
- * with a size lower than 4GB, and then compare it to the size of a
- * completed segment. The 4 last bytes correspond to the ISIZE member
- * according to http://www.zlib.org/rfc-gzip.html.
- */
- if (!ispartial && !iscompress)
- {
- struct stat statbuf;
- char fullpath[MAXPGPATH];
-
- snprintf(fullpath, sizeof(fullpath), "%s/%s", basedir, dirent->d_name);
- if (stat(fullpath, &statbuf) != 0)
- {
- fprintf(stderr, _("%s: could not stat file \"%s\": %s\n"),
- progname, fullpath, strerror(errno));
- disconnect_and_exit(1);
- }
-
- if (statbuf.st_size != XLOG_SEG_SIZE)
- {
- fprintf(stderr,
- _("%s: segment file \"%s\" has incorrect size %d, skipping\n"),
- progname, dirent->d_name, (int) statbuf.st_size);
- continue;
- }
- }
- else if (!ispartial && iscompress)
- {
- int fd;
- char buf[4];
- int bytes_out;
- char fullpath[MAXPGPATH];
-
- snprintf(fullpath, sizeof(fullpath), "%s/%s", basedir, dirent->d_name);
-
- fd = open(fullpath, O_RDONLY | PG_BINARY);
- if (fd < 0)
- {
- fprintf(stderr, _("%s: could not open compressed file \"%s\": %s\n"),
- progname, fullpath, strerror(errno));
- disconnect_and_exit(1);
- }
- if (lseek(fd, (off_t)(-4), SEEK_END) < 0)
- {
- fprintf(stderr, _("%s: could not seek compressed file \"%s\": %s\n"),
- progname, fullpath, strerror(errno));
- disconnect_and_exit(1);
- }
- if (read(fd, (char *) buf, sizeof(buf)) != sizeof(buf))
- {
- fprintf(stderr, _("%s: could not read compressed file \"%s\": %s\n"),
- progname, fullpath, strerror(errno));
- disconnect_and_exit(1);
- }
-
- close(fd);
- bytes_out = (buf[3] << 24) | (buf[2] << 16) |
- (buf[1] << 8) | buf[0];
-
- if (bytes_out != XLOG_SEG_SIZE)
- {
- fprintf(stderr,
- _("%s: compressed segment file \"%s\" has incorrect uncompressed size %d, skipping\n"),
- progname, dirent->d_name, bytes_out);
- continue;
- }
- }
-
- /* Looks like a valid segment. Remember that we saw it. */
- if ((segno > high_segno) ||
- (segno == high_segno && tli > high_tli) ||
- (segno == high_segno && tli == high_tli && high_ispartial && !ispartial))
- {
- high_segno = segno;
- high_tli = tli;
- high_ispartial = ispartial;
- }
- }
-
- if (errno)
- {
- fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
- progname, basedir, strerror(errno));
- disconnect_and_exit(1);
- }
-
- close_destination_dir(dir, basedir);
-
- if (high_segno > 0)
- {
- XLogRecPtr high_ptr;
-
- /*
- * Move the starting pointer to the start of the next segment, if the
- * highest one we saw was completed. Otherwise start streaming from
- * the beginning of the .partial segment.
- */
- if (!high_ispartial)
- high_segno++;
-
- XLogSegNoOffsetToRecPtr(high_segno, 0, high_ptr);
-
- *tli = high_tli;
- return high_ptr;
- }
- else
- return InvalidXLogRecPtr;
-}
-
-/*
- * Start the log streaming
- */
-static void
-StreamLog(void)
-{
- XLogRecPtr serverpos;
- TimeLineID servertli;
- StreamCtl stream;
-
- MemSet(&stream, 0, sizeof(stream));
-
- /*
- * Connect in replication mode to the server
- */
- if (conn == NULL)
- conn = GetConnection();
- if (!conn)
- /* Error message already written in GetConnection() */
- return;
-
- if (!CheckServerVersionForStreaming(conn))
- {
- /*
- * Error message already written in CheckServerVersionForStreaming().
- * There's no hope of recovering from a version mismatch, so don't
- * retry.
- */
- disconnect_and_exit(1);
- }
-
- /*
- * Identify server, obtaining start LSN position and current timeline ID
- * at the same time, necessary if not valid data can be found in the
- * existing output directory.
- */
- if (!RunIdentifySystem(conn, NULL, &servertli, &serverpos, NULL))
- disconnect_and_exit(1);
-
- /*
- * Figure out where to start streaming.
- */
- stream.startpos = FindStreamingStart(&stream.timeline);
- if (stream.startpos == InvalidXLogRecPtr)
- {
- stream.startpos = serverpos;
- stream.timeline = servertli;
- }
-
- /*
- * Always start streaming at the beginning of a segment
- */
- stream.startpos -= stream.startpos % XLOG_SEG_SIZE;
-
- /*
- * Start the replication
- */
- if (verbose)
- fprintf(stderr,
- _("%s: starting log streaming at %X/%X (timeline %u)\n"),
- progname, (uint32) (stream.startpos >> 32), (uint32) stream.startpos,
- stream.timeline);
-
- stream.stream_stop = stop_streaming;
- stream.standby_message_timeout = standby_message_timeout;
- stream.synchronous = synchronous;
- stream.do_sync = true;
- stream.mark_done = false;
- stream.walmethod = CreateWalDirectoryMethod(basedir, compresslevel,
- stream.do_sync);
- stream.partial_suffix = ".partial";
- stream.replication_slot = replication_slot;
- stream.temp_slot = false;
-
- ReceiveXlogStream(conn, &stream);
-
- if (!stream.walmethod->finish())
- {
- fprintf(stderr,
- _("%s: could not finish writing WAL files: %s\n"),
- progname, strerror(errno));
- return;
- }
-
- PQfinish(conn);
-
- FreeWalDirectoryMethod();
- pg_free(stream.walmethod);
-
- conn = NULL;
-}
-
-/*
- * When sigint is called, just tell the system to exit at the next possible
- * moment.
- */
-#ifndef WIN32
-
-static void
-sigint_handler(int signum)
-{
- time_to_abort = true;
-}
-#endif
-
-int
-main(int argc, char **argv)
-{
- static struct option long_options[] = {
- {"help", no_argument, NULL, '?'},
- {"version", no_argument, NULL, 'V'},
- {"directory", required_argument, NULL, 'D'},
- {"dbname", required_argument, NULL, 'd'},
- {"host", required_argument, NULL, 'h'},
- {"port", required_argument, NULL, 'p'},
- {"username", required_argument, NULL, 'U'},
- {"no-loop", no_argument, NULL, 'n'},
- {"no-password", no_argument, NULL, 'w'},
- {"password", no_argument, NULL, 'W'},
- {"status-interval", required_argument, NULL, 's'},
- {"slot", required_argument, NULL, 'S'},
- {"verbose", no_argument, NULL, 'v'},
- {"compress", required_argument, NULL, 'Z'},
-/* action */
- {"create-slot", no_argument, NULL, 1},
- {"drop-slot", no_argument, NULL, 2},
- {"if-not-exists", no_argument, NULL, 3},
- {"synchronous", no_argument, NULL, 4},
- {NULL, 0, NULL, 0}
- };
-
- int c;
- int option_index;
- char *db_name;
-
- progname = get_progname(argv[0]);
- set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_basebackup"));
-
- if (argc > 1)
- {
- if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
- {
- usage();
- exit(0);
- }
- else if (strcmp(argv[1], "-V") == 0 ||
- strcmp(argv[1], "--version") == 0)
- {
- puts("pg_receivexlog (PostgreSQL) " PG_VERSION);
- exit(0);
- }
- }
-
- while ((c = getopt_long(argc, argv, "D:d:h:p:U:s:S:nwWvZ:",
- long_options, &option_index)) != -1)
- {
- switch (c)
- {
- case 'D':
- basedir = pg_strdup(optarg);
- break;
- case 'd':
- connection_string = pg_strdup(optarg);
- break;
- case 'h':
- dbhost = pg_strdup(optarg);
- break;
- case 'p':
- if (atoi(optarg) <= 0)
- {
- fprintf(stderr, _("%s: invalid port number \"%s\"\n"),
- progname, optarg);
- exit(1);
- }
- dbport = pg_strdup(optarg);
- break;
- case 'U':
- dbuser = pg_strdup(optarg);
- break;
- case 'w':
- dbgetpassword = -1;
- break;
- case 'W':
- dbgetpassword = 1;
- break;
- case 's':
- standby_message_timeout = atoi(optarg) * 1000;
- if (standby_message_timeout < 0)
- {
- fprintf(stderr, _("%s: invalid status interval \"%s\"\n"),
- progname, optarg);
- exit(1);
- }
- break;
- case 'S':
- replication_slot = pg_strdup(optarg);
- break;
- case 'n':
- noloop = 1;
- break;
- case 'v':
- verbose++;
- break;
- case 'Z':
- compresslevel = atoi(optarg);
- if (compresslevel < 0 || compresslevel > 9)
- {
- fprintf(stderr, _("%s: invalid compression level \"%s\"\n"),
- progname, optarg);
- exit(1);
- }
- break;
-/* action */
- case 1:
- do_create_slot = true;
- break;
- case 2:
- do_drop_slot = true;
- break;
- case 3:
- slot_exists_ok = true;
- break;
- case 4:
- synchronous = true;
- break;
- default:
-
- /*
- * getopt_long already emitted a complaint
- */
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
- progname);
- exit(1);
- }
- }
-
- /*
- * Any non-option arguments?
- */
- if (optind < argc)
- {
- fprintf(stderr,
- _("%s: too many command-line arguments (first is \"%s\")\n"),
- progname, argv[optind]);
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
- progname);
- exit(1);
- }
-
- if (do_drop_slot && do_create_slot)
- {
- fprintf(stderr, _("%s: cannot use --create-slot together with --drop-slot\n"), progname);
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
- progname);
- exit(1);
- }
-
- if (replication_slot == NULL && (do_drop_slot || do_create_slot))
- {
- /* translator: second %s is an option name */
- fprintf(stderr, _("%s: %s needs a slot to be specified using --slot\n"), progname,
- do_drop_slot ? "--drop-slot" : "--create-slot");
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
- progname);
- exit(1);
- }
-
- /*
- * Required arguments
- */
- if (basedir == NULL && !do_drop_slot && !do_create_slot)
- {
- fprintf(stderr, _("%s: no target directory specified\n"), progname);
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
- progname);
- exit(1);
- }
-
-#ifndef HAVE_LIBZ
- if (compresslevel != 0)
- {
- fprintf(stderr,
- _("%s: this build does not support compression\n"),
- progname);
- exit(1);
- }
-#endif
-
- /*
- * Check existence of destination folder.
- */
- if (!do_drop_slot && !do_create_slot)
- {
- DIR *dir = get_destination_dir(basedir);
-
- close_destination_dir(dir, basedir);
- }
-
-#ifndef WIN32
- pqsignal(SIGINT, sigint_handler);
-#endif
-
- /*
- * Obtain a connection before doing anything.
- */
- conn = GetConnection();
- if (!conn)
- /* error message already written in GetConnection() */
- exit(1);
-
- /*
- * Run IDENTIFY_SYSTEM to make sure we've successfully have established a
- * replication connection and haven't connected using a database specific
- * connection.
- */
- if (!RunIdentifySystem(conn, NULL, NULL, NULL, &db_name))
- disconnect_and_exit(1);
-
- /*
- * Check that there is a database associated with connection, none should
- * be defined in this context.
- */
- if (db_name)
- {
- fprintf(stderr,
- _("%s: replication connection using slot \"%s\" is unexpectedly database specific\n"),
- progname, replication_slot);
- disconnect_and_exit(1);
- }
-
- /*
- * Drop a replication slot.
- */
- if (do_drop_slot)
- {
- if (verbose)
- fprintf(stderr,
- _("%s: dropping replication slot \"%s\"\n"),
- progname, replication_slot);
-
- if (!DropReplicationSlot(conn, replication_slot))
- disconnect_and_exit(1);
- disconnect_and_exit(0);
- }
-
- /* Create a replication slot */
- if (do_create_slot)
- {
- if (verbose)
- fprintf(stderr,
- _("%s: creating replication slot \"%s\"\n"),
- progname, replication_slot);
-
- if (!CreateReplicationSlot(conn, replication_slot, NULL, true,
- slot_exists_ok))
- disconnect_and_exit(1);
- disconnect_and_exit(0);
- }
-
- /*
- * Don't close the connection here so that subsequent StreamLog() can
- * reuse it.
- */
-
- while (true)
- {
- StreamLog();
- if (time_to_abort)
- {
- /*
- * We've been Ctrl-C'ed. That's not an error, so exit without an
- * errorcode.
- */
- exit(0);
- }
- else if (noloop)
- {
- fprintf(stderr, _("%s: disconnected\n"), progname);
- exit(1);
- }
- else
- {
- fprintf(stderr,
- /* translator: check source for value for %d */
- _("%s: disconnected; waiting %d seconds to try again\n"),
- progname, RECONNECT_SLEEP_TIME);
- pg_usleep(RECONNECT_SLEEP_TIME * 1000000);
- }
- }
-}
diff --git a/src/bin/pg_basebackup/t/020_pg_receivewal.pl b/src/bin/pg_basebackup/t/020_pg_receivewal.pl
new file mode 100644
index 0000000..b4cb6f7
--- /dev/null
+++ b/src/bin/pg_basebackup/t/020_pg_receivewal.pl
@@ -0,0 +1,8 @@
+use strict;
+use warnings;
+use TestLib;
+use Test::More tests => 8;
+
+program_help_ok('pg_receivewal');
+program_version_ok('pg_receivewal');
+program_options_handling_ok('pg_receivewal');
diff --git a/src/bin/pg_basebackup/t/020_pg_receivexlog.pl b/src/bin/pg_basebackup/t/020_pg_receivexlog.pl
deleted file mode 100644
index c68e86d..0000000
--- a/src/bin/pg_basebackup/t/020_pg_receivexlog.pl
+++ /dev/null
@@ -1,8 +0,0 @@
-use strict;
-use warnings;
-use TestLib;
-use Test::More tests => 8;
-
-program_help_ok('pg_receivexlog');
-program_version_ok('pg_receivexlog');
-program_options_handling_ok('pg_receivexlog');
diff --git a/src/bin/pg_basebackup/walmethods.h b/src/bin/pg_basebackup/walmethods.h
index 2cd8b6d..8d679da 100644
--- a/src/bin/pg_basebackup/walmethods.h
+++ b/src/bin/pg_basebackup/walmethods.h
@@ -39,7 +39,7 @@ struct WalWriteMethod
* - WalDirectoryMethod - write WAL to regular files in a standard pg_xlog
* - TarDirectoryMethod - write WAL to a tarfile corresponding to pg_xlog
* (only implements the methods required for pg_basebackup,
- * not all those required for pg_receivexlog)
+ * not all those required for pg_receivewal)
*/
WalWriteMethod *CreateWalDirectoryMethod(const char *basedir,
int compression, bool sync);
diff --git a/src/bin/pg_resetwal/.gitignore b/src/bin/pg_resetwal/.gitignore
new file mode 100644
index 0000000..236abb4
--- /dev/null
+++ b/src/bin/pg_resetwal/.gitignore
@@ -0,0 +1 @@
+/pg_resetwal
diff --git a/src/bin/pg_resetwal/Makefile b/src/bin/pg_resetwal/Makefile
new file mode 100644
index 0000000..0f6e5da
--- /dev/null
+++ b/src/bin/pg_resetwal/Makefile
@@ -0,0 +1,35 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for src/bin/pg_resetwal
+#
+# Copyright (c) 1998-2017, PostgreSQL Global Development Group
+#
+# src/bin/pg_resetwal/Makefile
+#
+#-------------------------------------------------------------------------
+
+PGFILEDESC = "pg_resetwal - reset PostgreSQL WAL log"
+PGAPPICON=win32
+
+subdir = src/bin/pg_resetwal
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+OBJS= pg_resetwal.o $(WIN32RES)
+
+all: pg_resetwal
+
+pg_resetwal: $(OBJS) | submake-libpgport
+ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+
+install: all installdirs
+ $(INSTALL_PROGRAM) pg_resetwal$(X) '$(DESTDIR)$(bindir)/pg_resetwal$(X)'
+
+installdirs:
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
+
+uninstall:
+ rm -f '$(DESTDIR)$(bindir)/pg_resetwal$(X)'
+
+clean distclean maintainer-clean:
+ rm -f pg_resetwal$(X) $(OBJS)
diff --git a/src/bin/pg_resetwal/nls.mk b/src/bin/pg_resetwal/nls.mk
new file mode 100644
index 0000000..d04d58e
--- /dev/null
+++ b/src/bin/pg_resetwal/nls.mk
@@ -0,0 +1,4 @@
+# src/bin/pg_resetwal/nls.mk
+CATALOG_NAME = pg_resetwal
+AVAIL_LANGUAGES = cs de es fr it ja ko pl pt_BR ru sv zh_CN
+GETTEXT_FILES = pg_resetwal.c ../../common/restricted_token.c
diff --git a/src/bin/pg_resetwal/pg_resetwal.c b/src/bin/pg_resetwal/pg_resetwal.c
new file mode 100644
index 0000000..96b7097
--- /dev/null
+++ b/src/bin/pg_resetwal/pg_resetwal.c
@@ -0,0 +1,1184 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_resetwal.c
+ * A utility to "zero out" the xlog when it's corrupt beyond recovery.
+ * Can also rebuild pg_control if needed.
+ *
+ * The theory of operation is fairly simple:
+ * 1. Read the existing pg_control (which will include the last
+ * checkpoint record). If it is an old format then update to
+ * current format.
+ * 2. If pg_control is corrupt, attempt to intuit reasonable values,
+ * by scanning the old xlog if necessary.
+ * 3. Modify pg_control to reflect a "shutdown" state with a checkpoint
+ * record at the start of xlog.
+ * 4. Flush the existing xlog files and write a new segment with
+ * just a checkpoint record in it. The new segment is positioned
+ * just past the end of the old xlog, so that existing LSNs in
+ * data pages will appear to be "in the past".
+ * This is all pretty straightforward except for the intuition part of
+ * step 2 ...
+ *
+ *
+ * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1994, Regents of the University of California
+ *
+ * src/bin/pg_resetwal/pg_resetwal.c
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/*
+ * We have to use postgres.h not postgres_fe.h here, because there's so much
+ * backend-only stuff in the XLOG include files we need. But we need a
+ * frontend-ish environment otherwise. Hence this ugly hack.
+ */
+#define FRONTEND 1
+
+#include "postgres.h"
+
+#include <dirent.h>
+#include <fcntl.h>
+#include <locale.h>
+#include <sys/stat.h>
+#include <sys/time.h>
+#include <time.h>
+#include <unistd.h>
+
+#include "access/transam.h"
+#include "access/tuptoaster.h"
+#include "access/multixact.h"
+#include "access/xlog.h"
+#include "access/xlog_internal.h"
+#include "catalog/catversion.h"
+#include "catalog/pg_control.h"
+#include "common/fe_memutils.h"
+#include "common/restricted_token.h"
+#include "storage/large_object.h"
+#include "pg_getopt.h"
+
+
+static ControlFileData ControlFile; /* pg_control values */
+static XLogSegNo newXlogSegNo; /* new XLOG segment # */
+static bool guessed = false; /* T if we had to guess at any values */
+static const char *progname;
+static uint32 set_xid_epoch = (uint32) -1;
+static TransactionId set_xid = 0;
+static TransactionId set_oldest_commit_ts_xid = 0;
+static TransactionId set_newest_commit_ts_xid = 0;
+static Oid set_oid = 0;
+static MultiXactId set_mxid = 0;
+static MultiXactOffset set_mxoff = (MultiXactOffset) -1;
+static uint32 minXlogTli = 0;
+static XLogSegNo minXlogSegNo = 0;
+
+static bool ReadControlFile(void);
+static void GuessControlValues(void);
+static void PrintControlValues(bool guessed);
+static void PrintNewControlValues(void);
+static void RewriteControlFile(void);
+static void FindEndOfXLOG(void);
+static void KillExistingXLOG(void);
+static void KillExistingArchiveStatus(void);
+static void WriteEmptyXLOG(void);
+static void usage(void);
+
+
+int
+main(int argc, char *argv[])
+{
+ int c;
+ bool force = false;
+ bool noupdate = false;
+ MultiXactId set_oldestmxid = 0;
+ char *endptr;
+ char *endptr2;
+ char *DataDir = NULL;
+ int fd;
+
+ set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_resetwal"));
+
+ progname = get_progname(argv[0]);
+
+ if (argc > 1)
+ {
+ if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
+ {
+ usage();
+ exit(0);
+ }
+ if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
+ {
+ puts("pg_resetwal (PostgreSQL) " PG_VERSION);
+ exit(0);
+ }
+ }
+
+
+ while ((c = getopt(argc, argv, "c:D:e:fl:m:no:O:x:")) != -1)
+ {
+ switch (c)
+ {
+ case 'D':
+ DataDir = optarg;
+ break;
+
+ case 'f':
+ force = true;
+ break;
+
+ case 'n':
+ noupdate = true;
+ break;
+
+ case 'e':
+ set_xid_epoch = strtoul(optarg, &endptr, 0);
+ if (endptr == optarg || *endptr != '\0')
+ {
+ /*------
+ translator: the second %s is a command line argument (-e, etc) */
+ fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-e");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+ if (set_xid_epoch == -1)
+ {
+ fprintf(stderr, _("%s: transaction ID epoch (-e) must not be -1\n"), progname);
+ exit(1);
+ }
+ break;
+
+ case 'x':
+ set_xid = strtoul(optarg, &endptr, 0);
+ if (endptr == optarg || *endptr != '\0')
+ {
+ fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-x");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+ if (set_xid == 0)
+ {
+ fprintf(stderr, _("%s: transaction ID (-x) must not be 0\n"), progname);
+ exit(1);
+ }
+ break;
+
+ case 'c':
+ set_oldest_commit_ts_xid = strtoul(optarg, &endptr, 0);
+ if (endptr == optarg || *endptr != ',')
+ {
+ fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+ set_newest_commit_ts_xid = strtoul(endptr + 1, &endptr2, 0);
+ if (endptr2 == endptr + 1 || *endptr2 != '\0')
+ {
+ fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+
+ if (set_oldest_commit_ts_xid < 2 &&
+ set_oldest_commit_ts_xid != 0)
+ {
+ fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
+ exit(1);
+ }
+
+ if (set_newest_commit_ts_xid < 2 &&
+ set_newest_commit_ts_xid != 0)
+ {
+ fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
+ exit(1);
+ }
+ break;
+
+ case 'o':
+ set_oid = strtoul(optarg, &endptr, 0);
+ if (endptr == optarg || *endptr != '\0')
+ {
+ fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-o");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+ if (set_oid == 0)
+ {
+ fprintf(stderr, _("%s: OID (-o) must not be 0\n"), progname);
+ exit(1);
+ }
+ break;
+
+ case 'm':
+ set_mxid = strtoul(optarg, &endptr, 0);
+ if (endptr == optarg || *endptr != ',')
+ {
+ fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-m");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+
+ set_oldestmxid = strtoul(endptr + 1, &endptr2, 0);
+ if (endptr2 == endptr + 1 || *endptr2 != '\0')
+ {
+ fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-m");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+ if (set_mxid == 0)
+ {
+ fprintf(stderr, _("%s: multitransaction ID (-m) must not be 0\n"), progname);
+ exit(1);
+ }
+
+ /*
+ * XXX It'd be nice to have more sanity checks here, e.g. so
+ * that oldest is not wrapped around w.r.t. nextMulti.
+ */
+ if (set_oldestmxid == 0)
+ {
+ fprintf(stderr, _("%s: oldest multitransaction ID (-m) must not be 0\n"),
+ progname);
+ exit(1);
+ }
+ break;
+
+ case 'O':
+ set_mxoff = strtoul(optarg, &endptr, 0);
+ if (endptr == optarg || *endptr != '\0')
+ {
+ fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-O");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+ if (set_mxoff == -1)
+ {
+ fprintf(stderr, _("%s: multitransaction offset (-O) must not be -1\n"), progname);
+ exit(1);
+ }
+ break;
+
+ case 'l':
+ if (strspn(optarg, "01234567890ABCDEFabcdef") != XLOG_FNAME_LEN)
+ {
+ fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-l");
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+ XLogFromFileName(optarg, &minXlogTli, &minXlogSegNo);
+ break;
+
+ default:
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+ }
+
+ if (DataDir == NULL && optind < argc)
+ DataDir = argv[optind++];
+
+ /* Complain if any arguments remain */
+ if (optind < argc)
+ {
+ fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
+ progname, argv[optind]);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
+ progname);
+ exit(1);
+ }
+
+ if (DataDir == NULL)
+ {
+ fprintf(stderr, _("%s: no data directory specified\n"), progname);
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ exit(1);
+ }
+
+ /*
+ * Don't allow pg_resetwal to be run as root, to avoid overwriting the
+ * ownership of files in the data directory. We need only check for root
+ * -- any other user won't have sufficient permissions to modify files in
+ * the data directory.
+ */
+#ifndef WIN32
+ if (geteuid() == 0)
+ {
+ fprintf(stderr, _("%s: cannot be executed by \"root\"\n"),
+ progname);
+ fprintf(stderr, _("You must run %s as the PostgreSQL superuser.\n"),
+ progname);
+ exit(1);
+ }
+#endif
+
+ get_restricted_token(progname);
+
+ if (chdir(DataDir) < 0)
+ {
+ fprintf(stderr, _("%s: could not change directory to \"%s\": %s\n"),
+ progname, DataDir, strerror(errno));
+ exit(1);
+ }
+
+ /*
+ * Check for a postmaster lock file --- if there is one, refuse to
+ * proceed, on grounds we might be interfering with a live installation.
+ */
+ if ((fd = open("postmaster.pid", O_RDONLY, 0)) < 0)
+ {
+ if (errno != ENOENT)
+ {
+ fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
+ progname, "postmaster.pid", strerror(errno));
+ exit(1);
+ }
+ }
+ else
+ {
+ fprintf(stderr, _("%s: lock file \"%s\" exists\n"
+ "Is a server running? If not, delete the lock file and try again.\n"),
+ progname, "postmaster.pid");
+ exit(1);
+ }
+
+ /*
+ * Attempt to read the existing pg_control file
+ */
+ if (!ReadControlFile())
+ GuessControlValues();
+
+ /*
+ * Also look at existing segment files to set up newXlogSegNo
+ */
+ FindEndOfXLOG();
+
+ /*
+ * If we're not going to proceed with the reset, print the current control
+ * file parameters.
+ */
+ if ((guessed && !force) || noupdate)
+ PrintControlValues(guessed);
+
+ /*
+ * Adjust fields if required by switches. (Do this now so that printout,
+ * if any, includes these values.)
+ */
+ if (set_xid_epoch != -1)
+ ControlFile.checkPointCopy.nextXidEpoch = set_xid_epoch;
+
+ if (set_xid != 0)
+ {
+ ControlFile.checkPointCopy.nextXid = set_xid;
+
+ /*
+ * For the moment, just set oldestXid to a value that will force
+ * immediate autovacuum-for-wraparound. It's not clear whether adding
+ * user control of this is useful, so let's just do something that's
+ * reasonably safe. The magic constant here corresponds to the
+ * maximum allowed value of autovacuum_freeze_max_age.
+ */
+ ControlFile.checkPointCopy.oldestXid = set_xid - 2000000000;
+ if (ControlFile.checkPointCopy.oldestXid < FirstNormalTransactionId)
+ ControlFile.checkPointCopy.oldestXid += FirstNormalTransactionId;
+ ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
+ }
+
+ if (set_oldest_commit_ts_xid != 0)
+ ControlFile.checkPointCopy.oldestCommitTsXid = set_oldest_commit_ts_xid;
+ if (set_newest_commit_ts_xid != 0)
+ ControlFile.checkPointCopy.newestCommitTsXid = set_newest_commit_ts_xid;
+
+ if (set_oid != 0)
+ ControlFile.checkPointCopy.nextOid = set_oid;
+
+ if (set_mxid != 0)
+ {
+ ControlFile.checkPointCopy.nextMulti = set_mxid;
+
+ ControlFile.checkPointCopy.oldestMulti = set_oldestmxid;
+ if (ControlFile.checkPointCopy.oldestMulti < FirstMultiXactId)
+ ControlFile.checkPointCopy.oldestMulti += FirstMultiXactId;
+ ControlFile.checkPointCopy.oldestMultiDB = InvalidOid;
+ }
+
+ if (set_mxoff != -1)
+ ControlFile.checkPointCopy.nextMultiOffset = set_mxoff;
+
+ if (minXlogTli > ControlFile.checkPointCopy.ThisTimeLineID)
+ {
+ ControlFile.checkPointCopy.ThisTimeLineID = minXlogTli;
+ ControlFile.checkPointCopy.PrevTimeLineID = minXlogTli;
+ }
+
+ if (minXlogSegNo > newXlogSegNo)
+ newXlogSegNo = minXlogSegNo;
+
+ /*
+ * If we had to guess anything, and -f was not given, just print the
+ * guessed values and exit. Also print if -n is given.
+ */
+ if ((guessed && !force) || noupdate)
+ {
+ PrintNewControlValues();
+ if (!noupdate)
+ {
+ printf(_("\nIf these values seem acceptable, use -f to force reset.\n"));
+ exit(1);
+ }
+ else
+ exit(0);
+ }
+
+ /*
+ * Don't reset from a dirty pg_control without -f, either.
+ */
+ if (ControlFile.state != DB_SHUTDOWNED && !force)
+ {
+ printf(_("The database server was not shut down cleanly.\n"
+ "Resetting the transaction log might cause data to be lost.\n"
+ "If you want to proceed anyway, use -f to force reset.\n"));
+ exit(1);
+ }
+
+ /*
+ * Else, do the dirty deed.
+ */
+ RewriteControlFile();
+ KillExistingXLOG();
+ KillExistingArchiveStatus();
+ WriteEmptyXLOG();
+
+ printf(_("Transaction log reset\n"));
+ return 0;
+}
+
+
+/*
+ * Try to read the existing pg_control file.
+ *
+ * This routine is also responsible for updating old pg_control versions
+ * to the current format. (Currently we don't do anything of the sort.)
+ */
+static bool
+ReadControlFile(void)
+{
+ int fd;
+ int len;
+ char *buffer;
+ pg_crc32c crc;
+
+ if ((fd = open(XLOG_CONTROL_FILE, O_RDONLY | PG_BINARY, 0)) < 0)
+ {
+ /*
+ * If pg_control is not there at all, or we can't read it, the odds
+ * are we've been handed a bad DataDir path, so give up. User can do
+ * "touch pg_control" to force us to proceed.
+ */
+ fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
+ progname, XLOG_CONTROL_FILE, strerror(errno));
+ if (errno == ENOENT)
+ fprintf(stderr, _("If you are sure the data directory path is correct, execute\n"
+ " touch %s\n"
+ "and try again.\n"),
+ XLOG_CONTROL_FILE);
+ exit(1);
+ }
+
+ /* Use malloc to ensure we have a maxaligned buffer */
+ buffer = (char *) pg_malloc(PG_CONTROL_SIZE);
+
+ len = read(fd, buffer, PG_CONTROL_SIZE);
+ if (len < 0)
+ {
+ fprintf(stderr, _("%s: could not read file \"%s\": %s\n"),
+ progname, XLOG_CONTROL_FILE, strerror(errno));
+ exit(1);
+ }
+ close(fd);
+
+ if (len >= sizeof(ControlFileData) &&
+ ((ControlFileData *) buffer)->pg_control_version == PG_CONTROL_VERSION)
+ {
+ /* Check the CRC. */
+ INIT_CRC32C(crc);
+ COMP_CRC32C(crc,
+ buffer,
+ offsetof(ControlFileData, crc));
+ FIN_CRC32C(crc);
+
+ if (EQ_CRC32C(crc, ((ControlFileData *) buffer)->crc))
+ {
+ /* Valid data... */
+ memcpy(&ControlFile, buffer, sizeof(ControlFile));
+ return true;
+ }
+
+ fprintf(stderr, _("%s: pg_control exists but has invalid CRC; proceed with caution\n"),
+ progname);
+ /* We will use the data anyway, but treat it as guessed. */
+ memcpy(&ControlFile, buffer, sizeof(ControlFile));
+ guessed = true;
+ return true;
+ }
+
+ /* Looks like it's a mess. */
+ fprintf(stderr, _("%s: pg_control exists but is broken or unknown version; ignoring it\n"),
+ progname);
+ return false;
+}
+
+
+/*
+ * Guess at pg_control values when we can't read the old ones.
+ */
+static void
+GuessControlValues(void)
+{
+ uint64 sysidentifier;
+ struct timeval tv;
+
+ /*
+ * Set up a completely default set of pg_control values.
+ */
+ guessed = true;
+ memset(&ControlFile, 0, sizeof(ControlFile));
+
+ ControlFile.pg_control_version = PG_CONTROL_VERSION;
+ ControlFile.catalog_version_no = CATALOG_VERSION_NO;
+
+ /*
+ * Create a new unique installation identifier, since we can no longer use
+ * any old XLOG records. See notes in xlog.c about the algorithm.
+ */
+ gettimeofday(&tv, NULL);
+ sysidentifier = ((uint64) tv.tv_sec) << 32;
+ sysidentifier |= ((uint64) tv.tv_usec) << 12;
+ sysidentifier |= getpid() & 0xFFF;
+
+ ControlFile.system_identifier = sysidentifier;
+
+ ControlFile.checkPointCopy.redo = SizeOfXLogLongPHD;
+ ControlFile.checkPointCopy.ThisTimeLineID = 1;
+ ControlFile.checkPointCopy.PrevTimeLineID = 1;
+ ControlFile.checkPointCopy.fullPageWrites = false;
+ ControlFile.checkPointCopy.nextXidEpoch = 0;
+ ControlFile.checkPointCopy.nextXid = FirstNormalTransactionId;
+ ControlFile.checkPointCopy.nextOid = FirstBootstrapObjectId;
+ ControlFile.checkPointCopy.nextMulti = FirstMultiXactId;
+ ControlFile.checkPointCopy.nextMultiOffset = 0;
+ ControlFile.checkPointCopy.oldestXid = FirstNormalTransactionId;
+ ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
+ ControlFile.checkPointCopy.oldestMulti = FirstMultiXactId;
+ ControlFile.checkPointCopy.oldestMultiDB = InvalidOid;
+ ControlFile.checkPointCopy.time = (pg_time_t) time(NULL);
+ ControlFile.checkPointCopy.oldestActiveXid = InvalidTransactionId;
+
+ ControlFile.state = DB_SHUTDOWNED;
+ ControlFile.time = (pg_time_t) time(NULL);
+ ControlFile.checkPoint = ControlFile.checkPointCopy.redo;
+ ControlFile.unloggedLSN = 1;
+
+ /* minRecoveryPoint, backupStartPoint and backupEndPoint can be left zero */
+
+ ControlFile.wal_level = WAL_LEVEL_MINIMAL;
+ ControlFile.wal_log_hints = false;
+ ControlFile.track_commit_timestamp = false;
+ ControlFile.MaxConnections = 100;
+ ControlFile.max_worker_processes = 8;
+ ControlFile.max_prepared_xacts = 0;
+ ControlFile.max_locks_per_xact = 64;
+
+ ControlFile.maxAlign = MAXIMUM_ALIGNOF;
+ ControlFile.floatFormat = FLOATFORMAT_VALUE;
+ ControlFile.blcksz = BLCKSZ;
+ ControlFile.relseg_size = RELSEG_SIZE;
+ ControlFile.xlog_blcksz = XLOG_BLCKSZ;
+ ControlFile.xlog_seg_size = XLOG_SEG_SIZE;
+ ControlFile.nameDataLen = NAMEDATALEN;
+ ControlFile.indexMaxKeys = INDEX_MAX_KEYS;
+ ControlFile.toast_max_chunk_size = TOAST_MAX_CHUNK_SIZE;
+ ControlFile.loblksize = LOBLKSIZE;
+#ifdef HAVE_INT64_TIMESTAMP
+ ControlFile.enableIntTimes = true;
+#else
+ ControlFile.enableIntTimes = false;
+#endif
+ ControlFile.float4ByVal = FLOAT4PASSBYVAL;
+ ControlFile.float8ByVal = FLOAT8PASSBYVAL;
+
+ /*
+ * XXX eventually, should try to grovel through old XLOG to develop more
+ * accurate values for TimeLineID, nextXID, etc.
+ */
+}
+
+
+/*
+ * Print the guessed pg_control values when we had to guess.
+ *
+ * NB: this display should be just those fields that will not be
+ * reset by RewriteControlFile().
+ */
+static void
+PrintControlValues(bool guessed)
+{
+ char sysident_str[32];
+
+ if (guessed)
+ printf(_("Guessed pg_control values:\n\n"));
+ else
+ printf(_("Current pg_control values:\n\n"));
+
+ /*
+ * Format system_identifier separately to keep platform-dependent format
+ * code out of the translatable message string.
+ */
+ snprintf(sysident_str, sizeof(sysident_str), UINT64_FORMAT,
+ ControlFile.system_identifier);
+
+ printf(_("pg_control version number: %u\n"),
+ ControlFile.pg_control_version);
+ printf(_("Catalog version number: %u\n"),
+ ControlFile.catalog_version_no);
+ printf(_("Database system identifier: %s\n"),
+ sysident_str);
+ printf(_("Latest checkpoint's TimeLineID: %u\n"),
+ ControlFile.checkPointCopy.ThisTimeLineID);
+ printf(_("Latest checkpoint's full_page_writes: %s\n"),
+ ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off"));
+ printf(_("Latest checkpoint's NextXID: %u:%u\n"),
+ ControlFile.checkPointCopy.nextXidEpoch,
+ ControlFile.checkPointCopy.nextXid);
+ printf(_("Latest checkpoint's NextOID: %u\n"),
+ ControlFile.checkPointCopy.nextOid);
+ printf(_("Latest checkpoint's NextMultiXactId: %u\n"),
+ ControlFile.checkPointCopy.nextMulti);
+ printf(_("Latest checkpoint's NextMultiOffset: %u\n"),
+ ControlFile.checkPointCopy.nextMultiOffset);
+ printf(_("Latest checkpoint's oldestXID: %u\n"),
+ ControlFile.checkPointCopy.oldestXid);
+ printf(_("Latest checkpoint's oldestXID's DB: %u\n"),
+ ControlFile.checkPointCopy.oldestXidDB);
+ printf(_("Latest checkpoint's oldestActiveXID: %u\n"),
+ ControlFile.checkPointCopy.oldestActiveXid);
+ printf(_("Latest checkpoint's oldestMultiXid: %u\n"),
+ ControlFile.checkPointCopy.oldestMulti);
+ printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
+ ControlFile.checkPointCopy.oldestMultiDB);
+ printf(_("Latest checkpoint's oldestCommitTsXid:%u\n"),
+ ControlFile.checkPointCopy.oldestCommitTsXid);
+ printf(_("Latest checkpoint's newestCommitTsXid:%u\n"),
+ ControlFile.checkPointCopy.newestCommitTsXid);
+ printf(_("Maximum data alignment: %u\n"),
+ ControlFile.maxAlign);
+ /* we don't print floatFormat since can't say much useful about it */
+ printf(_("Database block size: %u\n"),
+ ControlFile.blcksz);
+ printf(_("Blocks per segment of large relation: %u\n"),
+ ControlFile.relseg_size);
+ printf(_("WAL block size: %u\n"),
+ ControlFile.xlog_blcksz);
+ printf(_("Bytes per WAL segment: %u\n"),
+ ControlFile.xlog_seg_size);
+ printf(_("Maximum length of identifiers: %u\n"),
+ ControlFile.nameDataLen);
+ printf(_("Maximum columns in an index: %u\n"),
+ ControlFile.indexMaxKeys);
+ printf(_("Maximum size of a TOAST chunk: %u\n"),
+ ControlFile.toast_max_chunk_size);
+ printf(_("Size of a large-object chunk: %u\n"),
+ ControlFile.loblksize);
+ printf(_("Date/time type storage: %s\n"),
+ (ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers")));
+ printf(_("Float4 argument passing: %s\n"),
+ (ControlFile.float4ByVal ? _("by value") : _("by reference")));
+ printf(_("Float8 argument passing: %s\n"),
+ (ControlFile.float8ByVal ? _("by value") : _("by reference")));
+ printf(_("Data page checksum version: %u\n"),
+ ControlFile.data_checksum_version);
+}
+
+
+/*
+ * Print the values to be changed.
+ */
+static void
+PrintNewControlValues(void)
+{
+ char fname[MAXFNAMELEN];
+
+ /* This will be always printed in order to keep format same. */
+ printf(_("\n\nValues to be changed:\n\n"));
+
+ XLogFileName(fname, ControlFile.checkPointCopy.ThisTimeLineID, newXlogSegNo);
+ printf(_("First log segment after reset: %s\n"), fname);
+
+ if (set_mxid != 0)
+ {
+ printf(_("NextMultiXactId: %u\n"),
+ ControlFile.checkPointCopy.nextMulti);
+ printf(_("OldestMultiXid: %u\n"),
+ ControlFile.checkPointCopy.oldestMulti);
+ printf(_("OldestMulti's DB: %u\n"),
+ ControlFile.checkPointCopy.oldestMultiDB);
+ }
+
+ if (set_mxoff != -1)
+ {
+ printf(_("NextMultiOffset: %u\n"),
+ ControlFile.checkPointCopy.nextMultiOffset);
+ }
+
+ if (set_oid != 0)
+ {
+ printf(_("NextOID: %u\n"),
+ ControlFile.checkPointCopy.nextOid);
+ }
+
+ if (set_xid != 0)
+ {
+ printf(_("NextXID: %u\n"),
+ ControlFile.checkPointCopy.nextXid);
+ printf(_("OldestXID: %u\n"),
+ ControlFile.checkPointCopy.oldestXid);
+ printf(_("OldestXID's DB: %u\n"),
+ ControlFile.checkPointCopy.oldestXidDB);
+ }
+
+ if (set_xid_epoch != -1)
+ {
+ printf(_("NextXID epoch: %u\n"),
+ ControlFile.checkPointCopy.nextXidEpoch);
+ }
+
+ if (set_oldest_commit_ts_xid != 0)
+ {
+ printf(_("oldestCommitTsXid: %u\n"),
+ ControlFile.checkPointCopy.oldestCommitTsXid);
+ }
+ if (set_newest_commit_ts_xid != 0)
+ {
+ printf(_("newestCommitTsXid: %u\n"),
+ ControlFile.checkPointCopy.newestCommitTsXid);
+ }
+}
+
+
+/*
+ * Write out the new pg_control file.
+ */
+static void
+RewriteControlFile(void)
+{
+ int fd;
+ char buffer[PG_CONTROL_SIZE]; /* need not be aligned */
+
+ /*
+ * Adjust fields as needed to force an empty XLOG starting at
+ * newXlogSegNo.
+ */
+ XLogSegNoOffsetToRecPtr(newXlogSegNo, SizeOfXLogLongPHD,
+ ControlFile.checkPointCopy.redo);
+ ControlFile.checkPointCopy.time = (pg_time_t) time(NULL);
+
+ ControlFile.state = DB_SHUTDOWNED;
+ ControlFile.time = (pg_time_t) time(NULL);
+ ControlFile.checkPoint = ControlFile.checkPointCopy.redo;
+ ControlFile.prevCheckPoint = 0;
+ ControlFile.minRecoveryPoint = 0;
+ ControlFile.minRecoveryPointTLI = 0;
+ ControlFile.backupStartPoint = 0;
+ ControlFile.backupEndPoint = 0;
+ ControlFile.backupEndRequired = false;
+
+ /*
+ * Force the defaults for max_* settings. The values don't really matter
+ * as long as wal_level='minimal'; the postmaster will reset these fields
+ * anyway at startup.
+ */
+ ControlFile.wal_level = WAL_LEVEL_MINIMAL;
+ ControlFile.wal_log_hints = false;
+ ControlFile.track_commit_timestamp = false;
+ ControlFile.MaxConnections = 100;
+ ControlFile.max_worker_processes = 8;
+ ControlFile.max_prepared_xacts = 0;
+ ControlFile.max_locks_per_xact = 64;
+
+ /* Now we can force the recorded xlog seg size to the right thing. */
+ ControlFile.xlog_seg_size = XLogSegSize;
+
+ /* Contents are protected with a CRC */
+ INIT_CRC32C(ControlFile.crc);
+ COMP_CRC32C(ControlFile.crc,
+ (char *) &ControlFile,
+ offsetof(ControlFileData, crc));
+ FIN_CRC32C(ControlFile.crc);
+
+ /*
+ * We write out PG_CONTROL_SIZE bytes into pg_control, zero-padding the
+ * excess over sizeof(ControlFileData). This reduces the odds of
+ * premature-EOF errors when reading pg_control. We'll still fail when we
+ * check the contents of the file, but hopefully with a more specific
+ * error than "couldn't read pg_control".
+ */
+ if (sizeof(ControlFileData) > PG_CONTROL_SIZE)
+ {
+ fprintf(stderr,
+ _("%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"),
+ progname);
+ exit(1);
+ }
+
+ memset(buffer, 0, PG_CONTROL_SIZE);
+ memcpy(buffer, &ControlFile, sizeof(ControlFileData));
+
+ unlink(XLOG_CONTROL_FILE);
+
+ fd = open(XLOG_CONTROL_FILE,
+ O_RDWR | O_CREAT | O_EXCL | PG_BINARY,
+ S_IRUSR | S_IWUSR);
+ if (fd < 0)
+ {
+ fprintf(stderr, _("%s: could not create pg_control file: %s\n"),
+ progname, strerror(errno));
+ exit(1);
+ }
+
+ errno = 0;
+ if (write(fd, buffer, PG_CONTROL_SIZE) != PG_CONTROL_SIZE)
+ {
+ /* if write didn't set errno, assume problem is no disk space */
+ if (errno == 0)
+ errno = ENOSPC;
+ fprintf(stderr, _("%s: could not write pg_control file: %s\n"),
+ progname, strerror(errno));
+ exit(1);
+ }
+
+ if (fsync(fd) != 0)
+ {
+ fprintf(stderr, _("%s: fsync error: %s\n"), progname, strerror(errno));
+ exit(1);
+ }
+
+ close(fd);
+}
+
+
+/*
+ * Scan existing XLOG files and determine the highest existing WAL address
+ *
+ * On entry, ControlFile.checkPointCopy.redo and ControlFile.xlog_seg_size
+ * are assumed valid (note that we allow the old xlog seg size to differ
+ * from what we're using). On exit, newXlogId and newXlogSeg are set to
+ * suitable values for the beginning of replacement WAL (in our seg size).
+ */
+static void
+FindEndOfXLOG(void)
+{
+ DIR *xldir;
+ struct dirent *xlde;
+ uint64 segs_per_xlogid;
+ uint64 xlogbytepos;
+
+ /*
+ * Initialize the max() computation using the last checkpoint address from
+ * old pg_control. Note that for the moment we are working with segment
+ * numbering according to the old xlog seg size.
+ */
+ segs_per_xlogid = (UINT64CONST(0x0000000100000000) / ControlFile.xlog_seg_size);
+ newXlogSegNo = ControlFile.checkPointCopy.redo / ControlFile.xlog_seg_size;
+
+ /*
+ * Scan the pg_wal directory to find existing WAL segment files. We
+ * assume any present have been used; in most scenarios this should be
+ * conservative, because of xlog.c's attempts to pre-create files.
+ */
+ xldir = opendir(XLOGDIR);
+ if (xldir == NULL)
+ {
+ fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
+ progname, XLOGDIR, strerror(errno));
+ exit(1);
+ }
+
+ while (errno = 0, (xlde = readdir(xldir)) != NULL)
+ {
+ if (IsXLogFileName(xlde->d_name) ||
+ IsPartialXLogFileName(xlde->d_name))
+ {
+ unsigned int tli,
+ log,
+ seg;
+ XLogSegNo segno;
+
+ /*
+ * Note: We don't use XLogFromFileName here, because we want to
+ * use the segment size from the control file, not the size the
+ * pg_resetwal binary was compiled with
+ */
+ sscanf(xlde->d_name, "%08X%08X%08X", &tli, &log, &seg);
+ segno = ((uint64) log) * segs_per_xlogid + seg;
+
+ /*
+ * Note: we take the max of all files found, regardless of their
+ * timelines. Another possibility would be to ignore files of
+ * timelines other than the target TLI, but this seems safer.
+ * Better too large a result than too small...
+ */
+ if (segno > newXlogSegNo)
+ newXlogSegNo = segno;
+ }
+ }
+
+ if (errno)
+ {
+ fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
+ progname, XLOGDIR, strerror(errno));
+ exit(1);
+ }
+
+ if (closedir(xldir))
+ {
+ fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
+ progname, XLOGDIR, strerror(errno));
+ exit(1);
+ }
+
+ /*
+ * Finally, convert to new xlog seg size, and advance by one to ensure we
+ * are in virgin territory.
+ */
+ xlogbytepos = newXlogSegNo * ControlFile.xlog_seg_size;
+ newXlogSegNo = (xlogbytepos + XLogSegSize - 1) / XLogSegSize;
+ newXlogSegNo++;
+}
+
+
+/*
+ * Remove existing XLOG files
+ */
+static void
+KillExistingXLOG(void)
+{
+ DIR *xldir;
+ struct dirent *xlde;
+ char path[MAXPGPATH];
+
+ xldir = opendir(XLOGDIR);
+ if (xldir == NULL)
+ {
+ fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
+ progname, XLOGDIR, strerror(errno));
+ exit(1);
+ }
+
+ while (errno = 0, (xlde = readdir(xldir)) != NULL)
+ {
+ if (IsXLogFileName(xlde->d_name) ||
+ IsPartialXLogFileName(xlde->d_name))
+ {
+ snprintf(path, MAXPGPATH, "%s/%s", XLOGDIR, xlde->d_name);
+ if (unlink(path) < 0)
+ {
+ fprintf(stderr, _("%s: could not delete file \"%s\": %s\n"),
+ progname, path, strerror(errno));
+ exit(1);
+ }
+ }
+ }
+
+ if (errno)
+ {
+ fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
+ progname, XLOGDIR, strerror(errno));
+ exit(1);
+ }
+
+ if (closedir(xldir))
+ {
+ fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
+ progname, XLOGDIR, strerror(errno));
+ exit(1);
+ }
+}
+
+
+/*
+ * Remove existing archive status files
+ */
+static void
+KillExistingArchiveStatus(void)
+{
+ DIR *xldir;
+ struct dirent *xlde;
+ char path[MAXPGPATH];
+
+#define ARCHSTATDIR XLOGDIR "/archive_status"
+
+ xldir = opendir(ARCHSTATDIR);
+ if (xldir == NULL)
+ {
+ fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
+ progname, ARCHSTATDIR, strerror(errno));
+ exit(1);
+ }
+
+ while (errno = 0, (xlde = readdir(xldir)) != NULL)
+ {
+ if (strspn(xlde->d_name, "0123456789ABCDEF") == XLOG_FNAME_LEN &&
+ (strcmp(xlde->d_name + XLOG_FNAME_LEN, ".ready") == 0 ||
+ strcmp(xlde->d_name + XLOG_FNAME_LEN, ".done") == 0 ||
+ strcmp(xlde->d_name + XLOG_FNAME_LEN, ".partial.ready") == 0 ||
+ strcmp(xlde->d_name + XLOG_FNAME_LEN, ".partial.done") == 0))
+ {
+ snprintf(path, MAXPGPATH, "%s/%s", ARCHSTATDIR, xlde->d_name);
+ if (unlink(path) < 0)
+ {
+ fprintf(stderr, _("%s: could not delete file \"%s\": %s\n"),
+ progname, path, strerror(errno));
+ exit(1);
+ }
+ }
+ }
+
+ if (errno)
+ {
+ fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
+ progname, ARCHSTATDIR, strerror(errno));
+ exit(1);
+ }
+
+ if (closedir(xldir))
+ {
+ fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
+ progname, ARCHSTATDIR, strerror(errno));
+ exit(1);
+ }
+}
+
+
+/*
+ * Write an empty XLOG file, containing only the checkpoint record
+ * already set up in ControlFile.
+ */
+static void
+WriteEmptyXLOG(void)
+{
+ char *buffer;
+ XLogPageHeader page;
+ XLogLongPageHeader longpage;
+ XLogRecord *record;
+ pg_crc32c crc;
+ char path[MAXPGPATH];
+ int fd;
+ int nbytes;
+ char *recptr;
+
+ /* Use malloc() to ensure buffer is MAXALIGNED */
+ buffer = (char *) pg_malloc(XLOG_BLCKSZ);
+ page = (XLogPageHeader) buffer;
+ memset(buffer, 0, XLOG_BLCKSZ);
+
+ /* Set up the XLOG page header */
+ page->xlp_magic = XLOG_PAGE_MAGIC;
+ page->xlp_info = XLP_LONG_HEADER;
+ page->xlp_tli = ControlFile.checkPointCopy.ThisTimeLineID;
+ page->xlp_pageaddr = ControlFile.checkPointCopy.redo - SizeOfXLogLongPHD;
+ longpage = (XLogLongPageHeader) page;
+ longpage->xlp_sysid = ControlFile.system_identifier;
+ longpage->xlp_seg_size = XLogSegSize;
+ longpage->xlp_xlog_blcksz = XLOG_BLCKSZ;
+
+ /* Insert the initial checkpoint record */
+ recptr = (char *) page + SizeOfXLogLongPHD;
+ record = (XLogRecord *) recptr;
+ record->xl_prev = 0;
+ record->xl_xid = InvalidTransactionId;
+ record->xl_tot_len = SizeOfXLogRecord + SizeOfXLogRecordDataHeaderShort + sizeof(CheckPoint);
+ record->xl_info = XLOG_CHECKPOINT_SHUTDOWN;
+ record->xl_rmid = RM_XLOG_ID;
+
+ recptr += SizeOfXLogRecord;
+ *(recptr++) = XLR_BLOCK_ID_DATA_SHORT;
+ *(recptr++) = sizeof(CheckPoint);
+ memcpy(recptr, &ControlFile.checkPointCopy,
+ sizeof(CheckPoint));
+
+ INIT_CRC32C(crc);
+ COMP_CRC32C(crc, ((char *) record) + SizeOfXLogRecord, record->xl_tot_len - SizeOfXLogRecord);
+ COMP_CRC32C(crc, (char *) record, offsetof(XLogRecord, xl_crc));
+ FIN_CRC32C(crc);
+ record->xl_crc = crc;
+
+ /* Write the first page */
+ XLogFilePath(path, ControlFile.checkPointCopy.ThisTimeLineID, newXlogSegNo);
+
+ unlink(path);
+
+ fd = open(path, O_RDWR | O_CREAT | O_EXCL | PG_BINARY,
+ S_IRUSR | S_IWUSR);
+ if (fd < 0)
+ {
+ fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
+ progname, path, strerror(errno));
+ exit(1);
+ }
+
+ errno = 0;
+ if (write(fd, buffer, XLOG_BLCKSZ) != XLOG_BLCKSZ)
+ {
+ /* if write didn't set errno, assume problem is no disk space */
+ if (errno == 0)
+ errno = ENOSPC;
+ fprintf(stderr, _("%s: could not write file \"%s\": %s\n"),
+ progname, path, strerror(errno));
+ exit(1);
+ }
+
+ /* Fill the rest of the file with zeroes */
+ memset(buffer, 0, XLOG_BLCKSZ);
+ for (nbytes = XLOG_BLCKSZ; nbytes < XLogSegSize; nbytes += XLOG_BLCKSZ)
+ {
+ errno = 0;
+ if (write(fd, buffer, XLOG_BLCKSZ) != XLOG_BLCKSZ)
+ {
+ if (errno == 0)
+ errno = ENOSPC;
+ fprintf(stderr, _("%s: could not write file \"%s\": %s\n"),
+ progname, path, strerror(errno));
+ exit(1);
+ }
+ }
+
+ if (fsync(fd) != 0)
+ {
+ fprintf(stderr, _("%s: fsync error: %s\n"), progname, strerror(errno));
+ exit(1);
+ }
+
+ close(fd);
+}
+
+
+static void
+usage(void)
+{
+ printf(_("%s resets the PostgreSQL transaction log.\n\n"), progname);
+ printf(_("Usage:\n %s [OPTION]... DATADIR\n\n"), progname);
+ printf(_("Options:\n"));
+ printf(_(" -c XID,XID set oldest and newest transactions bearing commit timestamp\n"));
+ printf(_(" (zero in either value means no change)\n"));
+ printf(_(" [-D] DATADIR data directory\n"));
+ printf(_(" -e XIDEPOCH set next transaction ID epoch\n"));
+ printf(_(" -f force update to be done\n"));
+ printf(_(" -l XLOGFILE force minimum WAL starting location for new transaction log\n"));
+ printf(_(" -m MXID,MXID set next and oldest multitransaction ID\n"));
+ printf(_(" -n no update, just show what would be done (for testing)\n"));
+ printf(_(" -o OID set next OID\n"));
+ printf(_(" -O OFFSET set next multitransaction offset\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -x XID set next transaction ID\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
+ printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
+}
diff --git a/src/bin/pg_resetwal/po/cs.po b/src/bin/pg_resetwal/po/cs.po
new file mode 100644
index 0000000..52ddcac
--- /dev/null
+++ b/src/bin/pg_resetwal/po/cs.po
@@ -0,0 +1,498 @@
+# Czech message translation file for pg_resetxlog
+# Copyright (C) 2012 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Tomas Vondra <tv@fuzzy.cz>, 2012, 2013.
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_resetxlog-cs (PostgreSQL 9.3)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2013-09-23 20:18+0000\n"
+"PO-Revision-Date: 2013-12-01 20:46-0500\n"
+"Last-Translator: Tomas Vondra <tv@fuzzy.cz>\n"
+"Language-Team: Czech <info@cspug.cx>\n"
+"Language: cs\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+"X-Generator: Lokalize 1.5\n"
+
+#: pg_resetxlog.c:133
+#, c-format
+msgid "%s: invalid argument for option -e\n"
+msgstr "%s: neplatn�� argument pro volbu -e\n"
+
+#: pg_resetxlog.c:134 pg_resetxlog.c:149 pg_resetxlog.c:164 pg_resetxlog.c:179
+#: pg_resetxlog.c:187 pg_resetxlog.c:213 pg_resetxlog.c:227 pg_resetxlog.c:234
+#: pg_resetxlog.c:242
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Zkuste \"%s --help\" pro v��ce informac��.\n"
+
+#: pg_resetxlog.c:139
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: epocha ID transakce (-e) nesm�� b��t -1\n"
+
+#: pg_resetxlog.c:148
+#, c-format
+msgid "%s: invalid argument for option -x\n"
+msgstr "%s: neplatn�� argument pro volbu -x\n"
+
+#: pg_resetxlog.c:154
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: ID transakce (-x) nesm�� b��t 0\n"
+
+#: pg_resetxlog.c:163
+#, c-format
+msgid "%s: invalid argument for option -o\n"
+msgstr "%s: neplatn�� argument pro volbu -o\n"
+
+#: pg_resetxlog.c:169
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) nesm�� b��t 0\n"
+
+#: pg_resetxlog.c:178 pg_resetxlog.c:186
+#, c-format
+msgid "%s: invalid argument for option -m\n"
+msgstr "%s: neplatn�� argument pro volbu -m\n"
+
+#: pg_resetxlog.c:192
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID transakce (-m) nesm�� b��t 0\n"
+
+#: pg_resetxlog.c:202
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID nejstar���� multitransakce (-m) nesm�� b��t 0\n"
+
+#: pg_resetxlog.c:212
+#, c-format
+msgid "%s: invalid argument for option -O\n"
+msgstr "%s: neplatn�� argument pro volbu -O\n"
+
+#: pg_resetxlog.c:218
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: ID transakce (-O) nesm�� b��t -1\n"
+
+#: pg_resetxlog.c:226
+#, c-format
+msgid "%s: invalid argument for option -l\n"
+msgstr "%s: neplatn�� argument pro volbu -l\n"
+
+#: pg_resetxlog.c:241
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: nen�� specifikov��n datov�� adres����\n"
+
+#: pg_resetxlog.c:255
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: nem����e b��t spu��t��n u��ivatelem \"root\"\n"
+
+#: pg_resetxlog.c:257
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Mus��te spustit %s jako PostgreSQL superu��ivatel.\n"
+
+#: pg_resetxlog.c:267
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: nelze zm��nit adres���� na \"%s\": %s\n"
+
+#: pg_resetxlog.c:280 pg_resetxlog.c:414
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: nelze otev����t soubor \"%s\" pro ��ten��: %s\n"
+
+#: pg_resetxlog.c:287
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running? If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: soubor se z��mkem \"%s\" existuje\n"
+"Neb������ ji�� server? Jestli��e ne, sma��te soubor se z��mkem a zkuste to znova.\n"
+
+#: pg_resetxlog.c:362
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Jestli��e tyto hodnoty vypadaj�� akceptovateln��, pou��ijte -f pro vynucen�� "
+"reset.\n"
+
+#: pg_resetxlog.c:374
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Datab��zov�� server nebyl ukon��en standardn��.\n"
+"Resetov��n�� transak��n��ho logu m����e zp��sobit ztr��tu dat.\n"
+"Jestli��e i p��esto chcete pokra��ovat, pou��ijte -f pro vynucen�� reset.\n"
+
+#: pg_resetxlog.c:388
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Transak��n�� log resetov��n\n"
+
+#: pg_resetxlog.c:417
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+" touch %s\n"
+"and try again.\n"
+msgstr ""
+"M��te-li jistotu, ��e je cesta k datov��mu adres����i spr��vn��, prove��te\n"
+" touch %s\n"
+"a zkuste to znovu.\n"
+
+#: pg_resetxlog.c:430
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: nelze ����st soubor \"%s\": %s\n"
+
+#: pg_resetxlog.c:453
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr ""
+"%s: pg_control existuje, ale s neplatn��m kontroln��m sou��tem CRC; postupujte "
+"opatrn��\n"
+
+#: pg_resetxlog.c:462
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr ""
+"%s: pg_control existuje, ale je po��kozen nebo nezn��m�� verze; ignoruji to\n"
+
+#: pg_resetxlog.c:561
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Odhadnut�� hodnoty pg_controlu:\n"
+"\n"
+
+#: pg_resetxlog.c:563
+#, c-format
+msgid ""
+"pg_control values:\n"
+"\n"
+msgstr ""
+"Hodnoty pg_controlu:\n"
+"\n"
+
+#: pg_resetxlog.c:574
+#, c-format
+msgid "First log segment after reset: %s\n"
+msgstr "Prvn�� log segment po resetu: %s\n"
+
+#: pg_resetxlog.c:576
+#, c-format
+msgid "pg_control version number: %u\n"
+msgstr "����slo verze pg_controlu: %u\n"
+
+#: pg_resetxlog.c:578
+#, c-format
+msgid "Catalog version number: %u\n"
+msgstr "����slo verze katalogu: %u\n"
+
+#: pg_resetxlog.c:580
+#, c-format
+msgid "Database system identifier: %s\n"
+msgstr "Identifik��tor datab��zov��ho syst��mu: %s\n"
+
+#: pg_resetxlog.c:582
+#, c-format
+msgid "Latest checkpoint's TimeLineID: %u\n"
+msgstr "TimeLineID posledn��ho checkpointu: %u\n"
+
+#: pg_resetxlog.c:584
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "Posledn�� full_page_writes checkpointu: %s\n"
+
+#: pg_resetxlog.c:585
+msgid "off"
+msgstr "vypnuto"
+
+#: pg_resetxlog.c:585
+msgid "on"
+msgstr "zapnuto"
+
+#: pg_resetxlog.c:586
+#, c-format
+msgid "Latest checkpoint's NextXID: %u/%u\n"
+msgstr "Posledn�� um��st��n�� NextXID checkpointu: %u/%u\n"
+
+#: pg_resetxlog.c:589
+#, c-format
+msgid "Latest checkpoint's NextOID: %u\n"
+msgstr "Posledn�� um��st��n�� NextOID checkpointu: %u\n"
+
+#: pg_resetxlog.c:591
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId: %u\n"
+msgstr "NextMultiXactId posledn��ho checkpointu: %u\n"
+
+#: pg_resetxlog.c:593
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset: %u\n"
+msgstr "NextMultiOffset posledn��ho checkpointu: %u\n"
+
+#: pg_resetxlog.c:595
+#, c-format
+msgid "Latest checkpoint's oldestXID: %u\n"
+msgstr "oldestXID posledn��ho checkpointu: %u\n"
+
+#: pg_resetxlog.c:597
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB: %u\n"
+msgstr "DB k oldestXID posledn��ho checkpointu: %u\n"
+
+#: pg_resetxlog.c:599
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID: %u\n"
+msgstr "oldestActiveXID posledn��ho checkpointu: %u\n"
+
+#: pg_resetxlog.c:601
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid: %u\n"
+msgstr "oldestMultiXid posledn��ho checkpointu: %u\n"
+
+#: pg_resetxlog.c:603
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "oldestMulti's DB posledn��ho checkpointu: %u\n"
+
+#: pg_resetxlog.c:605
+#, c-format
+msgid "Maximum data alignment: %u\n"
+msgstr "Maxim��ln�� zarovn��n�� dat: %u\n"
+
+#: pg_resetxlog.c:608
+#, c-format
+msgid "Database block size: %u\n"
+msgstr "Velikost datab��zov��ho bloku: %u\n"
+
+#: pg_resetxlog.c:610
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Blok�� v segmentu velk�� relace: %u\n"
+
+#: pg_resetxlog.c:612
+#, c-format
+msgid "WAL block size: %u\n"
+msgstr "Velikost WAL bloku: %u\n"
+
+#: pg_resetxlog.c:614
+#, c-format
+msgid "Bytes per WAL segment: %u\n"
+msgstr "Byt�� ve WAL segmentu: %u\n"
+
+#: pg_resetxlog.c:616
+#, c-format
+msgid "Maximum length of identifiers: %u\n"
+msgstr "Maxim��ln�� d��lka identifik��tor��: %u\n"
+
+#: pg_resetxlog.c:618
+#, c-format
+msgid "Maximum columns in an index: %u\n"
+msgstr "Maxim��ln�� po��et sloupc�� v indexu: %u\n"
+
+#: pg_resetxlog.c:620
+#, c-format
+msgid "Maximum size of a TOAST chunk: %u\n"
+msgstr "Maxim��ln�� velikost ��seku TOAST: %u\n"
+
+#: pg_resetxlog.c:622
+#, c-format
+msgid "Date/time type storage: %s\n"
+msgstr "Zp��sob ulo��en�� typu date/time: %s\n"
+
+#: pg_resetxlog.c:623
+msgid "64-bit integers"
+msgstr "64-bitov�� ����sla"
+
+#: pg_resetxlog.c:623
+msgid "floating-point numbers"
+msgstr "����sla s plovouc�� ����dovou ����rkou"
+
+#: pg_resetxlog.c:624
+#, c-format
+msgid "Float4 argument passing: %s\n"
+msgstr "Zp��sob p��ed��v��n�� float4 hodnot: %s\n"
+
+#: pg_resetxlog.c:625 pg_resetxlog.c:627
+msgid "by reference"
+msgstr "odkazem"
+
+#: pg_resetxlog.c:625 pg_resetxlog.c:627
+msgid "by value"
+msgstr "hodnotou"
+
+#: pg_resetxlog.c:626
+#, c-format
+msgid "Float8 argument passing: %s\n"
+msgstr "Zp��sob p��ed��v��n�� float8 hodnot: %s\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+#| msgid "Catalog version number: %u\n"
+msgid "Data page checksum version: %u\n"
+msgstr "Verze kontroln��ch sou��t�� datov��ch str��nek: %u\n"
+
+#: pg_resetxlog.c:690
+#, c-format
+msgid ""
+"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
+"PG_CONTROL_SIZE\n"
+msgstr ""
+"%s: intern�� chyba -- sizeof(ControlFileData) je p����li�� velk�� ... opravte "
+"PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:705
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: nelze vytvo��it pg_control soubor: %s\n"
+
+#: pg_resetxlog.c:716
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: nelze zapsat pg_control soubor: %s\n"
+
+#: pg_resetxlog.c:723 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: fsync chyba: %s\n"
+
+#: pg_resetxlog.c:763 pg_resetxlog.c:834 pg_resetxlog.c:890
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: nelze otev����t adres���� \"%s\": %s\n"
+
+#: pg_resetxlog.c:805 pg_resetxlog.c:867 pg_resetxlog.c:924
+#, c-format
+msgid "%s: could not read from directory \"%s\": %s\n"
+msgstr "%s: nelze ����st z adres����e \"%s\": %s\n"
+
+#: pg_resetxlog.c:848 pg_resetxlog.c:905
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: nelze smazat soubor \"%s\": %s\n"
+
+#: pg_resetxlog.c:989
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: nelze otev����t soubor \"%s\": %s\n"
+
+#: pg_resetxlog.c:1000 pg_resetxlog.c:1014
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: nelze zapsat do souboru \"%s\": %s\n"
+
+#: pg_resetxlog.c:1033
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s resetuje PostgreSQL transak��n�� log.\n"
+"\n"
+
+#: pg_resetxlog.c:1034
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Pou��it��:\n"
+" %s [VOLBA]... ADRES����\n"
+"\n"
+
+#: pg_resetxlog.c:1035
+#, c-format
+msgid "Options:\n"
+msgstr "P��ep��na��e:\n"
+
+#: pg_resetxlog.c:1036
+#, c-format
+msgid " -e XIDEPOCH set next transaction ID epoch\n"
+msgstr " -e XIDEPOCH nastav�� epochu n��sleduj��c��ho ID transakce\n"
+
+#: pg_resetxlog.c:1037
+#, c-format
+msgid " -f force update to be done\n"
+msgstr " -f vynut�� proveden�� update\n"
+
+#: pg_resetxlog.c:1038
+#, c-format
+msgid ""
+" -l XLOGFILE force minimum WAL starting location for new transaction "
+"log\n"
+msgstr ""
+" -l XLOGFILE vynut�� minim��ln�� po����te��n�� WAL pozici pro nov�� transak��n�� "
+"log\n"
+
+#: pg_resetxlog.c:1039
+#, c-format
+#| msgid " -x XID set next transaction ID\n"
+msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
+msgstr " -m MXID,MXID nastav dal���� a nejstar���� ID multitransakce\n"
+
+#: pg_resetxlog.c:1040
+#, c-format
+msgid ""
+" -n no update, just show extracted control values (for "
+"testing)\n"
+msgstr ""
+" -n bez zm��ny, jen uk����e z��skan�� kontroln�� hodnoty (pro "
+"testov��n��)\n"
+
+#: pg_resetxlog.c:1041
+#, c-format
+msgid " -o OID set next OID\n"
+msgstr " -o OID nastav�� n��sleduj��c�� OID\n"
+
+#: pg_resetxlog.c:1042
+#, c-format
+msgid " -O OFFSET set next multitransaction offset\n"
+msgstr " -O OFFSET nastav�� offset n��sleduj��c�� multitransakce\n"
+
+#: pg_resetxlog.c:1043
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version uk����e informace o verzi a skon����\n"
+
+#: pg_resetxlog.c:1044
+#, c-format
+msgid " -x XID set next transaction ID\n"
+msgstr " -x XID nastav�� ID n��sleduj��c�� transakce\n"
+
+#: pg_resetxlog.c:1045
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help uk����e tuto n��pov��du a skon����\n"
+
+#: pg_resetxlog.c:1046
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Chyby hlaste na adresu <pgsql-bugs@postgresql.org>.\n"
+
+#~ msgid "First log file ID after reset: %u\n"
+#~ msgstr "Prvn�� ID log souboru po resetu: %u\n"
diff --git a/src/bin/pg_resetwal/po/de.po b/src/bin/pg_resetwal/po/de.po
new file mode 100644
index 0000000..fb6324d
--- /dev/null
+++ b/src/bin/pg_resetwal/po/de.po
@@ -0,0 +1,605 @@
+# German message translation file for pg_resetxlog
+# Peter Eisentraut <peter_e@gmx.net>, 2002 - 2016.
+#
+# Use these quotes: ��%s��
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.6\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-04-12 20:14+0000\n"
+"PO-Revision-Date: 2016-04-12 18:28-0400\n"
+"Last-Translator: Peter Eisentraut <peter_e@gmx.net>\n"
+"Language-Team: German <peter_e@gmx.net>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: WARNUNG: auf dieser Plattform k��nnen keine beschr��nkten Token erzeugt werden\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: konnte Prozess-Token nicht ��ffnen: Fehlercode %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: konnte SIDs nicht erzeugen: Fehlercode %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: konnte beschr��nktes Token nicht erzeugen: Fehlercode %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: konnte Prozess f��r Befehl ��%s�� nicht starten: Fehlercode %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: konnte Prozess nicht mit beschr��nktem Token neu starten: Fehlercode %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: konnte Statuscode des Subprozesses nicht ermitteln: Fehlercode %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: ung��ltiges Argument f��r Option %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Versuchen Sie ��%s --help�� f��r weitere Informationen.\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: Transaktions-ID-Epoche (-e) darf nicht -1 sein\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: Transaktions-ID (-x) darf nicht 0 sein\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s: Transaktions-ID (-c) muss entweder 0 oder gr����er oder gleich 2 sein\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) darf nicht 0 sein\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: Multitransaktions-ID (-m) darf nicht 0 sein\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ��lteste Multitransaktions-ID (-m) darf nicht 0 sein\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: Multitransaktions-Offset (-O) darf nicht -1 sein\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: zu viele Kommandozeilenargumente (das erste ist ��%s��)\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: kein Datenverzeichnis angegeben\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: kann nicht von ��root�� ausgef��hrt werden\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Sie m��ssen %s als PostgreSQL-Superuser ausf��hren.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: konnte nicht in Verzeichnis ��%s�� wechseln: %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: konnte Datei ��%s�� nicht zum Lesen ��ffnen: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running? If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: Sperrdatei ��%s�� existiert bereits\n"
+"L��uft der Server? Wenn nicht, dann Sperrdatei l��schen und nochmal versuchen.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Wenn diese Werte akzeptabel scheinen, dann benutzen Sie -f um das\n"
+"Zur��cksetzen zu erzwingen.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Der Datenbankserver wurde nicht sauber heruntergefahren.\n"
+"Beim Zur��cksetzen des Transaktionslogs k��nnen Daten verloren gehen.\n"
+"Wenn Sie trotzdem weiter machen wollen, benutzen Sie -f, um das\n"
+"Zur��cksetzen zu erzwingen.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Transaktionslog wurde zur��ck gesetzt\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+" touch %s\n"
+"and try again.\n"
+msgstr ""
+"Wenn Sie sicher sind, dass das Datenverzeichnis korrekt ist, f��hren Sie\n"
+" touch %s\n"
+"aus und versuchen Sie es erneut.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: konnte Datei ��%s�� nicht lesen: %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control existiert, aber mit ung��ltiger CRC; mit Vorsicht fortfahren\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control existiert, aber ist kaputt oder hat unbekannte Version; wird ignoriert\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Gesch��tzte pg_control-Werte:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Aktuelle pg_control-Werte:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number: %u\n"
+msgstr "pg_control-Versionsnummer: %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number: %u\n"
+msgstr "Katalogversionsnummer: %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier: %s\n"
+msgstr "Datenbanksystemidentifikation: %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID: %u\n"
+msgstr "TimeLineID des letzten Checkpoints: %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "full_page_writes des letzten Checkpoints: %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "aus"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "an"
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID: %u:%u\n"
+msgstr "NextXID des letzten Checkpoints: %u:%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID: %u\n"
+msgstr "NextOID des letzten Checkpoints: %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId: %u\n"
+msgstr "NextMultiXactId des letzten Checkpoints: %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset: %u\n"
+msgstr "NextMultiOffset des letzten Checkpoints: %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID: %u\n"
+msgstr "oldestXID des letzten Checkpoints: %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB: %u\n"
+msgstr "DB der oldestXID des letzten Checkpoints: %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID: %u\n"
+msgstr "oldestActiveXID des letzten Checkpoints: %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid: %u\n"
+msgstr "oldestMultiXid des letzten Checkpoints: %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "DB des oldestMulti des letzten Checkpoints: %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "oldestCommitTsXid des letzten Checkpoints: %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "newestCommitTsXid des letzten Checkpoints: %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment: %u\n"
+msgstr "Maximale Datenausrichtung (Alignment): %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size: %u\n"
+msgstr "Datenbankblockgr����e: %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Bl��cke pro Segment: %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size: %u\n"
+msgstr "WAL-Blockgr����e: %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment: %u\n"
+msgstr "Bytes pro WAL-Segment: %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers: %u\n"
+msgstr "Maximale Bezeichnerl��nge: %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index: %u\n"
+msgstr "Maximale Spalten in einem Index: %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk: %u\n"
+msgstr "Maximale Gr����e eines St��cks TOAST: %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk: %u\n"
+msgstr "Gr����e eines Large-Object-Chunks: %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage: %s\n"
+msgstr "Speicherung von Datum/Zeit-Typen: %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "64-Bit-Ganzzahlen"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "Gleitkommazahlen"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing: %s\n"
+msgstr "��bergabe von Float4-Argumenten: %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "Referenz"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "Wert"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing: %s\n"
+msgstr "��bergabe von Float8-Argumenten: %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version: %u\n"
+msgstr "Datenseitenpr��fsummenversion: %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Zu ��ndernde Werte:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset: %s\n"
+msgstr "Erstes Logdateisegment nach Zur��cksetzen: %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId: %u\n"
+msgstr "NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid: %u\n"
+msgstr "OldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB: %u\n"
+msgstr "OldestMulti's DB: %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset: %u\n"
+msgstr "NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID: %u\n"
+msgstr "NextOID: %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID: %u\n"
+msgstr "NextXID: %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID: %u\n"
+msgstr "OldestXID: %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB: %u\n"
+msgstr "OldestXID's DB: %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch: %u\n"
+msgstr "NextXID-Epoche: %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid: %u\n"
+msgstr "oldestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid: %u\n"
+msgstr "newestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr "%s: interner Fehler -- sizeof(ControlFileData) ist zu gro�� ... PG_CONTROL_SIZE reparieren\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: konnte pg_control-Datei nicht erstellen: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%sL konnte pg_control-Datei nicht schreiben: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: fsync-Fehler: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: konnte Verzeichnis ��%s�� nicht ��ffnen: %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: konnte Verzeichnis ��%s�� nicht lesen: %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: konnte Verzeichnis ��%s�� nicht schlie��en: %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: konnte Datei ��%s�� nicht l��schen: %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: konnte Datei ��%s�� nicht ��ffnen: %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: konnte Datei ��%s�� nicht schreiben: %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s setzt den PostgreSQL-Transaktionslog zur��ck.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Aufruf:\n"
+" %s [OPTION]... DATENVERZEICHNIS\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Optionen:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid " -c XID,XID set oldest and newest transactions bearing commit timestamp\n"
+msgstr " -c XID,XID ��lteste und neuste Transaktion mit Commit-Timestamp setzen\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid " (zero in either value means no change)\n"
+msgstr " (Null in einem Wert bedeutet keine ��nderung)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR data directory\n"
+msgstr " [-D] DATENVERZ Datenbankverzeichnis\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid " -e XIDEPOCH set next transaction ID epoch\n"
+msgstr " -e XIDEPOCHE n��chste Transaktions-ID-Epoche setzen\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid " -f force update to be done\n"
+msgstr " -f ��nderung erzwingen\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
+msgstr " -l XLOGDATEI minimale WAL-Startposition f��r neuen Log erzwingen\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
+msgstr " -m MXID,MXID n��chste und ��lteste Multitransaktions-ID setzen\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid " -n no update, just show what would be done (for testing)\n"
+msgstr ""
+" -n keine ��nderungen; nur zeigen, was gemacht werden w��rde (zum\n"
+" Testen)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid " -o OID set next OID\n"
+msgstr " -o OID n��chste OID setzen\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid " -O OFFSET set next multitransaction offset\n"
+msgstr " -O OFFSET n��chsten Multitransaktions-Offset setzen\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version Versionsinformationen anzeigen, dann beenden\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid " -x XID set next transaction ID\n"
+msgstr " -x XID n��chste Transaktions-ID setzen\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help diese Hilfe anzeigen, dann beenden\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Berichten Sie Fehler an <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetwal/po/es.po b/src/bin/pg_resetwal/po/es.po
new file mode 100644
index 0000000..fec8ea9
--- /dev/null
+++ b/src/bin/pg_resetwal/po/es.po
@@ -0,0 +1,611 @@
+# Spanish message translation file for pg_resetxlog
+#
+# Copyright (C) 2003-2012 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+#
+# Ivan Hernandez <ivanx@ciencias.unam.mx>, 2003.
+# Alvaro Herrera <alvherre@alvh.no-ip.org>, 2004-2014
+# Jaime Casanova <systemguards@gmail.com>, 2005
+# Mart��n Marqu��s <martin@2ndquadrant.com>, 2013-2014
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_resetxlog (PostgreSQL 9.6)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-05-02 20:14+0000\n"
+"PO-Revision-Date: 2016-05-24 10:56-0500\n"
+"Last-Translator: Carlos Chapi <carlos.chapi@2ndquadrant.com>\n"
+"Language-Team: Espa��ol <pgsql-es-ayuda@postgresql.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.7\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: ATENCI��N: no se pueden crear tokens restrigidos en esta plataforma\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: no se pudo abrir el token de proceso: c��digo de error %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: no se pudo emplazar los SIDs: c��digo de error %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: no se pudo crear el token restringido: c��digo de error %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: no se pudo iniciar el proceso para la orden ��%s��: c��digo de error %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: no se pudo re-ejecutar con el token restringido: c��digo de error %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: no se pudo obtener el c��digo de salida del subproceso��: c��digo de error %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: argumento no v��lido para la opci��n %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Prueba con ��%s --help�� para m��s informaci��n\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: el ��epoch�� de ID de transacci��n (-e) no debe ser -1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: el ID de transacci��n (-x) no debe ser 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s: el ID de transacci��n (-c) debe ser 0 o bien mayor o igual a 2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) no debe ser cero\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: el ID de multitransacci��n (-m) no debe ser 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: el ID de multitransacci��n m��s antiguo (-m) no debe ser 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: la posici��n de multitransacci��n (-O) no debe ser -1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: demasiados argumentos de l��nea de ��rdenes (el primero es ��%s��)\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: directorio de datos no especificado\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: no puede ser ejecutado con el usuario ��root��\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Debe ejecutar %s con el superusuario de PostgreSQL.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: no se pudo cambiar al directorio ��%s��: %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: no se pudo abrir el archivo ��%s�� para lectura: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running? If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: el archivo candado ��%s�� existe\n"
+"��Hay un servidor corriendo? Si no, borre el archivo candado e int��ntelo de nuevo\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Si estos valores parecen aceptables, use -f para forzar reinicio.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"El servidor de base de datos no fue terminado limpiamente.\n"
+"Reiniciar la bit��cora de transacciones puede causar p��rdida de datos.\n"
+"Si de todas formas quiere proceder, use -f para forzar su reinicio.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Bit��cora de transacciones reiniciada\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+" touch %s\n"
+"and try again.\n"
+msgstr ""
+"Si est�� seguro que la ruta al directorio de datos es correcta, ejecute\n"
+" touch %s\n"
+"y pruebe de nuevo.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: no se pudo leer el archivo ��%s��: %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: existe pg_control pero tiene un CRC no v��lido, proceda con precauci��n\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: existe pg_control pero est�� roto o se desconoce su versi��n; ignor��ndolo\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Valores de pg_control asumidos:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Valores actuales de pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number: %u\n"
+msgstr "N��mero de versi��n de pg_control: %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number: %u\n"
+msgstr "N��mero de versi��n de cat��logo: %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier: %s\n"
+msgstr "Identificador de sistema: %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID: %u\n"
+msgstr "TimeLineID del checkpoint m��s reciente: %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "full_page_writes del checkpoint m��s reciente: %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "desactivado"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "activado"
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID: %u:%u\n"
+msgstr "NextXID del checkpoint m��s reciente: %u:%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID: %u\n"
+msgstr "NextOID del checkpoint m��s reciente: %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId: %u\n"
+msgstr "NextMultiXactId del checkpoint m��s reciente: %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset: %u\n"
+msgstr "NextMultiOffset del checkpoint m��s reciente: %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID: %u\n"
+msgstr "oldestXID del checkpoint m��s reciente: %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB: %u\n"
+msgstr "BD del oldestXID del checkpoint m��s reciente: %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID: %u\n"
+msgstr "oldestActiveXID del checkpoint m��s reciente: %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid: %u\n"
+msgstr "oldestMultiXid del checkpoint m��s reciente: %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "BD del oldestMultiXid del checkpt. m��s reciente: %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "oldestCommitTsXid del ��ltimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "newestCommitTsXid del ��ltimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment: %u\n"
+msgstr "M��ximo alineamiento de datos: %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size: %u\n"
+msgstr "Tama��o del bloque de la base de datos: %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Bloques por segmento de relaci��n grande: %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size: %u\n"
+msgstr "Tama��o del bloque de WAL: %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment: %u\n"
+msgstr "Bytes por segmento WAL: %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers: %u\n"
+msgstr "Longitud m��xima de identificadores: %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index: %u\n"
+msgstr "M��ximo n��mero de columnas en un ��ndice: %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk: %u\n"
+msgstr "Longitud m��xima de un trozo TOAST: %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk: %u\n"
+msgstr "Longitud m��xima de un trozo de objeto grande: %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage: %s\n"
+msgstr "Tipo de almacenamiento hora/fecha: %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "enteros de 64 bits"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "n��meros de coma flotante"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing: %s\n"
+msgstr "Paso de par��metros float4: %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "por referencia"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "por valor"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing: %s\n"
+msgstr "Paso de par��metros float8: %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version: %u\n"
+msgstr "Versi��n de suma de verificaci��n de datos: %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Valores a cambiar:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset: %s\n"
+msgstr "Primer segmento de log despu��s de reiniciar: %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId: %u\n"
+msgstr "NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid: %u\n"
+msgstr "OldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB: %u\n"
+msgstr "Base de datos del OldestMulti: %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset: %u\n"
+msgstr "NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID: %u\n"
+msgstr "NextOID: %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID: %u\n"
+msgstr "NextXID: %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID: %u\n"
+msgstr "OldestXID: %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB: %u\n"
+msgstr "Base de datos del OldestXID: %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch: %u\n"
+msgstr "Epoch del NextXID: %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid: %u\n"
+msgstr "oldestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid: %u\n"
+msgstr "newestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr "%s: error interno -- sizeof(ControlFileData) es demasiado grande ... corrija PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: no se pudo crear el archivo pg_control: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: no se pudo escribir el archivo pg_control: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: error de fsync: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: no se pudo abrir el directorio ��%s��: %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: no se pudo leer el directorio ��%s��: %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: no se pudo cerrar el directorio ��%s��: %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: no se pudo borrar el archivo ��%s��: %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: no se pudo abrir el archivo ��%s��: %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: no se pudo escribir en el archivo ��%s��: %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s reinicia la bit��cora de transacciones de PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Uso:\n"
+" %s [OPCI��N]... DATADIR\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Opciones:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid " -c XID,XID set oldest and newest transactions bearing commit timestamp\n"
+msgstr ""
+" -c XID,XID asigna los ID de transacciones m��s antiguo y m��s nuevo que llevan\n"
+" timestamp de commit\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid " (zero in either value means no change)\n"
+msgstr " (cero en cualquiera de ellos significa no cambiar)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR data directory\n"
+msgstr " [-D] DATADIR directorio de datos\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid " -e XIDEPOCH set next transaction ID epoch\n"
+msgstr " -e XIDEPOCH asigna el siguiente ��epoch�� de ID de transacci��n\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid " -f force update to be done\n"
+msgstr " -f fuerza que la actualizaci��n sea hecha\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
+msgstr ""
+" -l XLOGFILE fuerza una posici��n m��nima de inicio de WAL para una\n"
+" nueva transacci��n\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
+msgstr " -m MXID,MXID asigna el siguiente ID de multitransacci��n y el m��s antiguo\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid " -n no update, just show what would be done (for testing)\n"
+msgstr " -n no actualiza, s��lo muestra lo que va a hacer (para pruebas)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid " -o OID set next OID\n"
+msgstr " -o OID asigna el siguiente OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid " -O OFFSET set next multitransaction offset\n"
+msgstr " -O OFFSET asigna la siguiente posici��n de multitransacci��n\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version muestra informaci��n de la versi��n, luego sale\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid " -x XID set next transaction ID\n"
+msgstr " -x XID asigna el siguiente ID de transacci��n\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help muestra esta ayuda, luego sale\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Reporte errores a <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetwal/po/fr.po b/src/bin/pg_resetwal/po/fr.po
new file mode 100644
index 0000000..1a9a57f
--- /dev/null
+++ b/src/bin/pg_resetwal/po/fr.po
@@ -0,0 +1,644 @@
+# translation of pg_resetxlog.po to fr_fr
+# french message translation file for pg_resetxlog
+#
+# Use these quotes: � %s �
+#
+# Guillaume Lelarge <guillaume@lelarge.info>, 2003-2009.
+# St�phane Schildknecht <stephane.schildknecht@dalibo.com>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.6\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-05-08 21:14+0000\n"
+"PO-Revision-Date: 2016-05-09 10:28+0200\n"
+"Last-Translator: Guillaume Lelarge <guillaume@lelarge.info>\n"
+"Language-Team: PostgreSQLfr <pgsql-fr-generale@postgresql.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.8.7.1\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s : ATTENTION : ne peut pas cr�r les jetons restreints sur cette plateforme\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s : n'a pas pu ouvrir le jeton du processus : code d'erreur %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s : n'a pas pu allouer les SID : code d'erreur %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s : n'a pas pu cr�er le jeton restreint : code d'erreur %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s : n'a pas pu d�marrer le processus pour la commande � %s � : code d'erreur %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s : n'a pas pu r�-ex�cuter le jeton restreint : code d'erreur %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s : n'a pas pu r�cup�rer le code de statut du sous-processus : code d'erreur %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s : argument invalide pour l'option %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Essayer � %s --help � pour plus d'informations.\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr ""
+"%s : la valeur epoch de l'identifiant de transaction (-e) ne doit pas �tre\n"
+"-1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s : l'identifiant de la transaction (-x) ne doit pas �tre 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s : l'identifiant de transaction (-c) doit �tre 0 ou sup�rieur ou �gal � 2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s : l'OID (-o) ne doit pas �tre 0\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s : l'identifiant de multi-transaction (-m) ne doit pas �tre 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s : l'identifiant de multi-transaction le plus ancien (-m) ne doit pas �tre 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s : le d�calage de multi-transaction (-O) ne doit pas �tre -1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s : trop d'arguments en ligne de commande (le premier �tant � %s �)\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s : aucun r�pertoire de donn�es indiqu�\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s : ne peut pas �tre ex�cut� par � root �\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Vous devez ex�cuter %s en tant que super-utilisateur PostgreSQL.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s : n'a pas pu acc�der au r�pertoire � %s � : %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s : n'a pas pu ouvrir le fichier � %s � en lecture : %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running? If not, delete the lock file and try again.\n"
+msgstr ""
+"%s : le verrou � %s � existe\n"
+"Le serveur est-il d�marr� ? Sinon, supprimer le fichier verrou et r�essayer.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Si ces valeurs semblent acceptables, utiliser -f pour forcer la\n"
+"r�initialisation.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Le serveur de bases de donn�es n'a pas �t� arr�t� proprement.\n"
+"R�-initialiser le journal des transactions peut occasionner des pertes de\n"
+"donn�es.\n"
+"Pour continuer malgr� tout, utiliser -f pour forcer la\n"
+"r�initialisation.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "R�initialisation du journal des transactions\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+" touch %s\n"
+"and try again.\n"
+msgstr ""
+"Si le chemin du r�pertoire de donn�es est correct, ex�cuter\n"
+" touch %s\n"
+"et r�essayer.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s : n'a pas pu lire le fichier � %s � : %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s : pg_control existe mais son CRC est invalide ; agir avec pr�caution\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s : pg_control existe mais est corrompu ou de version inconnue ; ignor�\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Valeurs de pg_control devin�es :\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Valeurs actuelles de pg_control :\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number: %u\n"
+msgstr "Num�ro de version de pg_control : %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number: %u\n"
+msgstr "Num�ro de version du catalogue : %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier: %s\n"
+msgstr "Identifiant du syst�me de base de donn�es : %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID: %u\n"
+msgstr "Dernier TimeLineID du point de contr�le : %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "Dernier full_page_writes du point de contr�le : %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "d�sactiv�"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "activ�"
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID: %u:%u\n"
+msgstr "Dernier NextXID du point de contr�le : %u:%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID: %u\n"
+msgstr "Dernier NextOID du point de contr�le : %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId: %u\n"
+msgstr "Dernier NextMultiXactId du point de contr�le : %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset: %u\n"
+msgstr "Dernier NextMultiOffset du point de contr�le : %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID: %u\n"
+msgstr "Dernier oldestXID du point de contr�le : %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB: %u\n"
+msgstr "Dernier oldestXID du point de contr�le de la base : %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID: %u\n"
+msgstr "Dernier oldestActiveXID du point de contr�le : %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid: %u\n"
+msgstr "Dernier oldestMultiXID du point de contr�le : %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "Dernier oldestMulti du point de contr�le de la base : %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "Dernier oldestCommitTsXid du point de contr�le : %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "Dernier newestCommitTsXid du point de contr�le : %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment: %u\n"
+msgstr "Alignement maximal des donn�es : %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size: %u\n"
+msgstr "Taille du bloc de la base de donn�es : %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Blocs par segment des relations volumineuses : %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size: %u\n"
+msgstr "Taille de bloc du journal de transaction : %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment: %u\n"
+msgstr "Octets par segment du journal de transaction : %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers: %u\n"
+msgstr "Longueur maximale des identifiants : %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index: %u\n"
+msgstr "Nombre maximal de colonnes d'un index: %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk: %u\n"
+msgstr "Longueur maximale d'un morceau TOAST : %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk: %u\n"
+msgstr "Taille d'un morceau de Large Object : %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage: %s\n"
+msgstr "Stockage du type date/heure : %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "entiers 64-bits"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "nombres � virgule flottante"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing: %s\n"
+msgstr "Passage d'argument float4 : %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "par r�f�rence"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "par valeur"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing: %s\n"
+msgstr "Passage d'argument float8 : %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version: %u\n"
+msgstr "Version des sommes de contr�le des pages de donn�es : %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Valeurs � changer :\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset: %s\n"
+msgstr "Premier segment du journal apr�s r�initialisation : %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId: %u\n"
+msgstr "NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid: %u\n"
+msgstr "OldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB: %u\n"
+msgstr "OldestMulti's DB: %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset: %u\n"
+msgstr "NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID: %u\n"
+msgstr "NextOID: %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID: %u\n"
+msgstr "NextXID: %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID: %u\n"
+msgstr "OldestXID: %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB: %u\n"
+msgstr "OldestXID's DB: %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch: %u\n"
+msgstr "NextXID Epoch: %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid: %u\n"
+msgstr "oldestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid: %u\n"
+msgstr "newestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr ""
+"%s : erreur interne -- sizeof(ControlFileData) est trop important...\n"
+"corrigez PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s : n'a pas pu cr�er le fichier pg_control : %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s : n'a pas pu �crire le fichier pg_control : %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s : erreur fsync : %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s : n'a pas pu ouvrir le r�pertoire � %s � : %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s : n'a pas pu lire le r�pertoire � %s � : %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s : n'a pas pu fermer le r�pertoire � %s � : %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s : n'a pas pu supprimer le fichier � %s � : %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s : n'a pas pu ouvrir le fichier � %s � : %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s : n'a pas pu �crire le fichier � %s � : %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s r�initialise le journal des transactions PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Usage :\n"
+" %s [OPTION]... R�P_DONN�ES\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Options :\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid " -c XID,XID set oldest and newest transactions bearing commit timestamp\n"
+msgstr " -c XID,XID configure la plus ancienne et la plus r�cente transaction\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid " (zero in either value means no change)\n"
+msgstr " (z�ro dans l'une des deux valeurs signifie aucun changement)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR data directory\n"
+msgstr " [-D] R�PDONNEES r�pertoire de la base de donn�es\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid " -e XIDEPOCH set next transaction ID epoch\n"
+msgstr ""
+" -e XIDEPOCH fixe la valeur epoch du prochain identifiant de\n"
+" transaction\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid " -f force update to be done\n"
+msgstr " -f force la mise � jour\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
+msgstr ""
+" -l FICHIERXLOG force l'emplacement minimal de d�but des WAL du nouveau\n"
+" journal de transactions\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
+msgstr " -m MXID,MXID fixe le prochain identifiant multi-transaction\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid " -n no update, just show what would be done (for testing)\n"
+msgstr ""
+" -n pas de mise � jour, affiche simplement ce qui sera fait\n"
+" (pour test)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid " -o OID set next OID\n"
+msgstr " -o OID fixe le prochain OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid " -O OFFSET set next multitransaction offset\n"
+msgstr " -O D�CALAGE fixe le d�calage de la prochaine multi-transaction\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version affiche la version et quitte\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid " -x XID set next transaction ID\n"
+msgstr " -x XID fixe le prochain identifiant de transaction\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help affiche cette aide et quitte\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Rapporter les bogues � <pgsql-bugs@postgresql.org>.\n"
+
+#~ msgid "%s: invalid argument for option -x\n"
+#~ msgstr "%s : argument invalide pour l'option -x\n"
+
+#~ msgid "%s: invalid argument for option -o\n"
+#~ msgstr "%s : argument invalide pour l'option -o\n"
+
+#~ msgid "%s: invalid argument for option -m\n"
+#~ msgstr "%s : argument invalide pour l'option -m\n"
+
+#~ msgid "%s: invalid argument for option -O\n"
+#~ msgstr "%s : argument invalide pour l'option -O\n"
+
+#~ msgid "%s: invalid argument for option -l\n"
+#~ msgstr "%s : argument invalide pour l'option -l\n"
+
+#~ msgid "%s: could not read from directory \"%s\": %s\n"
+#~ msgstr "%s : n'a pas pu lire le r�pertoire � %s � : %s\n"
+
+#~ msgid " --help show this help, then exit\n"
+#~ msgstr " --help affiche cette aide et quitte\n"
+
+#~ msgid " --version output version information, then exit\n"
+#~ msgstr " --version afficherla version et quitte\n"
+
+#~ msgid "First log file ID after reset: %u\n"
+#~ msgstr "Premier identifiant du journal apr�s r�initialisation : %u\n"
diff --git a/src/bin/pg_resetwal/po/it.po b/src/bin/pg_resetwal/po/it.po
new file mode 100644
index 0000000..9fc4479
--- /dev/null
+++ b/src/bin/pg_resetwal/po/it.po
@@ -0,0 +1,620 @@
+#
+# Translation of pg_resetxlog to Italian
+# PostgreSQL Project
+#
+# Associazione Culturale ITPUG - Italian PostgreSQL Users Group
+# http://www.itpug.org/ - info@itpug.org
+#
+# Traduttori:
+# * Diego Cinelli <diego.cinelli@itpug.org>
+# * Daniele Varrazzo <daniele.varrazzo@gmail.com>
+#
+# Revisori:
+# * Emanuele Zamprogno <emanuele.zamprogno@itpug.org>
+#
+# Traduttori precedenti:
+# * Fabrizio Mazzoni <veramente@libero.it>
+# * Mirko Tebaldi <mirko.tebaldi@libero.it>
+#
+# Copyright (c) 2010, Associazione Culturale ITPUG
+# Distributed under the same license of the PostgreSQL project
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_resetxlog (PostgreSQL) 9.6\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-04-17 00:14+0000\n"
+"PO-Revision-Date: 2016-04-17 20:51+0100\n"
+"Last-Translator: Daniele Varrazzo <daniele.varrazzo@gmail.com>\n"
+"Language-Team: Gruppo traduzioni ITPUG <traduzioni@itpug.org>\n"
+"Language: it\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Poedit 1.5.4\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: ATTENZIONE: non �� possibile creare token ristretti su questa piattaforma\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: apertura del token di processo fallita: codice di errore %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: allocazione dei SID fallita: codice di errore: %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: creazione del token ristretto fallita: codice di errore %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: avvio del processo fallito per il comando \"%s\": codice di errore %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: ri-esecuzione con token ristretto fallita: codice di errore %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: lettura del codice di uscita del sottoprocesso fallita: codice di errore %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: argomento non valido per l'opzione %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Prova \"%s --help\" per maggiori informazioni.\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: l'ID epoch della transazione (-e) non deve essere -1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: l'ID della transazione (-x) non deve essere 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s: l'ID di transazione (-c) dev'essere 0 or maggiore o uguale a 2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: l'OID (-o) non deve essere 0\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: l'ID della multitransazione (-m) non deve essere 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: l'ID multitransazione pi�� vecchio (-m) non pu�� essere 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: l'offset di una multitransazione (-O) non pu�� essere -1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: troppi argomenti di riga di comando (il primo �� \"%s\")\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: non �� stata specificata una directory per i dati\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s non pu�� essere eseguito da \"root\"\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "�� obbligatorio eseguire %s come superutente di PostgreSQL.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: spostamento nella directory \"%s\" fallito: %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: errore nell'apertura del file \"%s\" per la lettura: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running? If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: il file di lock \"%s\" esiste\n"
+"Il server �� in esecuzione? Se non lo ��, cancella il file di lock e riprova.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Se questi parametri sembrano accettabili, utilizza -f per forzare un reset.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Il server database non �� stato arrestato correttamente.\n"
+"Resettare il registro delle transazioni pu�� causare una perdita di dati.\n"
+"Se vuoi continuare comunque, utilizza -f per forzare il reset.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Registro delle transazioni riavviato\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+" touch %s\n"
+"and try again.\n"
+msgstr ""
+"Se sei sicuro che il percorso della directory dei dati �� corretto, esegui\n"
+" touch %s\n"
+"e riprova.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: lettura del file \"%s\" fallita: %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control esiste ma ha un CRC non valido; procedere con cautela\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control esiste ma �� inutilizzabile o �� una versione sconosciuta; verr�� ignorato\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Valori pg_control indovinati:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Valori pg_control attuali:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number: %u\n"
+msgstr "Numero di versione di pg_control: %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number: %u\n"
+msgstr "Numero di versione del catalogo: %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier: %s\n"
+msgstr "Identificatore di sistema del database: %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID: %u\n"
+msgstr "TimeLineId dell'ultimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "full_page_writes dell'ultimo checkpoint: %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "disattivato"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "attivato"
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID: %u:%u\n"
+msgstr "NextXID dell'ultimo checkpoint: %u.%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID: %u\n"
+msgstr "NextOID dell'ultimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId: %u\n"
+msgstr "NextMultiXactId dell'ultimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset: %u\n"
+msgstr "NextMultiOffset dell'ultimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID: %u\n"
+msgstr "oldestXID dell'ultimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB: %u\n"
+msgstr "DB dell'oldestXID dell'ultimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID: %u\n"
+msgstr "oldestActiveXID dell'ultimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid: %u\n"
+msgstr "oldestMultiXID dell'ultimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "DB dell'oldestMulti dell'ultimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "oldestCommitTsXid dell'ultimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "newestCommitTsXid dell'ultimo checkpoint: %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment: %u\n"
+msgstr "Massimo allineamento dei dati: %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size: %u\n"
+msgstr "Dimensione blocco database: %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Blocchi per ogni segmento grosse tabelle: %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size: %u\n"
+msgstr "Dimensione blocco WAL: %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment: %u\n"
+msgstr "Byte per segmento WAL: %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers: %u\n"
+msgstr "Lunghezza massima degli identificatori: %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index: %u\n"
+msgstr "Massimo numero di colonne in un indice: %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk: %u\n"
+msgstr "Massima dimensione di un segmento TOAST: %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk: %u\n"
+msgstr "Dimensione di un blocco large-object: %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage: %s\n"
+msgstr "Memorizzazione per tipi data/ora: %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "interi a 64 bit"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "numeri in virgola mobile"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing: %s\n"
+msgstr "Passaggio di argomenti Float4: %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "per riferimento"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "per valore"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing: %s\n"
+msgstr "passaggio di argomenti Float8: %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version: %u\n"
+msgstr "Versione somma di controllo dati pagine: %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Valori da cambiare:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset: %s\n"
+msgstr "Primo segmento di log dopo il reset: %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId: %u\n"
+msgstr "NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid: %u\n"
+msgstr "OldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB: %u\n"
+msgstr "DB di OldestMulti: %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset: %u\n"
+msgstr "NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID: %u\n"
+msgstr "NextOID: %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID: %u\n"
+msgstr "NextXID: %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID: %u\n"
+msgstr "OldestXID: %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB: %u\n"
+msgstr "DB di OldestXID: %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch: %u\n"
+msgstr "Epoca del NextXID: %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid: %u\n"
+msgstr "oldestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid: %u\n"
+msgstr "newestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr "%s: errore interno -- sizeof(ControlFileData) �� troppo grande ... correggere PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: creazione del file pg_control fallita: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: scrittura del file pg_control fallita: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: errore fsync: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: apertura della directory \"%s\" fallita: %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: lettura della directory \"%s\" fallita: %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: chiusura della directory \"%s\" fallita: %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: cancellazione del file \"%s\" fallita: %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: apertura del file \"%s\" fallita: %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: errore nella scrittura del file \"%s\": %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s riavvia il registro delle transazioni di PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Utilizzo:\n"
+" %s [OPZIONI]... DATADIR\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Opzioni:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid " -c XID,XID set oldest and newest transactions bearing commit timestamp\n"
+msgstr " -c XID,XID imposta le transazione pi�� vecchia e pi�� nuova che portano l'ora di commit\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid " (zero in either value means no change)\n"
+msgstr " (zero in uno dei dei valori vuol dire nessun cambiamento)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR data directory\n"
+msgstr " [-D] DATADIR directory dei dati\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid " -e XIDEPOCH set next transaction ID epoch\n"
+msgstr " -e XIDEPOCH imposta il prossimo ID epoch transazione\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid " -f force update to be done\n"
+msgstr " -f forza l'esecuzione dell'aggiornamento\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
+msgstr " -l XLOGFILE forza la locazione di inizio WAL minima per il nuovo log transazioni\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
+msgstr " -m MXID,MXID imposta gli ID multitransazione successivo e pi�� vecchio\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid " -n no update, just show what would be done (for testing)\n"
+msgstr " -n nessuna modifica, mostra solo cosa sarebbe fatto (per prova)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid " -o OID set next OID\n"
+msgstr " -o OID imposta il prossimo OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid " -O OFFSET set next multitransaction offset\n"
+msgstr " -O OFFSET imposta il prossimo offset multitransazione\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version mostra informazioni sulla versione ed esci\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid " -x XID set next transaction ID\n"
+msgstr " -x XID imposta il prossimo ID di transazione\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help mostra questo aiuto ed esci\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Puoi segnalare eventuali bug a <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetwal/po/ja.po b/src/bin/pg_resetwal/po/ja.po
new file mode 100644
index 0000000..54a0f87
--- /dev/null
+++ b/src/bin/pg_resetwal/po/ja.po
@@ -0,0 +1,490 @@
+# translation of initdb.
+# Shigehiro Honda <fwif0083@mb.infoweb.ne.jp>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.0 beta 3\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2013-08-18 12:05+0900\n"
+"PO-Revision-Date: 2013-08-18 12:10+0900\n"
+"Last-Translator: HOTTA Michihide <hotta@net-newbie.com>\n"
+"Language-Team: jpug-doc <jpug-doc@ml.postgresql.jp>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: pg_resetxlog.c:133
+#, c-format
+msgid "%s: invalid argument for option -e\n"
+msgstr "%s: ��������������� -e ������������������������\n"
+
+#: pg_resetxlog.c:134 pg_resetxlog.c:149 pg_resetxlog.c:164 pg_resetxlog.c:179
+#: pg_resetxlog.c:187 pg_resetxlog.c:213 pg_resetxlog.c:227 pg_resetxlog.c:234
+#: pg_resetxlog.c:242
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "���������\"%s --help\"���������������������������\n"
+
+#: pg_resetxlog.c:139
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: ������������������������ID ������������(-e)��� -1 ������������������������������\n"
+
+#: pg_resetxlog.c:148
+#, c-format
+msgid "%s: invalid argument for option -x\n"
+msgstr "%s: ���������������-x������������������������\n"
+
+#: pg_resetxlog.c:154
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: ������������������������ID(-x)������0������������������������������\n"
+
+#: pg_resetxlog.c:163
+#, c-format
+msgid "%s: invalid argument for option -o\n"
+msgstr "%s: ���������������-o������������������������\n"
+
+#: pg_resetxlog.c:169
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID(-o)������0������������������������������\n"
+
+#: pg_resetxlog.c:178 pg_resetxlog.c:186
+#, c-format
+msgid "%s: invalid argument for option -m\n"
+msgstr "%s: ���������������-m������������������������\n"
+
+#: pg_resetxlog.c:192
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ���������������������������������ID(-m)������0������������������������������\n"
+
+#: pg_resetxlog.c:202
+#, c-format
+#| msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ���������������������������������������������ID(-m)������0������������������������������\n"
+
+#: pg_resetxlog.c:212
+#, c-format
+msgid "%s: invalid argument for option -O\n"
+msgstr "%s: ���������������-O������������������������\n"
+
+#: pg_resetxlog.c:218
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: ������������������������������������������������(-O)���-1���������������������\n"
+
+#: pg_resetxlog.c:226
+#, c-format
+msgid "%s: invalid argument for option -l\n"
+msgstr "%s: ���������������-l������������������������\n"
+
+#: pg_resetxlog.c:241
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: ���������������������������������������������������������\n"
+
+#: pg_resetxlog.c:255
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: \"root\"���������������������������\n"
+
+#: pg_resetxlog.c:257
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "PostgreSQL���������������������������%s���������������������������������������\n"
+
+#: pg_resetxlog.c:267
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: ������������������\"%s\"���������������������������������: %s\n"
+
+#: pg_resetxlog.c:280 pg_resetxlog.c:414
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: ������������������������������\"%s\"���������������������������������������: %s\n"
+
+#: pg_resetxlog.c:287
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running? If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: ���������������������\"%s\"���������������\n"
+"���������������������������������������? ������������������������������������������������������������������������������������������\n"
+
+#: pg_resetxlog.c:362
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"������������������������������������������������������-f������������������������������������������������������\n"
+
+#: pg_resetxlog.c:374
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"���������������������������������������������������������������������������������������������\n"
+"���������������������������������������������������������������������������������������������\n"
+"���������������������������������������������-f������������������������������������������������������������\n"
+
+#: pg_resetxlog.c:388
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "���������������������������������������������������������\n"
+
+#: pg_resetxlog.c:417
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+" touch %s\n"
+"and try again.\n"
+msgstr ""
+"������������������������������������������������������������������\n"
+" touch %s\n"
+"���������������������������������������������\n"
+"\n"
+
+#: pg_resetxlog.c:430
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: ������������\"%s\"���������������������������������: %s\n"
+
+#: pg_resetxlog.c:453
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control������������������������CRC���������������������������������������������������\n"
+
+#: pg_resetxlog.c:462
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control������������������������������������������������������������������������������������������������\n"
+
+#: pg_resetxlog.c:562
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"pg_control������������:\n"
+"\n"
+
+#: pg_resetxlog.c:564
+#, c-format
+msgid ""
+"pg_control values:\n"
+"\n"
+msgstr ""
+"pg_control������:\n"
+"\n"
+
+#: pg_resetxlog.c:575
+#, c-format
+#| msgid "First log file segment after reset: %u\n"
+msgid "First log segment after reset: %s\n"
+msgstr "������������������������������������������������: %s\n"
+
+#: pg_resetxlog.c:577
+#, c-format
+msgid "pg_control version number: %u\n"
+msgstr "pg_control���������������������: %u\n"
+
+#: pg_resetxlog.c:579
+#, c-format
+msgid "Catalog version number: %u\n"
+msgstr "���������������������������������: %u\n"
+
+#: pg_resetxlog.c:581
+#, c-format
+msgid "Database system identifier: %s\n"
+msgstr "���������������������������������������: %s\n"
+
+#: pg_resetxlog.c:583
+#, c-format
+msgid "Latest checkpoint's TimeLineID: %u\n"
+msgstr "������������������������������������������ID: %u\n"
+
+#: pg_resetxlog.c:585
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "���������������������������������full_page_writes %s\n"
+
+#: pg_resetxlog.c:586
+msgid "off"
+msgstr "������"
+
+#: pg_resetxlog.c:586
+msgid "on"
+msgstr "������"
+
+#: pg_resetxlog.c:587
+#, c-format
+msgid "Latest checkpoint's NextXID: %u/%u\n"
+msgstr "���������������������������������NextXID: %u/%u\n"
+
+#: pg_resetxlog.c:590
+#, c-format
+msgid "Latest checkpoint's NextOID: %u\n"
+msgstr "���������������������������������NextOID: %u\n"
+
+#: pg_resetxlog.c:592
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId: %u\n"
+msgstr "���������������������������������NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:594
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset: %u\n"
+msgstr "���������������������������������NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:596
+#, c-format
+msgid "Latest checkpoint's oldestXID: %u\n"
+msgstr "���������������������������������oldestXID: %u\n"
+
+#: pg_resetxlog.c:598
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB: %u\n"
+msgstr "���������������������������������oldestXID���DB: %u\n"
+
+#: pg_resetxlog.c:600
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID: %u\n"
+msgstr "���������������������������������oldestActiveXID: %u\n"
+
+#: pg_resetxlog.c:602
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid: %u\n"
+msgstr "���������������������������������oldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:604
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "���������������������������������oldestMulti's���DB: %u\n"
+
+#: pg_resetxlog.c:606
+#, c-format
+msgid "Maximum data alignment: %u\n"
+msgstr "������������������������������������: %u\n"
+
+#: pg_resetxlog.c:609
+#, c-format
+msgid "Database block size: %u\n"
+msgstr "���������������������������������������: %u\n"
+
+#: pg_resetxlog.c:611
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "������������������������������������������������������������: %u\n"
+
+#: pg_resetxlog.c:613
+#, c-format
+msgid "WAL block size: %u\n"
+msgstr "WAL������������������������: %u\n"
+
+#: pg_resetxlog.c:615
+#, c-format
+msgid "Bytes per WAL segment: %u\n"
+msgstr "WAL���������������������������������������: %u\n"
+
+#: pg_resetxlog.c:617
+#, c-format
+msgid "Maximum length of identifiers: %u\n"
+msgstr "���������������������: %u\n"
+
+#: pg_resetxlog.c:619
+#, c-format
+msgid "Maximum columns in an index: %u\n"
+msgstr "������������������������������������: %u\n"
+
+#: pg_resetxlog.c:621
+#, c-format
+msgid "Maximum size of a TOAST chunk: %u\n"
+msgstr "TOAST ������������������������������������: %u\n"
+
+#: pg_resetxlog.c:623
+#, c-format
+msgid "Date/time type storage: %s\n"
+msgstr "������/������������������������ %s\n"
+
+#: pg_resetxlog.c:624
+msgid "64-bit integers"
+msgstr "64���������������"
+
+#: pg_resetxlog.c:624
+msgid "floating-point numbers"
+msgstr "������������������"
+
+#: pg_resetxlog.c:625
+#, c-format
+msgid "Float4 argument passing: %s\n"
+msgstr "Float4 ��������������������� %s\n"
+
+#: pg_resetxlog.c:626 pg_resetxlog.c:628
+msgid "by reference"
+msgstr "������������"
+
+#: pg_resetxlog.c:626 pg_resetxlog.c:628
+msgid "by value"
+msgstr "���������"
+
+#: pg_resetxlog.c:627
+#, c-format
+msgid "Float8 argument passing: %s\n"
+msgstr "Float8 ��������������������� %s\n"
+
+#: pg_resetxlog.c:629
+#, c-format
+msgid "Data page checksum version: %u\n"
+msgstr "������������������������������������������������������: %u\n"
+
+#: pg_resetxlog.c:692
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr ""
+"%s: ��������������� -- sizeof(ControlFileData)��������������������� \n"
+"... PG_CONTROL_SIZE ���������������������������\n"
+
+#: pg_resetxlog.c:707
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: pg_control���������������������������������������������: %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: pg_control���������������������������������������������: %s\n"
+
+#: pg_resetxlog.c:725 pg_resetxlog.c:1024
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: fsync���������: %s\n"
+
+#: pg_resetxlog.c:765 pg_resetxlog.c:836 pg_resetxlog.c:892
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: ������������������\"%s\"���������������������������������������: %s\n"
+
+#: pg_resetxlog.c:807 pg_resetxlog.c:869 pg_resetxlog.c:926
+#, c-format
+msgid "%s: could not read from directory \"%s\": %s\n"
+msgstr "%s: ������������������\"%s\"������������������������������������: %s\n"
+
+#: pg_resetxlog.c:850 pg_resetxlog.c:907
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: ������������\"%s\"���������������������������������: %s\n"
+
+#: pg_resetxlog.c:991
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: ������������\"%s\"���������������������������������������: %s\n"
+
+#: pg_resetxlog.c:1002 pg_resetxlog.c:1016
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: ������������\"%s\"���������������������������������: %s\n"
+
+#: pg_resetxlog.c:1035
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s���PostgreSQL������������������������������������������������������������\n"
+"\n"
+
+#: pg_resetxlog.c:1036
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"������������:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+
+#: pg_resetxlog.c:1037
+#, c-format
+msgid "Options:\n"
+msgstr "���������������:\n"
+
+#: pg_resetxlog.c:1038
+#, c-format
+msgid " -e XIDEPOCH set next transaction ID epoch\n"
+msgstr " -e XIDEPOCH ������������������������������ID������������������������������\n"
+
+#: pg_resetxlog.c:1039
+#, c-format
+msgid " -f force update to be done\n"
+msgstr " -f ������������������������������������\n"
+
+#: pg_resetxlog.c:1040
+#, c-format
+#| msgid " -l TLI,FILE,SEG force minimum WAL starting location for new transaction log\n"
+msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
+msgstr " -l XLOGFILE ������������������������������������������������WAL������������������������������������\n\n"
+
+#: pg_resetxlog.c:1041
+#, c-format
+#| msgid " -m XID set next multitransaction ID\n"
+msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
+msgstr " -m MXID,MXID ���������������������������������������������������ID������������������\n"
+
+#: pg_resetxlog.c:1042
+#, c-format
+msgid " -n no update, just show extracted control values (for testing)\n"
+msgstr " -n ������������������������������������������������������������������(���������)\n"
+
+#: pg_resetxlog.c:1043
+#, c-format
+msgid " -o OID set next OID\n"
+msgstr " -o OID ������OID������������������\n"
+
+#: pg_resetxlog.c:1044
+#, c-format
+msgid " -O OFFSET set next multitransaction offset\n"
+msgstr " -O OFFSET ������������������������������������������������������������������������\n"
+
+#: pg_resetxlog.c:1045
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version ���������������������������������������������������\n"
+
+#: pg_resetxlog.c:1046
+#, c-format
+msgid " -x XID set next transaction ID\n"
+msgstr " -x XID ������������������������������ID������������������\n"
+
+#: pg_resetxlog.c:1047
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help ���������������������������������������������\n"
+
+#: pg_resetxlog.c:1048
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"������������<pgsql-bugs@postgresql.org>���������������������������������\n"
+
+#~ msgid " --version output version information, then exit\n"
+#~ msgstr " --version ���������������������������������������������������\n"
+
+#~ msgid " --help show this help, then exit\n"
+#~ msgstr " --help ���������������������������������������\n"
+
+#~ msgid "First log file ID after reset: %u\n"
+#~ msgstr "���������������������������������������������ID: %u\n"
diff --git a/src/bin/pg_resetwal/po/ko.po b/src/bin/pg_resetwal/po/ko.po
new file mode 100644
index 0000000..47d83c3
--- /dev/null
+++ b/src/bin/pg_resetwal/po/ko.po
@@ -0,0 +1,616 @@
+# Korean message translation file for PostgreSQL pg_resetxlog
+# Ioseph Kim <ioseph@uri.sarang.net>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.5\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-01-27 10:03+0900\n"
+"PO-Revision-Date: 2016-01-29 13:45+0900\n"
+"Last-Translator: Ioseph Kim <ioseph@uri.sarang.net>\n"
+"Language-Team: Korean Team <pgsql-kr@postgresql.kr>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: ko\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: ������: ��� ������������������ restricted token��� ������ ��� ������\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: ������������ ��������� ��� ��� ������: ������ ������ %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: SID��� ��������� ��� ������: ������ ������ %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: ��������� ��������� ������ ��� ������: ������ ������ %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: \"%s\" ��������� ��������������� ��������� ��� ������: ������ ������ %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: ��������� ������������ ������������ ��� ������: ������ ������ %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: ������ ��������������� ������ ��������� ������ ��� ������: ������ ������ %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: %s ��������� ��������� ������\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "��������� ������������ \"%s --help\"\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: ������������ ID epoch (-e) ������ -1��� ���������������\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: ������������ ID (-x) ������ 0��� ���������������\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid ""
+"%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr ""
+"%s: -c ������������ ��������� ������������ ID��� 0��������� 2��������������� ���\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) ������ 0��� ���������������\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ������������������ ID (-m) ������ 0��� ���������������\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ������ ��������� ������������������ ID (-m) ������ 0��� ���������������\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: ������������������ ������ (-O) ������ -1��� ���������������\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: ������ ������ ��������� ��������� ������������������. (������ \"%s\")\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: ��������� ��������������� ������������ ���������\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: ��� ��������������� \"root\"��� ��������� ��� ������\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "PostgreSQL superuser��� %s ��������������� ������������������.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: \"%s\" ��������������� ������ ��� ������: %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: \"%s\" ��������� ������ ��������� ��� ��� ������: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running? If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: \"%s\" ������ ��������� ������������.\n"
+"��������� ������������������? ��������� ���������, ��� ��������� ��������� ������ ������������������.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"��� ��������������� ��������������� ������������, ��������� ���������������, -f ��������� ���������.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"��� ������������������ ��������� ��������������� ������������ ���������������.\n"
+"������������ ��������� ������ ������������ ������ ������ ��������� ��������� ��� ������������.\n"
+"������������ ������������ ���������������, -f ��������� ������������ ������ ��������� ������������.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "������������ ������ ���������\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+" touch %s\n"
+"and try again.\n"
+msgstr ""
+"��������� ��������� ��������������� ���������, ������ ��������� ������������, ������ ���������\n"
+"������������.\n"
+" touch %s\n"
+"(win32������ ��������� ������?)\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: \"%s\" ��������� ������ ��� ������: %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr ""
+"%s: pg_control��������� ���������, CRC������ ���������������������; ��������� ������ ���������\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control��������� ���������, ������������������ ��������� ��� ��� ������; ���������\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"��������� pg_control ������������:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"������ pg_control ������������:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number: %u\n"
+msgstr "pg_control ������ ������: %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number: %u\n"
+msgstr "������������ ������ ������: %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier: %s\n"
+msgstr "������������������ ��������� ���������: %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID: %u\n"
+msgstr "��������� ��������������� TimeLineID: %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "��������� ��������������� full_page_writes: %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "off"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "on"
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID: %u/%u\n"
+msgstr "��������� ��������������� NextXID: %u/%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID: %u\n"
+msgstr "��������� ��������������� NextOID: %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId: %u\n"
+msgstr "��������� ��������������� NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset: %u\n"
+msgstr "��������� ��������������� NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID: %u\n"
+msgstr "��������� ��������������� ������ ��������� XID: %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB: %u\n"
+msgstr "��������� ��������������� ������ ��������� XID��� DB:%u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID: %u\n"
+msgstr "��������� ��������������� ������ ��������� ActiveXID:%u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid: %u\n"
+msgstr "��������� ��������������� ������ ��������� MultiXid:%u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "��������� ��������������� ������ ��������� MultiXid��� DB:%u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "��������� ��������������� ������ ��������� CommitTsXid:%u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "��������� ��������������� ������ CommitTsXid: %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment: %u\n"
+msgstr "������ ������ ������: %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size: %u\n"
+msgstr "������������������ ������ ������: %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "������ ��������������� ��������������� ������ ������: %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size: %u\n"
+msgstr "WAL ������ ������: %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment: %u\n"
+msgstr "WAL ��������������� ������(byte): %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers: %u\n"
+msgstr "��������� ������ ������: %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index: %u\n"
+msgstr "��������������� ������������ ������ ��� ���: %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk: %u\n"
+msgstr "TOAST ��������� ������ ������: %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk: %u\n"
+msgstr "������������ ��������� ������ ������: %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage: %s\n"
+msgstr "������/��������� ��������� ������������: %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "64-������ ������"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "������������"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing: %s\n"
+msgstr "Float4 ������ ������: %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "���������"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "������"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing: %s\n"
+msgstr "Float8 ������ ������: %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version: %u\n"
+msgstr "��������� ��������� ��������� ������: %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"��������� ���:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset: %s\n"
+msgstr "������ ��� ��� ������ ������������: %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId: %u\n"
+msgstr "NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid: %u\n"
+msgstr "OldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB: %u\n"
+msgstr "OldestMultiXid��� DB: %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset: %u\n"
+msgstr "NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID: %u\n"
+msgstr "NextOID: %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID: %u\n"
+msgstr "NextXID: %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID: %u\n"
+msgstr "OldestXID: %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB: %u\n"
+msgstr "OldestXID��� DB: %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch: %u\n"
+msgstr "NextXID epoch: %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid: %u\n"
+msgstr "������ ��������� CommitTsXid: %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid: %u\n"
+msgstr "������ CommitTsXid: %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid ""
+"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
+"PG_CONTROL_SIZE\n"
+msgstr ""
+"%s: ������ ������ -- sizeof(ControlFileData) ������ ������ ��� ... PG_CONTROL_SIZE ���"
+"���������\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: pg_control ������ ������ ��� ������: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: pg_control ������ ��� ��� ������: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: fsync ������: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: \"%s\" ������������ ��� ��� ������: %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: \"%s\" ��������������� ������ ��� ������: %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: \"%s\" ��������������� ������ ��� ������: %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: \"%s\" ������ ������ ��� ��� ������: %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: \"%s\" ������ ��� ��� ������: %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: \"%s\" ������ ��� ��� ������: %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s ��������������� PostgreSQL ������������ ��������� ������ ���������������.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"���������:\n"
+" %s [������]... DATADIR\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "���������:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid ""
+" -c XID,XID set oldest and newest transactions bearing commit "
+"timestamp\n"
+msgstr ""
+" -c XID,XID ������ ��������� ������������ ������ ���������, ��������� ������������ ������\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid " (zero in either value means no change)\n"
+msgstr " (0������ ������������ ��������� ������)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR data directory\n"
+msgstr " [-D] DATADIR ��������� ������������\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid " -e XIDEPOCH set next transaction ID epoch\n"
+msgstr " -e XIDEPOCH ������ ������������ ID epoch ������\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid " -f force update to be done\n"
+msgstr " -f ��������� ���������\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid ""
+" -l XLOGFILE force minimum WAL starting location for new transaction "
+"log\n"
+msgstr ""
+" -l XLOGFILE ��� ������������ ��������� ������ WAL ������ ������ ��������� ��������� ������\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
+msgstr " -m MXID,MXID ������ ������ ��������� ������������������ ID ������\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid ""
+" -n no update, just show what would be done (for testing)\n"
+msgstr ""
+" -n ������������ ������, ��������� ��������� ��������������� ���(������������)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid " -o OID set next OID\n"
+msgstr " -o OID ������ OID ������\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid " -O OFFSET set next multitransaction offset\n"
+msgstr " -O OFFSET ������ ������������������ ������ ������\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version ������ ������ ������������ ������\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid " -x XID set next transaction ID\n"
+msgstr " -x XID ������ XID(������������ ID) ������\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help ��� ������������ ������������ ������\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"������������: <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetwal/po/pl.po b/src/bin/pg_resetwal/po/pl.po
new file mode 100644
index 0000000..d87214b
--- /dev/null
+++ b/src/bin/pg_resetwal/po/pl.po
@@ -0,0 +1,626 @@
+# pg_resetxlog message translation file for pg_resetxlog
+# Copyright (C) 2011 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Begina Felicysym <begina.felicysym@wp.eu>, 2011, 2012, 2013.
+# grzegorz <begina.felicysym@wp.eu>, 2014, 2015, 2016.
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_resetxlog (PostgreSQL 9.1)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-07-03 03:14+0000\n"
+"PO-Revision-Date: 2016-07-03 17:54+0200\n"
+"Last-Translator: grzegorz <begina.felicysym@wp.eu>\n"
+"Language-Team: begina.felicysym@wp.eu\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+"X-Generator: Virtaal 0.7.1\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: OSTRZE��ENIE nie mo��na tworzy�� ograniczonych token��w na tej platformie\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: nie mo��na otworzy�� tokenu procesu: kod b����du %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: nie uda��o si�� przydzieli�� SID��w: kod b����du %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: nie uda��o si�� utworzy�� ograniczonego tokena: kod b����du %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: nie uda��o si�� uruchomi�� procesu dla polecenia \"%s\": kod b����du %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: nie uda��o si�� ponownie wykona�� ograniczonego tokena: %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: nie uda��o uzyska�� kodu wyj��cia z us��ugi podrz��dnej: kod b����du %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: niepoprawny argument dla opcji %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Spr��buj \"%s --help\" aby uzyska�� wi��cej informacji.\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: epoka ID transakcji (-e) nie mo��e by�� -1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: ID transakcji (-x) nie mo��e by�� 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s: ID transakcji (-c) musi by�� albo 0 albo wi��ksza lub r��wna 2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) nie mo��e by�� 0\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID multitransakcji (-m) nie mo��e by�� 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: najstarszy ID multitransakcji (-m) nie mo��e by�� 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: offset multitransakcji (-O) nie mo��e by�� -1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: za du��a ilo���� parametr��w (pierwszy to \"%s\")\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: katalog danych nie zosta�� ustawiony\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: nie mo��e by�� wykonywane pod \"rootem\"\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Musisz uruchomi�� %s jako superu��ytkownik PostgreSQL.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: nie mo��na zmieni�� katalogu na \"%s\": %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: nie mo��na otworzy�� pliku \"%s\" do odczytu: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running? If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: plik blokady \"%s\" istnieje\n"
+"Czy serwer dzia��a? Je��li nie, usu�� plik blokady i spr��buj ponownie.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Je��li te warto��ci wydaj�� si�� do przyj��cia, u��yj -f by wymusi�� reset.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Serwer bazy danych nie zosta�� poprawnie zamkni��ty.\n"
+"Zresetowanie dziennika transakcji mo��e spowodowa�� utrat�� danych.\n"
+"Je��li chcesz kontynuowa��, u��yj -f, aby wymusi�� reset.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Reset dziennika transakcji\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+" touch %s\n"
+"and try again.\n"
+msgstr ""
+"Je��li jeste�� pewien, ��e ��cie��ka folder u jest poprawna, wykonaj\n"
+" touch %s\n"
+"i spr��buj ponownie.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: nie mo��na odczyta�� z pliku \"%s\": %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control istnieje ale ma niepoprawne CRC; post��puj ostro��nie\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control istnieje ale jest uszkodzony lub ma nieznan�� wersj��, zignorowano\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Odgadni��te warto��ci pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Bie����ce warto��ci pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number: %u\n"
+msgstr "pg_control w wersji numer: %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number: %u\n"
+msgstr "Katalog w wersji numer: %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier: %s\n"
+msgstr "Identyfikator systemu bazy danych: %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID: %u\n"
+msgstr "TimeLineID najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "full_page_writes najnowszego punktu kontrolnego: %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "wy����czone"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "w����czone"
+
+#: pg_resetxlog.c:649
+#, c-format
+#| msgid "Latest checkpoint's NextXID: %u/%u\n"
+msgid "Latest checkpoint's NextXID: %u:%u\n"
+msgstr "NextXID najnowszego punktu kontrolnego: %u:%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID: %u\n"
+msgstr "NextOID najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId: %u\n"
+msgstr "NextMultiXactId najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset: %u\n"
+msgstr "NextMultiOffset najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID: %u\n"
+msgstr "oldestXID najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB: %u\n"
+msgstr "DB oldestXID'u najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID: %u\n"
+msgstr "NextXID najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid: %u\n"
+msgstr "oldestMultiXid najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "DB oldestMulti'u najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "oldestCommitTsXid najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "newestCommitTsXid najnowszego punktu kontrolnego: %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment: %u\n"
+msgstr "Maksymalne wyr��wnanie danych: %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size: %u\n"
+msgstr "Wielko���� bloku bazy danych: %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Bloki na segment s�� w relacji: %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size: %u\n"
+msgstr "Wielko���� bloku WAL: %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment: %u\n"
+msgstr "Bajt��w na segment WAL: %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers: %u\n"
+msgstr "Maksymalna d��ugo���� identyfikator��w: %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index: %u\n"
+msgstr "Maksymalna liczba kolumn w indeksie: %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk: %u\n"
+msgstr "Maksymalny rozmiar fragmentu TOAST: %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk: %u\n"
+msgstr "Rozmiar fragmentu du��ego obiektu: %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage: %s\n"
+msgstr "Typ przechowywania daty/czasu: %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "64-bit'owe zmienne integer"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "liczby zmiennoprzecinkowe"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing: %s\n"
+msgstr "Przekazywanie parametru float4: %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "przez referencj��"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "przez warto����"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing: %s\n"
+msgstr "Przekazywanie parametru float8: %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version: %u\n"
+msgstr "Suma kontrolna strony danych w wersji numer: %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Warto��ci do zmiany:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset: %s\n"
+msgstr "Pierwszy segment dziennika po resecie: %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId: %u\n"
+msgstr "NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid: %u\n"
+msgstr "OldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB: %u\n"
+msgstr "DB OldestMulti'u: %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset: %u\n"
+msgstr "NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID: %u\n"
+msgstr "NextOID: %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID: %u\n"
+msgstr "NextXID: %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID: %u\n"
+msgstr "OldestXID: %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB: %u\n"
+msgstr "DB OldestXIDu: %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch: %u\n"
+msgstr "Epoka NextXID: %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid: %u\n"
+msgstr "oldestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid: %u\n"
+msgstr "newestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr "%s: b����d wewn��trzny -- sizeof(ControlFileData) jest zbyt du��a ... popraw PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: nie mo��na utworzy�� pliku pg_control: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: nie mo��na pisa�� do pliku pg_control: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: b����d fsync: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: nie mo��na otworzy�� katalogu \"%s\": %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: nie mo��na odczyta�� katalogu \"%s\": %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: nie mo��na zamkn���� katalogu \"%s\": %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: nie mo��na usun���� pliku \"%s\": %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: nie mo��na otworzy�� pliku \"%s\": %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: nie mo��na zapisa�� pliku \"%s\": %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s resetuje log transakcji PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Spos��b u��ycia:\n"
+" %s [OPCJA]... FOLDERDANYCH\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Opcje:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid " -c XID,XID set oldest and newest transactions bearing commit timestamp\n"
+msgstr " -c XID,XID ustawia najstarszy i naj��wie��szy znacznik czasu wykonywanego zatwierdzenia\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid " (zero in either value means no change)\n"
+msgstr " (zero w obu warto��ciach oznacza brak zmian)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR data directory\n"
+msgstr " [-D] DATADIR folder bazy danych\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid " -e XIDEPOCH set next transaction ID epoch\n"
+msgstr " -e XIDEPOCH ustawia epok�� ID nast��pnej transakcji\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid " -f force update to be done\n"
+msgstr " -f wymusza wykonanie modyfikacji\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
+msgstr " -l XLOGFILE wymusza minimalne po��o��enie pocz��tkowe WAL dla nowego komunikatu transakcji\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
+msgstr " -m XID,MXID ustawia ID nast��pnej i najstarszej multitransakcji\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid " -n no update, just show what would be done (for testing)\n"
+msgstr " -n bez modyfikacji, po prostu wy��wietl co b��dzie zrobione (do testowania)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid " -o OID set next OID\n"
+msgstr " -o OID ustawia nast��pny OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid " -O OFFSET set next multitransaction offset\n"
+msgstr " -O OFFSET ustawia nast��pny offset multitransakcji\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version wypisuje informacje o wersji i ko��czy\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid " -x XID set next transaction ID\n"
+msgstr " -x XID ustawia ID nast��pnej transakcji\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help pokazuje ten ekran pomocy i ko��czy\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"B����dy prosz�� przesy��a�� na adres <pgsql-bugs@postgresql.org>.\n"
+
+#~ msgid "%s: invalid argument for option -x\n"
+#~ msgstr "%s: niepoprawny argument dla opcji -x\n"
+
+#~ msgid "%s: invalid argument for option -o\n"
+#~ msgstr "%s: niepoprawny argument dla opcji -o\n"
+
+#~ msgid "%s: invalid argument for option -m\n"
+#~ msgstr "%s: niepoprawny argument dla opcji -m\n"
+
+#~ msgid "%s: invalid argument for option -O\n"
+#~ msgstr "%s: niepoprawny argument dla opcji -O\n"
+
+#~ msgid "%s: invalid argument for option -l\n"
+#~ msgstr "%s: niepoprawny argument dla opcji -l\n"
+
+#~ msgid "%s: could not read from directory \"%s\": %s\n"
+#~ msgstr "%s: nie mo��na odczyta�� katalogu \"%s\": %s\n"
+
+#~ msgid "First log file ID after reset: %u\n"
+#~ msgstr "Pierwszy plik dziennika po resecie: %u\n"
diff --git a/src/bin/pg_resetwal/po/pt_BR.po b/src/bin/pg_resetwal/po/pt_BR.po
new file mode 100644
index 0000000..ca6e6d4
--- /dev/null
+++ b/src/bin/pg_resetwal/po/pt_BR.po
@@ -0,0 +1,603 @@
+# Brazilian Portuguese message translation file for pg_resetxlog
+# Copyright (C) 2009 PostgreSQL Global Development Group
+# This file is distributed under the same license as the PostgreSQL package.
+# Cesar Suga <sartre@linuxbr.com>, 2002.
+# Roberto Mello <rmello@fslc.usu.edu>, 2002.
+# Euler Taveira de Oliveira <euler@timbira.com>, 2003-2016.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.5\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-02-13 17:22-0300\n"
+"PO-Revision-Date: 2005-10-04 22:55-0300\n"
+"Last-Translator: Euler Taveira de Oliveira <euler@timbira.com>\n"
+"Language-Team: Brazilian Portuguese <pgbr-dev@listas.postgresql.org.br>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: AVISO: n��o pode criar informa����es restritas nessa plataforma\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: n��o p��de abrir informa����o sobre processo: c��digo de erro %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: n��o p��de alocar SIDs: c��digo de erro %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: n��o p��de criar informa����o restrita: c��digo de erro %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: n��o p��de iniciar processo para comando \"%s\": c��digo de erro %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: n��o p��de executar novamente com informa����o restrita: c��digo de erro %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: n��o p��de obter c��digo de sa��da de subprocesso: c��digo de erro %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: argumento inv��lido para op����o %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "Tente \"%s --help\" para obter informa����es adicionais.\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: ��poca do ID da transa����o (-e) n��o deve ser -1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: ID da transa����o (-x) n��o deve ser 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s: ID de transa����o (-c) deve ser 0 ou maior ou igual a 2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) n��o deve ser 0\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID de transa����o m��ltipla (-m) n��o deve ser 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID de transa����o m��ltipla mais velho (-m) n��o deve ser 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: deslocamento da transa����o m��ltipla (-O) n��o deve ser -1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: muitos argumentos de linha de comando (primeiro �� \"%s\")\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: nenhum diret��rio de dados foi especificado\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: n��o pode ser executado pelo \"root\"\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Voc�� deve executar %s como um super-usu��rio do PostgreSQL.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: n��o p��de mudar diret��rio para \"%s\": %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: n��o p��de abrir arquivo \"%s\" para leitura: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running? If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: arquivo de bloqueio \"%s\" existe\n"
+"O servidor est�� executando? Se n��o, apague o arquivo de bloqueio e tente novamente.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Se estes valores lhe parecem aceit��veis, use -f para for��ar o rein��cio.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"O servidor de banco de dados n��o foi desligado corretamente.\n"
+"Reiniciar o log de transa����o pode causar perda de dados.\n"
+"Se voc�� quer continuar mesmo assim, use -f para for��ar o rein��cio.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "Log de transa����o reiniciado\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+" touch %s\n"
+"and try again.\n"
+msgstr ""
+"Se voc�� tem certeza que o caminho do diret��rio de dados est�� correto, execute\n"
+" touch %s\n"
+"e tente novamente.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: n��o p��de ler arquivo \"%s\": %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control existe mas tem CRC inv��lido: prossiga com cuidado\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control existe mas n��o funciona ou sua vers��o �� desconhecida; ignorando-o\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Valores supostos do pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Valores atuais do pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number: %u\n"
+msgstr "n��mero da vers��o do pg_control: %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number: %u\n"
+msgstr "N��mero da vers��o do cat��logo: %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier: %s\n"
+msgstr "Identificador do sistema de banco de dados: %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID: %u\n"
+msgstr "TimeLineID do ��ltimo ponto de controle: %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "full_page_writes do ��ltimo ponto de controle: %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "desabilitado"
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "habilitado"
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID: %u/%u\n"
+msgstr "NextXID do ��ltimo ponto de controle: %u/%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID: %u\n"
+msgstr "NextOID do ��ltimo ponto de controle: %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId: %u\n"
+msgstr "NextMultiXactId do ��ltimo ponto de controle: %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset: %u\n"
+msgstr "NextMultiOffset do ��ltimo ponto de controle: %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID: %u\n"
+msgstr "oldestXID do ��ltimo ponto de controle: %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB: %u\n"
+msgstr "BD do oldestXID do ��ltimo ponto de controle: %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID: %u\n"
+msgstr "oldestActiveXID do ��ltimo ponto de controle: %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid: %u\n"
+msgstr "oldestMultiXid do ��ltimo ponto de controle: %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "BD do oldestMulti do ��ltimo ponto de controle: %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "oldestCommitTsXid do ��ltimo ponto de controle: %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "newestCommitTsXid do ��ltimo ponto de controle: %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment: %u\n"
+msgstr "M��ximo alinhamento de dado: %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size: %u\n"
+msgstr "Tamanho do bloco do banco de dados: %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Blocos por segmento da rela����o grande: %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size: %u\n"
+msgstr "Tamanho do bloco do WAL: %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment: %u\n"
+msgstr "Bytes por segmento do WAL: %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers: %u\n"
+msgstr "Tamanho m��ximo de identificadores: %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index: %u\n"
+msgstr "M��ximo de colunas em um ��ndice: %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk: %u\n"
+msgstr "Tamanho m��ximo do bloco TOAST: %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk: %u\n"
+msgstr "Tamanho do bloco de um objeto grande: %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage: %s\n"
+msgstr "Tipo de data/hora do reposit��rio: %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "inteiros de 64 bits"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "n��meros de ponto flutuante"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing: %s\n"
+msgstr "Passagem de argumento float4: %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "por refer��ncia"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "por valor"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing: %s\n"
+msgstr "Passagem de argumento float8: %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version: %u\n"
+msgstr "Vers��o da verifica����o de p��ginas de dados: %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"Valores a serem alterados:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset: %s\n"
+msgstr "Primeiro segmento do arquivo de log ap��s rein��cio: %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId: %u\n"
+msgstr "NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid: %u\n"
+msgstr "OldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB: %u\n"
+msgstr "BD do OldestMulti: %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset: %u\n"
+msgstr "NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID: %u\n"
+msgstr "NextOID: %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID: %u\n"
+msgstr "NextXID: %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID: %u\n"
+msgstr "OldestXID: %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB: %u\n"
+msgstr "BD do OldestXID: %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch: %u\n"
+msgstr "��poca do NextXID: %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid: %u\n"
+msgstr "oldestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid: %u\n"
+msgstr "newestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr "%s: erro interno -- sizeof(ControlFileData) �� muito grande ... conserte o PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: n��o p��de criar arquivo do pg_control: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: n��o p��de escrever no arquivo do pg_control: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: erro ao executar fsync: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: n��o p��de abrir diret��rio \"%s\": %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: n��o p��de ler diret��rio \"%s\": %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: n��o p��de fechar diret��rio \"%s\": %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: n��o p��de apagar arquivo \"%s\": %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: n��o p��de abrir arquivo \"%s\": %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: n��o p��de escrever no arquivo \"%s\": %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s reinicia o log de transa����o do PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Uso:\n"
+" %s [OP����O]... DIRDADOS\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "Op����es:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid " -c XID,XID set oldest and newest transactions bearing commit timestamp\n"
+msgstr " -c XID,XID define transa����es mais velha e mais nova contendo timestamp de efetiva����o\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid " (zero in either value means no change)\n"
+msgstr " (zero em qualquer valor significa nenhuma mudan��a)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR data directory\n"
+msgstr " [-D] DIRDADOS diret��rio de dados\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid " -e XIDEPOCH set next transaction ID epoch\n"
+msgstr " -e ��POCA_XID define pr��xima ��poca do ID de transa����o\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid " -f force update to be done\n"
+msgstr " -f for��a atualiza����o ser feita\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
+msgstr " -l XLOGFILE for��a local inicial m��nimo do WAL para novo log de transa����o\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
+msgstr " -m MXID,MXID define pr��ximo e mais velho ID de transa����o m��ltipla\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid " -n no update, just show what would be done (for testing)\n"
+msgstr " -n sem atualiza����o, mostra o que seria feito (para teste)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid " -o OID set next OID\n"
+msgstr " -o OID define pr��ximo OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid " -O OFFSET set next multitransaction offset\n"
+msgstr " -O OFFSET define pr��xima posi����o de transa����o m��ltipla\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version mostra informa����o sobre a vers��o e termina\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid " -x XID set next transaction ID\n"
+msgstr " -x XID define pr��ximo ID de transa����o\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help mostra essa ajuda e termina\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Relate erros a <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetwal/po/ru.po b/src/bin/pg_resetwal/po/ru.po
new file mode 100644
index 0000000..5a8e12e
--- /dev/null
+++ b/src/bin/pg_resetwal/po/ru.po
@@ -0,0 +1,677 @@
+# PG_RESETXLOG Translated Messages into the Russian Language (UTF-8)
+#
+# Copyright (c) 2002-2005 Serguei A. Mokhov, mokhov@cs.concordia.ca
+# Copyright (c) 2012-2013 Alexander Lakhin, exclusion@gmail.com
+# Distributed under the same licensing terms as PostgreSQL itself.
+#
+# pgtranslation Id: pg_resetxlog.po,v 1.3 2009/10/14 21:08:40 petere Exp $
+#
+# translation of subject-specific terminology, see:
+# �������������� ������������������ ���������������������� ����������������:
+# http://wiki.postgresql.org/wiki/NLS/ru/dict
+#
+# ChangeLog:
+# - August 24, 2014: Updates for 9.4. Alexander Lakhin <exclusion@gmail.com>.
+# - With corrections from Dmitriy Olshevskiy <olshevskiy87@bk.ru>
+# - March 14, 2013: Updates for 9.3. Alexander Lakhin <exclusion@gmail.com>.
+# - June 27, 2012: Updates for 9.2. Alexander Lakhin <exclusion@gmail.com>.
+# - April 2, 2012: Bug fixes. Alexander Lakhin <exclusion@gmail.com>.
+# - February 18, 2012: Complete translation for 9.1. Alexander Lakhin <exclusion@gmail.com>.
+# - March 27, 2009: complete translation for 8.3, Sergey Burladyan <eshkinkot@gmail.com>.
+# - January 17, 2005: Complete translation for 8.0, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
+# - December, 2004: Corrections and improvements by Oleg Bartunov <oleg@sai.msu.su>.
+# - April 6 - August 11, 2004: Updates for 8.0; <mokhov@cs.concordia.ca>.
+# - July 24 - August 23, 2003: Updates for 7.4.*; <mokhov@cs.concordia.ca>.
+# - October 12, 2002: Complete post-7.3beta2 Translation, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
+# - September 7, 2002: Complete post-7.3beta1 Translation, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
+# - August 31, 2002: Initial Translation, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9 current\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-05-27 16:14+0000\n"
+"PO-Revision-Date: 2015-12-31 14:56+0300\n"
+"Last-Translator: Alexander Lakhin <exclusion@gmail.com>\n"
+"Language-Team: Russian <pgsql-translators@postgresql.org>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"X-Generator: Lokalize 2.0\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: ����������������������������: �� �������� ���� ������������ ������������������ ������������������������ ��������������\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s: ���� �������������� �������������� ������������ ���������������� (������ ������������: %lu)\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: ���� �������������� ���������������������� ������������������ SID (������ ������������: %lu)\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: ���� �������������� �������������� ������������������������ ������������ (������ ������������: %lu)\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr ""
+"%s: ���� �������������� ������������������ �������������� ������ �������������� \"%s\" (������ ������������: %lu)\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr ""
+"%s: ���� �������������� ������������������������������ �� ������������������������ ���������������� (������ ������������: %lu)\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: ���� �������������� ���������������� ������ ������������ ���� ���������������������� (������ ������������: %lu)\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s: ������������������������ ���������������� ������������������ %s\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "������ ���������������������������� �������������������� �������������������� \"%s --help\".\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: ���������� ID �������������������� (-e) ���� ������������ �������� ���������� -1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: ID �������������������� (-x) ���� ������������ �������� ���������� 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid ""
+"%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s: ID �������������������� (-c) ������������ �������� ���������� 0, �������� ������������ ������ ���������� 2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) ���� ������������ �������� ���������� 0\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID �������������������������������� (-m) ���� ������������ �������� ���������� 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ID ������������������ �������������������������������� (-m) ���� ������������ �������� ���������� 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: ���������������� �������������������������������� (-O) ���� ������������ �������� ���������� -1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: �������������� ���������� �������������������� ������������������ ������������ (������������: \"%s\")\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: �������������� ������������ ���� ������������\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: ������������������ ���� ������������ ������������������ root\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "������������������ %s ���������� ���� ���������� ���������������������������������� PostgreSQL.\n"
+
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: ���� �������������� �������������� �� �������������� \"%s\": %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: ���� �������������� �������������� �������� \"%s\" ������ ������������: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running? If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: ������������������ �������� �������������������� \"%s\"\n"
+"����������������, ������������ ��������������? �������� ������, �������������� �������� �������� �� �������������������� ����������.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"�������� ������ ���������������� ������������������, ������������������ ���������� ��������������������������, �������������� �������� -"
+"f.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"������������ ������ ������������ ������ �������������������� ����������������������.\n"
+"���������� �������������� �������������������� ���������� ���������������� �� ������������ ������������.\n"
+"�������� ���� ������������ ���������������� ������, ���������������� ���� ������, ���������������� �������� -f.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "������������ �������������������� ��������������\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+" touch %s\n"
+"and try again.\n"
+msgstr ""
+"�������� ���� ��������������, ������ �������� �� ���������������� ������������ ��������������������, ������������������\n"
+" touch %s\n"
+"�� ������������������ ��������������.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: ���� �������������� ������������������ �������� \"%s\": %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr ""
+"%s: pg_control ��������������������, ���� ������ ���������������������� ���������� ��������������; ���������������������� �� "
+"��������������������������\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr ""
+"%s: pg_control ���������������� ������ ���������� ���������������������� ������������; ������������������������...\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"���������������������������� ���������������� pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"�������������� ���������������� pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number: %u\n"
+msgstr "���������� ������������ pg_control: %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number: %u\n"
+msgstr "���������� ������������ ����������������: %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier: %s\n"
+msgstr "�������������������������� �������������� ������ ������������: %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID: %u\n"
+msgstr "���������� �������������� ������������������ ��������. ����������: %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "���������� full_page_writes ������������������ ��.��: %s\n"
+
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "��������."
+
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "������."
+
+#: pg_resetxlog.c:649
+#, c-format
+msgid "Latest checkpoint's NextXID: %u:%u\n"
+msgstr "NextXID ������������������ ��������. ����������: %u:%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID: %u\n"
+msgstr "NextOID ������������������ ��������. ����������: %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId: %u\n"
+msgstr "NextMultiXactId ������������. ��������. ����������: %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset: %u\n"
+msgstr "NextMultiOffset ������������. ��������. ����������: %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID: %u\n"
+msgstr "oldestXID ������������������ ��������. ����������: %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB: %u\n"
+msgstr "���� �� oldestXID ������������������ ��������. ����������: %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID: %u\n"
+msgstr "oldestActiveXID ������������������ ��.��.: %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid: %u\n"
+msgstr "oldestMultiXid ������������������ ��������. ����������: %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "���� �� oldestMulti ������������������ ��.��.: %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "oldestCommitTsXid ������������������ ��. ��.: %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "newestCommitTsXid ������������������ ��. ��.: %u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment: %u\n"
+msgstr "��������. ������������ ������������������������ ������������: %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size: %u\n"
+msgstr "������������ ���������� ����: %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "������������ �� ��������. ���������������� ������������������: %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size: %u\n"
+msgstr "������������ ���������� WAL: %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment: %u\n"
+msgstr "�������� �� ���������������� WAL: %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers: %u\n"
+msgstr "������������������������ ���������� ������������������������������: %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index: %u\n"
+msgstr "������������������������ ���������� ���������������� �� ��������������: %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk: %u\n"
+msgstr "������������������������ ������������ ������������ TOAST: %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk: %u\n"
+msgstr "������������ ������������ ���������������� ��������������: %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage: %s\n"
+msgstr "������������ ���������������� ��������/��������������: %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "64-������������ ����������"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "���������� �� ������������������ ������������"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing: %s\n"
+msgstr "���������������� ������������������ Float4: %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "���� ������������"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "���� ����������������"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing: %s\n"
+msgstr "���������������� ������������������ Float8: %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version: %u\n"
+msgstr "������������ ���������������������� �������� ��������������: %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"����������������, �������������� ���������� ����������������:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset: %s\n"
+msgstr "������������ �������������� �������������� ���������� ������������: %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId: %u\n"
+msgstr "NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid: %u\n"
+msgstr "OldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB: %u\n"
+msgstr "���� �� oldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset: %u\n"
+msgstr "NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID: %u\n"
+msgstr "NextOID: %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID: %u\n"
+msgstr "NextXID: %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID: %u\n"
+msgstr "OldestXID: %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB: %u\n"
+msgstr "���� �� oldestXID: %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch: %u\n"
+msgstr "���������� NextXID: %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+msgid "oldestCommitTsXid: %u\n"
+msgstr "oldestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+msgid "newestCommitTsXid: %u\n"
+msgstr "newestCommitTsXid: %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid ""
+"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
+"PG_CONTROL_SIZE\n"
+msgstr ""
+"%s: �������������������� ������������ -- ������������ ControlFileData �������������� ���������� -- ������������������ "
+"PG_CONTROL_SIZE\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: ���� �������������� �������������� �������� pg_control: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: ���� �������������� ���������������� �������� pg_control: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: ������������ �������������������������� �� ����: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: ���� �������������� �������������� �������������� \"%s\": %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: ���� �������������� ������������������ �������������� \"%s\": %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: ���� �������������� �������������� �������������� \"%s\": %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: ������������ ������ ���������������� ���������� \"%s\": %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: ���� �������������� �������������� �������� \"%s\": %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: ���� �������������� ���������������� �������� \"%s\": %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s �������������������� ������������ �������������������� PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Usage:\n"
+" %s [����������������]... ������_������������\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "������������������:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid ""
+" -c XID,XID set oldest and newest transactions bearing commit "
+"timestamp\n"
+msgstr ""
+" -c XID,XID ������������ ������������������ �� ���������������� ��������������������, �������������� ���������� "
+"�������������� ����������������\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid " (zero in either value means no change)\n"
+msgstr " (0 �� ���������� ���� �������������������� ������������������������)\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR data directory\n"
+msgstr " [-D] ������_������������ �������������� ������������\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid " -e XIDEPOCH set next transaction ID epoch\n"
+msgstr " -e XIDEPOCH ������������ ���������� �� ID ������������������ ��������������������\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid " -f force update to be done\n"
+msgstr " -f ���������������������������� �������������������� ����������������\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid ""
+" -l XLOGFILE force minimum WAL starting location for new transaction "
+"log\n"
+msgstr ""
+" -l XLOGFILE ������������ ���������������������� ������������������ ������������������ WAL ������ ������������\n"
+" �������������� ��������������������\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
+msgstr " -m MXID,MXID ������������ ID ������������������ �� ������������������ ��������������������������������\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid ""
+" -n no update, just show what would be done (for testing)\n"
+msgstr ""
+" -n ����������������, ���������� ���������������� ���������� ������������������, ���� ���� ������������������ "
+"����\n"
+" (������ ����������������)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid " -o OID set next OID\n"
+msgstr " -o OID ������������ ������������������ OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid " -O OFFSET set next multitransaction offset\n"
+msgstr " -O ���������������� ������������ ���������������� ������������������ ��������������������������������\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version ���������������� ������������ �� ����������\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid " -x XID set next transaction ID\n"
+msgstr " -x XID ������������ ID ������������������ ��������������������\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help ���������������� ������ �������������� �� ����������\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"���� �������������� ������������������ ���� ������������ <pgsql-bugs@postgresql.org>.\n"
+
+#~ msgid "%s: invalid argument for option -x\n"
+#~ msgstr "%s: ������������������������ ���������������� ������������������ -x\n"
+
+#~ msgid "%s: invalid argument for option -o\n"
+#~ msgstr "%s: ������������������������ ���������������� ������������������ -o\n"
+
+#~ msgid "%s: invalid argument for option -m\n"
+#~ msgstr "%s: ������������������������ ���������������� ������������������ -m\n"
+
+#~ msgid "%s: invalid argument for option -O\n"
+#~ msgstr "%s: ������������������������ ���������������� ������������������ -O\n"
+
+#~ msgid "%s: invalid argument for option -l\n"
+#~ msgstr "%s: ������������������������ ���������������� ������������������ -l\n"
+
+#~ msgid " -m XID,OLDEST set next multitransaction ID and oldest value\n"
+#~ msgstr ""
+#~ " -m XID,������������������ ������������ ID ������������������ �������������������������������� �� ID ������������������\n"
+
+#~ msgid "disabled"
+#~ msgstr "����������������"
+
+#~ msgid "enabled"
+#~ msgstr "��������������"
+
+#~ msgid "First log file ID after reset: %u\n"
+#~ msgstr "ID �������������� �������������� ���������� ������������: %u\n"
diff --git a/src/bin/pg_resetwal/po/sv.po b/src/bin/pg_resetwal/po/sv.po
new file mode 100644
index 0000000..528531b
--- /dev/null
+++ b/src/bin/pg_resetwal/po/sv.po
@@ -0,0 +1,550 @@
+# Swedish message translation file for resetxlog.
+# Dennis Bj��rklund <db@zigo.dhs.org>, 2002, 2003, 2004, 2005, 2006.
+# Peter Eisentraut <peter_e@gmx.net>, 2010.
+# Mats Erik Andersson <bsd@gisladisker.se>, 2014.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PostgreSQL 9.4\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2014-11-25 16:12+0000\n"
+"PO-Revision-Date: 2014-11-29 18:32+0100\n"
+"Last-Translator: Mats Erik Andersson <bsd@gisladisker.se>\n"
+"Language-Team: Swedish <sv@li.org>\n"
+"Language: sv\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: pg_resetxlog.c:130
+#, c-format
+msgid "%s: invalid argument for option -e\n"
+msgstr "%s: Ogiltigt argument f��r v��xel -e.\n"
+
+#: pg_resetxlog.c:131 pg_resetxlog.c:146 pg_resetxlog.c:161 pg_resetxlog.c:176
+#: pg_resetxlog.c:184 pg_resetxlog.c:210 pg_resetxlog.c:224 pg_resetxlog.c:231
+#: pg_resetxlog.c:239
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "F��rs��k med \"%s --help\" f��r mer information.\n"
+
+#: pg_resetxlog.c:136
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: Epok (-e) f��r transaktions-ID f��r inte vara -1.\n"
+
+#: pg_resetxlog.c:145
+#, c-format
+msgid "%s: invalid argument for option -x\n"
+msgstr "%s: Ogiltigt argument f��r v��xel -x.\n"
+
+#: pg_resetxlog.c:151
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: Transaktions-ID (-x) f��r inte vara 0.\n"
+
+#: pg_resetxlog.c:160
+#, c-format
+msgid "%s: invalid argument for option -o\n"
+msgstr "%s: Ogiltigt argument f��r v��xel -o.\n"
+
+#: pg_resetxlog.c:166
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) f��r inte vara 0.\n"
+
+#: pg_resetxlog.c:175 pg_resetxlog.c:183
+#, c-format
+msgid "%s: invalid argument for option -m\n"
+msgstr "%s: Ogiltigt argument f��r v��xel -m.\n"
+
+#: pg_resetxlog.c:189
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: Multitransaktions-ID (-m) f��r inte vara 0.\n"
+
+#: pg_resetxlog.c:199
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ��ldsta multitransaktions-ID (-m) f��r inte vara 0.\n"
+
+#: pg_resetxlog.c:209
+#, c-format
+msgid "%s: invalid argument for option -O\n"
+msgstr "%s: Ogiltigt argument f��r v��xel -O.\n"
+
+#: pg_resetxlog.c:215
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: Multitransaktionsoffset (-O) f��r inte vara -1.\n"
+
+#: pg_resetxlog.c:223
+#, c-format
+msgid "%s: invalid argument for option -l\n"
+msgstr "%s: Ogiltigt argument f��r v��xel -l.\n"
+
+#: pg_resetxlog.c:238
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: Ingen datakatalog angiven.\n"
+
+#: pg_resetxlog.c:252
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s: F��r inte utf��ras av \"root\".\n"
+
+#: pg_resetxlog.c:254
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "Du m��ste k��ra %s som PostgreSQL:s superanv��ndare.\n"
+
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: Kunde inte g�� till katalog \"%s\": %s\n"
+
+#: pg_resetxlog.c:277 pg_resetxlog.c:418
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: Kunde inte ��ppna filen \"%s\" f��r l��sning: %s\n"
+
+#: pg_resetxlog.c:284
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running? If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: En l��sfil \"%s\" finns p�� plats.\n"
+"K��r servern redan? Om inte, radera l��sfilen och f��rs��k igen.\n"
+
+#: pg_resetxlog.c:366
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"Om dessa v��rden verkar godtagbara, anv��nd d�� -f f��r att\n"
+"framtvinga ��terst��llning.\n"
+
+#: pg_resetxlog.c:378
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"Databasservern st��ngdes inte av ordentligt. Att ��terst��lla\n"
+"transaktionsloggen kan medf��ra att data f��rloras. Om du ��nd��\n"
+"vill forts��tta, anv��nd -f f��r att framtvinga ��terst��llning.\n"
+
+#: pg_resetxlog.c:392
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "��terst��llning av transaktionslogg.\n"
+
+#: pg_resetxlog.c:421
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+" touch %s\n"
+"and try again.\n"
+msgstr ""
+"Om du ��r s��ker p�� att s��kv��gen till datakatalogen ��r riktig,\n"
+"utf��r d�� \"touch %s\" och f��rs��k sedan igen.\n"
+
+#: pg_resetxlog.c:434
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: Kunde inte l��sa fil \"%s\": %s\n"
+
+#: pg_resetxlog.c:457
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control existerar men har ogiltig CRC. Forts��tt med varsamhet.\n"
+
+#: pg_resetxlog.c:466
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control existerar men ��r trasig eller har ok��nd version. Den ignoreras.\n"
+
+#: pg_resetxlog.c:568
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"Gissade v��rden f��r pg_control:\n"
+"\n"
+
+#: pg_resetxlog.c:570
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"Nuvarande v��rden f��r pg_control:\n"
+"\n"
+
+# November 26th, 2014: Insert six additional space characters
+# for best alignment with Swedish translation.
+# Translations should be checked against those of pg_controldata.
+#: pg_resetxlog.c:579
+#, c-format
+msgid "pg_control version number: %u\n"
+msgstr "Versionsnummer f��r pg_control: %u\n"
+
+#: pg_resetxlog.c:581
+#, c-format
+msgid "Catalog version number: %u\n"
+msgstr "Katalogversion: %u\n"
+
+#: pg_resetxlog.c:583
+#, c-format
+msgid "Database system identifier: %s\n"
+msgstr "Databasens systemidentifierare: %s\n"
+
+#: pg_resetxlog.c:585
+#, c-format
+msgid "Latest checkpoint's TimeLineID: %u\n"
+msgstr "TimeLineID vid senaste kontrollpunkt: %u\n"
+
+#: pg_resetxlog.c:587
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "Senaste kontrollpunktens full_page_writes: %s\n"
+
+#: pg_resetxlog.c:588
+msgid "off"
+msgstr "av"
+
+#: pg_resetxlog.c:588
+msgid "on"
+msgstr "p��"
+
+#: pg_resetxlog.c:589
+#, c-format
+msgid "Latest checkpoint's NextXID: %u/%u\n"
+msgstr "NextXID vid senaste kontrollpunkt: %u/%u\n"
+
+#: pg_resetxlog.c:592
+#, c-format
+msgid "Latest checkpoint's NextOID: %u\n"
+msgstr "NextOID vid senaste kontrollpunkt: %u\n"
+
+#: pg_resetxlog.c:594
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId: %u\n"
+msgstr "NextMultiXactId vid senaste kontrollpunkt: %u\n"
+
+#: pg_resetxlog.c:596
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset: %u\n"
+msgstr "NextMultiOffset vid senaste kontrollpunkt: %u\n"
+
+#: pg_resetxlog.c:598
+#, c-format
+msgid "Latest checkpoint's oldestXID: %u\n"
+msgstr "oldestXID vid senaste kontrollpunkt: %u\n"
+
+#: pg_resetxlog.c:600
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB: %u\n"
+msgstr "DB f��r oldestXID vid senaste kontrollpunkt: %u\n"
+
+# FIXME: too wide
+#: pg_resetxlog.c:602
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID: %u\n"
+msgstr "oldestActiveXID vid senaste kontrollpunkt: %u\n"
+
+#: pg_resetxlog.c:604
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid: %u\n"
+msgstr "oldestMultiXid vid senaste kontrollpunkt: %u\n"
+
+#: pg_resetxlog.c:606
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "DB f��r oldestMulti vid senaste kontrollpkt: %u\n"
+
+#: pg_resetxlog.c:608
+#, c-format
+msgid "Maximum data alignment: %u\n"
+msgstr "Maximal j��mkning av data (alignment): %u\n"
+
+#: pg_resetxlog.c:611
+#, c-format
+msgid "Database block size: %u\n"
+msgstr "Databasens blockstorlek: %u\n"
+
+#: pg_resetxlog.c:613
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "Block per segment i en stor relation: %u\n"
+
+#: pg_resetxlog.c:615
+#, c-format
+msgid "WAL block size: %u\n"
+msgstr "Blockstorlek i transaktionsloggen: %u\n"
+
+#: pg_resetxlog.c:617
+#, c-format
+msgid "Bytes per WAL segment: %u\n"
+msgstr "Segmentstorlek i transaktionsloggen: %u\n"
+
+#: pg_resetxlog.c:619
+#, c-format
+msgid "Maximum length of identifiers: %u\n"
+msgstr "Maximal l��ngd f��r identifierare: %u\n"
+
+#: pg_resetxlog.c:621
+#, c-format
+msgid "Maximum columns in an index: %u\n"
+msgstr "Maximalt antal kolonner i ett index: %u\n"
+
+#: pg_resetxlog.c:623
+#, c-format
+msgid "Maximum size of a TOAST chunk: %u\n"
+msgstr "Maximal storlek f��r en TOAST-enhet: %u\n"
+
+#: pg_resetxlog.c:625
+#, c-format
+msgid "Size of a large-object chunk: %u\n"
+msgstr "Storlek f��r large-object-enheter: %u\n"
+
+#: pg_resetxlog.c:627
+#, c-format
+msgid "Date/time type storage: %s\n"
+msgstr "Representation av dag och tid: %s\n"
+
+#: pg_resetxlog.c:628
+msgid "64-bit integers"
+msgstr "64-bitars heltal"
+
+#: pg_resetxlog.c:628
+msgid "floating-point numbers"
+msgstr "flyttal"
+
+#: pg_resetxlog.c:629
+#, c-format
+msgid "Float4 argument passing: %s\n"
+msgstr "��tkomst till float4-argument: %s\n"
+
+#: pg_resetxlog.c:630 pg_resetxlog.c:632
+msgid "by reference"
+msgstr "referens"
+
+#: pg_resetxlog.c:630 pg_resetxlog.c:632
+msgid "by value"
+msgstr "v��rde��tkomst"
+
+#: pg_resetxlog.c:631
+#, c-format
+msgid "Float8 argument passing: %s\n"
+msgstr "��tkomst till float8-argument: %s\n"
+
+#: pg_resetxlog.c:633
+#, c-format
+msgid "Data page checksum version: %u\n"
+msgstr "Checksummaversion f��r datasidor: %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"V��rden att f��r��ndra:\n"
+"\n"
+
+# November 26th, 2014: Insert additional spacing to fit
+# with the first translated text, which uses most characters.
+#: pg_resetxlog.c:650
+#, c-format
+msgid "First log segment after reset: %s\n"
+msgstr "F��rsta loggsegment efter ��terst��llning: %s\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "NextMultiXactId: %u\n"
+msgstr "NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "OldestMultiXid: %u\n"
+msgstr "OldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "OldestMulti's DB: %u\n"
+msgstr "DB f��r OldestMulti: %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "NextMultiOffset: %u\n"
+msgstr "NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+msgid "NextOID: %u\n"
+msgstr "NextOID: %u\n"
+
+#: pg_resetxlog.c:676
+#, c-format
+msgid "NextXID: %u\n"
+msgstr "NextXID: %u\n"
+
+#: pg_resetxlog.c:678
+#, c-format
+msgid "OldestXID: %u\n"
+msgstr "OldestXID: %u\n"
+
+#: pg_resetxlog.c:680
+#, c-format
+msgid "OldestXID's DB: %u\n"
+msgstr "DB f��r OldestXID: %u\n"
+
+#: pg_resetxlog.c:686
+#, c-format
+msgid "NextXID epoch: %u\n"
+msgstr "Epok f��r NextXID: %u\n"
+
+
+#: pg_resetxlog.c:751
+#, c-format
+msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
+msgstr "%s: Internt fel: sizeof(ControlFileData) ��r alltf��r stor. R��tta till PG_CONTROL_SIZE.\n"
+
+#: pg_resetxlog.c:766
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: Kunde inte skapa fil f��r pg_control: %s\n"
+
+#: pg_resetxlog.c:777
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: Kunde inte skriva fil f��r pg_control: %s\n"
+
+#: pg_resetxlog.c:784 pg_resetxlog.c:1068
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: Misslyckad fsync: %s\n"
+
+#: pg_resetxlog.c:824 pg_resetxlog.c:890 pg_resetxlog.c:941
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: Kunde inte ��ppna filkatalog \"%s\": %s\n"
+
+#: pg_resetxlog.c:855 pg_resetxlog.c:912 pg_resetxlog.c:964
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: Kunde inte l��sa filkatalog \"%s\": %s\n"
+
+#: pg_resetxlog.c:862 pg_resetxlog.c:919 pg_resetxlog.c:971
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: Kunde inte st��nga filkatalog \"%s\": %s\n"
+
+#: pg_resetxlog.c:903 pg_resetxlog.c:955
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: Kunde inte radera fil \"%s\": %s\n"
+
+#: pg_resetxlog.c:1035
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: Kunde inte ��ppna fil \"%s\": %s\n"
+
+#: pg_resetxlog.c:1046 pg_resetxlog.c:1060
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: Kunde inte skriva fil \"%s\": %s\n"
+
+#: pg_resetxlog.c:1079
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s ��terst��ller transaktionslogg f��r PostgreSQL.\n"
+"\n"
+
+#: pg_resetxlog.c:1080
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"Anv��ndning:\n"
+" %s [FLAGGA]... DATAKATALOG\n"
+"\n"
+
+#: pg_resetxlog.c:1081
+#, c-format
+msgid "Options:\n"
+msgstr "Programv��xlar:\n"
+
+#: pg_resetxlog.c:1082
+#, c-format
+msgid " -e XIDEPOCH set next transaction ID epoch\n"
+msgstr " -e XIDEPOCH s��tter epok f��r n��sta transaktions-ID\n"
+
+#: pg_resetxlog.c:1083
+#, c-format
+msgid " -f force update to be done\n"
+msgstr " -f framtvinga ��terst��llning\n"
+
+#: pg_resetxlog.c:1084
+#, c-format
+msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
+msgstr " -l XLOGFIL ny transaktionslogg m��ste vara detta namn eller ett senare\n"
+
+#: pg_resetxlog.c:1085
+#, c-format
+msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
+msgstr " -m MXID,MXID s��tt n��sta och ��ldsta multitransaktions-ID\n"
+
+#: pg_resetxlog.c:1086
+#, c-format
+msgid " -n no update, just show what would be done (for testing)\n"
+msgstr " -n ingen updatering; visa planerade ��tg��rder (f��r testning)\n"
+
+#: pg_resetxlog.c:1087
+#, c-format
+msgid " -o OID set next OID\n"
+msgstr " -o OID s��tt n��sta OID\n"
+
+#: pg_resetxlog.c:1088
+#, c-format
+msgid " -O OFFSET set next multitransaction offset\n"
+msgstr " -O OFFSET s��tt n��sta multitransaktionsoffset\n"
+
+#: pg_resetxlog.c:1089
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version visa versionsinformation, avsluta sedan\n"
+
+#: pg_resetxlog.c:1090
+#, c-format
+msgid " -x XID set next transaction ID\n"
+msgstr " -x XID s��tt n��sta transaktions-ID\n"
+
+#: pg_resetxlog.c:1091
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help visa denna hj��lp, avsluta sedan\n"
+
+#: pg_resetxlog.c:1092
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"Reportera fel till <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetwal/po/zh_CN.po b/src/bin/pg_resetwal/po/zh_CN.po
new file mode 100644
index 0000000..c199ac9
--- /dev/null
+++ b/src/bin/pg_resetwal/po/zh_CN.po
@@ -0,0 +1,661 @@
+# simplified Chinese translation file for pg_resetxlog and friends
+# Bao Wei <weibao@forevertek.com>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pg_resetxlog (PostgreSQL 9.0)\n"
+"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
+"POT-Creation-Date: 2016-04-18 04:44+0000\n"
+"PO-Revision-Date: 2016-05-19 20:41+0800\n"
+"Last-Translator: Yuwei Peng <ywpeng@whu.edu.cn>\n"
+"Language-Team: Chinese (Simplified) <ywpeng@whu.edu.cn>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.5.7\n"
+
+#: ../../common/restricted_token.c:68
+#, c-format
+msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
+msgstr "%s: WARNING: ������������������������������������������\n"
+
+#: ../../common/restricted_token.c:77
+#, c-format
+msgid "%s: could not open process token: error code %lu\n"
+msgstr "%s:������������������������ (token): ��������� %lu\n"
+
+#: ../../common/restricted_token.c:90
+#, c-format
+msgid "%s: could not allocate SIDs: error code %lu\n"
+msgstr "%s: ������������SID: ��������� %lu\n"
+
+#: ../../common/restricted_token.c:110
+#, c-format
+msgid "%s: could not create restricted token: error code %lu\n"
+msgstr "%s: ������������������������: ������������ %lu\n"
+
+#: ../../common/restricted_token.c:132
+#, c-format
+msgid "%s: could not start process for command \"%s\": error code %lu\n"
+msgstr "%s: ��������������� \"%s\"������������: ��������� %lu\n"
+
+#: ../../common/restricted_token.c:170
+#, c-format
+msgid "%s: could not re-execute with restricted token: error code %lu\n"
+msgstr "%s: ������������������������������������: ��������� %lu\n"
+
+#: ../../common/restricted_token.c:186
+#, c-format
+msgid "%s: could not get exit code from subprocess: error code %lu\n"
+msgstr "%s: ���������������������������������: ��������� %lu\n"
+
+#. translator: the second %s is a command line argument (-e, etc)
+#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
+#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
+#: pg_resetxlog.c:264
+#, c-format
+msgid "%s: invalid argument for option %s\n"
+msgstr "%s:���������%s���������������\n"
+
+#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
+#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
+#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
+#, c-format
+msgid "Try \"%s --help\" for more information.\n"
+msgstr "������ \"%s --help\" ���������������������.\n"
+
+#: pg_resetxlog.c:146
+#, c-format
+msgid "%s: transaction ID epoch (-e) must not be -1\n"
+msgstr "%s: ������ID epoch(-e) ��������� -1\n"
+
+#: pg_resetxlog.c:161
+#, c-format
+msgid "%s: transaction ID (-x) must not be 0\n"
+msgstr "%s: ������ ID (-x) ��������� 0\n"
+
+#: pg_resetxlog.c:185 pg_resetxlog.c:192
+#, c-format
+msgid ""
+"%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
+msgstr "%s���������ID (-c) ���������0������������������2\n"
+
+#: pg_resetxlog.c:207
+#, c-format
+msgid "%s: OID (-o) must not be 0\n"
+msgstr "%s: OID (-o) ��������� 0\n"
+
+#: pg_resetxlog.c:230
+#, c-format
+msgid "%s: multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ��������� ID (-m) ��������� 0\n"
+
+#: pg_resetxlog.c:240
+#, c-format
+msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
+msgstr "%s: ������������������ ID (-m) ��������� 0\n"
+
+#: pg_resetxlog.c:256
+#, c-format
+msgid "%s: multitransaction offset (-O) must not be -1\n"
+msgstr "%s: ��������� ������ (-O) ���������-1\n"
+
+#: pg_resetxlog.c:283
+#, c-format
+msgid "%s: too many command-line arguments (first is \"%s\")\n"
+msgstr "%s: ��������������������� (������������ \"%s\")\n"
+
+#: pg_resetxlog.c:292
+#, c-format
+msgid "%s: no data directory specified\n"
+msgstr "%s: ������������������������\n"
+
+#: pg_resetxlog.c:306
+#, c-format
+msgid "%s: cannot be executed by \"root\"\n"
+msgstr "%s:���������\"root\"������\n"
+
+#: pg_resetxlog.c:308
+#, c-format
+msgid "You must run %s as the PostgreSQL superuser.\n"
+msgstr "���������������PostgreSQL������������������%s.\n"
+
+# command.c:256
+#: pg_resetxlog.c:318
+#, c-format
+msgid "%s: could not change directory to \"%s\": %s\n"
+msgstr "%s: ��������������������� \"%s\": %s\n"
+
+#: pg_resetxlog.c:331 pg_resetxlog.c:477
+#, c-format
+msgid "%s: could not open file \"%s\" for reading: %s\n"
+msgstr "%s: ������������������ \"%s\" ������������: %s\n"
+
+#: pg_resetxlog.c:338
+#, c-format
+msgid ""
+"%s: lock file \"%s\" exists\n"
+"Is a server running? If not, delete the lock file and try again.\n"
+msgstr ""
+"%s: ��������� \"%s\" ������������\n"
+"���������������������������������? ������������, ���������������������������������������.\n"
+
+#: pg_resetxlog.c:425
+#, c-format
+msgid ""
+"\n"
+"If these values seem acceptable, use -f to force reset.\n"
+msgstr ""
+"\n"
+"������������������������, ��� -f ������������.\n"
+
+#: pg_resetxlog.c:437
+#, c-format
+msgid ""
+"The database server was not shut down cleanly.\n"
+"Resetting the transaction log might cause data to be lost.\n"
+"If you want to proceed anyway, use -f to force reset.\n"
+msgstr ""
+"������������������������������������.\n"
+"������������������������������������������������.\n"
+"���������������������, ��� -f ������������.\n"
+
+#: pg_resetxlog.c:451
+#, c-format
+msgid "Transaction log reset\n"
+msgstr "������������������\n"
+
+#: pg_resetxlog.c:480
+#, c-format
+msgid ""
+"If you are sure the data directory path is correct, execute\n"
+" touch %s\n"
+"and try again.\n"
+msgstr ""
+"���������������������������������������������, ������\n"
+" touch %s\n"
+"������������������.\n"
+
+#: pg_resetxlog.c:493
+#, c-format
+msgid "%s: could not read file \"%s\": %s\n"
+msgstr "%s: ������������������ \"%s\": %s\n"
+
+#: pg_resetxlog.c:516
+#, c-format
+msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
+msgstr "%s: pg_control ������������, ���������������CRC; ���������������������������\n"
+
+#: pg_resetxlog.c:525
+#, c-format
+msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
+msgstr "%s: pg_control ������������, ���������������������������; ���������\n"
+
+#: pg_resetxlog.c:628
+#, c-format
+msgid ""
+"Guessed pg_control values:\n"
+"\n"
+msgstr ""
+"��������� pg_control ���:\n"
+"\n"
+
+#: pg_resetxlog.c:630
+#, c-format
+msgid ""
+"Current pg_control values:\n"
+"\n"
+msgstr ""
+"��������� pg_control ���:\n"
+"\n"
+
+#: pg_resetxlog.c:639
+#, c-format
+msgid "pg_control version number: %u\n"
+msgstr "pg_control ������: %u\n"
+
+#: pg_resetxlog.c:641
+#, c-format
+msgid "Catalog version number: %u\n"
+msgstr "Catalog ������: %u\n"
+
+#: pg_resetxlog.c:643
+#, c-format
+msgid "Database system identifier: %s\n"
+msgstr "������������������������: %s\n"
+
+#: pg_resetxlog.c:645
+#, c-format
+msgid "Latest checkpoint's TimeLineID: %u\n"
+msgstr "������������������ TimeLineID: %u\n"
+
+#: pg_resetxlog.c:647
+#, c-format
+msgid "Latest checkpoint's full_page_writes: %s\n"
+msgstr "������������������full_page_writes: %s\n"
+
+# help.c:48
+#: pg_resetxlog.c:648
+msgid "off"
+msgstr "������"
+
+# help.c:48
+#: pg_resetxlog.c:648
+msgid "on"
+msgstr "������"
+
+#: pg_resetxlog.c:649
+#, c-format
+#| msgid "Latest checkpoint's NextXID: %u/%u\n"
+msgid "Latest checkpoint's NextXID: %u:%u\n"
+msgstr "������������������NextXID: %u:%u\n"
+
+#: pg_resetxlog.c:652
+#, c-format
+msgid "Latest checkpoint's NextOID: %u\n"
+msgstr "������������������ NextOID: %u\n"
+
+#: pg_resetxlog.c:654
+#, c-format
+msgid "Latest checkpoint's NextMultiXactId: %u\n"
+msgstr "������������������ NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:656
+#, c-format
+msgid "Latest checkpoint's NextMultiOffset: %u\n"
+msgstr "������������������ NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:658
+#, c-format
+msgid "Latest checkpoint's oldestXID: %u\n"
+msgstr "������������������oldestXID: %u\n"
+
+#: pg_resetxlog.c:660
+#, c-format
+msgid "Latest checkpoint's oldestXID's DB: %u\n"
+msgstr "������������������oldestXID������������������: %u\n"
+
+#: pg_resetxlog.c:662
+#, c-format
+msgid "Latest checkpoint's oldestActiveXID: %u\n"
+msgstr "������������������oldestActiveXID: %u\n"
+
+#: pg_resetxlog.c:664
+#, c-format
+msgid "Latest checkpoint's oldestMultiXid: %u\n"
+msgstr "������������������oldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:666
+#, c-format
+msgid "Latest checkpoint's oldestMulti's DB: %u\n"
+msgstr "������������������oldestMulti������������������: %u\n"
+
+#: pg_resetxlog.c:668
+#, c-format
+#| msgid "Latest checkpoint's oldestCommitTs: %u\n"
+msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
+msgstr "������������������oldestCommitTsXid:%u\n"
+
+#: pg_resetxlog.c:670
+#, c-format
+#| msgid "Latest checkpoint's newestCommitTs: %u\n"
+msgid "Latest checkpoint's newestCommitTsXid:%u\n"
+msgstr "������������������newestCommitTsXid:%u\n"
+
+#: pg_resetxlog.c:672
+#, c-format
+msgid "Maximum data alignment: %u\n"
+msgstr "���������������������: %u\n"
+
+#: pg_resetxlog.c:675
+#, c-format
+msgid "Database block size: %u\n"
+msgstr "������������������: %u\n"
+
+#: pg_resetxlog.c:677
+#, c-format
+msgid "Blocks per segment of large relation: %u\n"
+msgstr "������������������������: %u\n"
+
+#: pg_resetxlog.c:679
+#, c-format
+msgid "WAL block size: %u\n"
+msgstr "WAL���������: %u\n"
+
+#: pg_resetxlog.c:681
+#, c-format
+msgid "Bytes per WAL segment: %u\n"
+msgstr "��������� WAL ������������: %u\n"
+
+#: pg_resetxlog.c:683
+#, c-format
+msgid "Maximum length of identifiers: %u\n"
+msgstr "������������������������: %u\n"
+
+#: pg_resetxlog.c:685
+#, c-format
+msgid "Maximum columns in an index: %u\n"
+msgstr "���������������������������������: %u\n"
+
+#: pg_resetxlog.c:687
+#, c-format
+msgid "Maximum size of a TOAST chunk: %u\n"
+msgstr "������TOAST���������������������: %u\n"
+
+#: pg_resetxlog.c:689
+#, c-format
+msgid "Size of a large-object chunk: %u\n"
+msgstr "������������������������������: %u\n"
+
+#: pg_resetxlog.c:691
+#, c-format
+msgid "Date/time type storage: %s\n"
+msgstr "������/������������������: %s\n"
+
+#: pg_resetxlog.c:692
+msgid "64-bit integers"
+msgstr "64���������"
+
+#: pg_resetxlog.c:692
+msgid "floating-point numbers"
+msgstr "���������"
+
+#: pg_resetxlog.c:693
+#, c-format
+msgid "Float4 argument passing: %s\n"
+msgstr "������������Float4���������������: %s\n"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by reference"
+msgstr "���������"
+
+#: pg_resetxlog.c:694 pg_resetxlog.c:696
+msgid "by value"
+msgstr "������"
+
+#: pg_resetxlog.c:695
+#, c-format
+msgid "Float8 argument passing: %s\n"
+msgstr "������������Float8���������������: %s\n"
+
+#: pg_resetxlog.c:697
+#, c-format
+msgid "Data page checksum version: %u\n"
+msgstr "������������������������: %u\n"
+
+#: pg_resetxlog.c:711
+#, c-format
+msgid ""
+"\n"
+"\n"
+"Values to be changed:\n"
+"\n"
+msgstr ""
+"\n"
+"\n"
+"������������������:\n"
+"\n"
+
+#: pg_resetxlog.c:714
+#, c-format
+msgid "First log segment after reset: %s\n"
+msgstr "������������������������������: %s\n"
+
+#: pg_resetxlog.c:718
+#, c-format
+msgid "NextMultiXactId: %u\n"
+msgstr "���������MultiXactId���NextMultiXactId: %u\n"
+
+#: pg_resetxlog.c:720
+#, c-format
+msgid "OldestMultiXid: %u\n"
+msgstr "���������MultiXid���OldestMultiXid: %u\n"
+
+#: pg_resetxlog.c:722
+#, c-format
+msgid "OldestMulti's DB: %u\n"
+msgstr "���������MultiXid���������DB: %u\n"
+
+#: pg_resetxlog.c:728
+#, c-format
+msgid "NextMultiOffset: %u\n"
+msgstr "���������������NextMultiOffset: %u\n"
+
+#: pg_resetxlog.c:734
+#, c-format
+msgid "NextOID: %u\n"
+msgstr "NextOID: %u\n"
+
+#: pg_resetxlog.c:740
+#, c-format
+msgid "NextXID: %u\n"
+msgstr "NextXID: %u\n"
+
+#: pg_resetxlog.c:742
+#, c-format
+msgid "OldestXID: %u\n"
+msgstr "OldestXID: %u\n"
+
+#: pg_resetxlog.c:744
+#, c-format
+msgid "OldestXID's DB: %u\n"
+msgstr "OldestXID's DB: %u\n"
+
+#: pg_resetxlog.c:750
+#, c-format
+msgid "NextXID epoch: %u\n"
+msgstr "NextXID ������: %u\n"
+
+#: pg_resetxlog.c:756
+#, c-format
+#| msgid "oldestCommitTs: %u\n"
+msgid "oldestCommitTsXid: %u\n"
+msgstr "oldestCommitTsXid��� %u\n"
+
+#: pg_resetxlog.c:761
+#, c-format
+#| msgid "newestCommitTs: %u\n"
+msgid "newestCommitTsXid: %u\n"
+msgstr "newestCommitTsXid��� %u\n"
+
+#: pg_resetxlog.c:827
+#, c-format
+msgid ""
+"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
+"PG_CONTROL_SIZE\n"
+msgstr "%s: ������������ -- sizeof(ControlFileData) ������ ... ������ xlog.c\n"
+
+#: pg_resetxlog.c:842
+#, c-format
+msgid "%s: could not create pg_control file: %s\n"
+msgstr "%s: ������������ pg_control ������: %s\n"
+
+#: pg_resetxlog.c:853
+#, c-format
+msgid "%s: could not write pg_control file: %s\n"
+msgstr "%s: ��������� pg_control ������: %s\n"
+
+#: pg_resetxlog.c:860 pg_resetxlog.c:1156
+#, c-format
+msgid "%s: fsync error: %s\n"
+msgstr "%s: fsync ������: %s\n"
+
+#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
+#, c-format
+msgid "%s: could not open directory \"%s\": %s\n"
+msgstr "%s: ������������������ \"%s\": %s\n"
+
+#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
+#, c-format
+msgid "%s: could not read directory \"%s\": %s\n"
+msgstr "%s: ������������������ \"%s\": %s\n"
+
+#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
+#, c-format
+msgid "%s: could not close directory \"%s\": %s\n"
+msgstr "%s: ������������������ \"%s\": %s\n"
+
+#: pg_resetxlog.c:984 pg_resetxlog.c:1038
+#, c-format
+msgid "%s: could not delete file \"%s\": %s\n"
+msgstr "%s: ������������������ \"%s\": %s\n"
+
+#: pg_resetxlog.c:1123
+#, c-format
+msgid "%s: could not open file \"%s\": %s\n"
+msgstr "%s: ������������������ \"%s\": %s\n"
+
+#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
+#, c-format
+msgid "%s: could not write file \"%s\": %s\n"
+msgstr "%s: ��������������� \"%s\": %s\n"
+
+#: pg_resetxlog.c:1167
+#, c-format
+msgid ""
+"%s resets the PostgreSQL transaction log.\n"
+"\n"
+msgstr ""
+"%s ������ PostgreSQL ������������.\n"
+"\n"
+
+#: pg_resetxlog.c:1168
+#, c-format
+msgid ""
+"Usage:\n"
+" %s [OPTION]... DATADIR\n"
+"\n"
+msgstr ""
+"������������:\n"
+" %s [������]... ������������\n"
+"\n"
+
+#: pg_resetxlog.c:1169
+#, c-format
+msgid "Options:\n"
+msgstr "������:\n"
+
+#: pg_resetxlog.c:1170
+#, c-format
+msgid ""
+" -c XID,XID set oldest and newest transactions bearing commit "
+"timestamp\n"
+msgstr " -c XID,XID ���������������������������������������������������\n"
+
+#: pg_resetxlog.c:1171
+#, c-format
+msgid " (zero in either value means no change)\n"
+msgstr " ������������������������������������������\n"
+
+#: pg_resetxlog.c:1172
+#, c-format
+msgid " [-D] DATADIR data directory\n"
+msgstr " [-D] DATADIR ������������\n"
+
+#: pg_resetxlog.c:1173
+#, c-format
+msgid " -e XIDEPOCH set next transaction ID epoch\n"
+msgstr " -e XIDEPOCH ���������������������ID���������������epoch���\n"
+
+#: pg_resetxlog.c:1174
+#, c-format
+msgid " -f force update to be done\n"
+msgstr " -f ������������\n"
+
+#: pg_resetxlog.c:1175
+#, c-format
+msgid ""
+" -l XLOGFILE force minimum WAL starting location for new transaction "
+"log\n"
+msgstr " -l XLOGFILE ���������������������������������������WAL������������������\n"
+
+#: pg_resetxlog.c:1176
+#, c-format
+msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
+msgstr " -m MXID,MXID ������������������������������������������ID\n"
+
+#: pg_resetxlog.c:1177
+#, c-format
+msgid ""
+" -n no update, just show what would be done (for testing)\n"
+msgstr " -n ���������, ������������������������ (������������)\n"
+
+#: pg_resetxlog.c:1178
+#, c-format
+msgid " -o OID set next OID\n"
+msgstr " -o OID ��������������� OID\n"
+
+#: pg_resetxlog.c:1179
+#, c-format
+msgid " -O OFFSET set next multitransaction offset\n"
+msgstr " -O OFFSET ���������������������������multitransaction���������\n"
+
+#: pg_resetxlog.c:1180
+#, c-format
+msgid " -V, --version output version information, then exit\n"
+msgstr " -V, --version ���������������������������������\n"
+
+#: pg_resetxlog.c:1181
+#, c-format
+msgid " -x XID set next transaction ID\n"
+msgstr " -x XID ��������������������� ID\n"
+
+#: pg_resetxlog.c:1182
+#, c-format
+msgid " -?, --help show this help, then exit\n"
+msgstr " -?, --help ���������������������������������\n"
+
+#: pg_resetxlog.c:1183
+#, c-format
+msgid ""
+"\n"
+"Report bugs to <pgsql-bugs@postgresql.org>.\n"
+msgstr ""
+"\n"
+"��������������� <pgsql-bugs@postgresql.org>.\n"
+
+#~ msgid "%s: invalid argument for option -x\n"
+#~ msgstr "%s: ��� -x ���������������������\n"
+
+#~ msgid "%s: invalid argument for option -o\n"
+#~ msgstr "%s: ��� -o ���������������������\n"
+
+#~ msgid "%s: invalid argument for option -m\n"
+#~ msgstr "%s: ������������-m ������������\n"
+
+#~ msgid "%s: invalid argument for option -O\n"
+#~ msgstr "%s: ������������-O ������������\n"
+
+#~ msgid "%s: invalid argument for option -l\n"
+#~ msgstr "%s: ��� -l ���������������������\n"
+
+#~ msgid "First log file ID after reset: %u\n"
+#~ msgstr "���������������������������������ID: %u\n"
+
+#~ msgid "%s: invalid argument for -o option\n"
+#~ msgstr "%s: ��� -o ���������������������\n"
+
+#~ msgid "%s: invalid argument for -x option\n"
+#~ msgstr "%s: ��� -x ���������������������\n"
+
+#~ msgid "Latest checkpoint's StartUpID: %u\n"
+#~ msgstr "������������������ StartUpID: %u\n"
+
+#~ msgid "Maximum number of function arguments: %u\n"
+#~ msgstr "���������������������������: %u\n"
+
+#~ msgid "%s: invalid LC_CTYPE setting\n"
+#~ msgstr "%s: ��������� LC_CTYPE ������\n"
+
+#~ msgid "%s: invalid LC_COLLATE setting\n"
+#~ msgstr "%s: ��������� LC_COLLATE ������\n"
+
+#~ msgid " --version output version information, then exit\n"
+#~ msgstr " --version ������������������, ������������\n"
+
+#~ msgid " --help show this help, then exit\n"
+#~ msgstr " --help ���������������������, ������������\n"
+
+#~ msgid "%s: could not read from directory \"%s\": %s\n"
+#~ msgstr "%s: ��������������� \"%s\" ���������: %s\n"
diff --git a/src/bin/pg_resetxlog/.gitignore b/src/bin/pg_resetxlog/.gitignore
deleted file mode 100644
index 6b84208..0000000
--- a/src/bin/pg_resetxlog/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-/pg_resetxlog
diff --git a/src/bin/pg_resetxlog/Makefile b/src/bin/pg_resetxlog/Makefile
deleted file mode 100644
index e048924..0000000
--- a/src/bin/pg_resetxlog/Makefile
+++ /dev/null
@@ -1,35 +0,0 @@
-#-------------------------------------------------------------------------
-#
-# Makefile for src/bin/pg_resetxlog
-#
-# Copyright (c) 1998-2017, PostgreSQL Global Development Group
-#
-# src/bin/pg_resetxlog/Makefile
-#
-#-------------------------------------------------------------------------
-
-PGFILEDESC = "pg_resetxlog - reset PostgreSQL WAL log"
-PGAPPICON=win32
-
-subdir = src/bin/pg_resetxlog
-top_builddir = ../../..
-include $(top_builddir)/src/Makefile.global
-
-OBJS= pg_resetxlog.o $(WIN32RES)
-
-all: pg_resetxlog
-
-pg_resetxlog: $(OBJS) | submake-libpgport
- $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
-
-install: all installdirs
- $(INSTALL_PROGRAM) pg_resetxlog$(X) '$(DESTDIR)$(bindir)/pg_resetxlog$(X)'
-
-installdirs:
- $(MKDIR_P) '$(DESTDIR)$(bindir)'
-
-uninstall:
- rm -f '$(DESTDIR)$(bindir)/pg_resetxlog$(X)'
-
-clean distclean maintainer-clean:
- rm -f pg_resetxlog$(X) $(OBJS)
diff --git a/src/bin/pg_resetxlog/nls.mk b/src/bin/pg_resetxlog/nls.mk
deleted file mode 100644
index ce18674..0000000
--- a/src/bin/pg_resetxlog/nls.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-# src/bin/pg_resetxlog/nls.mk
-CATALOG_NAME = pg_resetxlog
-AVAIL_LANGUAGES = cs de es fr it ja ko pl pt_BR ru sv zh_CN
-GETTEXT_FILES = pg_resetxlog.c ../../common/restricted_token.c
diff --git a/src/bin/pg_resetxlog/pg_resetxlog.c b/src/bin/pg_resetxlog/pg_resetxlog.c
deleted file mode 100644
index 963802e..0000000
--- a/src/bin/pg_resetxlog/pg_resetxlog.c
+++ /dev/null
@@ -1,1184 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_resetxlog.c
- * A utility to "zero out" the xlog when it's corrupt beyond recovery.
- * Can also rebuild pg_control if needed.
- *
- * The theory of operation is fairly simple:
- * 1. Read the existing pg_control (which will include the last
- * checkpoint record). If it is an old format then update to
- * current format.
- * 2. If pg_control is corrupt, attempt to intuit reasonable values,
- * by scanning the old xlog if necessary.
- * 3. Modify pg_control to reflect a "shutdown" state with a checkpoint
- * record at the start of xlog.
- * 4. Flush the existing xlog files and write a new segment with
- * just a checkpoint record in it. The new segment is positioned
- * just past the end of the old xlog, so that existing LSNs in
- * data pages will appear to be "in the past".
- * This is all pretty straightforward except for the intuition part of
- * step 2 ...
- *
- *
- * Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
- * Portions Copyright (c) 1994, Regents of the University of California
- *
- * src/bin/pg_resetxlog/pg_resetxlog.c
- *
- *-------------------------------------------------------------------------
- */
-
-/*
- * We have to use postgres.h not postgres_fe.h here, because there's so much
- * backend-only stuff in the XLOG include files we need. But we need a
- * frontend-ish environment otherwise. Hence this ugly hack.
- */
-#define FRONTEND 1
-
-#include "postgres.h"
-
-#include <dirent.h>
-#include <fcntl.h>
-#include <locale.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <time.h>
-#include <unistd.h>
-
-#include "access/transam.h"
-#include "access/tuptoaster.h"
-#include "access/multixact.h"
-#include "access/xlog.h"
-#include "access/xlog_internal.h"
-#include "catalog/catversion.h"
-#include "catalog/pg_control.h"
-#include "common/fe_memutils.h"
-#include "common/restricted_token.h"
-#include "storage/large_object.h"
-#include "pg_getopt.h"
-
-
-static ControlFileData ControlFile; /* pg_control values */
-static XLogSegNo newXlogSegNo; /* new XLOG segment # */
-static bool guessed = false; /* T if we had to guess at any values */
-static const char *progname;
-static uint32 set_xid_epoch = (uint32) -1;
-static TransactionId set_xid = 0;
-static TransactionId set_oldest_commit_ts_xid = 0;
-static TransactionId set_newest_commit_ts_xid = 0;
-static Oid set_oid = 0;
-static MultiXactId set_mxid = 0;
-static MultiXactOffset set_mxoff = (MultiXactOffset) -1;
-static uint32 minXlogTli = 0;
-static XLogSegNo minXlogSegNo = 0;
-
-static bool ReadControlFile(void);
-static void GuessControlValues(void);
-static void PrintControlValues(bool guessed);
-static void PrintNewControlValues(void);
-static void RewriteControlFile(void);
-static void FindEndOfXLOG(void);
-static void KillExistingXLOG(void);
-static void KillExistingArchiveStatus(void);
-static void WriteEmptyXLOG(void);
-static void usage(void);
-
-
-int
-main(int argc, char *argv[])
-{
- int c;
- bool force = false;
- bool noupdate = false;
- MultiXactId set_oldestmxid = 0;
- char *endptr;
- char *endptr2;
- char *DataDir = NULL;
- int fd;
-
- set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_resetxlog"));
-
- progname = get_progname(argv[0]);
-
- if (argc > 1)
- {
- if (strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-?") == 0)
- {
- usage();
- exit(0);
- }
- if (strcmp(argv[1], "--version") == 0 || strcmp(argv[1], "-V") == 0)
- {
- puts("pg_resetxlog (PostgreSQL) " PG_VERSION);
- exit(0);
- }
- }
-
-
- while ((c = getopt(argc, argv, "c:D:e:fl:m:no:O:x:")) != -1)
- {
- switch (c)
- {
- case 'D':
- DataDir = optarg;
- break;
-
- case 'f':
- force = true;
- break;
-
- case 'n':
- noupdate = true;
- break;
-
- case 'e':
- set_xid_epoch = strtoul(optarg, &endptr, 0);
- if (endptr == optarg || *endptr != '\0')
- {
- /*------
- translator: the second %s is a command line argument (-e, etc) */
- fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-e");
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
- exit(1);
- }
- if (set_xid_epoch == -1)
- {
- fprintf(stderr, _("%s: transaction ID epoch (-e) must not be -1\n"), progname);
- exit(1);
- }
- break;
-
- case 'x':
- set_xid = strtoul(optarg, &endptr, 0);
- if (endptr == optarg || *endptr != '\0')
- {
- fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-x");
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
- exit(1);
- }
- if (set_xid == 0)
- {
- fprintf(stderr, _("%s: transaction ID (-x) must not be 0\n"), progname);
- exit(1);
- }
- break;
-
- case 'c':
- set_oldest_commit_ts_xid = strtoul(optarg, &endptr, 0);
- if (endptr == optarg || *endptr != ',')
- {
- fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
- exit(1);
- }
- set_newest_commit_ts_xid = strtoul(endptr + 1, &endptr2, 0);
- if (endptr2 == endptr + 1 || *endptr2 != '\0')
- {
- fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-c");
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
- exit(1);
- }
-
- if (set_oldest_commit_ts_xid < 2 &&
- set_oldest_commit_ts_xid != 0)
- {
- fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
- exit(1);
- }
-
- if (set_newest_commit_ts_xid < 2 &&
- set_newest_commit_ts_xid != 0)
- {
- fprintf(stderr, _("%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"), progname);
- exit(1);
- }
- break;
-
- case 'o':
- set_oid = strtoul(optarg, &endptr, 0);
- if (endptr == optarg || *endptr != '\0')
- {
- fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-o");
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
- exit(1);
- }
- if (set_oid == 0)
- {
- fprintf(stderr, _("%s: OID (-o) must not be 0\n"), progname);
- exit(1);
- }
- break;
-
- case 'm':
- set_mxid = strtoul(optarg, &endptr, 0);
- if (endptr == optarg || *endptr != ',')
- {
- fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-m");
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
- exit(1);
- }
-
- set_oldestmxid = strtoul(endptr + 1, &endptr2, 0);
- if (endptr2 == endptr + 1 || *endptr2 != '\0')
- {
- fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-m");
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
- exit(1);
- }
- if (set_mxid == 0)
- {
- fprintf(stderr, _("%s: multitransaction ID (-m) must not be 0\n"), progname);
- exit(1);
- }
-
- /*
- * XXX It'd be nice to have more sanity checks here, e.g. so
- * that oldest is not wrapped around w.r.t. nextMulti.
- */
- if (set_oldestmxid == 0)
- {
- fprintf(stderr, _("%s: oldest multitransaction ID (-m) must not be 0\n"),
- progname);
- exit(1);
- }
- break;
-
- case 'O':
- set_mxoff = strtoul(optarg, &endptr, 0);
- if (endptr == optarg || *endptr != '\0')
- {
- fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-O");
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
- exit(1);
- }
- if (set_mxoff == -1)
- {
- fprintf(stderr, _("%s: multitransaction offset (-O) must not be -1\n"), progname);
- exit(1);
- }
- break;
-
- case 'l':
- if (strspn(optarg, "01234567890ABCDEFabcdef") != XLOG_FNAME_LEN)
- {
- fprintf(stderr, _("%s: invalid argument for option %s\n"), progname, "-l");
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
- exit(1);
- }
- XLogFromFileName(optarg, &minXlogTli, &minXlogSegNo);
- break;
-
- default:
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
- exit(1);
- }
- }
-
- if (DataDir == NULL && optind < argc)
- DataDir = argv[optind++];
-
- /* Complain if any arguments remain */
- if (optind < argc)
- {
- fprintf(stderr, _("%s: too many command-line arguments (first is \"%s\")\n"),
- progname, argv[optind]);
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"),
- progname);
- exit(1);
- }
-
- if (DataDir == NULL)
- {
- fprintf(stderr, _("%s: no data directory specified\n"), progname);
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
- exit(1);
- }
-
- /*
- * Don't allow pg_resetxlog to be run as root, to avoid overwriting the
- * ownership of files in the data directory. We need only check for root
- * -- any other user won't have sufficient permissions to modify files in
- * the data directory.
- */
-#ifndef WIN32
- if (geteuid() == 0)
- {
- fprintf(stderr, _("%s: cannot be executed by \"root\"\n"),
- progname);
- fprintf(stderr, _("You must run %s as the PostgreSQL superuser.\n"),
- progname);
- exit(1);
- }
-#endif
-
- get_restricted_token(progname);
-
- if (chdir(DataDir) < 0)
- {
- fprintf(stderr, _("%s: could not change directory to \"%s\": %s\n"),
- progname, DataDir, strerror(errno));
- exit(1);
- }
-
- /*
- * Check for a postmaster lock file --- if there is one, refuse to
- * proceed, on grounds we might be interfering with a live installation.
- */
- if ((fd = open("postmaster.pid", O_RDONLY, 0)) < 0)
- {
- if (errno != ENOENT)
- {
- fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
- progname, "postmaster.pid", strerror(errno));
- exit(1);
- }
- }
- else
- {
- fprintf(stderr, _("%s: lock file \"%s\" exists\n"
- "Is a server running? If not, delete the lock file and try again.\n"),
- progname, "postmaster.pid");
- exit(1);
- }
-
- /*
- * Attempt to read the existing pg_control file
- */
- if (!ReadControlFile())
- GuessControlValues();
-
- /*
- * Also look at existing segment files to set up newXlogSegNo
- */
- FindEndOfXLOG();
-
- /*
- * If we're not going to proceed with the reset, print the current control
- * file parameters.
- */
- if ((guessed && !force) || noupdate)
- PrintControlValues(guessed);
-
- /*
- * Adjust fields if required by switches. (Do this now so that printout,
- * if any, includes these values.)
- */
- if (set_xid_epoch != -1)
- ControlFile.checkPointCopy.nextXidEpoch = set_xid_epoch;
-
- if (set_xid != 0)
- {
- ControlFile.checkPointCopy.nextXid = set_xid;
-
- /*
- * For the moment, just set oldestXid to a value that will force
- * immediate autovacuum-for-wraparound. It's not clear whether adding
- * user control of this is useful, so let's just do something that's
- * reasonably safe. The magic constant here corresponds to the
- * maximum allowed value of autovacuum_freeze_max_age.
- */
- ControlFile.checkPointCopy.oldestXid = set_xid - 2000000000;
- if (ControlFile.checkPointCopy.oldestXid < FirstNormalTransactionId)
- ControlFile.checkPointCopy.oldestXid += FirstNormalTransactionId;
- ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
- }
-
- if (set_oldest_commit_ts_xid != 0)
- ControlFile.checkPointCopy.oldestCommitTsXid = set_oldest_commit_ts_xid;
- if (set_newest_commit_ts_xid != 0)
- ControlFile.checkPointCopy.newestCommitTsXid = set_newest_commit_ts_xid;
-
- if (set_oid != 0)
- ControlFile.checkPointCopy.nextOid = set_oid;
-
- if (set_mxid != 0)
- {
- ControlFile.checkPointCopy.nextMulti = set_mxid;
-
- ControlFile.checkPointCopy.oldestMulti = set_oldestmxid;
- if (ControlFile.checkPointCopy.oldestMulti < FirstMultiXactId)
- ControlFile.checkPointCopy.oldestMulti += FirstMultiXactId;
- ControlFile.checkPointCopy.oldestMultiDB = InvalidOid;
- }
-
- if (set_mxoff != -1)
- ControlFile.checkPointCopy.nextMultiOffset = set_mxoff;
-
- if (minXlogTli > ControlFile.checkPointCopy.ThisTimeLineID)
- {
- ControlFile.checkPointCopy.ThisTimeLineID = minXlogTli;
- ControlFile.checkPointCopy.PrevTimeLineID = minXlogTli;
- }
-
- if (minXlogSegNo > newXlogSegNo)
- newXlogSegNo = minXlogSegNo;
-
- /*
- * If we had to guess anything, and -f was not given, just print the
- * guessed values and exit. Also print if -n is given.
- */
- if ((guessed && !force) || noupdate)
- {
- PrintNewControlValues();
- if (!noupdate)
- {
- printf(_("\nIf these values seem acceptable, use -f to force reset.\n"));
- exit(1);
- }
- else
- exit(0);
- }
-
- /*
- * Don't reset from a dirty pg_control without -f, either.
- */
- if (ControlFile.state != DB_SHUTDOWNED && !force)
- {
- printf(_("The database server was not shut down cleanly.\n"
- "Resetting the transaction log might cause data to be lost.\n"
- "If you want to proceed anyway, use -f to force reset.\n"));
- exit(1);
- }
-
- /*
- * Else, do the dirty deed.
- */
- RewriteControlFile();
- KillExistingXLOG();
- KillExistingArchiveStatus();
- WriteEmptyXLOG();
-
- printf(_("Transaction log reset\n"));
- return 0;
-}
-
-
-/*
- * Try to read the existing pg_control file.
- *
- * This routine is also responsible for updating old pg_control versions
- * to the current format. (Currently we don't do anything of the sort.)
- */
-static bool
-ReadControlFile(void)
-{
- int fd;
- int len;
- char *buffer;
- pg_crc32c crc;
-
- if ((fd = open(XLOG_CONTROL_FILE, O_RDONLY | PG_BINARY, 0)) < 0)
- {
- /*
- * If pg_control is not there at all, or we can't read it, the odds
- * are we've been handed a bad DataDir path, so give up. User can do
- * "touch pg_control" to force us to proceed.
- */
- fprintf(stderr, _("%s: could not open file \"%s\" for reading: %s\n"),
- progname, XLOG_CONTROL_FILE, strerror(errno));
- if (errno == ENOENT)
- fprintf(stderr, _("If you are sure the data directory path is correct, execute\n"
- " touch %s\n"
- "and try again.\n"),
- XLOG_CONTROL_FILE);
- exit(1);
- }
-
- /* Use malloc to ensure we have a maxaligned buffer */
- buffer = (char *) pg_malloc(PG_CONTROL_SIZE);
-
- len = read(fd, buffer, PG_CONTROL_SIZE);
- if (len < 0)
- {
- fprintf(stderr, _("%s: could not read file \"%s\": %s\n"),
- progname, XLOG_CONTROL_FILE, strerror(errno));
- exit(1);
- }
- close(fd);
-
- if (len >= sizeof(ControlFileData) &&
- ((ControlFileData *) buffer)->pg_control_version == PG_CONTROL_VERSION)
- {
- /* Check the CRC. */
- INIT_CRC32C(crc);
- COMP_CRC32C(crc,
- buffer,
- offsetof(ControlFileData, crc));
- FIN_CRC32C(crc);
-
- if (EQ_CRC32C(crc, ((ControlFileData *) buffer)->crc))
- {
- /* Valid data... */
- memcpy(&ControlFile, buffer, sizeof(ControlFile));
- return true;
- }
-
- fprintf(stderr, _("%s: pg_control exists but has invalid CRC; proceed with caution\n"),
- progname);
- /* We will use the data anyway, but treat it as guessed. */
- memcpy(&ControlFile, buffer, sizeof(ControlFile));
- guessed = true;
- return true;
- }
-
- /* Looks like it's a mess. */
- fprintf(stderr, _("%s: pg_control exists but is broken or unknown version; ignoring it\n"),
- progname);
- return false;
-}
-
-
-/*
- * Guess at pg_control values when we can't read the old ones.
- */
-static void
-GuessControlValues(void)
-{
- uint64 sysidentifier;
- struct timeval tv;
-
- /*
- * Set up a completely default set of pg_control values.
- */
- guessed = true;
- memset(&ControlFile, 0, sizeof(ControlFile));
-
- ControlFile.pg_control_version = PG_CONTROL_VERSION;
- ControlFile.catalog_version_no = CATALOG_VERSION_NO;
-
- /*
- * Create a new unique installation identifier, since we can no longer use
- * any old XLOG records. See notes in xlog.c about the algorithm.
- */
- gettimeofday(&tv, NULL);
- sysidentifier = ((uint64) tv.tv_sec) << 32;
- sysidentifier |= ((uint64) tv.tv_usec) << 12;
- sysidentifier |= getpid() & 0xFFF;
-
- ControlFile.system_identifier = sysidentifier;
-
- ControlFile.checkPointCopy.redo = SizeOfXLogLongPHD;
- ControlFile.checkPointCopy.ThisTimeLineID = 1;
- ControlFile.checkPointCopy.PrevTimeLineID = 1;
- ControlFile.checkPointCopy.fullPageWrites = false;
- ControlFile.checkPointCopy.nextXidEpoch = 0;
- ControlFile.checkPointCopy.nextXid = FirstNormalTransactionId;
- ControlFile.checkPointCopy.nextOid = FirstBootstrapObjectId;
- ControlFile.checkPointCopy.nextMulti = FirstMultiXactId;
- ControlFile.checkPointCopy.nextMultiOffset = 0;
- ControlFile.checkPointCopy.oldestXid = FirstNormalTransactionId;
- ControlFile.checkPointCopy.oldestXidDB = InvalidOid;
- ControlFile.checkPointCopy.oldestMulti = FirstMultiXactId;
- ControlFile.checkPointCopy.oldestMultiDB = InvalidOid;
- ControlFile.checkPointCopy.time = (pg_time_t) time(NULL);
- ControlFile.checkPointCopy.oldestActiveXid = InvalidTransactionId;
-
- ControlFile.state = DB_SHUTDOWNED;
- ControlFile.time = (pg_time_t) time(NULL);
- ControlFile.checkPoint = ControlFile.checkPointCopy.redo;
- ControlFile.unloggedLSN = 1;
-
- /* minRecoveryPoint, backupStartPoint and backupEndPoint can be left zero */
-
- ControlFile.wal_level = WAL_LEVEL_MINIMAL;
- ControlFile.wal_log_hints = false;
- ControlFile.track_commit_timestamp = false;
- ControlFile.MaxConnections = 100;
- ControlFile.max_worker_processes = 8;
- ControlFile.max_prepared_xacts = 0;
- ControlFile.max_locks_per_xact = 64;
-
- ControlFile.maxAlign = MAXIMUM_ALIGNOF;
- ControlFile.floatFormat = FLOATFORMAT_VALUE;
- ControlFile.blcksz = BLCKSZ;
- ControlFile.relseg_size = RELSEG_SIZE;
- ControlFile.xlog_blcksz = XLOG_BLCKSZ;
- ControlFile.xlog_seg_size = XLOG_SEG_SIZE;
- ControlFile.nameDataLen = NAMEDATALEN;
- ControlFile.indexMaxKeys = INDEX_MAX_KEYS;
- ControlFile.toast_max_chunk_size = TOAST_MAX_CHUNK_SIZE;
- ControlFile.loblksize = LOBLKSIZE;
-#ifdef HAVE_INT64_TIMESTAMP
- ControlFile.enableIntTimes = true;
-#else
- ControlFile.enableIntTimes = false;
-#endif
- ControlFile.float4ByVal = FLOAT4PASSBYVAL;
- ControlFile.float8ByVal = FLOAT8PASSBYVAL;
-
- /*
- * XXX eventually, should try to grovel through old XLOG to develop more
- * accurate values for TimeLineID, nextXID, etc.
- */
-}
-
-
-/*
- * Print the guessed pg_control values when we had to guess.
- *
- * NB: this display should be just those fields that will not be
- * reset by RewriteControlFile().
- */
-static void
-PrintControlValues(bool guessed)
-{
- char sysident_str[32];
-
- if (guessed)
- printf(_("Guessed pg_control values:\n\n"));
- else
- printf(_("Current pg_control values:\n\n"));
-
- /*
- * Format system_identifier separately to keep platform-dependent format
- * code out of the translatable message string.
- */
- snprintf(sysident_str, sizeof(sysident_str), UINT64_FORMAT,
- ControlFile.system_identifier);
-
- printf(_("pg_control version number: %u\n"),
- ControlFile.pg_control_version);
- printf(_("Catalog version number: %u\n"),
- ControlFile.catalog_version_no);
- printf(_("Database system identifier: %s\n"),
- sysident_str);
- printf(_("Latest checkpoint's TimeLineID: %u\n"),
- ControlFile.checkPointCopy.ThisTimeLineID);
- printf(_("Latest checkpoint's full_page_writes: %s\n"),
- ControlFile.checkPointCopy.fullPageWrites ? _("on") : _("off"));
- printf(_("Latest checkpoint's NextXID: %u:%u\n"),
- ControlFile.checkPointCopy.nextXidEpoch,
- ControlFile.checkPointCopy.nextXid);
- printf(_("Latest checkpoint's NextOID: %u\n"),
- ControlFile.checkPointCopy.nextOid);
- printf(_("Latest checkpoint's NextMultiXactId: %u\n"),
- ControlFile.checkPointCopy.nextMulti);
- printf(_("Latest checkpoint's NextMultiOffset: %u\n"),
- ControlFile.checkPointCopy.nextMultiOffset);
- printf(_("Latest checkpoint's oldestXID: %u\n"),
- ControlFile.checkPointCopy.oldestXid);
- printf(_("Latest checkpoint's oldestXID's DB: %u\n"),
- ControlFile.checkPointCopy.oldestXidDB);
- printf(_("Latest checkpoint's oldestActiveXID: %u\n"),
- ControlFile.checkPointCopy.oldestActiveXid);
- printf(_("Latest checkpoint's oldestMultiXid: %u\n"),
- ControlFile.checkPointCopy.oldestMulti);
- printf(_("Latest checkpoint's oldestMulti's DB: %u\n"),
- ControlFile.checkPointCopy.oldestMultiDB);
- printf(_("Latest checkpoint's oldestCommitTsXid:%u\n"),
- ControlFile.checkPointCopy.oldestCommitTsXid);
- printf(_("Latest checkpoint's newestCommitTsXid:%u\n"),
- ControlFile.checkPointCopy.newestCommitTsXid);
- printf(_("Maximum data alignment: %u\n"),
- ControlFile.maxAlign);
- /* we don't print floatFormat since can't say much useful about it */
- printf(_("Database block size: %u\n"),
- ControlFile.blcksz);
- printf(_("Blocks per segment of large relation: %u\n"),
- ControlFile.relseg_size);
- printf(_("WAL block size: %u\n"),
- ControlFile.xlog_blcksz);
- printf(_("Bytes per WAL segment: %u\n"),
- ControlFile.xlog_seg_size);
- printf(_("Maximum length of identifiers: %u\n"),
- ControlFile.nameDataLen);
- printf(_("Maximum columns in an index: %u\n"),
- ControlFile.indexMaxKeys);
- printf(_("Maximum size of a TOAST chunk: %u\n"),
- ControlFile.toast_max_chunk_size);
- printf(_("Size of a large-object chunk: %u\n"),
- ControlFile.loblksize);
- printf(_("Date/time type storage: %s\n"),
- (ControlFile.enableIntTimes ? _("64-bit integers") : _("floating-point numbers")));
- printf(_("Float4 argument passing: %s\n"),
- (ControlFile.float4ByVal ? _("by value") : _("by reference")));
- printf(_("Float8 argument passing: %s\n"),
- (ControlFile.float8ByVal ? _("by value") : _("by reference")));
- printf(_("Data page checksum version: %u\n"),
- ControlFile.data_checksum_version);
-}
-
-
-/*
- * Print the values to be changed.
- */
-static void
-PrintNewControlValues(void)
-{
- char fname[MAXFNAMELEN];
-
- /* This will be always printed in order to keep format same. */
- printf(_("\n\nValues to be changed:\n\n"));
-
- XLogFileName(fname, ControlFile.checkPointCopy.ThisTimeLineID, newXlogSegNo);
- printf(_("First log segment after reset: %s\n"), fname);
-
- if (set_mxid != 0)
- {
- printf(_("NextMultiXactId: %u\n"),
- ControlFile.checkPointCopy.nextMulti);
- printf(_("OldestMultiXid: %u\n"),
- ControlFile.checkPointCopy.oldestMulti);
- printf(_("OldestMulti's DB: %u\n"),
- ControlFile.checkPointCopy.oldestMultiDB);
- }
-
- if (set_mxoff != -1)
- {
- printf(_("NextMultiOffset: %u\n"),
- ControlFile.checkPointCopy.nextMultiOffset);
- }
-
- if (set_oid != 0)
- {
- printf(_("NextOID: %u\n"),
- ControlFile.checkPointCopy.nextOid);
- }
-
- if (set_xid != 0)
- {
- printf(_("NextXID: %u\n"),
- ControlFile.checkPointCopy.nextXid);
- printf(_("OldestXID: %u\n"),
- ControlFile.checkPointCopy.oldestXid);
- printf(_("OldestXID's DB: %u\n"),
- ControlFile.checkPointCopy.oldestXidDB);
- }
-
- if (set_xid_epoch != -1)
- {
- printf(_("NextXID epoch: %u\n"),
- ControlFile.checkPointCopy.nextXidEpoch);
- }
-
- if (set_oldest_commit_ts_xid != 0)
- {
- printf(_("oldestCommitTsXid: %u\n"),
- ControlFile.checkPointCopy.oldestCommitTsXid);
- }
- if (set_newest_commit_ts_xid != 0)
- {
- printf(_("newestCommitTsXid: %u\n"),
- ControlFile.checkPointCopy.newestCommitTsXid);
- }
-}
-
-
-/*
- * Write out the new pg_control file.
- */
-static void
-RewriteControlFile(void)
-{
- int fd;
- char buffer[PG_CONTROL_SIZE]; /* need not be aligned */
-
- /*
- * Adjust fields as needed to force an empty XLOG starting at
- * newXlogSegNo.
- */
- XLogSegNoOffsetToRecPtr(newXlogSegNo, SizeOfXLogLongPHD,
- ControlFile.checkPointCopy.redo);
- ControlFile.checkPointCopy.time = (pg_time_t) time(NULL);
-
- ControlFile.state = DB_SHUTDOWNED;
- ControlFile.time = (pg_time_t) time(NULL);
- ControlFile.checkPoint = ControlFile.checkPointCopy.redo;
- ControlFile.prevCheckPoint = 0;
- ControlFile.minRecoveryPoint = 0;
- ControlFile.minRecoveryPointTLI = 0;
- ControlFile.backupStartPoint = 0;
- ControlFile.backupEndPoint = 0;
- ControlFile.backupEndRequired = false;
-
- /*
- * Force the defaults for max_* settings. The values don't really matter
- * as long as wal_level='minimal'; the postmaster will reset these fields
- * anyway at startup.
- */
- ControlFile.wal_level = WAL_LEVEL_MINIMAL;
- ControlFile.wal_log_hints = false;
- ControlFile.track_commit_timestamp = false;
- ControlFile.MaxConnections = 100;
- ControlFile.max_worker_processes = 8;
- ControlFile.max_prepared_xacts = 0;
- ControlFile.max_locks_per_xact = 64;
-
- /* Now we can force the recorded xlog seg size to the right thing. */
- ControlFile.xlog_seg_size = XLogSegSize;
-
- /* Contents are protected with a CRC */
- INIT_CRC32C(ControlFile.crc);
- COMP_CRC32C(ControlFile.crc,
- (char *) &ControlFile,
- offsetof(ControlFileData, crc));
- FIN_CRC32C(ControlFile.crc);
-
- /*
- * We write out PG_CONTROL_SIZE bytes into pg_control, zero-padding the
- * excess over sizeof(ControlFileData). This reduces the odds of
- * premature-EOF errors when reading pg_control. We'll still fail when we
- * check the contents of the file, but hopefully with a more specific
- * error than "couldn't read pg_control".
- */
- if (sizeof(ControlFileData) > PG_CONTROL_SIZE)
- {
- fprintf(stderr,
- _("%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"),
- progname);
- exit(1);
- }
-
- memset(buffer, 0, PG_CONTROL_SIZE);
- memcpy(buffer, &ControlFile, sizeof(ControlFileData));
-
- unlink(XLOG_CONTROL_FILE);
-
- fd = open(XLOG_CONTROL_FILE,
- O_RDWR | O_CREAT | O_EXCL | PG_BINARY,
- S_IRUSR | S_IWUSR);
- if (fd < 0)
- {
- fprintf(stderr, _("%s: could not create pg_control file: %s\n"),
- progname, strerror(errno));
- exit(1);
- }
-
- errno = 0;
- if (write(fd, buffer, PG_CONTROL_SIZE) != PG_CONTROL_SIZE)
- {
- /* if write didn't set errno, assume problem is no disk space */
- if (errno == 0)
- errno = ENOSPC;
- fprintf(stderr, _("%s: could not write pg_control file: %s\n"),
- progname, strerror(errno));
- exit(1);
- }
-
- if (fsync(fd) != 0)
- {
- fprintf(stderr, _("%s: fsync error: %s\n"), progname, strerror(errno));
- exit(1);
- }
-
- close(fd);
-}
-
-
-/*
- * Scan existing XLOG files and determine the highest existing WAL address
- *
- * On entry, ControlFile.checkPointCopy.redo and ControlFile.xlog_seg_size
- * are assumed valid (note that we allow the old xlog seg size to differ
- * from what we're using). On exit, newXlogId and newXlogSeg are set to
- * suitable values for the beginning of replacement WAL (in our seg size).
- */
-static void
-FindEndOfXLOG(void)
-{
- DIR *xldir;
- struct dirent *xlde;
- uint64 segs_per_xlogid;
- uint64 xlogbytepos;
-
- /*
- * Initialize the max() computation using the last checkpoint address from
- * old pg_control. Note that for the moment we are working with segment
- * numbering according to the old xlog seg size.
- */
- segs_per_xlogid = (UINT64CONST(0x0000000100000000) / ControlFile.xlog_seg_size);
- newXlogSegNo = ControlFile.checkPointCopy.redo / ControlFile.xlog_seg_size;
-
- /*
- * Scan the pg_wal directory to find existing WAL segment files. We
- * assume any present have been used; in most scenarios this should be
- * conservative, because of xlog.c's attempts to pre-create files.
- */
- xldir = opendir(XLOGDIR);
- if (xldir == NULL)
- {
- fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
- progname, XLOGDIR, strerror(errno));
- exit(1);
- }
-
- while (errno = 0, (xlde = readdir(xldir)) != NULL)
- {
- if (IsXLogFileName(xlde->d_name) ||
- IsPartialXLogFileName(xlde->d_name))
- {
- unsigned int tli,
- log,
- seg;
- XLogSegNo segno;
-
- /*
- * Note: We don't use XLogFromFileName here, because we want to
- * use the segment size from the control file, not the size the
- * pg_resetxlog binary was compiled with
- */
- sscanf(xlde->d_name, "%08X%08X%08X", &tli, &log, &seg);
- segno = ((uint64) log) * segs_per_xlogid + seg;
-
- /*
- * Note: we take the max of all files found, regardless of their
- * timelines. Another possibility would be to ignore files of
- * timelines other than the target TLI, but this seems safer.
- * Better too large a result than too small...
- */
- if (segno > newXlogSegNo)
- newXlogSegNo = segno;
- }
- }
-
- if (errno)
- {
- fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
- progname, XLOGDIR, strerror(errno));
- exit(1);
- }
-
- if (closedir(xldir))
- {
- fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
- progname, XLOGDIR, strerror(errno));
- exit(1);
- }
-
- /*
- * Finally, convert to new xlog seg size, and advance by one to ensure we
- * are in virgin territory.
- */
- xlogbytepos = newXlogSegNo * ControlFile.xlog_seg_size;
- newXlogSegNo = (xlogbytepos + XLogSegSize - 1) / XLogSegSize;
- newXlogSegNo++;
-}
-
-
-/*
- * Remove existing XLOG files
- */
-static void
-KillExistingXLOG(void)
-{
- DIR *xldir;
- struct dirent *xlde;
- char path[MAXPGPATH];
-
- xldir = opendir(XLOGDIR);
- if (xldir == NULL)
- {
- fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
- progname, XLOGDIR, strerror(errno));
- exit(1);
- }
-
- while (errno = 0, (xlde = readdir(xldir)) != NULL)
- {
- if (IsXLogFileName(xlde->d_name) ||
- IsPartialXLogFileName(xlde->d_name))
- {
- snprintf(path, MAXPGPATH, "%s/%s", XLOGDIR, xlde->d_name);
- if (unlink(path) < 0)
- {
- fprintf(stderr, _("%s: could not delete file \"%s\": %s\n"),
- progname, path, strerror(errno));
- exit(1);
- }
- }
- }
-
- if (errno)
- {
- fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
- progname, XLOGDIR, strerror(errno));
- exit(1);
- }
-
- if (closedir(xldir))
- {
- fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
- progname, XLOGDIR, strerror(errno));
- exit(1);
- }
-}
-
-
-/*
- * Remove existing archive status files
- */
-static void
-KillExistingArchiveStatus(void)
-{
- DIR *xldir;
- struct dirent *xlde;
- char path[MAXPGPATH];
-
-#define ARCHSTATDIR XLOGDIR "/archive_status"
-
- xldir = opendir(ARCHSTATDIR);
- if (xldir == NULL)
- {
- fprintf(stderr, _("%s: could not open directory \"%s\": %s\n"),
- progname, ARCHSTATDIR, strerror(errno));
- exit(1);
- }
-
- while (errno = 0, (xlde = readdir(xldir)) != NULL)
- {
- if (strspn(xlde->d_name, "0123456789ABCDEF") == XLOG_FNAME_LEN &&
- (strcmp(xlde->d_name + XLOG_FNAME_LEN, ".ready") == 0 ||
- strcmp(xlde->d_name + XLOG_FNAME_LEN, ".done") == 0 ||
- strcmp(xlde->d_name + XLOG_FNAME_LEN, ".partial.ready") == 0 ||
- strcmp(xlde->d_name + XLOG_FNAME_LEN, ".partial.done") == 0))
- {
- snprintf(path, MAXPGPATH, "%s/%s", ARCHSTATDIR, xlde->d_name);
- if (unlink(path) < 0)
- {
- fprintf(stderr, _("%s: could not delete file \"%s\": %s\n"),
- progname, path, strerror(errno));
- exit(1);
- }
- }
- }
-
- if (errno)
- {
- fprintf(stderr, _("%s: could not read directory \"%s\": %s\n"),
- progname, ARCHSTATDIR, strerror(errno));
- exit(1);
- }
-
- if (closedir(xldir))
- {
- fprintf(stderr, _("%s: could not close directory \"%s\": %s\n"),
- progname, ARCHSTATDIR, strerror(errno));
- exit(1);
- }
-}
-
-
-/*
- * Write an empty XLOG file, containing only the checkpoint record
- * already set up in ControlFile.
- */
-static void
-WriteEmptyXLOG(void)
-{
- char *buffer;
- XLogPageHeader page;
- XLogLongPageHeader longpage;
- XLogRecord *record;
- pg_crc32c crc;
- char path[MAXPGPATH];
- int fd;
- int nbytes;
- char *recptr;
-
- /* Use malloc() to ensure buffer is MAXALIGNED */
- buffer = (char *) pg_malloc(XLOG_BLCKSZ);
- page = (XLogPageHeader) buffer;
- memset(buffer, 0, XLOG_BLCKSZ);
-
- /* Set up the XLOG page header */
- page->xlp_magic = XLOG_PAGE_MAGIC;
- page->xlp_info = XLP_LONG_HEADER;
- page->xlp_tli = ControlFile.checkPointCopy.ThisTimeLineID;
- page->xlp_pageaddr = ControlFile.checkPointCopy.redo - SizeOfXLogLongPHD;
- longpage = (XLogLongPageHeader) page;
- longpage->xlp_sysid = ControlFile.system_identifier;
- longpage->xlp_seg_size = XLogSegSize;
- longpage->xlp_xlog_blcksz = XLOG_BLCKSZ;
-
- /* Insert the initial checkpoint record */
- recptr = (char *) page + SizeOfXLogLongPHD;
- record = (XLogRecord *) recptr;
- record->xl_prev = 0;
- record->xl_xid = InvalidTransactionId;
- record->xl_tot_len = SizeOfXLogRecord + SizeOfXLogRecordDataHeaderShort + sizeof(CheckPoint);
- record->xl_info = XLOG_CHECKPOINT_SHUTDOWN;
- record->xl_rmid = RM_XLOG_ID;
-
- recptr += SizeOfXLogRecord;
- *(recptr++) = XLR_BLOCK_ID_DATA_SHORT;
- *(recptr++) = sizeof(CheckPoint);
- memcpy(recptr, &ControlFile.checkPointCopy,
- sizeof(CheckPoint));
-
- INIT_CRC32C(crc);
- COMP_CRC32C(crc, ((char *) record) + SizeOfXLogRecord, record->xl_tot_len - SizeOfXLogRecord);
- COMP_CRC32C(crc, (char *) record, offsetof(XLogRecord, xl_crc));
- FIN_CRC32C(crc);
- record->xl_crc = crc;
-
- /* Write the first page */
- XLogFilePath(path, ControlFile.checkPointCopy.ThisTimeLineID, newXlogSegNo);
-
- unlink(path);
-
- fd = open(path, O_RDWR | O_CREAT | O_EXCL | PG_BINARY,
- S_IRUSR | S_IWUSR);
- if (fd < 0)
- {
- fprintf(stderr, _("%s: could not open file \"%s\": %s\n"),
- progname, path, strerror(errno));
- exit(1);
- }
-
- errno = 0;
- if (write(fd, buffer, XLOG_BLCKSZ) != XLOG_BLCKSZ)
- {
- /* if write didn't set errno, assume problem is no disk space */
- if (errno == 0)
- errno = ENOSPC;
- fprintf(stderr, _("%s: could not write file \"%s\": %s\n"),
- progname, path, strerror(errno));
- exit(1);
- }
-
- /* Fill the rest of the file with zeroes */
- memset(buffer, 0, XLOG_BLCKSZ);
- for (nbytes = XLOG_BLCKSZ; nbytes < XLogSegSize; nbytes += XLOG_BLCKSZ)
- {
- errno = 0;
- if (write(fd, buffer, XLOG_BLCKSZ) != XLOG_BLCKSZ)
- {
- if (errno == 0)
- errno = ENOSPC;
- fprintf(stderr, _("%s: could not write file \"%s\": %s\n"),
- progname, path, strerror(errno));
- exit(1);
- }
- }
-
- if (fsync(fd) != 0)
- {
- fprintf(stderr, _("%s: fsync error: %s\n"), progname, strerror(errno));
- exit(1);
- }
-
- close(fd);
-}
-
-
-static void
-usage(void)
-{
- printf(_("%s resets the PostgreSQL transaction log.\n\n"), progname);
- printf(_("Usage:\n %s [OPTION]... DATADIR\n\n"), progname);
- printf(_("Options:\n"));
- printf(_(" -c XID,XID set oldest and newest transactions bearing commit timestamp\n"));
- printf(_(" (zero in either value means no change)\n"));
- printf(_(" [-D] DATADIR data directory\n"));
- printf(_(" -e XIDEPOCH set next transaction ID epoch\n"));
- printf(_(" -f force update to be done\n"));
- printf(_(" -l XLOGFILE force minimum WAL starting location for new transaction log\n"));
- printf(_(" -m MXID,MXID set next and oldest multitransaction ID\n"));
- printf(_(" -n no update, just show what would be done (for testing)\n"));
- printf(_(" -o OID set next OID\n"));
- printf(_(" -O OFFSET set next multitransaction offset\n"));
- printf(_(" -V, --version output version information, then exit\n"));
- printf(_(" -x XID set next transaction ID\n"));
- printf(_(" -?, --help show this help, then exit\n"));
- printf(_("\nReport bugs to <pgsql-bugs@postgresql.org>.\n"));
-}
diff --git a/src/bin/pg_resetxlog/po/cs.po b/src/bin/pg_resetxlog/po/cs.po
deleted file mode 100644
index 52ddcac..0000000
--- a/src/bin/pg_resetxlog/po/cs.po
+++ /dev/null
@@ -1,498 +0,0 @@
-# Czech message translation file for pg_resetxlog
-# Copyright (C) 2012 PostgreSQL Global Development Group
-# This file is distributed under the same license as the PostgreSQL package.
-#
-# Tomas Vondra <tv@fuzzy.cz>, 2012, 2013.
-msgid ""
-msgstr ""
-"Project-Id-Version: pg_resetxlog-cs (PostgreSQL 9.3)\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2013-09-23 20:18+0000\n"
-"PO-Revision-Date: 2013-12-01 20:46-0500\n"
-"Last-Translator: Tomas Vondra <tv@fuzzy.cz>\n"
-"Language-Team: Czech <info@cspug.cx>\n"
-"Language: cs\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Lokalize 1.5\n"
-
-#: pg_resetxlog.c:133
-#, c-format
-msgid "%s: invalid argument for option -e\n"
-msgstr "%s: neplatn�� argument pro volbu -e\n"
-
-#: pg_resetxlog.c:134 pg_resetxlog.c:149 pg_resetxlog.c:164 pg_resetxlog.c:179
-#: pg_resetxlog.c:187 pg_resetxlog.c:213 pg_resetxlog.c:227 pg_resetxlog.c:234
-#: pg_resetxlog.c:242
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Zkuste \"%s --help\" pro v��ce informac��.\n"
-
-#: pg_resetxlog.c:139
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: epocha ID transakce (-e) nesm�� b��t -1\n"
-
-#: pg_resetxlog.c:148
-#, c-format
-msgid "%s: invalid argument for option -x\n"
-msgstr "%s: neplatn�� argument pro volbu -x\n"
-
-#: pg_resetxlog.c:154
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: ID transakce (-x) nesm�� b��t 0\n"
-
-#: pg_resetxlog.c:163
-#, c-format
-msgid "%s: invalid argument for option -o\n"
-msgstr "%s: neplatn�� argument pro volbu -o\n"
-
-#: pg_resetxlog.c:169
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) nesm�� b��t 0\n"
-
-#: pg_resetxlog.c:178 pg_resetxlog.c:186
-#, c-format
-msgid "%s: invalid argument for option -m\n"
-msgstr "%s: neplatn�� argument pro volbu -m\n"
-
-#: pg_resetxlog.c:192
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID transakce (-m) nesm�� b��t 0\n"
-
-#: pg_resetxlog.c:202
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID nejstar���� multitransakce (-m) nesm�� b��t 0\n"
-
-#: pg_resetxlog.c:212
-#, c-format
-msgid "%s: invalid argument for option -O\n"
-msgstr "%s: neplatn�� argument pro volbu -O\n"
-
-#: pg_resetxlog.c:218
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: ID transakce (-O) nesm�� b��t -1\n"
-
-#: pg_resetxlog.c:226
-#, c-format
-msgid "%s: invalid argument for option -l\n"
-msgstr "%s: neplatn�� argument pro volbu -l\n"
-
-#: pg_resetxlog.c:241
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: nen�� specifikov��n datov�� adres����\n"
-
-#: pg_resetxlog.c:255
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: nem����e b��t spu��t��n u��ivatelem \"root\"\n"
-
-#: pg_resetxlog.c:257
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Mus��te spustit %s jako PostgreSQL superu��ivatel.\n"
-
-#: pg_resetxlog.c:267
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: nelze zm��nit adres���� na \"%s\": %s\n"
-
-#: pg_resetxlog.c:280 pg_resetxlog.c:414
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: nelze otev����t soubor \"%s\" pro ��ten��: %s\n"
-
-#: pg_resetxlog.c:287
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running? If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: soubor se z��mkem \"%s\" existuje\n"
-"Neb������ ji�� server? Jestli��e ne, sma��te soubor se z��mkem a zkuste to znova.\n"
-
-#: pg_resetxlog.c:362
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Jestli��e tyto hodnoty vypadaj�� akceptovateln��, pou��ijte -f pro vynucen�� "
-"reset.\n"
-
-#: pg_resetxlog.c:374
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Datab��zov�� server nebyl ukon��en standardn��.\n"
-"Resetov��n�� transak��n��ho logu m����e zp��sobit ztr��tu dat.\n"
-"Jestli��e i p��esto chcete pokra��ovat, pou��ijte -f pro vynucen�� reset.\n"
-
-#: pg_resetxlog.c:388
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Transak��n�� log resetov��n\n"
-
-#: pg_resetxlog.c:417
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-" touch %s\n"
-"and try again.\n"
-msgstr ""
-"M��te-li jistotu, ��e je cesta k datov��mu adres����i spr��vn��, prove��te\n"
-" touch %s\n"
-"a zkuste to znovu.\n"
-
-#: pg_resetxlog.c:430
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: nelze ����st soubor \"%s\": %s\n"
-
-#: pg_resetxlog.c:453
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr ""
-"%s: pg_control existuje, ale s neplatn��m kontroln��m sou��tem CRC; postupujte "
-"opatrn��\n"
-
-#: pg_resetxlog.c:462
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr ""
-"%s: pg_control existuje, ale je po��kozen nebo nezn��m�� verze; ignoruji to\n"
-
-#: pg_resetxlog.c:561
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Odhadnut�� hodnoty pg_controlu:\n"
-"\n"
-
-#: pg_resetxlog.c:563
-#, c-format
-msgid ""
-"pg_control values:\n"
-"\n"
-msgstr ""
-"Hodnoty pg_controlu:\n"
-"\n"
-
-#: pg_resetxlog.c:574
-#, c-format
-msgid "First log segment after reset: %s\n"
-msgstr "Prvn�� log segment po resetu: %s\n"
-
-#: pg_resetxlog.c:576
-#, c-format
-msgid "pg_control version number: %u\n"
-msgstr "����slo verze pg_controlu: %u\n"
-
-#: pg_resetxlog.c:578
-#, c-format
-msgid "Catalog version number: %u\n"
-msgstr "����slo verze katalogu: %u\n"
-
-#: pg_resetxlog.c:580
-#, c-format
-msgid "Database system identifier: %s\n"
-msgstr "Identifik��tor datab��zov��ho syst��mu: %s\n"
-
-#: pg_resetxlog.c:582
-#, c-format
-msgid "Latest checkpoint's TimeLineID: %u\n"
-msgstr "TimeLineID posledn��ho checkpointu: %u\n"
-
-#: pg_resetxlog.c:584
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "Posledn�� full_page_writes checkpointu: %s\n"
-
-#: pg_resetxlog.c:585
-msgid "off"
-msgstr "vypnuto"
-
-#: pg_resetxlog.c:585
-msgid "on"
-msgstr "zapnuto"
-
-#: pg_resetxlog.c:586
-#, c-format
-msgid "Latest checkpoint's NextXID: %u/%u\n"
-msgstr "Posledn�� um��st��n�� NextXID checkpointu: %u/%u\n"
-
-#: pg_resetxlog.c:589
-#, c-format
-msgid "Latest checkpoint's NextOID: %u\n"
-msgstr "Posledn�� um��st��n�� NextOID checkpointu: %u\n"
-
-#: pg_resetxlog.c:591
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId: %u\n"
-msgstr "NextMultiXactId posledn��ho checkpointu: %u\n"
-
-#: pg_resetxlog.c:593
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset: %u\n"
-msgstr "NextMultiOffset posledn��ho checkpointu: %u\n"
-
-#: pg_resetxlog.c:595
-#, c-format
-msgid "Latest checkpoint's oldestXID: %u\n"
-msgstr "oldestXID posledn��ho checkpointu: %u\n"
-
-#: pg_resetxlog.c:597
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB: %u\n"
-msgstr "DB k oldestXID posledn��ho checkpointu: %u\n"
-
-#: pg_resetxlog.c:599
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID: %u\n"
-msgstr "oldestActiveXID posledn��ho checkpointu: %u\n"
-
-#: pg_resetxlog.c:601
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid: %u\n"
-msgstr "oldestMultiXid posledn��ho checkpointu: %u\n"
-
-#: pg_resetxlog.c:603
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "oldestMulti's DB posledn��ho checkpointu: %u\n"
-
-#: pg_resetxlog.c:605
-#, c-format
-msgid "Maximum data alignment: %u\n"
-msgstr "Maxim��ln�� zarovn��n�� dat: %u\n"
-
-#: pg_resetxlog.c:608
-#, c-format
-msgid "Database block size: %u\n"
-msgstr "Velikost datab��zov��ho bloku: %u\n"
-
-#: pg_resetxlog.c:610
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Blok�� v segmentu velk�� relace: %u\n"
-
-#: pg_resetxlog.c:612
-#, c-format
-msgid "WAL block size: %u\n"
-msgstr "Velikost WAL bloku: %u\n"
-
-#: pg_resetxlog.c:614
-#, c-format
-msgid "Bytes per WAL segment: %u\n"
-msgstr "Byt�� ve WAL segmentu: %u\n"
-
-#: pg_resetxlog.c:616
-#, c-format
-msgid "Maximum length of identifiers: %u\n"
-msgstr "Maxim��ln�� d��lka identifik��tor��: %u\n"
-
-#: pg_resetxlog.c:618
-#, c-format
-msgid "Maximum columns in an index: %u\n"
-msgstr "Maxim��ln�� po��et sloupc�� v indexu: %u\n"
-
-#: pg_resetxlog.c:620
-#, c-format
-msgid "Maximum size of a TOAST chunk: %u\n"
-msgstr "Maxim��ln�� velikost ��seku TOAST: %u\n"
-
-#: pg_resetxlog.c:622
-#, c-format
-msgid "Date/time type storage: %s\n"
-msgstr "Zp��sob ulo��en�� typu date/time: %s\n"
-
-#: pg_resetxlog.c:623
-msgid "64-bit integers"
-msgstr "64-bitov�� ����sla"
-
-#: pg_resetxlog.c:623
-msgid "floating-point numbers"
-msgstr "����sla s plovouc�� ����dovou ����rkou"
-
-#: pg_resetxlog.c:624
-#, c-format
-msgid "Float4 argument passing: %s\n"
-msgstr "Zp��sob p��ed��v��n�� float4 hodnot: %s\n"
-
-#: pg_resetxlog.c:625 pg_resetxlog.c:627
-msgid "by reference"
-msgstr "odkazem"
-
-#: pg_resetxlog.c:625 pg_resetxlog.c:627
-msgid "by value"
-msgstr "hodnotou"
-
-#: pg_resetxlog.c:626
-#, c-format
-msgid "Float8 argument passing: %s\n"
-msgstr "Zp��sob p��ed��v��n�� float8 hodnot: %s\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-#| msgid "Catalog version number: %u\n"
-msgid "Data page checksum version: %u\n"
-msgstr "Verze kontroln��ch sou��t�� datov��ch str��nek: %u\n"
-
-#: pg_resetxlog.c:690
-#, c-format
-msgid ""
-"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
-"PG_CONTROL_SIZE\n"
-msgstr ""
-"%s: intern�� chyba -- sizeof(ControlFileData) je p����li�� velk�� ... opravte "
-"PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:705
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: nelze vytvo��it pg_control soubor: %s\n"
-
-#: pg_resetxlog.c:716
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: nelze zapsat pg_control soubor: %s\n"
-
-#: pg_resetxlog.c:723 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: fsync chyba: %s\n"
-
-#: pg_resetxlog.c:763 pg_resetxlog.c:834 pg_resetxlog.c:890
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: nelze otev����t adres���� \"%s\": %s\n"
-
-#: pg_resetxlog.c:805 pg_resetxlog.c:867 pg_resetxlog.c:924
-#, c-format
-msgid "%s: could not read from directory \"%s\": %s\n"
-msgstr "%s: nelze ����st z adres����e \"%s\": %s\n"
-
-#: pg_resetxlog.c:848 pg_resetxlog.c:905
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: nelze smazat soubor \"%s\": %s\n"
-
-#: pg_resetxlog.c:989
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: nelze otev����t soubor \"%s\": %s\n"
-
-#: pg_resetxlog.c:1000 pg_resetxlog.c:1014
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: nelze zapsat do souboru \"%s\": %s\n"
-
-#: pg_resetxlog.c:1033
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s resetuje PostgreSQL transak��n�� log.\n"
-"\n"
-
-#: pg_resetxlog.c:1034
-#, c-format
-msgid ""
-"Usage:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Pou��it��:\n"
-" %s [VOLBA]... ADRES����\n"
-"\n"
-
-#: pg_resetxlog.c:1035
-#, c-format
-msgid "Options:\n"
-msgstr "P��ep��na��e:\n"
-
-#: pg_resetxlog.c:1036
-#, c-format
-msgid " -e XIDEPOCH set next transaction ID epoch\n"
-msgstr " -e XIDEPOCH nastav�� epochu n��sleduj��c��ho ID transakce\n"
-
-#: pg_resetxlog.c:1037
-#, c-format
-msgid " -f force update to be done\n"
-msgstr " -f vynut�� proveden�� update\n"
-
-#: pg_resetxlog.c:1038
-#, c-format
-msgid ""
-" -l XLOGFILE force minimum WAL starting location for new transaction "
-"log\n"
-msgstr ""
-" -l XLOGFILE vynut�� minim��ln�� po����te��n�� WAL pozici pro nov�� transak��n�� "
-"log\n"
-
-#: pg_resetxlog.c:1039
-#, c-format
-#| msgid " -x XID set next transaction ID\n"
-msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
-msgstr " -m MXID,MXID nastav dal���� a nejstar���� ID multitransakce\n"
-
-#: pg_resetxlog.c:1040
-#, c-format
-msgid ""
-" -n no update, just show extracted control values (for "
-"testing)\n"
-msgstr ""
-" -n bez zm��ny, jen uk����e z��skan�� kontroln�� hodnoty (pro "
-"testov��n��)\n"
-
-#: pg_resetxlog.c:1041
-#, c-format
-msgid " -o OID set next OID\n"
-msgstr " -o OID nastav�� n��sleduj��c�� OID\n"
-
-#: pg_resetxlog.c:1042
-#, c-format
-msgid " -O OFFSET set next multitransaction offset\n"
-msgstr " -O OFFSET nastav�� offset n��sleduj��c�� multitransakce\n"
-
-#: pg_resetxlog.c:1043
-#, c-format
-msgid " -V, --version output version information, then exit\n"
-msgstr " -V, --version uk����e informace o verzi a skon����\n"
-
-#: pg_resetxlog.c:1044
-#, c-format
-msgid " -x XID set next transaction ID\n"
-msgstr " -x XID nastav�� ID n��sleduj��c�� transakce\n"
-
-#: pg_resetxlog.c:1045
-#, c-format
-msgid " -?, --help show this help, then exit\n"
-msgstr " -?, --help uk����e tuto n��pov��du a skon����\n"
-
-#: pg_resetxlog.c:1046
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Chyby hlaste na adresu <pgsql-bugs@postgresql.org>.\n"
-
-#~ msgid "First log file ID after reset: %u\n"
-#~ msgstr "Prvn�� ID log souboru po resetu: %u\n"
diff --git a/src/bin/pg_resetxlog/po/de.po b/src/bin/pg_resetxlog/po/de.po
deleted file mode 100644
index fb6324d..0000000
--- a/src/bin/pg_resetxlog/po/de.po
+++ /dev/null
@@ -1,605 +0,0 @@
-# German message translation file for pg_resetxlog
-# Peter Eisentraut <peter_e@gmx.net>, 2002 - 2016.
-#
-# Use these quotes: ��%s��
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9.6\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-04-12 20:14+0000\n"
-"PO-Revision-Date: 2016-04-12 18:28-0400\n"
-"Last-Translator: Peter Eisentraut <peter_e@gmx.net>\n"
-"Language-Team: German <peter_e@gmx.net>\n"
-"Language: de\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: WARNUNG: auf dieser Plattform k��nnen keine beschr��nkten Token erzeugt werden\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: konnte Prozess-Token nicht ��ffnen: Fehlercode %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: konnte SIDs nicht erzeugen: Fehlercode %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: konnte beschr��nktes Token nicht erzeugen: Fehlercode %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: konnte Prozess f��r Befehl ��%s�� nicht starten: Fehlercode %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: konnte Prozess nicht mit beschr��nktem Token neu starten: Fehlercode %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: konnte Statuscode des Subprozesses nicht ermitteln: Fehlercode %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: ung��ltiges Argument f��r Option %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Versuchen Sie ��%s --help�� f��r weitere Informationen.\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: Transaktions-ID-Epoche (-e) darf nicht -1 sein\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: Transaktions-ID (-x) darf nicht 0 sein\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s: Transaktions-ID (-c) muss entweder 0 oder gr����er oder gleich 2 sein\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) darf nicht 0 sein\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: Multitransaktions-ID (-m) darf nicht 0 sein\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ��lteste Multitransaktions-ID (-m) darf nicht 0 sein\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: Multitransaktions-Offset (-O) darf nicht -1 sein\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: zu viele Kommandozeilenargumente (das erste ist ��%s��)\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: kein Datenverzeichnis angegeben\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: kann nicht von ��root�� ausgef��hrt werden\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Sie m��ssen %s als PostgreSQL-Superuser ausf��hren.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: konnte nicht in Verzeichnis ��%s�� wechseln: %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: konnte Datei ��%s�� nicht zum Lesen ��ffnen: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running? If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: Sperrdatei ��%s�� existiert bereits\n"
-"L��uft der Server? Wenn nicht, dann Sperrdatei l��schen und nochmal versuchen.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Wenn diese Werte akzeptabel scheinen, dann benutzen Sie -f um das\n"
-"Zur��cksetzen zu erzwingen.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Der Datenbankserver wurde nicht sauber heruntergefahren.\n"
-"Beim Zur��cksetzen des Transaktionslogs k��nnen Daten verloren gehen.\n"
-"Wenn Sie trotzdem weiter machen wollen, benutzen Sie -f, um das\n"
-"Zur��cksetzen zu erzwingen.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Transaktionslog wurde zur��ck gesetzt\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-" touch %s\n"
-"and try again.\n"
-msgstr ""
-"Wenn Sie sicher sind, dass das Datenverzeichnis korrekt ist, f��hren Sie\n"
-" touch %s\n"
-"aus und versuchen Sie es erneut.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: konnte Datei ��%s�� nicht lesen: %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control existiert, aber mit ung��ltiger CRC; mit Vorsicht fortfahren\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control existiert, aber ist kaputt oder hat unbekannte Version; wird ignoriert\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Gesch��tzte pg_control-Werte:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Aktuelle pg_control-Werte:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number: %u\n"
-msgstr "pg_control-Versionsnummer: %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number: %u\n"
-msgstr "Katalogversionsnummer: %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier: %s\n"
-msgstr "Datenbanksystemidentifikation: %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID: %u\n"
-msgstr "TimeLineID des letzten Checkpoints: %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "full_page_writes des letzten Checkpoints: %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "aus"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "an"
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID: %u:%u\n"
-msgstr "NextXID des letzten Checkpoints: %u:%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID: %u\n"
-msgstr "NextOID des letzten Checkpoints: %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId: %u\n"
-msgstr "NextMultiXactId des letzten Checkpoints: %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset: %u\n"
-msgstr "NextMultiOffset des letzten Checkpoints: %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID: %u\n"
-msgstr "oldestXID des letzten Checkpoints: %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB: %u\n"
-msgstr "DB der oldestXID des letzten Checkpoints: %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID: %u\n"
-msgstr "oldestActiveXID des letzten Checkpoints: %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid: %u\n"
-msgstr "oldestMultiXid des letzten Checkpoints: %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "DB des oldestMulti des letzten Checkpoints: %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "oldestCommitTsXid des letzten Checkpoints: %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "newestCommitTsXid des letzten Checkpoints: %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment: %u\n"
-msgstr "Maximale Datenausrichtung (Alignment): %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size: %u\n"
-msgstr "Datenbankblockgr����e: %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Bl��cke pro Segment: %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size: %u\n"
-msgstr "WAL-Blockgr����e: %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment: %u\n"
-msgstr "Bytes pro WAL-Segment: %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers: %u\n"
-msgstr "Maximale Bezeichnerl��nge: %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index: %u\n"
-msgstr "Maximale Spalten in einem Index: %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk: %u\n"
-msgstr "Maximale Gr����e eines St��cks TOAST: %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk: %u\n"
-msgstr "Gr����e eines Large-Object-Chunks: %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage: %s\n"
-msgstr "Speicherung von Datum/Zeit-Typen: %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "64-Bit-Ganzzahlen"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "Gleitkommazahlen"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing: %s\n"
-msgstr "��bergabe von Float4-Argumenten: %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "Referenz"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "Wert"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing: %s\n"
-msgstr "��bergabe von Float8-Argumenten: %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version: %u\n"
-msgstr "Datenseitenpr��fsummenversion: %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Zu ��ndernde Werte:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset: %s\n"
-msgstr "Erstes Logdateisegment nach Zur��cksetzen: %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId: %u\n"
-msgstr "NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid: %u\n"
-msgstr "OldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB: %u\n"
-msgstr "OldestMulti's DB: %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset: %u\n"
-msgstr "NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID: %u\n"
-msgstr "NextOID: %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID: %u\n"
-msgstr "NextXID: %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID: %u\n"
-msgstr "OldestXID: %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB: %u\n"
-msgstr "OldestXID's DB: %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch: %u\n"
-msgstr "NextXID-Epoche: %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid: %u\n"
-msgstr "oldestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid: %u\n"
-msgstr "newestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr "%s: interner Fehler -- sizeof(ControlFileData) ist zu gro�� ... PG_CONTROL_SIZE reparieren\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: konnte pg_control-Datei nicht erstellen: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%sL konnte pg_control-Datei nicht schreiben: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: fsync-Fehler: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: konnte Verzeichnis ��%s�� nicht ��ffnen: %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: konnte Verzeichnis ��%s�� nicht lesen: %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: konnte Verzeichnis ��%s�� nicht schlie��en: %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: konnte Datei ��%s�� nicht l��schen: %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: konnte Datei ��%s�� nicht ��ffnen: %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: konnte Datei ��%s�� nicht schreiben: %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s setzt den PostgreSQL-Transaktionslog zur��ck.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Aufruf:\n"
-" %s [OPTION]... DATENVERZEICHNIS\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Optionen:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid " -c XID,XID set oldest and newest transactions bearing commit timestamp\n"
-msgstr " -c XID,XID ��lteste und neuste Transaktion mit Commit-Timestamp setzen\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid " (zero in either value means no change)\n"
-msgstr " (Null in einem Wert bedeutet keine ��nderung)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR data directory\n"
-msgstr " [-D] DATENVERZ Datenbankverzeichnis\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid " -e XIDEPOCH set next transaction ID epoch\n"
-msgstr " -e XIDEPOCHE n��chste Transaktions-ID-Epoche setzen\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid " -f force update to be done\n"
-msgstr " -f ��nderung erzwingen\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
-msgstr " -l XLOGDATEI minimale WAL-Startposition f��r neuen Log erzwingen\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
-msgstr " -m MXID,MXID n��chste und ��lteste Multitransaktions-ID setzen\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid " -n no update, just show what would be done (for testing)\n"
-msgstr ""
-" -n keine ��nderungen; nur zeigen, was gemacht werden w��rde (zum\n"
-" Testen)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid " -o OID set next OID\n"
-msgstr " -o OID n��chste OID setzen\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid " -O OFFSET set next multitransaction offset\n"
-msgstr " -O OFFSET n��chsten Multitransaktions-Offset setzen\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid " -V, --version output version information, then exit\n"
-msgstr " -V, --version Versionsinformationen anzeigen, dann beenden\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid " -x XID set next transaction ID\n"
-msgstr " -x XID n��chste Transaktions-ID setzen\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid " -?, --help show this help, then exit\n"
-msgstr " -?, --help diese Hilfe anzeigen, dann beenden\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Berichten Sie Fehler an <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetxlog/po/es.po b/src/bin/pg_resetxlog/po/es.po
deleted file mode 100644
index fec8ea9..0000000
--- a/src/bin/pg_resetxlog/po/es.po
+++ /dev/null
@@ -1,611 +0,0 @@
-# Spanish message translation file for pg_resetxlog
-#
-# Copyright (C) 2003-2012 PostgreSQL Global Development Group
-# This file is distributed under the same license as the PostgreSQL package.
-#
-# Ivan Hernandez <ivanx@ciencias.unam.mx>, 2003.
-# Alvaro Herrera <alvherre@alvh.no-ip.org>, 2004-2014
-# Jaime Casanova <systemguards@gmail.com>, 2005
-# Mart��n Marqu��s <martin@2ndquadrant.com>, 2013-2014
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: pg_resetxlog (PostgreSQL 9.6)\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-05-02 20:14+0000\n"
-"PO-Revision-Date: 2016-05-24 10:56-0500\n"
-"Last-Translator: Carlos Chapi <carlos.chapi@2ndquadrant.com>\n"
-"Language-Team: Espa��ol <pgsql-es-ayuda@postgresql.org>\n"
-"Language: es\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.8.7\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: ATENCI��N: no se pueden crear tokens restrigidos en esta plataforma\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: no se pudo abrir el token de proceso: c��digo de error %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: no se pudo emplazar los SIDs: c��digo de error %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: no se pudo crear el token restringido: c��digo de error %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: no se pudo iniciar el proceso para la orden ��%s��: c��digo de error %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: no se pudo re-ejecutar con el token restringido: c��digo de error %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: no se pudo obtener el c��digo de salida del subproceso��: c��digo de error %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: argumento no v��lido para la opci��n %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Prueba con ��%s --help�� para m��s informaci��n\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: el ��epoch�� de ID de transacci��n (-e) no debe ser -1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: el ID de transacci��n (-x) no debe ser 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s: el ID de transacci��n (-c) debe ser 0 o bien mayor o igual a 2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) no debe ser cero\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: el ID de multitransacci��n (-m) no debe ser 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: el ID de multitransacci��n m��s antiguo (-m) no debe ser 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: la posici��n de multitransacci��n (-O) no debe ser -1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: demasiados argumentos de l��nea de ��rdenes (el primero es ��%s��)\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: directorio de datos no especificado\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: no puede ser ejecutado con el usuario ��root��\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Debe ejecutar %s con el superusuario de PostgreSQL.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: no se pudo cambiar al directorio ��%s��: %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: no se pudo abrir el archivo ��%s�� para lectura: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running? If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: el archivo candado ��%s�� existe\n"
-"��Hay un servidor corriendo? Si no, borre el archivo candado e int��ntelo de nuevo\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Si estos valores parecen aceptables, use -f para forzar reinicio.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"El servidor de base de datos no fue terminado limpiamente.\n"
-"Reiniciar la bit��cora de transacciones puede causar p��rdida de datos.\n"
-"Si de todas formas quiere proceder, use -f para forzar su reinicio.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Bit��cora de transacciones reiniciada\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-" touch %s\n"
-"and try again.\n"
-msgstr ""
-"Si est�� seguro que la ruta al directorio de datos es correcta, ejecute\n"
-" touch %s\n"
-"y pruebe de nuevo.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: no se pudo leer el archivo ��%s��: %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: existe pg_control pero tiene un CRC no v��lido, proceda con precauci��n\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: existe pg_control pero est�� roto o se desconoce su versi��n; ignor��ndolo\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Valores de pg_control asumidos:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Valores actuales de pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number: %u\n"
-msgstr "N��mero de versi��n de pg_control: %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number: %u\n"
-msgstr "N��mero de versi��n de cat��logo: %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier: %s\n"
-msgstr "Identificador de sistema: %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID: %u\n"
-msgstr "TimeLineID del checkpoint m��s reciente: %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "full_page_writes del checkpoint m��s reciente: %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "desactivado"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "activado"
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID: %u:%u\n"
-msgstr "NextXID del checkpoint m��s reciente: %u:%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID: %u\n"
-msgstr "NextOID del checkpoint m��s reciente: %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId: %u\n"
-msgstr "NextMultiXactId del checkpoint m��s reciente: %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset: %u\n"
-msgstr "NextMultiOffset del checkpoint m��s reciente: %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID: %u\n"
-msgstr "oldestXID del checkpoint m��s reciente: %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB: %u\n"
-msgstr "BD del oldestXID del checkpoint m��s reciente: %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID: %u\n"
-msgstr "oldestActiveXID del checkpoint m��s reciente: %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid: %u\n"
-msgstr "oldestMultiXid del checkpoint m��s reciente: %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "BD del oldestMultiXid del checkpt. m��s reciente: %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "oldestCommitTsXid del ��ltimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "newestCommitTsXid del ��ltimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment: %u\n"
-msgstr "M��ximo alineamiento de datos: %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size: %u\n"
-msgstr "Tama��o del bloque de la base de datos: %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Bloques por segmento de relaci��n grande: %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size: %u\n"
-msgstr "Tama��o del bloque de WAL: %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment: %u\n"
-msgstr "Bytes por segmento WAL: %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers: %u\n"
-msgstr "Longitud m��xima de identificadores: %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index: %u\n"
-msgstr "M��ximo n��mero de columnas en un ��ndice: %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk: %u\n"
-msgstr "Longitud m��xima de un trozo TOAST: %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk: %u\n"
-msgstr "Longitud m��xima de un trozo de objeto grande: %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage: %s\n"
-msgstr "Tipo de almacenamiento hora/fecha: %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "enteros de 64 bits"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "n��meros de coma flotante"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing: %s\n"
-msgstr "Paso de par��metros float4: %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "por referencia"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "por valor"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing: %s\n"
-msgstr "Paso de par��metros float8: %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version: %u\n"
-msgstr "Versi��n de suma de verificaci��n de datos: %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Valores a cambiar:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset: %s\n"
-msgstr "Primer segmento de log despu��s de reiniciar: %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId: %u\n"
-msgstr "NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid: %u\n"
-msgstr "OldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB: %u\n"
-msgstr "Base de datos del OldestMulti: %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset: %u\n"
-msgstr "NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID: %u\n"
-msgstr "NextOID: %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID: %u\n"
-msgstr "NextXID: %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID: %u\n"
-msgstr "OldestXID: %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB: %u\n"
-msgstr "Base de datos del OldestXID: %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch: %u\n"
-msgstr "Epoch del NextXID: %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid: %u\n"
-msgstr "oldestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid: %u\n"
-msgstr "newestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr "%s: error interno -- sizeof(ControlFileData) es demasiado grande ... corrija PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: no se pudo crear el archivo pg_control: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: no se pudo escribir el archivo pg_control: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: error de fsync: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: no se pudo abrir el directorio ��%s��: %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: no se pudo leer el directorio ��%s��: %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: no se pudo cerrar el directorio ��%s��: %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: no se pudo borrar el archivo ��%s��: %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: no se pudo abrir el archivo ��%s��: %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: no se pudo escribir en el archivo ��%s��: %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s reinicia la bit��cora de transacciones de PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Uso:\n"
-" %s [OPCI��N]... DATADIR\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Opciones:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid " -c XID,XID set oldest and newest transactions bearing commit timestamp\n"
-msgstr ""
-" -c XID,XID asigna los ID de transacciones m��s antiguo y m��s nuevo que llevan\n"
-" timestamp de commit\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid " (zero in either value means no change)\n"
-msgstr " (cero en cualquiera de ellos significa no cambiar)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR data directory\n"
-msgstr " [-D] DATADIR directorio de datos\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid " -e XIDEPOCH set next transaction ID epoch\n"
-msgstr " -e XIDEPOCH asigna el siguiente ��epoch�� de ID de transacci��n\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid " -f force update to be done\n"
-msgstr " -f fuerza que la actualizaci��n sea hecha\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
-msgstr ""
-" -l XLOGFILE fuerza una posici��n m��nima de inicio de WAL para una\n"
-" nueva transacci��n\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
-msgstr " -m MXID,MXID asigna el siguiente ID de multitransacci��n y el m��s antiguo\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid " -n no update, just show what would be done (for testing)\n"
-msgstr " -n no actualiza, s��lo muestra lo que va a hacer (para pruebas)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid " -o OID set next OID\n"
-msgstr " -o OID asigna el siguiente OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid " -O OFFSET set next multitransaction offset\n"
-msgstr " -O OFFSET asigna la siguiente posici��n de multitransacci��n\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid " -V, --version output version information, then exit\n"
-msgstr " -V, --version muestra informaci��n de la versi��n, luego sale\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid " -x XID set next transaction ID\n"
-msgstr " -x XID asigna el siguiente ID de transacci��n\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid " -?, --help show this help, then exit\n"
-msgstr " -?, --help muestra esta ayuda, luego sale\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Reporte errores a <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetxlog/po/fr.po b/src/bin/pg_resetxlog/po/fr.po
deleted file mode 100644
index 1a9a57f..0000000
--- a/src/bin/pg_resetxlog/po/fr.po
+++ /dev/null
@@ -1,644 +0,0 @@
-# translation of pg_resetxlog.po to fr_fr
-# french message translation file for pg_resetxlog
-#
-# Use these quotes: � %s �
-#
-# Guillaume Lelarge <guillaume@lelarge.info>, 2003-2009.
-# St�phane Schildknecht <stephane.schildknecht@dalibo.com>, 2009.
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9.6\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-05-08 21:14+0000\n"
-"PO-Revision-Date: 2016-05-09 10:28+0200\n"
-"Last-Translator: Guillaume Lelarge <guillaume@lelarge.info>\n"
-"Language-Team: PostgreSQLfr <pgsql-fr-generale@postgresql.org>\n"
-"Language: fr\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-15\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.8.7.1\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s : ATTENTION : ne peut pas cr�r les jetons restreints sur cette plateforme\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s : n'a pas pu ouvrir le jeton du processus : code d'erreur %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s : n'a pas pu allouer les SID : code d'erreur %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s : n'a pas pu cr�er le jeton restreint : code d'erreur %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s : n'a pas pu d�marrer le processus pour la commande � %s � : code d'erreur %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s : n'a pas pu r�-ex�cuter le jeton restreint : code d'erreur %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s : n'a pas pu r�cup�rer le code de statut du sous-processus : code d'erreur %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s : argument invalide pour l'option %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Essayer � %s --help � pour plus d'informations.\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr ""
-"%s : la valeur epoch de l'identifiant de transaction (-e) ne doit pas �tre\n"
-"-1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s : l'identifiant de la transaction (-x) ne doit pas �tre 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s : l'identifiant de transaction (-c) doit �tre 0 ou sup�rieur ou �gal � 2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s : l'OID (-o) ne doit pas �tre 0\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s : l'identifiant de multi-transaction (-m) ne doit pas �tre 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s : l'identifiant de multi-transaction le plus ancien (-m) ne doit pas �tre 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s : le d�calage de multi-transaction (-O) ne doit pas �tre -1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s : trop d'arguments en ligne de commande (le premier �tant � %s �)\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s : aucun r�pertoire de donn�es indiqu�\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s : ne peut pas �tre ex�cut� par � root �\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Vous devez ex�cuter %s en tant que super-utilisateur PostgreSQL.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s : n'a pas pu acc�der au r�pertoire � %s � : %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s : n'a pas pu ouvrir le fichier � %s � en lecture : %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running? If not, delete the lock file and try again.\n"
-msgstr ""
-"%s : le verrou � %s � existe\n"
-"Le serveur est-il d�marr� ? Sinon, supprimer le fichier verrou et r�essayer.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Si ces valeurs semblent acceptables, utiliser -f pour forcer la\n"
-"r�initialisation.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Le serveur de bases de donn�es n'a pas �t� arr�t� proprement.\n"
-"R�-initialiser le journal des transactions peut occasionner des pertes de\n"
-"donn�es.\n"
-"Pour continuer malgr� tout, utiliser -f pour forcer la\n"
-"r�initialisation.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "R�initialisation du journal des transactions\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-" touch %s\n"
-"and try again.\n"
-msgstr ""
-"Si le chemin du r�pertoire de donn�es est correct, ex�cuter\n"
-" touch %s\n"
-"et r�essayer.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s : n'a pas pu lire le fichier � %s � : %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s : pg_control existe mais son CRC est invalide ; agir avec pr�caution\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s : pg_control existe mais est corrompu ou de version inconnue ; ignor�\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Valeurs de pg_control devin�es :\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Valeurs actuelles de pg_control :\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number: %u\n"
-msgstr "Num�ro de version de pg_control : %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number: %u\n"
-msgstr "Num�ro de version du catalogue : %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier: %s\n"
-msgstr "Identifiant du syst�me de base de donn�es : %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID: %u\n"
-msgstr "Dernier TimeLineID du point de contr�le : %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "Dernier full_page_writes du point de contr�le : %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "d�sactiv�"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "activ�"
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID: %u:%u\n"
-msgstr "Dernier NextXID du point de contr�le : %u:%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID: %u\n"
-msgstr "Dernier NextOID du point de contr�le : %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId: %u\n"
-msgstr "Dernier NextMultiXactId du point de contr�le : %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset: %u\n"
-msgstr "Dernier NextMultiOffset du point de contr�le : %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID: %u\n"
-msgstr "Dernier oldestXID du point de contr�le : %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB: %u\n"
-msgstr "Dernier oldestXID du point de contr�le de la base : %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID: %u\n"
-msgstr "Dernier oldestActiveXID du point de contr�le : %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid: %u\n"
-msgstr "Dernier oldestMultiXID du point de contr�le : %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "Dernier oldestMulti du point de contr�le de la base : %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "Dernier oldestCommitTsXid du point de contr�le : %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "Dernier newestCommitTsXid du point de contr�le : %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment: %u\n"
-msgstr "Alignement maximal des donn�es : %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size: %u\n"
-msgstr "Taille du bloc de la base de donn�es : %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Blocs par segment des relations volumineuses : %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size: %u\n"
-msgstr "Taille de bloc du journal de transaction : %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment: %u\n"
-msgstr "Octets par segment du journal de transaction : %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers: %u\n"
-msgstr "Longueur maximale des identifiants : %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index: %u\n"
-msgstr "Nombre maximal de colonnes d'un index: %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk: %u\n"
-msgstr "Longueur maximale d'un morceau TOAST : %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk: %u\n"
-msgstr "Taille d'un morceau de Large Object : %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage: %s\n"
-msgstr "Stockage du type date/heure : %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "entiers 64-bits"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "nombres � virgule flottante"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing: %s\n"
-msgstr "Passage d'argument float4 : %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "par r�f�rence"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "par valeur"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing: %s\n"
-msgstr "Passage d'argument float8 : %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version: %u\n"
-msgstr "Version des sommes de contr�le des pages de donn�es : %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Valeurs � changer :\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset: %s\n"
-msgstr "Premier segment du journal apr�s r�initialisation : %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId: %u\n"
-msgstr "NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid: %u\n"
-msgstr "OldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB: %u\n"
-msgstr "OldestMulti's DB: %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset: %u\n"
-msgstr "NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID: %u\n"
-msgstr "NextOID: %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID: %u\n"
-msgstr "NextXID: %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID: %u\n"
-msgstr "OldestXID: %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB: %u\n"
-msgstr "OldestXID's DB: %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch: %u\n"
-msgstr "NextXID Epoch: %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid: %u\n"
-msgstr "oldestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid: %u\n"
-msgstr "newestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr ""
-"%s : erreur interne -- sizeof(ControlFileData) est trop important...\n"
-"corrigez PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s : n'a pas pu cr�er le fichier pg_control : %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s : n'a pas pu �crire le fichier pg_control : %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s : erreur fsync : %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s : n'a pas pu ouvrir le r�pertoire � %s � : %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s : n'a pas pu lire le r�pertoire � %s � : %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s : n'a pas pu fermer le r�pertoire � %s � : %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s : n'a pas pu supprimer le fichier � %s � : %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s : n'a pas pu ouvrir le fichier � %s � : %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s : n'a pas pu �crire le fichier � %s � : %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s r�initialise le journal des transactions PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Usage :\n"
-" %s [OPTION]... R�P_DONN�ES\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Options :\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid " -c XID,XID set oldest and newest transactions bearing commit timestamp\n"
-msgstr " -c XID,XID configure la plus ancienne et la plus r�cente transaction\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid " (zero in either value means no change)\n"
-msgstr " (z�ro dans l'une des deux valeurs signifie aucun changement)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR data directory\n"
-msgstr " [-D] R�PDONNEES r�pertoire de la base de donn�es\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid " -e XIDEPOCH set next transaction ID epoch\n"
-msgstr ""
-" -e XIDEPOCH fixe la valeur epoch du prochain identifiant de\n"
-" transaction\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid " -f force update to be done\n"
-msgstr " -f force la mise � jour\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
-msgstr ""
-" -l FICHIERXLOG force l'emplacement minimal de d�but des WAL du nouveau\n"
-" journal de transactions\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
-msgstr " -m MXID,MXID fixe le prochain identifiant multi-transaction\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid " -n no update, just show what would be done (for testing)\n"
-msgstr ""
-" -n pas de mise � jour, affiche simplement ce qui sera fait\n"
-" (pour test)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid " -o OID set next OID\n"
-msgstr " -o OID fixe le prochain OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid " -O OFFSET set next multitransaction offset\n"
-msgstr " -O D�CALAGE fixe le d�calage de la prochaine multi-transaction\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid " -V, --version output version information, then exit\n"
-msgstr " -V, --version affiche la version et quitte\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid " -x XID set next transaction ID\n"
-msgstr " -x XID fixe le prochain identifiant de transaction\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid " -?, --help show this help, then exit\n"
-msgstr " -?, --help affiche cette aide et quitte\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Rapporter les bogues � <pgsql-bugs@postgresql.org>.\n"
-
-#~ msgid "%s: invalid argument for option -x\n"
-#~ msgstr "%s : argument invalide pour l'option -x\n"
-
-#~ msgid "%s: invalid argument for option -o\n"
-#~ msgstr "%s : argument invalide pour l'option -o\n"
-
-#~ msgid "%s: invalid argument for option -m\n"
-#~ msgstr "%s : argument invalide pour l'option -m\n"
-
-#~ msgid "%s: invalid argument for option -O\n"
-#~ msgstr "%s : argument invalide pour l'option -O\n"
-
-#~ msgid "%s: invalid argument for option -l\n"
-#~ msgstr "%s : argument invalide pour l'option -l\n"
-
-#~ msgid "%s: could not read from directory \"%s\": %s\n"
-#~ msgstr "%s : n'a pas pu lire le r�pertoire � %s � : %s\n"
-
-#~ msgid " --help show this help, then exit\n"
-#~ msgstr " --help affiche cette aide et quitte\n"
-
-#~ msgid " --version output version information, then exit\n"
-#~ msgstr " --version afficherla version et quitte\n"
-
-#~ msgid "First log file ID after reset: %u\n"
-#~ msgstr "Premier identifiant du journal apr�s r�initialisation : %u\n"
diff --git a/src/bin/pg_resetxlog/po/it.po b/src/bin/pg_resetxlog/po/it.po
deleted file mode 100644
index 9fc4479..0000000
--- a/src/bin/pg_resetxlog/po/it.po
+++ /dev/null
@@ -1,620 +0,0 @@
-#
-# Translation of pg_resetxlog to Italian
-# PostgreSQL Project
-#
-# Associazione Culturale ITPUG - Italian PostgreSQL Users Group
-# http://www.itpug.org/ - info@itpug.org
-#
-# Traduttori:
-# * Diego Cinelli <diego.cinelli@itpug.org>
-# * Daniele Varrazzo <daniele.varrazzo@gmail.com>
-#
-# Revisori:
-# * Emanuele Zamprogno <emanuele.zamprogno@itpug.org>
-#
-# Traduttori precedenti:
-# * Fabrizio Mazzoni <veramente@libero.it>
-# * Mirko Tebaldi <mirko.tebaldi@libero.it>
-#
-# Copyright (c) 2010, Associazione Culturale ITPUG
-# Distributed under the same license of the PostgreSQL project
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: pg_resetxlog (PostgreSQL) 9.6\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-04-17 00:14+0000\n"
-"PO-Revision-Date: 2016-04-17 20:51+0100\n"
-"Last-Translator: Daniele Varrazzo <daniele.varrazzo@gmail.com>\n"
-"Language-Team: Gruppo traduzioni ITPUG <traduzioni@itpug.org>\n"
-"Language: it\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-SourceCharset: utf-8\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Poedit 1.5.4\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: ATTENZIONE: non �� possibile creare token ristretti su questa piattaforma\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: apertura del token di processo fallita: codice di errore %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: allocazione dei SID fallita: codice di errore: %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: creazione del token ristretto fallita: codice di errore %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: avvio del processo fallito per il comando \"%s\": codice di errore %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: ri-esecuzione con token ristretto fallita: codice di errore %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: lettura del codice di uscita del sottoprocesso fallita: codice di errore %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: argomento non valido per l'opzione %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Prova \"%s --help\" per maggiori informazioni.\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: l'ID epoch della transazione (-e) non deve essere -1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: l'ID della transazione (-x) non deve essere 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s: l'ID di transazione (-c) dev'essere 0 or maggiore o uguale a 2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: l'OID (-o) non deve essere 0\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: l'ID della multitransazione (-m) non deve essere 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: l'ID multitransazione pi�� vecchio (-m) non pu�� essere 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: l'offset di una multitransazione (-O) non pu�� essere -1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: troppi argomenti di riga di comando (il primo �� \"%s\")\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: non �� stata specificata una directory per i dati\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s non pu�� essere eseguito da \"root\"\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "�� obbligatorio eseguire %s come superutente di PostgreSQL.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: spostamento nella directory \"%s\" fallito: %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: errore nell'apertura del file \"%s\" per la lettura: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running? If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: il file di lock \"%s\" esiste\n"
-"Il server �� in esecuzione? Se non lo ��, cancella il file di lock e riprova.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Se questi parametri sembrano accettabili, utilizza -f per forzare un reset.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Il server database non �� stato arrestato correttamente.\n"
-"Resettare il registro delle transazioni pu�� causare una perdita di dati.\n"
-"Se vuoi continuare comunque, utilizza -f per forzare il reset.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Registro delle transazioni riavviato\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-" touch %s\n"
-"and try again.\n"
-msgstr ""
-"Se sei sicuro che il percorso della directory dei dati �� corretto, esegui\n"
-" touch %s\n"
-"e riprova.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: lettura del file \"%s\" fallita: %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control esiste ma ha un CRC non valido; procedere con cautela\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control esiste ma �� inutilizzabile o �� una versione sconosciuta; verr�� ignorato\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Valori pg_control indovinati:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Valori pg_control attuali:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number: %u\n"
-msgstr "Numero di versione di pg_control: %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number: %u\n"
-msgstr "Numero di versione del catalogo: %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier: %s\n"
-msgstr "Identificatore di sistema del database: %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID: %u\n"
-msgstr "TimeLineId dell'ultimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "full_page_writes dell'ultimo checkpoint: %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "disattivato"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "attivato"
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID: %u:%u\n"
-msgstr "NextXID dell'ultimo checkpoint: %u.%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID: %u\n"
-msgstr "NextOID dell'ultimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId: %u\n"
-msgstr "NextMultiXactId dell'ultimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset: %u\n"
-msgstr "NextMultiOffset dell'ultimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID: %u\n"
-msgstr "oldestXID dell'ultimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB: %u\n"
-msgstr "DB dell'oldestXID dell'ultimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID: %u\n"
-msgstr "oldestActiveXID dell'ultimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid: %u\n"
-msgstr "oldestMultiXID dell'ultimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "DB dell'oldestMulti dell'ultimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "oldestCommitTsXid dell'ultimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "newestCommitTsXid dell'ultimo checkpoint: %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment: %u\n"
-msgstr "Massimo allineamento dei dati: %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size: %u\n"
-msgstr "Dimensione blocco database: %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Blocchi per ogni segmento grosse tabelle: %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size: %u\n"
-msgstr "Dimensione blocco WAL: %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment: %u\n"
-msgstr "Byte per segmento WAL: %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers: %u\n"
-msgstr "Lunghezza massima degli identificatori: %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index: %u\n"
-msgstr "Massimo numero di colonne in un indice: %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk: %u\n"
-msgstr "Massima dimensione di un segmento TOAST: %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk: %u\n"
-msgstr "Dimensione di un blocco large-object: %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage: %s\n"
-msgstr "Memorizzazione per tipi data/ora: %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "interi a 64 bit"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "numeri in virgola mobile"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing: %s\n"
-msgstr "Passaggio di argomenti Float4: %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "per riferimento"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "per valore"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing: %s\n"
-msgstr "passaggio di argomenti Float8: %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version: %u\n"
-msgstr "Versione somma di controllo dati pagine: %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Valori da cambiare:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset: %s\n"
-msgstr "Primo segmento di log dopo il reset: %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId: %u\n"
-msgstr "NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid: %u\n"
-msgstr "OldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB: %u\n"
-msgstr "DB di OldestMulti: %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset: %u\n"
-msgstr "NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID: %u\n"
-msgstr "NextOID: %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID: %u\n"
-msgstr "NextXID: %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID: %u\n"
-msgstr "OldestXID: %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB: %u\n"
-msgstr "DB di OldestXID: %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch: %u\n"
-msgstr "Epoca del NextXID: %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid: %u\n"
-msgstr "oldestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid: %u\n"
-msgstr "newestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr "%s: errore interno -- sizeof(ControlFileData) �� troppo grande ... correggere PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: creazione del file pg_control fallita: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: scrittura del file pg_control fallita: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: errore fsync: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: apertura della directory \"%s\" fallita: %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: lettura della directory \"%s\" fallita: %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: chiusura della directory \"%s\" fallita: %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: cancellazione del file \"%s\" fallita: %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: apertura del file \"%s\" fallita: %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: errore nella scrittura del file \"%s\": %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s riavvia il registro delle transazioni di PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Utilizzo:\n"
-" %s [OPZIONI]... DATADIR\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Opzioni:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid " -c XID,XID set oldest and newest transactions bearing commit timestamp\n"
-msgstr " -c XID,XID imposta le transazione pi�� vecchia e pi�� nuova che portano l'ora di commit\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid " (zero in either value means no change)\n"
-msgstr " (zero in uno dei dei valori vuol dire nessun cambiamento)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR data directory\n"
-msgstr " [-D] DATADIR directory dei dati\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid " -e XIDEPOCH set next transaction ID epoch\n"
-msgstr " -e XIDEPOCH imposta il prossimo ID epoch transazione\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid " -f force update to be done\n"
-msgstr " -f forza l'esecuzione dell'aggiornamento\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
-msgstr " -l XLOGFILE forza la locazione di inizio WAL minima per il nuovo log transazioni\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
-msgstr " -m MXID,MXID imposta gli ID multitransazione successivo e pi�� vecchio\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid " -n no update, just show what would be done (for testing)\n"
-msgstr " -n nessuna modifica, mostra solo cosa sarebbe fatto (per prova)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid " -o OID set next OID\n"
-msgstr " -o OID imposta il prossimo OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid " -O OFFSET set next multitransaction offset\n"
-msgstr " -O OFFSET imposta il prossimo offset multitransazione\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid " -V, --version output version information, then exit\n"
-msgstr " -V, --version mostra informazioni sulla versione ed esci\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid " -x XID set next transaction ID\n"
-msgstr " -x XID imposta il prossimo ID di transazione\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid " -?, --help show this help, then exit\n"
-msgstr " -?, --help mostra questo aiuto ed esci\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Puoi segnalare eventuali bug a <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetxlog/po/ja.po b/src/bin/pg_resetxlog/po/ja.po
deleted file mode 100644
index 54a0f87..0000000
--- a/src/bin/pg_resetxlog/po/ja.po
+++ /dev/null
@@ -1,490 +0,0 @@
-# translation of initdb.
-# Shigehiro Honda <fwif0083@mb.infoweb.ne.jp>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9.0 beta 3\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2013-08-18 12:05+0900\n"
-"PO-Revision-Date: 2013-08-18 12:10+0900\n"
-"Last-Translator: HOTTA Michihide <hotta@net-newbie.com>\n"
-"Language-Team: jpug-doc <jpug-doc@ml.postgresql.jp>\n"
-"Language: ja\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: pg_resetxlog.c:133
-#, c-format
-msgid "%s: invalid argument for option -e\n"
-msgstr "%s: ��������������� -e ������������������������\n"
-
-#: pg_resetxlog.c:134 pg_resetxlog.c:149 pg_resetxlog.c:164 pg_resetxlog.c:179
-#: pg_resetxlog.c:187 pg_resetxlog.c:213 pg_resetxlog.c:227 pg_resetxlog.c:234
-#: pg_resetxlog.c:242
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "���������\"%s --help\"���������������������������\n"
-
-#: pg_resetxlog.c:139
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: ������������������������ID ������������(-e)��� -1 ������������������������������\n"
-
-#: pg_resetxlog.c:148
-#, c-format
-msgid "%s: invalid argument for option -x\n"
-msgstr "%s: ���������������-x������������������������\n"
-
-#: pg_resetxlog.c:154
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: ������������������������ID(-x)������0������������������������������\n"
-
-#: pg_resetxlog.c:163
-#, c-format
-msgid "%s: invalid argument for option -o\n"
-msgstr "%s: ���������������-o������������������������\n"
-
-#: pg_resetxlog.c:169
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID(-o)������0������������������������������\n"
-
-#: pg_resetxlog.c:178 pg_resetxlog.c:186
-#, c-format
-msgid "%s: invalid argument for option -m\n"
-msgstr "%s: ���������������-m������������������������\n"
-
-#: pg_resetxlog.c:192
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ���������������������������������ID(-m)������0������������������������������\n"
-
-#: pg_resetxlog.c:202
-#, c-format
-#| msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ���������������������������������������������ID(-m)������0������������������������������\n"
-
-#: pg_resetxlog.c:212
-#, c-format
-msgid "%s: invalid argument for option -O\n"
-msgstr "%s: ���������������-O������������������������\n"
-
-#: pg_resetxlog.c:218
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: ������������������������������������������������(-O)���-1���������������������\n"
-
-#: pg_resetxlog.c:226
-#, c-format
-msgid "%s: invalid argument for option -l\n"
-msgstr "%s: ���������������-l������������������������\n"
-
-#: pg_resetxlog.c:241
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: ���������������������������������������������������������\n"
-
-#: pg_resetxlog.c:255
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: \"root\"���������������������������\n"
-
-#: pg_resetxlog.c:257
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "PostgreSQL���������������������������%s���������������������������������������\n"
-
-#: pg_resetxlog.c:267
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: ������������������\"%s\"���������������������������������: %s\n"
-
-#: pg_resetxlog.c:280 pg_resetxlog.c:414
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: ������������������������������\"%s\"���������������������������������������: %s\n"
-
-#: pg_resetxlog.c:287
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running? If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: ���������������������\"%s\"���������������\n"
-"���������������������������������������? ������������������������������������������������������������������������������������������\n"
-
-#: pg_resetxlog.c:362
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"������������������������������������������������������-f������������������������������������������������������\n"
-
-#: pg_resetxlog.c:374
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"���������������������������������������������������������������������������������������������\n"
-"���������������������������������������������������������������������������������������������\n"
-"���������������������������������������������-f������������������������������������������������������������\n"
-
-#: pg_resetxlog.c:388
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "���������������������������������������������������������\n"
-
-#: pg_resetxlog.c:417
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-" touch %s\n"
-"and try again.\n"
-msgstr ""
-"������������������������������������������������������������������\n"
-" touch %s\n"
-"���������������������������������������������\n"
-"\n"
-
-#: pg_resetxlog.c:430
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: ������������\"%s\"���������������������������������: %s\n"
-
-#: pg_resetxlog.c:453
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control������������������������CRC���������������������������������������������������\n"
-
-#: pg_resetxlog.c:462
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control������������������������������������������������������������������������������������������������\n"
-
-#: pg_resetxlog.c:562
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"pg_control������������:\n"
-"\n"
-
-#: pg_resetxlog.c:564
-#, c-format
-msgid ""
-"pg_control values:\n"
-"\n"
-msgstr ""
-"pg_control������:\n"
-"\n"
-
-#: pg_resetxlog.c:575
-#, c-format
-#| msgid "First log file segment after reset: %u\n"
-msgid "First log segment after reset: %s\n"
-msgstr "������������������������������������������������: %s\n"
-
-#: pg_resetxlog.c:577
-#, c-format
-msgid "pg_control version number: %u\n"
-msgstr "pg_control���������������������: %u\n"
-
-#: pg_resetxlog.c:579
-#, c-format
-msgid "Catalog version number: %u\n"
-msgstr "���������������������������������: %u\n"
-
-#: pg_resetxlog.c:581
-#, c-format
-msgid "Database system identifier: %s\n"
-msgstr "���������������������������������������: %s\n"
-
-#: pg_resetxlog.c:583
-#, c-format
-msgid "Latest checkpoint's TimeLineID: %u\n"
-msgstr "������������������������������������������ID: %u\n"
-
-#: pg_resetxlog.c:585
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "���������������������������������full_page_writes %s\n"
-
-#: pg_resetxlog.c:586
-msgid "off"
-msgstr "������"
-
-#: pg_resetxlog.c:586
-msgid "on"
-msgstr "������"
-
-#: pg_resetxlog.c:587
-#, c-format
-msgid "Latest checkpoint's NextXID: %u/%u\n"
-msgstr "���������������������������������NextXID: %u/%u\n"
-
-#: pg_resetxlog.c:590
-#, c-format
-msgid "Latest checkpoint's NextOID: %u\n"
-msgstr "���������������������������������NextOID: %u\n"
-
-#: pg_resetxlog.c:592
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId: %u\n"
-msgstr "���������������������������������NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:594
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset: %u\n"
-msgstr "���������������������������������NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:596
-#, c-format
-msgid "Latest checkpoint's oldestXID: %u\n"
-msgstr "���������������������������������oldestXID: %u\n"
-
-#: pg_resetxlog.c:598
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB: %u\n"
-msgstr "���������������������������������oldestXID���DB: %u\n"
-
-#: pg_resetxlog.c:600
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID: %u\n"
-msgstr "���������������������������������oldestActiveXID: %u\n"
-
-#: pg_resetxlog.c:602
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid: %u\n"
-msgstr "���������������������������������oldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:604
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "���������������������������������oldestMulti's���DB: %u\n"
-
-#: pg_resetxlog.c:606
-#, c-format
-msgid "Maximum data alignment: %u\n"
-msgstr "������������������������������������: %u\n"
-
-#: pg_resetxlog.c:609
-#, c-format
-msgid "Database block size: %u\n"
-msgstr "���������������������������������������: %u\n"
-
-#: pg_resetxlog.c:611
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "������������������������������������������������������������: %u\n"
-
-#: pg_resetxlog.c:613
-#, c-format
-msgid "WAL block size: %u\n"
-msgstr "WAL������������������������: %u\n"
-
-#: pg_resetxlog.c:615
-#, c-format
-msgid "Bytes per WAL segment: %u\n"
-msgstr "WAL���������������������������������������: %u\n"
-
-#: pg_resetxlog.c:617
-#, c-format
-msgid "Maximum length of identifiers: %u\n"
-msgstr "���������������������: %u\n"
-
-#: pg_resetxlog.c:619
-#, c-format
-msgid "Maximum columns in an index: %u\n"
-msgstr "������������������������������������: %u\n"
-
-#: pg_resetxlog.c:621
-#, c-format
-msgid "Maximum size of a TOAST chunk: %u\n"
-msgstr "TOAST ������������������������������������: %u\n"
-
-#: pg_resetxlog.c:623
-#, c-format
-msgid "Date/time type storage: %s\n"
-msgstr "������/������������������������ %s\n"
-
-#: pg_resetxlog.c:624
-msgid "64-bit integers"
-msgstr "64���������������"
-
-#: pg_resetxlog.c:624
-msgid "floating-point numbers"
-msgstr "������������������"
-
-#: pg_resetxlog.c:625
-#, c-format
-msgid "Float4 argument passing: %s\n"
-msgstr "Float4 ��������������������� %s\n"
-
-#: pg_resetxlog.c:626 pg_resetxlog.c:628
-msgid "by reference"
-msgstr "������������"
-
-#: pg_resetxlog.c:626 pg_resetxlog.c:628
-msgid "by value"
-msgstr "���������"
-
-#: pg_resetxlog.c:627
-#, c-format
-msgid "Float8 argument passing: %s\n"
-msgstr "Float8 ��������������������� %s\n"
-
-#: pg_resetxlog.c:629
-#, c-format
-msgid "Data page checksum version: %u\n"
-msgstr "������������������������������������������������������: %u\n"
-
-#: pg_resetxlog.c:692
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr ""
-"%s: ��������������� -- sizeof(ControlFileData)��������������������� \n"
-"... PG_CONTROL_SIZE ���������������������������\n"
-
-#: pg_resetxlog.c:707
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: pg_control���������������������������������������������: %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: pg_control���������������������������������������������: %s\n"
-
-#: pg_resetxlog.c:725 pg_resetxlog.c:1024
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: fsync���������: %s\n"
-
-#: pg_resetxlog.c:765 pg_resetxlog.c:836 pg_resetxlog.c:892
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: ������������������\"%s\"���������������������������������������: %s\n"
-
-#: pg_resetxlog.c:807 pg_resetxlog.c:869 pg_resetxlog.c:926
-#, c-format
-msgid "%s: could not read from directory \"%s\": %s\n"
-msgstr "%s: ������������������\"%s\"������������������������������������: %s\n"
-
-#: pg_resetxlog.c:850 pg_resetxlog.c:907
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: ������������\"%s\"���������������������������������: %s\n"
-
-#: pg_resetxlog.c:991
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: ������������\"%s\"���������������������������������������: %s\n"
-
-#: pg_resetxlog.c:1002 pg_resetxlog.c:1016
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: ������������\"%s\"���������������������������������: %s\n"
-
-#: pg_resetxlog.c:1035
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s���PostgreSQL������������������������������������������������������������\n"
-"\n"
-
-#: pg_resetxlog.c:1036
-#, c-format
-msgid ""
-"Usage:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"������������:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-
-#: pg_resetxlog.c:1037
-#, c-format
-msgid "Options:\n"
-msgstr "���������������:\n"
-
-#: pg_resetxlog.c:1038
-#, c-format
-msgid " -e XIDEPOCH set next transaction ID epoch\n"
-msgstr " -e XIDEPOCH ������������������������������ID������������������������������\n"
-
-#: pg_resetxlog.c:1039
-#, c-format
-msgid " -f force update to be done\n"
-msgstr " -f ������������������������������������\n"
-
-#: pg_resetxlog.c:1040
-#, c-format
-#| msgid " -l TLI,FILE,SEG force minimum WAL starting location for new transaction log\n"
-msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
-msgstr " -l XLOGFILE ������������������������������������������������WAL������������������������������������\n\n"
-
-#: pg_resetxlog.c:1041
-#, c-format
-#| msgid " -m XID set next multitransaction ID\n"
-msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
-msgstr " -m MXID,MXID ���������������������������������������������������ID������������������\n"
-
-#: pg_resetxlog.c:1042
-#, c-format
-msgid " -n no update, just show extracted control values (for testing)\n"
-msgstr " -n ������������������������������������������������������������������(���������)\n"
-
-#: pg_resetxlog.c:1043
-#, c-format
-msgid " -o OID set next OID\n"
-msgstr " -o OID ������OID������������������\n"
-
-#: pg_resetxlog.c:1044
-#, c-format
-msgid " -O OFFSET set next multitransaction offset\n"
-msgstr " -O OFFSET ������������������������������������������������������������������������\n"
-
-#: pg_resetxlog.c:1045
-#, c-format
-msgid " -V, --version output version information, then exit\n"
-msgstr " -V, --version ���������������������������������������������������\n"
-
-#: pg_resetxlog.c:1046
-#, c-format
-msgid " -x XID set next transaction ID\n"
-msgstr " -x XID ������������������������������ID������������������\n"
-
-#: pg_resetxlog.c:1047
-#, c-format
-msgid " -?, --help show this help, then exit\n"
-msgstr " -?, --help ���������������������������������������������\n"
-
-#: pg_resetxlog.c:1048
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"������������<pgsql-bugs@postgresql.org>���������������������������������\n"
-
-#~ msgid " --version output version information, then exit\n"
-#~ msgstr " --version ���������������������������������������������������\n"
-
-#~ msgid " --help show this help, then exit\n"
-#~ msgstr " --help ���������������������������������������\n"
-
-#~ msgid "First log file ID after reset: %u\n"
-#~ msgstr "���������������������������������������������ID: %u\n"
diff --git a/src/bin/pg_resetxlog/po/ko.po b/src/bin/pg_resetxlog/po/ko.po
deleted file mode 100644
index 47d83c3..0000000
--- a/src/bin/pg_resetxlog/po/ko.po
+++ /dev/null
@@ -1,616 +0,0 @@
-# Korean message translation file for PostgreSQL pg_resetxlog
-# Ioseph Kim <ioseph@uri.sarang.net>, 2004.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9.5\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-01-27 10:03+0900\n"
-"PO-Revision-Date: 2016-01-29 13:45+0900\n"
-"Last-Translator: Ioseph Kim <ioseph@uri.sarang.net>\n"
-"Language-Team: Korean Team <pgsql-kr@postgresql.kr>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Language: ko\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: ������: ��� ������������������ restricted token��� ������ ��� ������\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: ������������ ��������� ��� ��� ������: ������ ������ %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: SID��� ��������� ��� ������: ������ ������ %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: ��������� ��������� ������ ��� ������: ������ ������ %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: \"%s\" ��������� ��������������� ��������� ��� ������: ������ ������ %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: ��������� ������������ ������������ ��� ������: ������ ������ %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: ������ ��������������� ������ ��������� ������ ��� ������: ������ ������ %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: %s ��������� ��������� ������\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "��������� ������������ \"%s --help\"\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: ������������ ID epoch (-e) ������ -1��� ���������������\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: ������������ ID (-x) ������ 0��� ���������������\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid ""
-"%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr ""
-"%s: -c ������������ ��������� ������������ ID��� 0��������� 2��������������� ���\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) ������ 0��� ���������������\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ������������������ ID (-m) ������ 0��� ���������������\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ������ ��������� ������������������ ID (-m) ������ 0��� ���������������\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: ������������������ ������ (-O) ������ -1��� ���������������\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: ������ ������ ��������� ��������� ������������������. (������ \"%s\")\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: ��������� ��������������� ������������ ���������\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: ��� ��������������� \"root\"��� ��������� ��� ������\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "PostgreSQL superuser��� %s ��������������� ������������������.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: \"%s\" ��������������� ������ ��� ������: %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: \"%s\" ��������� ������ ��������� ��� ��� ������: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running? If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: \"%s\" ������ ��������� ������������.\n"
-"��������� ������������������? ��������� ���������, ��� ��������� ��������� ������ ������������������.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"��� ��������������� ��������������� ������������, ��������� ���������������, -f ��������� ���������.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"��� ������������������ ��������� ��������������� ������������ ���������������.\n"
-"������������ ��������� ������ ������������ ������ ������ ��������� ��������� ��� ������������.\n"
-"������������ ������������ ���������������, -f ��������� ������������ ������ ��������� ������������.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "������������ ������ ���������\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-" touch %s\n"
-"and try again.\n"
-msgstr ""
-"��������� ��������� ��������������� ���������, ������ ��������� ������������, ������ ���������\n"
-"������������.\n"
-" touch %s\n"
-"(win32������ ��������� ������?)\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: \"%s\" ��������� ������ ��� ������: %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr ""
-"%s: pg_control��������� ���������, CRC������ ���������������������; ��������� ������ ���������\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control��������� ���������, ������������������ ��������� ��� ��� ������; ���������\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"��������� pg_control ������������:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"������ pg_control ������������:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number: %u\n"
-msgstr "pg_control ������ ������: %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number: %u\n"
-msgstr "������������ ������ ������: %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier: %s\n"
-msgstr "������������������ ��������� ���������: %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID: %u\n"
-msgstr "��������� ��������������� TimeLineID: %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "��������� ��������������� full_page_writes: %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "off"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "on"
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID: %u/%u\n"
-msgstr "��������� ��������������� NextXID: %u/%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID: %u\n"
-msgstr "��������� ��������������� NextOID: %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId: %u\n"
-msgstr "��������� ��������������� NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset: %u\n"
-msgstr "��������� ��������������� NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID: %u\n"
-msgstr "��������� ��������������� ������ ��������� XID: %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB: %u\n"
-msgstr "��������� ��������������� ������ ��������� XID��� DB:%u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID: %u\n"
-msgstr "��������� ��������������� ������ ��������� ActiveXID:%u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid: %u\n"
-msgstr "��������� ��������������� ������ ��������� MultiXid:%u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "��������� ��������������� ������ ��������� MultiXid��� DB:%u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "��������� ��������������� ������ ��������� CommitTsXid:%u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "��������� ��������������� ������ CommitTsXid: %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment: %u\n"
-msgstr "������ ������ ������: %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size: %u\n"
-msgstr "������������������ ������ ������: %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "������ ��������������� ��������������� ������ ������: %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size: %u\n"
-msgstr "WAL ������ ������: %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment: %u\n"
-msgstr "WAL ��������������� ������(byte): %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers: %u\n"
-msgstr "��������� ������ ������: %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index: %u\n"
-msgstr "��������������� ������������ ������ ��� ���: %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk: %u\n"
-msgstr "TOAST ��������� ������ ������: %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk: %u\n"
-msgstr "������������ ��������� ������ ������: %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage: %s\n"
-msgstr "������/��������� ��������� ������������: %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "64-������ ������"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "������������"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing: %s\n"
-msgstr "Float4 ������ ������: %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "���������"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "������"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing: %s\n"
-msgstr "Float8 ������ ������: %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version: %u\n"
-msgstr "��������� ��������� ��������� ������: %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"��������� ���:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset: %s\n"
-msgstr "������ ��� ��� ������ ������������: %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId: %u\n"
-msgstr "NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid: %u\n"
-msgstr "OldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB: %u\n"
-msgstr "OldestMultiXid��� DB: %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset: %u\n"
-msgstr "NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID: %u\n"
-msgstr "NextOID: %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID: %u\n"
-msgstr "NextXID: %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID: %u\n"
-msgstr "OldestXID: %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB: %u\n"
-msgstr "OldestXID��� DB: %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch: %u\n"
-msgstr "NextXID epoch: %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid: %u\n"
-msgstr "������ ��������� CommitTsXid: %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid: %u\n"
-msgstr "������ CommitTsXid: %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid ""
-"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
-"PG_CONTROL_SIZE\n"
-msgstr ""
-"%s: ������ ������ -- sizeof(ControlFileData) ������ ������ ��� ... PG_CONTROL_SIZE ���"
-"���������\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: pg_control ������ ������ ��� ������: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: pg_control ������ ��� ��� ������: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: fsync ������: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: \"%s\" ������������ ��� ��� ������: %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: \"%s\" ��������������� ������ ��� ������: %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: \"%s\" ��������������� ������ ��� ������: %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: \"%s\" ������ ������ ��� ��� ������: %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: \"%s\" ������ ��� ��� ������: %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: \"%s\" ������ ��� ��� ������: %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s ��������������� PostgreSQL ������������ ��������� ������ ���������������.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"���������:\n"
-" %s [������]... DATADIR\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "���������:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid ""
-" -c XID,XID set oldest and newest transactions bearing commit "
-"timestamp\n"
-msgstr ""
-" -c XID,XID ������ ��������� ������������ ������ ���������, ��������� ������������ ������\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid " (zero in either value means no change)\n"
-msgstr " (0������ ������������ ��������� ������)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR data directory\n"
-msgstr " [-D] DATADIR ��������� ������������\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid " -e XIDEPOCH set next transaction ID epoch\n"
-msgstr " -e XIDEPOCH ������ ������������ ID epoch ������\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid " -f force update to be done\n"
-msgstr " -f ��������� ���������\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid ""
-" -l XLOGFILE force minimum WAL starting location for new transaction "
-"log\n"
-msgstr ""
-" -l XLOGFILE ��� ������������ ��������� ������ WAL ������ ������ ��������� ��������� ������\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
-msgstr " -m MXID,MXID ������ ������ ��������� ������������������ ID ������\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid ""
-" -n no update, just show what would be done (for testing)\n"
-msgstr ""
-" -n ������������ ������, ��������� ��������� ��������������� ���(������������)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid " -o OID set next OID\n"
-msgstr " -o OID ������ OID ������\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid " -O OFFSET set next multitransaction offset\n"
-msgstr " -O OFFSET ������ ������������������ ������ ������\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid " -V, --version output version information, then exit\n"
-msgstr " -V, --version ������ ������ ������������ ������\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid " -x XID set next transaction ID\n"
-msgstr " -x XID ������ XID(������������ ID) ������\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid " -?, --help show this help, then exit\n"
-msgstr " -?, --help ��� ������������ ������������ ������\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"������������: <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetxlog/po/pl.po b/src/bin/pg_resetxlog/po/pl.po
deleted file mode 100644
index d87214b..0000000
--- a/src/bin/pg_resetxlog/po/pl.po
+++ /dev/null
@@ -1,626 +0,0 @@
-# pg_resetxlog message translation file for pg_resetxlog
-# Copyright (C) 2011 PostgreSQL Global Development Group
-# This file is distributed under the same license as the PostgreSQL package.
-# Begina Felicysym <begina.felicysym@wp.eu>, 2011, 2012, 2013.
-# grzegorz <begina.felicysym@wp.eu>, 2014, 2015, 2016.
-msgid ""
-msgstr ""
-"Project-Id-Version: pg_resetxlog (PostgreSQL 9.1)\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-07-03 03:14+0000\n"
-"PO-Revision-Date: 2016-07-03 17:54+0200\n"
-"Last-Translator: grzegorz <begina.felicysym@wp.eu>\n"
-"Language-Team: begina.felicysym@wp.eu\n"
-"Language: pl\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2);\n"
-"X-Generator: Virtaal 0.7.1\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: OSTRZE��ENIE nie mo��na tworzy�� ograniczonych token��w na tej platformie\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: nie mo��na otworzy�� tokenu procesu: kod b����du %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: nie uda��o si�� przydzieli�� SID��w: kod b����du %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: nie uda��o si�� utworzy�� ograniczonego tokena: kod b����du %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: nie uda��o si�� uruchomi�� procesu dla polecenia \"%s\": kod b����du %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: nie uda��o si�� ponownie wykona�� ograniczonego tokena: %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: nie uda��o uzyska�� kodu wyj��cia z us��ugi podrz��dnej: kod b����du %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: niepoprawny argument dla opcji %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Spr��buj \"%s --help\" aby uzyska�� wi��cej informacji.\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: epoka ID transakcji (-e) nie mo��e by�� -1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: ID transakcji (-x) nie mo��e by�� 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s: ID transakcji (-c) musi by�� albo 0 albo wi��ksza lub r��wna 2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) nie mo��e by�� 0\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID multitransakcji (-m) nie mo��e by�� 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: najstarszy ID multitransakcji (-m) nie mo��e by�� 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: offset multitransakcji (-O) nie mo��e by�� -1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: za du��a ilo���� parametr��w (pierwszy to \"%s\")\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: katalog danych nie zosta�� ustawiony\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: nie mo��e by�� wykonywane pod \"rootem\"\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Musisz uruchomi�� %s jako superu��ytkownik PostgreSQL.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: nie mo��na zmieni�� katalogu na \"%s\": %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: nie mo��na otworzy�� pliku \"%s\" do odczytu: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running? If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: plik blokady \"%s\" istnieje\n"
-"Czy serwer dzia��a? Je��li nie, usu�� plik blokady i spr��buj ponownie.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Je��li te warto��ci wydaj�� si�� do przyj��cia, u��yj -f by wymusi�� reset.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Serwer bazy danych nie zosta�� poprawnie zamkni��ty.\n"
-"Zresetowanie dziennika transakcji mo��e spowodowa�� utrat�� danych.\n"
-"Je��li chcesz kontynuowa��, u��yj -f, aby wymusi�� reset.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Reset dziennika transakcji\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-" touch %s\n"
-"and try again.\n"
-msgstr ""
-"Je��li jeste�� pewien, ��e ��cie��ka folder u jest poprawna, wykonaj\n"
-" touch %s\n"
-"i spr��buj ponownie.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: nie mo��na odczyta�� z pliku \"%s\": %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control istnieje ale ma niepoprawne CRC; post��puj ostro��nie\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control istnieje ale jest uszkodzony lub ma nieznan�� wersj��, zignorowano\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Odgadni��te warto��ci pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Bie����ce warto��ci pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number: %u\n"
-msgstr "pg_control w wersji numer: %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number: %u\n"
-msgstr "Katalog w wersji numer: %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier: %s\n"
-msgstr "Identyfikator systemu bazy danych: %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID: %u\n"
-msgstr "TimeLineID najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "full_page_writes najnowszego punktu kontrolnego: %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "wy����czone"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "w����czone"
-
-#: pg_resetxlog.c:649
-#, c-format
-#| msgid "Latest checkpoint's NextXID: %u/%u\n"
-msgid "Latest checkpoint's NextXID: %u:%u\n"
-msgstr "NextXID najnowszego punktu kontrolnego: %u:%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID: %u\n"
-msgstr "NextOID najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId: %u\n"
-msgstr "NextMultiXactId najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset: %u\n"
-msgstr "NextMultiOffset najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID: %u\n"
-msgstr "oldestXID najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB: %u\n"
-msgstr "DB oldestXID'u najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID: %u\n"
-msgstr "NextXID najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid: %u\n"
-msgstr "oldestMultiXid najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "DB oldestMulti'u najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "oldestCommitTsXid najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "newestCommitTsXid najnowszego punktu kontrolnego: %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment: %u\n"
-msgstr "Maksymalne wyr��wnanie danych: %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size: %u\n"
-msgstr "Wielko���� bloku bazy danych: %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Bloki na segment s�� w relacji: %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size: %u\n"
-msgstr "Wielko���� bloku WAL: %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment: %u\n"
-msgstr "Bajt��w na segment WAL: %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers: %u\n"
-msgstr "Maksymalna d��ugo���� identyfikator��w: %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index: %u\n"
-msgstr "Maksymalna liczba kolumn w indeksie: %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk: %u\n"
-msgstr "Maksymalny rozmiar fragmentu TOAST: %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk: %u\n"
-msgstr "Rozmiar fragmentu du��ego obiektu: %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage: %s\n"
-msgstr "Typ przechowywania daty/czasu: %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "64-bit'owe zmienne integer"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "liczby zmiennoprzecinkowe"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing: %s\n"
-msgstr "Przekazywanie parametru float4: %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "przez referencj��"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "przez warto����"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing: %s\n"
-msgstr "Przekazywanie parametru float8: %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version: %u\n"
-msgstr "Suma kontrolna strony danych w wersji numer: %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Warto��ci do zmiany:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset: %s\n"
-msgstr "Pierwszy segment dziennika po resecie: %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId: %u\n"
-msgstr "NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid: %u\n"
-msgstr "OldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB: %u\n"
-msgstr "DB OldestMulti'u: %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset: %u\n"
-msgstr "NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID: %u\n"
-msgstr "NextOID: %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID: %u\n"
-msgstr "NextXID: %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID: %u\n"
-msgstr "OldestXID: %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB: %u\n"
-msgstr "DB OldestXIDu: %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch: %u\n"
-msgstr "Epoka NextXID: %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid: %u\n"
-msgstr "oldestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid: %u\n"
-msgstr "newestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr "%s: b����d wewn��trzny -- sizeof(ControlFileData) jest zbyt du��a ... popraw PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: nie mo��na utworzy�� pliku pg_control: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: nie mo��na pisa�� do pliku pg_control: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: b����d fsync: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: nie mo��na otworzy�� katalogu \"%s\": %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: nie mo��na odczyta�� katalogu \"%s\": %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: nie mo��na zamkn���� katalogu \"%s\": %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: nie mo��na usun���� pliku \"%s\": %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: nie mo��na otworzy�� pliku \"%s\": %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: nie mo��na zapisa�� pliku \"%s\": %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s resetuje log transakcji PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Spos��b u��ycia:\n"
-" %s [OPCJA]... FOLDERDANYCH\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Opcje:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid " -c XID,XID set oldest and newest transactions bearing commit timestamp\n"
-msgstr " -c XID,XID ustawia najstarszy i naj��wie��szy znacznik czasu wykonywanego zatwierdzenia\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid " (zero in either value means no change)\n"
-msgstr " (zero w obu warto��ciach oznacza brak zmian)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR data directory\n"
-msgstr " [-D] DATADIR folder bazy danych\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid " -e XIDEPOCH set next transaction ID epoch\n"
-msgstr " -e XIDEPOCH ustawia epok�� ID nast��pnej transakcji\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid " -f force update to be done\n"
-msgstr " -f wymusza wykonanie modyfikacji\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
-msgstr " -l XLOGFILE wymusza minimalne po��o��enie pocz��tkowe WAL dla nowego komunikatu transakcji\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
-msgstr " -m XID,MXID ustawia ID nast��pnej i najstarszej multitransakcji\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid " -n no update, just show what would be done (for testing)\n"
-msgstr " -n bez modyfikacji, po prostu wy��wietl co b��dzie zrobione (do testowania)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid " -o OID set next OID\n"
-msgstr " -o OID ustawia nast��pny OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid " -O OFFSET set next multitransaction offset\n"
-msgstr " -O OFFSET ustawia nast��pny offset multitransakcji\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid " -V, --version output version information, then exit\n"
-msgstr " -V, --version wypisuje informacje o wersji i ko��czy\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid " -x XID set next transaction ID\n"
-msgstr " -x XID ustawia ID nast��pnej transakcji\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid " -?, --help show this help, then exit\n"
-msgstr " -?, --help pokazuje ten ekran pomocy i ko��czy\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"B����dy prosz�� przesy��a�� na adres <pgsql-bugs@postgresql.org>.\n"
-
-#~ msgid "%s: invalid argument for option -x\n"
-#~ msgstr "%s: niepoprawny argument dla opcji -x\n"
-
-#~ msgid "%s: invalid argument for option -o\n"
-#~ msgstr "%s: niepoprawny argument dla opcji -o\n"
-
-#~ msgid "%s: invalid argument for option -m\n"
-#~ msgstr "%s: niepoprawny argument dla opcji -m\n"
-
-#~ msgid "%s: invalid argument for option -O\n"
-#~ msgstr "%s: niepoprawny argument dla opcji -O\n"
-
-#~ msgid "%s: invalid argument for option -l\n"
-#~ msgstr "%s: niepoprawny argument dla opcji -l\n"
-
-#~ msgid "%s: could not read from directory \"%s\": %s\n"
-#~ msgstr "%s: nie mo��na odczyta�� katalogu \"%s\": %s\n"
-
-#~ msgid "First log file ID after reset: %u\n"
-#~ msgstr "Pierwszy plik dziennika po resecie: %u\n"
diff --git a/src/bin/pg_resetxlog/po/pt_BR.po b/src/bin/pg_resetxlog/po/pt_BR.po
deleted file mode 100644
index ca6e6d4..0000000
--- a/src/bin/pg_resetxlog/po/pt_BR.po
+++ /dev/null
@@ -1,603 +0,0 @@
-# Brazilian Portuguese message translation file for pg_resetxlog
-# Copyright (C) 2009 PostgreSQL Global Development Group
-# This file is distributed under the same license as the PostgreSQL package.
-# Cesar Suga <sartre@linuxbr.com>, 2002.
-# Roberto Mello <rmello@fslc.usu.edu>, 2002.
-# Euler Taveira de Oliveira <euler@timbira.com>, 2003-2016.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9.5\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-02-13 17:22-0300\n"
-"PO-Revision-Date: 2005-10-04 22:55-0300\n"
-"Last-Translator: Euler Taveira de Oliveira <euler@timbira.com>\n"
-"Language-Team: Brazilian Portuguese <pgbr-dev@listas.postgresql.org.br>\n"
-"Language: pt_BR\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: AVISO: n��o pode criar informa����es restritas nessa plataforma\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: n��o p��de abrir informa����o sobre processo: c��digo de erro %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: n��o p��de alocar SIDs: c��digo de erro %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: n��o p��de criar informa����o restrita: c��digo de erro %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: n��o p��de iniciar processo para comando \"%s\": c��digo de erro %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: n��o p��de executar novamente com informa����o restrita: c��digo de erro %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: n��o p��de obter c��digo de sa��da de subprocesso: c��digo de erro %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: argumento inv��lido para op����o %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "Tente \"%s --help\" para obter informa����es adicionais.\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: ��poca do ID da transa����o (-e) n��o deve ser -1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: ID da transa����o (-x) n��o deve ser 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid "%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s: ID de transa����o (-c) deve ser 0 ou maior ou igual a 2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) n��o deve ser 0\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID de transa����o m��ltipla (-m) n��o deve ser 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID de transa����o m��ltipla mais velho (-m) n��o deve ser 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: deslocamento da transa����o m��ltipla (-O) n��o deve ser -1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: muitos argumentos de linha de comando (primeiro �� \"%s\")\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: nenhum diret��rio de dados foi especificado\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: n��o pode ser executado pelo \"root\"\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Voc�� deve executar %s como um super-usu��rio do PostgreSQL.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: n��o p��de mudar diret��rio para \"%s\": %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: n��o p��de abrir arquivo \"%s\" para leitura: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running? If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: arquivo de bloqueio \"%s\" existe\n"
-"O servidor est�� executando? Se n��o, apague o arquivo de bloqueio e tente novamente.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Se estes valores lhe parecem aceit��veis, use -f para for��ar o rein��cio.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"O servidor de banco de dados n��o foi desligado corretamente.\n"
-"Reiniciar o log de transa����o pode causar perda de dados.\n"
-"Se voc�� quer continuar mesmo assim, use -f para for��ar o rein��cio.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "Log de transa����o reiniciado\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-" touch %s\n"
-"and try again.\n"
-msgstr ""
-"Se voc�� tem certeza que o caminho do diret��rio de dados est�� correto, execute\n"
-" touch %s\n"
-"e tente novamente.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: n��o p��de ler arquivo \"%s\": %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control existe mas tem CRC inv��lido: prossiga com cuidado\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control existe mas n��o funciona ou sua vers��o �� desconhecida; ignorando-o\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Valores supostos do pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Valores atuais do pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number: %u\n"
-msgstr "n��mero da vers��o do pg_control: %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number: %u\n"
-msgstr "N��mero da vers��o do cat��logo: %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier: %s\n"
-msgstr "Identificador do sistema de banco de dados: %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID: %u\n"
-msgstr "TimeLineID do ��ltimo ponto de controle: %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "full_page_writes do ��ltimo ponto de controle: %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "desabilitado"
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "habilitado"
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID: %u/%u\n"
-msgstr "NextXID do ��ltimo ponto de controle: %u/%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID: %u\n"
-msgstr "NextOID do ��ltimo ponto de controle: %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId: %u\n"
-msgstr "NextMultiXactId do ��ltimo ponto de controle: %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset: %u\n"
-msgstr "NextMultiOffset do ��ltimo ponto de controle: %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID: %u\n"
-msgstr "oldestXID do ��ltimo ponto de controle: %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB: %u\n"
-msgstr "BD do oldestXID do ��ltimo ponto de controle: %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID: %u\n"
-msgstr "oldestActiveXID do ��ltimo ponto de controle: %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid: %u\n"
-msgstr "oldestMultiXid do ��ltimo ponto de controle: %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "BD do oldestMulti do ��ltimo ponto de controle: %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "oldestCommitTsXid do ��ltimo ponto de controle: %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "newestCommitTsXid do ��ltimo ponto de controle: %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment: %u\n"
-msgstr "M��ximo alinhamento de dado: %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size: %u\n"
-msgstr "Tamanho do bloco do banco de dados: %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Blocos por segmento da rela����o grande: %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size: %u\n"
-msgstr "Tamanho do bloco do WAL: %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment: %u\n"
-msgstr "Bytes por segmento do WAL: %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers: %u\n"
-msgstr "Tamanho m��ximo de identificadores: %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index: %u\n"
-msgstr "M��ximo de colunas em um ��ndice: %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk: %u\n"
-msgstr "Tamanho m��ximo do bloco TOAST: %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk: %u\n"
-msgstr "Tamanho do bloco de um objeto grande: %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage: %s\n"
-msgstr "Tipo de data/hora do reposit��rio: %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "inteiros de 64 bits"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "n��meros de ponto flutuante"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing: %s\n"
-msgstr "Passagem de argumento float4: %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "por refer��ncia"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "por valor"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing: %s\n"
-msgstr "Passagem de argumento float8: %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version: %u\n"
-msgstr "Vers��o da verifica����o de p��ginas de dados: %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"Valores a serem alterados:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset: %s\n"
-msgstr "Primeiro segmento do arquivo de log ap��s rein��cio: %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId: %u\n"
-msgstr "NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid: %u\n"
-msgstr "OldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB: %u\n"
-msgstr "BD do OldestMulti: %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset: %u\n"
-msgstr "NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID: %u\n"
-msgstr "NextOID: %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID: %u\n"
-msgstr "NextXID: %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID: %u\n"
-msgstr "OldestXID: %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB: %u\n"
-msgstr "BD do OldestXID: %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch: %u\n"
-msgstr "��poca do NextXID: %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid: %u\n"
-msgstr "oldestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid: %u\n"
-msgstr "newestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr "%s: erro interno -- sizeof(ControlFileData) �� muito grande ... conserte o PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: n��o p��de criar arquivo do pg_control: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: n��o p��de escrever no arquivo do pg_control: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: erro ao executar fsync: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: n��o p��de abrir diret��rio \"%s\": %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: n��o p��de ler diret��rio \"%s\": %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: n��o p��de fechar diret��rio \"%s\": %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: n��o p��de apagar arquivo \"%s\": %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: n��o p��de abrir arquivo \"%s\": %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: n��o p��de escrever no arquivo \"%s\": %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s reinicia o log de transa����o do PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Uso:\n"
-" %s [OP����O]... DIRDADOS\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "Op����es:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid " -c XID,XID set oldest and newest transactions bearing commit timestamp\n"
-msgstr " -c XID,XID define transa����es mais velha e mais nova contendo timestamp de efetiva����o\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid " (zero in either value means no change)\n"
-msgstr " (zero em qualquer valor significa nenhuma mudan��a)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR data directory\n"
-msgstr " [-D] DIRDADOS diret��rio de dados\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid " -e XIDEPOCH set next transaction ID epoch\n"
-msgstr " -e ��POCA_XID define pr��xima ��poca do ID de transa����o\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid " -f force update to be done\n"
-msgstr " -f for��a atualiza����o ser feita\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
-msgstr " -l XLOGFILE for��a local inicial m��nimo do WAL para novo log de transa����o\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
-msgstr " -m MXID,MXID define pr��ximo e mais velho ID de transa����o m��ltipla\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid " -n no update, just show what would be done (for testing)\n"
-msgstr " -n sem atualiza����o, mostra o que seria feito (para teste)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid " -o OID set next OID\n"
-msgstr " -o OID define pr��ximo OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid " -O OFFSET set next multitransaction offset\n"
-msgstr " -O OFFSET define pr��xima posi����o de transa����o m��ltipla\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid " -V, --version output version information, then exit\n"
-msgstr " -V, --version mostra informa����o sobre a vers��o e termina\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid " -x XID set next transaction ID\n"
-msgstr " -x XID define pr��ximo ID de transa����o\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid " -?, --help show this help, then exit\n"
-msgstr " -?, --help mostra essa ajuda e termina\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Relate erros a <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetxlog/po/ru.po b/src/bin/pg_resetxlog/po/ru.po
deleted file mode 100644
index 5a8e12e..0000000
--- a/src/bin/pg_resetxlog/po/ru.po
+++ /dev/null
@@ -1,677 +0,0 @@
-# PG_RESETXLOG Translated Messages into the Russian Language (UTF-8)
-#
-# Copyright (c) 2002-2005 Serguei A. Mokhov, mokhov@cs.concordia.ca
-# Copyright (c) 2012-2013 Alexander Lakhin, exclusion@gmail.com
-# Distributed under the same licensing terms as PostgreSQL itself.
-#
-# pgtranslation Id: pg_resetxlog.po,v 1.3 2009/10/14 21:08:40 petere Exp $
-#
-# translation of subject-specific terminology, see:
-# �������������� ������������������ ���������������������� ����������������:
-# http://wiki.postgresql.org/wiki/NLS/ru/dict
-#
-# ChangeLog:
-# - August 24, 2014: Updates for 9.4. Alexander Lakhin <exclusion@gmail.com>.
-# - With corrections from Dmitriy Olshevskiy <olshevskiy87@bk.ru>
-# - March 14, 2013: Updates for 9.3. Alexander Lakhin <exclusion@gmail.com>.
-# - June 27, 2012: Updates for 9.2. Alexander Lakhin <exclusion@gmail.com>.
-# - April 2, 2012: Bug fixes. Alexander Lakhin <exclusion@gmail.com>.
-# - February 18, 2012: Complete translation for 9.1. Alexander Lakhin <exclusion@gmail.com>.
-# - March 27, 2009: complete translation for 8.3, Sergey Burladyan <eshkinkot@gmail.com>.
-# - January 17, 2005: Complete translation for 8.0, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
-# - December, 2004: Corrections and improvements by Oleg Bartunov <oleg@sai.msu.su>.
-# - April 6 - August 11, 2004: Updates for 8.0; <mokhov@cs.concordia.ca>.
-# - July 24 - August 23, 2003: Updates for 7.4.*; <mokhov@cs.concordia.ca>.
-# - October 12, 2002: Complete post-7.3beta2 Translation, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
-# - September 7, 2002: Complete post-7.3beta1 Translation, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
-# - August 31, 2002: Initial Translation, Serguei A. Mokhov <mokhov@cs.concordia.ca>.
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9 current\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-05-27 16:14+0000\n"
-"PO-Revision-Date: 2015-12-31 14:56+0300\n"
-"Last-Translator: Alexander Lakhin <exclusion@gmail.com>\n"
-"Language-Team: Russian <pgsql-translators@postgresql.org>\n"
-"Language: ru\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-"X-Generator: Lokalize 2.0\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: ����������������������������: �� �������� ���� ������������ ������������������ ������������������������ ��������������\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s: ���� �������������� �������������� ������������ ���������������� (������ ������������: %lu)\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: ���� �������������� ���������������������� ������������������ SID (������ ������������: %lu)\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: ���� �������������� �������������� ������������������������ ������������ (������ ������������: %lu)\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr ""
-"%s: ���� �������������� ������������������ �������������� ������ �������������� \"%s\" (������ ������������: %lu)\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr ""
-"%s: ���� �������������� ������������������������������ �� ������������������������ ���������������� (������ ������������: %lu)\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: ���� �������������� ���������������� ������ ������������ ���� ���������������������� (������ ������������: %lu)\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s: ������������������������ ���������������� ������������������ %s\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "������ ���������������������������� �������������������� �������������������� \"%s --help\".\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: ���������� ID �������������������� (-e) ���� ������������ �������� ���������� -1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: ID �������������������� (-x) ���� ������������ �������� ���������� 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid ""
-"%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s: ID �������������������� (-c) ������������ �������� ���������� 0, �������� ������������ ������ ���������� 2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) ���� ������������ �������� ���������� 0\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID �������������������������������� (-m) ���� ������������ �������� ���������� 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ID ������������������ �������������������������������� (-m) ���� ������������ �������� ���������� 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: ���������������� �������������������������������� (-O) ���� ������������ �������� ���������� -1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: �������������� ���������� �������������������� ������������������ ������������ (������������: \"%s\")\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: �������������� ������������ ���� ������������\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: ������������������ ���� ������������ ������������������ root\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "������������������ %s ���������� ���� ���������� ���������������������������������� PostgreSQL.\n"
-
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: ���� �������������� �������������� �� �������������� \"%s\": %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: ���� �������������� �������������� �������� \"%s\" ������ ������������: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running? If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: ������������������ �������� �������������������� \"%s\"\n"
-"����������������, ������������ ��������������? �������� ������, �������������� �������� �������� �� �������������������� ����������.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"�������� ������ ���������������� ������������������, ������������������ ���������� ��������������������������, �������������� �������� -"
-"f.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"������������ ������ ������������ ������ �������������������� ����������������������.\n"
-"���������� �������������� �������������������� ���������� ���������������� �� ������������ ������������.\n"
-"�������� ���� ������������ ���������������� ������, ���������������� ���� ������, ���������������� �������� -f.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "������������ �������������������� ��������������\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-" touch %s\n"
-"and try again.\n"
-msgstr ""
-"�������� ���� ��������������, ������ �������� �� ���������������� ������������ ��������������������, ������������������\n"
-" touch %s\n"
-"�� ������������������ ��������������.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: ���� �������������� ������������������ �������� \"%s\": %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr ""
-"%s: pg_control ��������������������, ���� ������ ���������������������� ���������� ��������������; ���������������������� �� "
-"��������������������������\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr ""
-"%s: pg_control ���������������� ������ ���������� ���������������������� ������������; ������������������������...\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"���������������������������� ���������������� pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"�������������� ���������������� pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number: %u\n"
-msgstr "���������� ������������ pg_control: %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number: %u\n"
-msgstr "���������� ������������ ����������������: %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier: %s\n"
-msgstr "�������������������������� �������������� ������ ������������: %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID: %u\n"
-msgstr "���������� �������������� ������������������ ��������. ����������: %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "���������� full_page_writes ������������������ ��.��: %s\n"
-
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "��������."
-
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "������."
-
-#: pg_resetxlog.c:649
-#, c-format
-msgid "Latest checkpoint's NextXID: %u:%u\n"
-msgstr "NextXID ������������������ ��������. ����������: %u:%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID: %u\n"
-msgstr "NextOID ������������������ ��������. ����������: %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId: %u\n"
-msgstr "NextMultiXactId ������������. ��������. ����������: %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset: %u\n"
-msgstr "NextMultiOffset ������������. ��������. ����������: %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID: %u\n"
-msgstr "oldestXID ������������������ ��������. ����������: %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB: %u\n"
-msgstr "���� �� oldestXID ������������������ ��������. ����������: %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID: %u\n"
-msgstr "oldestActiveXID ������������������ ��.��.: %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid: %u\n"
-msgstr "oldestMultiXid ������������������ ��������. ����������: %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "���� �� oldestMulti ������������������ ��.��.: %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "oldestCommitTsXid ������������������ ��. ��.: %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "newestCommitTsXid ������������������ ��. ��.: %u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment: %u\n"
-msgstr "��������. ������������ ������������������������ ������������: %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size: %u\n"
-msgstr "������������ ���������� ����: %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "������������ �� ��������. ���������������� ������������������: %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size: %u\n"
-msgstr "������������ ���������� WAL: %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment: %u\n"
-msgstr "�������� �� ���������������� WAL: %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers: %u\n"
-msgstr "������������������������ ���������� ������������������������������: %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index: %u\n"
-msgstr "������������������������ ���������� ���������������� �� ��������������: %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk: %u\n"
-msgstr "������������������������ ������������ ������������ TOAST: %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk: %u\n"
-msgstr "������������ ������������ ���������������� ��������������: %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage: %s\n"
-msgstr "������������ ���������������� ��������/��������������: %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "64-������������ ����������"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "���������� �� ������������������ ������������"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing: %s\n"
-msgstr "���������������� ������������������ Float4: %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "���� ������������"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "���� ����������������"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing: %s\n"
-msgstr "���������������� ������������������ Float8: %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version: %u\n"
-msgstr "������������ ���������������������� �������� ��������������: %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"����������������, �������������� ���������� ����������������:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset: %s\n"
-msgstr "������������ �������������� �������������� ���������� ������������: %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId: %u\n"
-msgstr "NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid: %u\n"
-msgstr "OldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB: %u\n"
-msgstr "���� �� oldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset: %u\n"
-msgstr "NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID: %u\n"
-msgstr "NextOID: %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID: %u\n"
-msgstr "NextXID: %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID: %u\n"
-msgstr "OldestXID: %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB: %u\n"
-msgstr "���� �� oldestXID: %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch: %u\n"
-msgstr "���������� NextXID: %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-msgid "oldestCommitTsXid: %u\n"
-msgstr "oldestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-msgid "newestCommitTsXid: %u\n"
-msgstr "newestCommitTsXid: %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid ""
-"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
-"PG_CONTROL_SIZE\n"
-msgstr ""
-"%s: �������������������� ������������ -- ������������ ControlFileData �������������� ���������� -- ������������������ "
-"PG_CONTROL_SIZE\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: ���� �������������� �������������� �������� pg_control: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: ���� �������������� ���������������� �������� pg_control: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: ������������ �������������������������� �� ����: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: ���� �������������� �������������� �������������� \"%s\": %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: ���� �������������� ������������������ �������������� \"%s\": %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: ���� �������������� �������������� �������������� \"%s\": %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: ������������ ������ ���������������� ���������� \"%s\": %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: ���� �������������� �������������� �������� \"%s\": %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: ���� �������������� ���������������� �������� \"%s\": %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s �������������������� ������������ �������������������� PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Usage:\n"
-" %s [����������������]... ������_������������\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "������������������:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid ""
-" -c XID,XID set oldest and newest transactions bearing commit "
-"timestamp\n"
-msgstr ""
-" -c XID,XID ������������ ������������������ �� ���������������� ��������������������, �������������� ���������� "
-"�������������� ����������������\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid " (zero in either value means no change)\n"
-msgstr " (0 �� ���������� ���� �������������������� ������������������������)\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR data directory\n"
-msgstr " [-D] ������_������������ �������������� ������������\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid " -e XIDEPOCH set next transaction ID epoch\n"
-msgstr " -e XIDEPOCH ������������ ���������� �� ID ������������������ ��������������������\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid " -f force update to be done\n"
-msgstr " -f ���������������������������� �������������������� ����������������\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid ""
-" -l XLOGFILE force minimum WAL starting location for new transaction "
-"log\n"
-msgstr ""
-" -l XLOGFILE ������������ ���������������������� ������������������ ������������������ WAL ������ ������������\n"
-" �������������� ��������������������\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
-msgstr " -m MXID,MXID ������������ ID ������������������ �� ������������������ ��������������������������������\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid ""
-" -n no update, just show what would be done (for testing)\n"
-msgstr ""
-" -n ����������������, ���������� ���������������� ���������� ������������������, ���� ���� ������������������ "
-"����\n"
-" (������ ����������������)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid " -o OID set next OID\n"
-msgstr " -o OID ������������ ������������������ OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid " -O OFFSET set next multitransaction offset\n"
-msgstr " -O ���������������� ������������ ���������������� ������������������ ��������������������������������\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid " -V, --version output version information, then exit\n"
-msgstr " -V, --version ���������������� ������������ �� ����������\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid " -x XID set next transaction ID\n"
-msgstr " -x XID ������������ ID ������������������ ��������������������\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid " -?, --help show this help, then exit\n"
-msgstr " -?, --help ���������������� ������ �������������� �� ����������\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"���� �������������� ������������������ ���� ������������ <pgsql-bugs@postgresql.org>.\n"
-
-#~ msgid "%s: invalid argument for option -x\n"
-#~ msgstr "%s: ������������������������ ���������������� ������������������ -x\n"
-
-#~ msgid "%s: invalid argument for option -o\n"
-#~ msgstr "%s: ������������������������ ���������������� ������������������ -o\n"
-
-#~ msgid "%s: invalid argument for option -m\n"
-#~ msgstr "%s: ������������������������ ���������������� ������������������ -m\n"
-
-#~ msgid "%s: invalid argument for option -O\n"
-#~ msgstr "%s: ������������������������ ���������������� ������������������ -O\n"
-
-#~ msgid "%s: invalid argument for option -l\n"
-#~ msgstr "%s: ������������������������ ���������������� ������������������ -l\n"
-
-#~ msgid " -m XID,OLDEST set next multitransaction ID and oldest value\n"
-#~ msgstr ""
-#~ " -m XID,������������������ ������������ ID ������������������ �������������������������������� �� ID ������������������\n"
-
-#~ msgid "disabled"
-#~ msgstr "����������������"
-
-#~ msgid "enabled"
-#~ msgstr "��������������"
-
-#~ msgid "First log file ID after reset: %u\n"
-#~ msgstr "ID �������������� �������������� ���������� ������������: %u\n"
diff --git a/src/bin/pg_resetxlog/po/sv.po b/src/bin/pg_resetxlog/po/sv.po
deleted file mode 100644
index 528531b..0000000
--- a/src/bin/pg_resetxlog/po/sv.po
+++ /dev/null
@@ -1,550 +0,0 @@
-# Swedish message translation file for resetxlog.
-# Dennis Bj��rklund <db@zigo.dhs.org>, 2002, 2003, 2004, 2005, 2006.
-# Peter Eisentraut <peter_e@gmx.net>, 2010.
-# Mats Erik Andersson <bsd@gisladisker.se>, 2014.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: PostgreSQL 9.4\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2014-11-25 16:12+0000\n"
-"PO-Revision-Date: 2014-11-29 18:32+0100\n"
-"Last-Translator: Mats Erik Andersson <bsd@gisladisker.se>\n"
-"Language-Team: Swedish <sv@li.org>\n"
-"Language: sv\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: pg_resetxlog.c:130
-#, c-format
-msgid "%s: invalid argument for option -e\n"
-msgstr "%s: Ogiltigt argument f��r v��xel -e.\n"
-
-#: pg_resetxlog.c:131 pg_resetxlog.c:146 pg_resetxlog.c:161 pg_resetxlog.c:176
-#: pg_resetxlog.c:184 pg_resetxlog.c:210 pg_resetxlog.c:224 pg_resetxlog.c:231
-#: pg_resetxlog.c:239
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "F��rs��k med \"%s --help\" f��r mer information.\n"
-
-#: pg_resetxlog.c:136
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: Epok (-e) f��r transaktions-ID f��r inte vara -1.\n"
-
-#: pg_resetxlog.c:145
-#, c-format
-msgid "%s: invalid argument for option -x\n"
-msgstr "%s: Ogiltigt argument f��r v��xel -x.\n"
-
-#: pg_resetxlog.c:151
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: Transaktions-ID (-x) f��r inte vara 0.\n"
-
-#: pg_resetxlog.c:160
-#, c-format
-msgid "%s: invalid argument for option -o\n"
-msgstr "%s: Ogiltigt argument f��r v��xel -o.\n"
-
-#: pg_resetxlog.c:166
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) f��r inte vara 0.\n"
-
-#: pg_resetxlog.c:175 pg_resetxlog.c:183
-#, c-format
-msgid "%s: invalid argument for option -m\n"
-msgstr "%s: Ogiltigt argument f��r v��xel -m.\n"
-
-#: pg_resetxlog.c:189
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: Multitransaktions-ID (-m) f��r inte vara 0.\n"
-
-#: pg_resetxlog.c:199
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ��ldsta multitransaktions-ID (-m) f��r inte vara 0.\n"
-
-#: pg_resetxlog.c:209
-#, c-format
-msgid "%s: invalid argument for option -O\n"
-msgstr "%s: Ogiltigt argument f��r v��xel -O.\n"
-
-#: pg_resetxlog.c:215
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: Multitransaktionsoffset (-O) f��r inte vara -1.\n"
-
-#: pg_resetxlog.c:223
-#, c-format
-msgid "%s: invalid argument for option -l\n"
-msgstr "%s: Ogiltigt argument f��r v��xel -l.\n"
-
-#: pg_resetxlog.c:238
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: Ingen datakatalog angiven.\n"
-
-#: pg_resetxlog.c:252
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s: F��r inte utf��ras av \"root\".\n"
-
-#: pg_resetxlog.c:254
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "Du m��ste k��ra %s som PostgreSQL:s superanv��ndare.\n"
-
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: Kunde inte g�� till katalog \"%s\": %s\n"
-
-#: pg_resetxlog.c:277 pg_resetxlog.c:418
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: Kunde inte ��ppna filen \"%s\" f��r l��sning: %s\n"
-
-#: pg_resetxlog.c:284
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running? If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: En l��sfil \"%s\" finns p�� plats.\n"
-"K��r servern redan? Om inte, radera l��sfilen och f��rs��k igen.\n"
-
-#: pg_resetxlog.c:366
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"Om dessa v��rden verkar godtagbara, anv��nd d�� -f f��r att\n"
-"framtvinga ��terst��llning.\n"
-
-#: pg_resetxlog.c:378
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"Databasservern st��ngdes inte av ordentligt. Att ��terst��lla\n"
-"transaktionsloggen kan medf��ra att data f��rloras. Om du ��nd��\n"
-"vill forts��tta, anv��nd -f f��r att framtvinga ��terst��llning.\n"
-
-#: pg_resetxlog.c:392
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "��terst��llning av transaktionslogg.\n"
-
-#: pg_resetxlog.c:421
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-" touch %s\n"
-"and try again.\n"
-msgstr ""
-"Om du ��r s��ker p�� att s��kv��gen till datakatalogen ��r riktig,\n"
-"utf��r d�� \"touch %s\" och f��rs��k sedan igen.\n"
-
-#: pg_resetxlog.c:434
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: Kunde inte l��sa fil \"%s\": %s\n"
-
-#: pg_resetxlog.c:457
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control existerar men har ogiltig CRC. Forts��tt med varsamhet.\n"
-
-#: pg_resetxlog.c:466
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control existerar men ��r trasig eller har ok��nd version. Den ignoreras.\n"
-
-#: pg_resetxlog.c:568
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"Gissade v��rden f��r pg_control:\n"
-"\n"
-
-#: pg_resetxlog.c:570
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"Nuvarande v��rden f��r pg_control:\n"
-"\n"
-
-# November 26th, 2014: Insert six additional space characters
-# for best alignment with Swedish translation.
-# Translations should be checked against those of pg_controldata.
-#: pg_resetxlog.c:579
-#, c-format
-msgid "pg_control version number: %u\n"
-msgstr "Versionsnummer f��r pg_control: %u\n"
-
-#: pg_resetxlog.c:581
-#, c-format
-msgid "Catalog version number: %u\n"
-msgstr "Katalogversion: %u\n"
-
-#: pg_resetxlog.c:583
-#, c-format
-msgid "Database system identifier: %s\n"
-msgstr "Databasens systemidentifierare: %s\n"
-
-#: pg_resetxlog.c:585
-#, c-format
-msgid "Latest checkpoint's TimeLineID: %u\n"
-msgstr "TimeLineID vid senaste kontrollpunkt: %u\n"
-
-#: pg_resetxlog.c:587
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "Senaste kontrollpunktens full_page_writes: %s\n"
-
-#: pg_resetxlog.c:588
-msgid "off"
-msgstr "av"
-
-#: pg_resetxlog.c:588
-msgid "on"
-msgstr "p��"
-
-#: pg_resetxlog.c:589
-#, c-format
-msgid "Latest checkpoint's NextXID: %u/%u\n"
-msgstr "NextXID vid senaste kontrollpunkt: %u/%u\n"
-
-#: pg_resetxlog.c:592
-#, c-format
-msgid "Latest checkpoint's NextOID: %u\n"
-msgstr "NextOID vid senaste kontrollpunkt: %u\n"
-
-#: pg_resetxlog.c:594
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId: %u\n"
-msgstr "NextMultiXactId vid senaste kontrollpunkt: %u\n"
-
-#: pg_resetxlog.c:596
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset: %u\n"
-msgstr "NextMultiOffset vid senaste kontrollpunkt: %u\n"
-
-#: pg_resetxlog.c:598
-#, c-format
-msgid "Latest checkpoint's oldestXID: %u\n"
-msgstr "oldestXID vid senaste kontrollpunkt: %u\n"
-
-#: pg_resetxlog.c:600
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB: %u\n"
-msgstr "DB f��r oldestXID vid senaste kontrollpunkt: %u\n"
-
-# FIXME: too wide
-#: pg_resetxlog.c:602
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID: %u\n"
-msgstr "oldestActiveXID vid senaste kontrollpunkt: %u\n"
-
-#: pg_resetxlog.c:604
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid: %u\n"
-msgstr "oldestMultiXid vid senaste kontrollpunkt: %u\n"
-
-#: pg_resetxlog.c:606
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "DB f��r oldestMulti vid senaste kontrollpkt: %u\n"
-
-#: pg_resetxlog.c:608
-#, c-format
-msgid "Maximum data alignment: %u\n"
-msgstr "Maximal j��mkning av data (alignment): %u\n"
-
-#: pg_resetxlog.c:611
-#, c-format
-msgid "Database block size: %u\n"
-msgstr "Databasens blockstorlek: %u\n"
-
-#: pg_resetxlog.c:613
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "Block per segment i en stor relation: %u\n"
-
-#: pg_resetxlog.c:615
-#, c-format
-msgid "WAL block size: %u\n"
-msgstr "Blockstorlek i transaktionsloggen: %u\n"
-
-#: pg_resetxlog.c:617
-#, c-format
-msgid "Bytes per WAL segment: %u\n"
-msgstr "Segmentstorlek i transaktionsloggen: %u\n"
-
-#: pg_resetxlog.c:619
-#, c-format
-msgid "Maximum length of identifiers: %u\n"
-msgstr "Maximal l��ngd f��r identifierare: %u\n"
-
-#: pg_resetxlog.c:621
-#, c-format
-msgid "Maximum columns in an index: %u\n"
-msgstr "Maximalt antal kolonner i ett index: %u\n"
-
-#: pg_resetxlog.c:623
-#, c-format
-msgid "Maximum size of a TOAST chunk: %u\n"
-msgstr "Maximal storlek f��r en TOAST-enhet: %u\n"
-
-#: pg_resetxlog.c:625
-#, c-format
-msgid "Size of a large-object chunk: %u\n"
-msgstr "Storlek f��r large-object-enheter: %u\n"
-
-#: pg_resetxlog.c:627
-#, c-format
-msgid "Date/time type storage: %s\n"
-msgstr "Representation av dag och tid: %s\n"
-
-#: pg_resetxlog.c:628
-msgid "64-bit integers"
-msgstr "64-bitars heltal"
-
-#: pg_resetxlog.c:628
-msgid "floating-point numbers"
-msgstr "flyttal"
-
-#: pg_resetxlog.c:629
-#, c-format
-msgid "Float4 argument passing: %s\n"
-msgstr "��tkomst till float4-argument: %s\n"
-
-#: pg_resetxlog.c:630 pg_resetxlog.c:632
-msgid "by reference"
-msgstr "referens"
-
-#: pg_resetxlog.c:630 pg_resetxlog.c:632
-msgid "by value"
-msgstr "v��rde��tkomst"
-
-#: pg_resetxlog.c:631
-#, c-format
-msgid "Float8 argument passing: %s\n"
-msgstr "��tkomst till float8-argument: %s\n"
-
-#: pg_resetxlog.c:633
-#, c-format
-msgid "Data page checksum version: %u\n"
-msgstr "Checksummaversion f��r datasidor: %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"V��rden att f��r��ndra:\n"
-"\n"
-
-# November 26th, 2014: Insert additional spacing to fit
-# with the first translated text, which uses most characters.
-#: pg_resetxlog.c:650
-#, c-format
-msgid "First log segment after reset: %s\n"
-msgstr "F��rsta loggsegment efter ��terst��llning: %s\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "NextMultiXactId: %u\n"
-msgstr "NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "OldestMultiXid: %u\n"
-msgstr "OldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "OldestMulti's DB: %u\n"
-msgstr "DB f��r OldestMulti: %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "NextMultiOffset: %u\n"
-msgstr "NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-msgid "NextOID: %u\n"
-msgstr "NextOID: %u\n"
-
-#: pg_resetxlog.c:676
-#, c-format
-msgid "NextXID: %u\n"
-msgstr "NextXID: %u\n"
-
-#: pg_resetxlog.c:678
-#, c-format
-msgid "OldestXID: %u\n"
-msgstr "OldestXID: %u\n"
-
-#: pg_resetxlog.c:680
-#, c-format
-msgid "OldestXID's DB: %u\n"
-msgstr "DB f��r OldestXID: %u\n"
-
-#: pg_resetxlog.c:686
-#, c-format
-msgid "NextXID epoch: %u\n"
-msgstr "Epok f��r NextXID: %u\n"
-
-
-#: pg_resetxlog.c:751
-#, c-format
-msgid "%s: internal error -- sizeof(ControlFileData) is too large ... fix PG_CONTROL_SIZE\n"
-msgstr "%s: Internt fel: sizeof(ControlFileData) ��r alltf��r stor. R��tta till PG_CONTROL_SIZE.\n"
-
-#: pg_resetxlog.c:766
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: Kunde inte skapa fil f��r pg_control: %s\n"
-
-#: pg_resetxlog.c:777
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: Kunde inte skriva fil f��r pg_control: %s\n"
-
-#: pg_resetxlog.c:784 pg_resetxlog.c:1068
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: Misslyckad fsync: %s\n"
-
-#: pg_resetxlog.c:824 pg_resetxlog.c:890 pg_resetxlog.c:941
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: Kunde inte ��ppna filkatalog \"%s\": %s\n"
-
-#: pg_resetxlog.c:855 pg_resetxlog.c:912 pg_resetxlog.c:964
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: Kunde inte l��sa filkatalog \"%s\": %s\n"
-
-#: pg_resetxlog.c:862 pg_resetxlog.c:919 pg_resetxlog.c:971
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: Kunde inte st��nga filkatalog \"%s\": %s\n"
-
-#: pg_resetxlog.c:903 pg_resetxlog.c:955
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: Kunde inte radera fil \"%s\": %s\n"
-
-#: pg_resetxlog.c:1035
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: Kunde inte ��ppna fil \"%s\": %s\n"
-
-#: pg_resetxlog.c:1046 pg_resetxlog.c:1060
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: Kunde inte skriva fil \"%s\": %s\n"
-
-#: pg_resetxlog.c:1079
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s ��terst��ller transaktionslogg f��r PostgreSQL.\n"
-"\n"
-
-#: pg_resetxlog.c:1080
-#, c-format
-msgid ""
-"Usage:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"Anv��ndning:\n"
-" %s [FLAGGA]... DATAKATALOG\n"
-"\n"
-
-#: pg_resetxlog.c:1081
-#, c-format
-msgid "Options:\n"
-msgstr "Programv��xlar:\n"
-
-#: pg_resetxlog.c:1082
-#, c-format
-msgid " -e XIDEPOCH set next transaction ID epoch\n"
-msgstr " -e XIDEPOCH s��tter epok f��r n��sta transaktions-ID\n"
-
-#: pg_resetxlog.c:1083
-#, c-format
-msgid " -f force update to be done\n"
-msgstr " -f framtvinga ��terst��llning\n"
-
-#: pg_resetxlog.c:1084
-#, c-format
-msgid " -l XLOGFILE force minimum WAL starting location for new transaction log\n"
-msgstr " -l XLOGFIL ny transaktionslogg m��ste vara detta namn eller ett senare\n"
-
-#: pg_resetxlog.c:1085
-#, c-format
-msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
-msgstr " -m MXID,MXID s��tt n��sta och ��ldsta multitransaktions-ID\n"
-
-#: pg_resetxlog.c:1086
-#, c-format
-msgid " -n no update, just show what would be done (for testing)\n"
-msgstr " -n ingen updatering; visa planerade ��tg��rder (f��r testning)\n"
-
-#: pg_resetxlog.c:1087
-#, c-format
-msgid " -o OID set next OID\n"
-msgstr " -o OID s��tt n��sta OID\n"
-
-#: pg_resetxlog.c:1088
-#, c-format
-msgid " -O OFFSET set next multitransaction offset\n"
-msgstr " -O OFFSET s��tt n��sta multitransaktionsoffset\n"
-
-#: pg_resetxlog.c:1089
-#, c-format
-msgid " -V, --version output version information, then exit\n"
-msgstr " -V, --version visa versionsinformation, avsluta sedan\n"
-
-#: pg_resetxlog.c:1090
-#, c-format
-msgid " -x XID set next transaction ID\n"
-msgstr " -x XID s��tt n��sta transaktions-ID\n"
-
-#: pg_resetxlog.c:1091
-#, c-format
-msgid " -?, --help show this help, then exit\n"
-msgstr " -?, --help visa denna hj��lp, avsluta sedan\n"
-
-#: pg_resetxlog.c:1092
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"Reportera fel till <pgsql-bugs@postgresql.org>.\n"
diff --git a/src/bin/pg_resetxlog/po/zh_CN.po b/src/bin/pg_resetxlog/po/zh_CN.po
deleted file mode 100644
index c199ac9..0000000
--- a/src/bin/pg_resetxlog/po/zh_CN.po
+++ /dev/null
@@ -1,661 +0,0 @@
-# simplified Chinese translation file for pg_resetxlog and friends
-# Bao Wei <weibao@forevertek.com>, 2002.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: pg_resetxlog (PostgreSQL 9.0)\n"
-"Report-Msgid-Bugs-To: pgsql-bugs@postgresql.org\n"
-"POT-Creation-Date: 2016-04-18 04:44+0000\n"
-"PO-Revision-Date: 2016-05-19 20:41+0800\n"
-"Last-Translator: Yuwei Peng <ywpeng@whu.edu.cn>\n"
-"Language-Team: Chinese (Simplified) <ywpeng@whu.edu.cn>\n"
-"Language: zh_CN\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: Poedit 1.5.7\n"
-
-#: ../../common/restricted_token.c:68
-#, c-format
-msgid "%s: WARNING: cannot create restricted tokens on this platform\n"
-msgstr "%s: WARNING: ������������������������������������������\n"
-
-#: ../../common/restricted_token.c:77
-#, c-format
-msgid "%s: could not open process token: error code %lu\n"
-msgstr "%s:������������������������ (token): ��������� %lu\n"
-
-#: ../../common/restricted_token.c:90
-#, c-format
-msgid "%s: could not allocate SIDs: error code %lu\n"
-msgstr "%s: ������������SID: ��������� %lu\n"
-
-#: ../../common/restricted_token.c:110
-#, c-format
-msgid "%s: could not create restricted token: error code %lu\n"
-msgstr "%s: ������������������������: ������������ %lu\n"
-
-#: ../../common/restricted_token.c:132
-#, c-format
-msgid "%s: could not start process for command \"%s\": error code %lu\n"
-msgstr "%s: ��������������� \"%s\"������������: ��������� %lu\n"
-
-#: ../../common/restricted_token.c:170
-#, c-format
-msgid "%s: could not re-execute with restricted token: error code %lu\n"
-msgstr "%s: ������������������������������������: ��������� %lu\n"
-
-#: ../../common/restricted_token.c:186
-#, c-format
-msgid "%s: could not get exit code from subprocess: error code %lu\n"
-msgstr "%s: ���������������������������������: ��������� %lu\n"
-
-#. translator: the second %s is a command line argument (-e, etc)
-#: pg_resetxlog.c:140 pg_resetxlog.c:155 pg_resetxlog.c:170 pg_resetxlog.c:177
-#: pg_resetxlog.c:201 pg_resetxlog.c:216 pg_resetxlog.c:224 pg_resetxlog.c:250
-#: pg_resetxlog.c:264
-#, c-format
-msgid "%s: invalid argument for option %s\n"
-msgstr "%s:���������%s���������������\n"
-
-#: pg_resetxlog.c:141 pg_resetxlog.c:156 pg_resetxlog.c:171 pg_resetxlog.c:178
-#: pg_resetxlog.c:202 pg_resetxlog.c:217 pg_resetxlog.c:225 pg_resetxlog.c:251
-#: pg_resetxlog.c:265 pg_resetxlog.c:272 pg_resetxlog.c:285 pg_resetxlog.c:293
-#, c-format
-msgid "Try \"%s --help\" for more information.\n"
-msgstr "������ \"%s --help\" ���������������������.\n"
-
-#: pg_resetxlog.c:146
-#, c-format
-msgid "%s: transaction ID epoch (-e) must not be -1\n"
-msgstr "%s: ������ID epoch(-e) ��������� -1\n"
-
-#: pg_resetxlog.c:161
-#, c-format
-msgid "%s: transaction ID (-x) must not be 0\n"
-msgstr "%s: ������ ID (-x) ��������� 0\n"
-
-#: pg_resetxlog.c:185 pg_resetxlog.c:192
-#, c-format
-msgid ""
-"%s: transaction ID (-c) must be either 0 or greater than or equal to 2\n"
-msgstr "%s���������ID (-c) ���������0������������������2\n"
-
-#: pg_resetxlog.c:207
-#, c-format
-msgid "%s: OID (-o) must not be 0\n"
-msgstr "%s: OID (-o) ��������� 0\n"
-
-#: pg_resetxlog.c:230
-#, c-format
-msgid "%s: multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ��������� ID (-m) ��������� 0\n"
-
-#: pg_resetxlog.c:240
-#, c-format
-msgid "%s: oldest multitransaction ID (-m) must not be 0\n"
-msgstr "%s: ������������������ ID (-m) ��������� 0\n"
-
-#: pg_resetxlog.c:256
-#, c-format
-msgid "%s: multitransaction offset (-O) must not be -1\n"
-msgstr "%s: ��������� ������ (-O) ���������-1\n"
-
-#: pg_resetxlog.c:283
-#, c-format
-msgid "%s: too many command-line arguments (first is \"%s\")\n"
-msgstr "%s: ��������������������� (������������ \"%s\")\n"
-
-#: pg_resetxlog.c:292
-#, c-format
-msgid "%s: no data directory specified\n"
-msgstr "%s: ������������������������\n"
-
-#: pg_resetxlog.c:306
-#, c-format
-msgid "%s: cannot be executed by \"root\"\n"
-msgstr "%s:���������\"root\"������\n"
-
-#: pg_resetxlog.c:308
-#, c-format
-msgid "You must run %s as the PostgreSQL superuser.\n"
-msgstr "���������������PostgreSQL������������������%s.\n"
-
-# command.c:256
-#: pg_resetxlog.c:318
-#, c-format
-msgid "%s: could not change directory to \"%s\": %s\n"
-msgstr "%s: ��������������������� \"%s\": %s\n"
-
-#: pg_resetxlog.c:331 pg_resetxlog.c:477
-#, c-format
-msgid "%s: could not open file \"%s\" for reading: %s\n"
-msgstr "%s: ������������������ \"%s\" ������������: %s\n"
-
-#: pg_resetxlog.c:338
-#, c-format
-msgid ""
-"%s: lock file \"%s\" exists\n"
-"Is a server running? If not, delete the lock file and try again.\n"
-msgstr ""
-"%s: ��������� \"%s\" ������������\n"
-"���������������������������������? ������������, ���������������������������������������.\n"
-
-#: pg_resetxlog.c:425
-#, c-format
-msgid ""
-"\n"
-"If these values seem acceptable, use -f to force reset.\n"
-msgstr ""
-"\n"
-"������������������������, ��� -f ������������.\n"
-
-#: pg_resetxlog.c:437
-#, c-format
-msgid ""
-"The database server was not shut down cleanly.\n"
-"Resetting the transaction log might cause data to be lost.\n"
-"If you want to proceed anyway, use -f to force reset.\n"
-msgstr ""
-"������������������������������������.\n"
-"������������������������������������������������.\n"
-"���������������������, ��� -f ������������.\n"
-
-#: pg_resetxlog.c:451
-#, c-format
-msgid "Transaction log reset\n"
-msgstr "������������������\n"
-
-#: pg_resetxlog.c:480
-#, c-format
-msgid ""
-"If you are sure the data directory path is correct, execute\n"
-" touch %s\n"
-"and try again.\n"
-msgstr ""
-"���������������������������������������������, ������\n"
-" touch %s\n"
-"������������������.\n"
-
-#: pg_resetxlog.c:493
-#, c-format
-msgid "%s: could not read file \"%s\": %s\n"
-msgstr "%s: ������������������ \"%s\": %s\n"
-
-#: pg_resetxlog.c:516
-#, c-format
-msgid "%s: pg_control exists but has invalid CRC; proceed with caution\n"
-msgstr "%s: pg_control ������������, ���������������CRC; ���������������������������\n"
-
-#: pg_resetxlog.c:525
-#, c-format
-msgid "%s: pg_control exists but is broken or unknown version; ignoring it\n"
-msgstr "%s: pg_control ������������, ���������������������������; ���������\n"
-
-#: pg_resetxlog.c:628
-#, c-format
-msgid ""
-"Guessed pg_control values:\n"
-"\n"
-msgstr ""
-"��������� pg_control ���:\n"
-"\n"
-
-#: pg_resetxlog.c:630
-#, c-format
-msgid ""
-"Current pg_control values:\n"
-"\n"
-msgstr ""
-"��������� pg_control ���:\n"
-"\n"
-
-#: pg_resetxlog.c:639
-#, c-format
-msgid "pg_control version number: %u\n"
-msgstr "pg_control ������: %u\n"
-
-#: pg_resetxlog.c:641
-#, c-format
-msgid "Catalog version number: %u\n"
-msgstr "Catalog ������: %u\n"
-
-#: pg_resetxlog.c:643
-#, c-format
-msgid "Database system identifier: %s\n"
-msgstr "������������������������: %s\n"
-
-#: pg_resetxlog.c:645
-#, c-format
-msgid "Latest checkpoint's TimeLineID: %u\n"
-msgstr "������������������ TimeLineID: %u\n"
-
-#: pg_resetxlog.c:647
-#, c-format
-msgid "Latest checkpoint's full_page_writes: %s\n"
-msgstr "������������������full_page_writes: %s\n"
-
-# help.c:48
-#: pg_resetxlog.c:648
-msgid "off"
-msgstr "������"
-
-# help.c:48
-#: pg_resetxlog.c:648
-msgid "on"
-msgstr "������"
-
-#: pg_resetxlog.c:649
-#, c-format
-#| msgid "Latest checkpoint's NextXID: %u/%u\n"
-msgid "Latest checkpoint's NextXID: %u:%u\n"
-msgstr "������������������NextXID: %u:%u\n"
-
-#: pg_resetxlog.c:652
-#, c-format
-msgid "Latest checkpoint's NextOID: %u\n"
-msgstr "������������������ NextOID: %u\n"
-
-#: pg_resetxlog.c:654
-#, c-format
-msgid "Latest checkpoint's NextMultiXactId: %u\n"
-msgstr "������������������ NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:656
-#, c-format
-msgid "Latest checkpoint's NextMultiOffset: %u\n"
-msgstr "������������������ NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:658
-#, c-format
-msgid "Latest checkpoint's oldestXID: %u\n"
-msgstr "������������������oldestXID: %u\n"
-
-#: pg_resetxlog.c:660
-#, c-format
-msgid "Latest checkpoint's oldestXID's DB: %u\n"
-msgstr "������������������oldestXID������������������: %u\n"
-
-#: pg_resetxlog.c:662
-#, c-format
-msgid "Latest checkpoint's oldestActiveXID: %u\n"
-msgstr "������������������oldestActiveXID: %u\n"
-
-#: pg_resetxlog.c:664
-#, c-format
-msgid "Latest checkpoint's oldestMultiXid: %u\n"
-msgstr "������������������oldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:666
-#, c-format
-msgid "Latest checkpoint's oldestMulti's DB: %u\n"
-msgstr "������������������oldestMulti������������������: %u\n"
-
-#: pg_resetxlog.c:668
-#, c-format
-#| msgid "Latest checkpoint's oldestCommitTs: %u\n"
-msgid "Latest checkpoint's oldestCommitTsXid:%u\n"
-msgstr "������������������oldestCommitTsXid:%u\n"
-
-#: pg_resetxlog.c:670
-#, c-format
-#| msgid "Latest checkpoint's newestCommitTs: %u\n"
-msgid "Latest checkpoint's newestCommitTsXid:%u\n"
-msgstr "������������������newestCommitTsXid:%u\n"
-
-#: pg_resetxlog.c:672
-#, c-format
-msgid "Maximum data alignment: %u\n"
-msgstr "���������������������: %u\n"
-
-#: pg_resetxlog.c:675
-#, c-format
-msgid "Database block size: %u\n"
-msgstr "������������������: %u\n"
-
-#: pg_resetxlog.c:677
-#, c-format
-msgid "Blocks per segment of large relation: %u\n"
-msgstr "������������������������: %u\n"
-
-#: pg_resetxlog.c:679
-#, c-format
-msgid "WAL block size: %u\n"
-msgstr "WAL���������: %u\n"
-
-#: pg_resetxlog.c:681
-#, c-format
-msgid "Bytes per WAL segment: %u\n"
-msgstr "��������� WAL ������������: %u\n"
-
-#: pg_resetxlog.c:683
-#, c-format
-msgid "Maximum length of identifiers: %u\n"
-msgstr "������������������������: %u\n"
-
-#: pg_resetxlog.c:685
-#, c-format
-msgid "Maximum columns in an index: %u\n"
-msgstr "���������������������������������: %u\n"
-
-#: pg_resetxlog.c:687
-#, c-format
-msgid "Maximum size of a TOAST chunk: %u\n"
-msgstr "������TOAST���������������������: %u\n"
-
-#: pg_resetxlog.c:689
-#, c-format
-msgid "Size of a large-object chunk: %u\n"
-msgstr "������������������������������: %u\n"
-
-#: pg_resetxlog.c:691
-#, c-format
-msgid "Date/time type storage: %s\n"
-msgstr "������/������������������: %s\n"
-
-#: pg_resetxlog.c:692
-msgid "64-bit integers"
-msgstr "64���������"
-
-#: pg_resetxlog.c:692
-msgid "floating-point numbers"
-msgstr "���������"
-
-#: pg_resetxlog.c:693
-#, c-format
-msgid "Float4 argument passing: %s\n"
-msgstr "������������Float4���������������: %s\n"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by reference"
-msgstr "���������"
-
-#: pg_resetxlog.c:694 pg_resetxlog.c:696
-msgid "by value"
-msgstr "������"
-
-#: pg_resetxlog.c:695
-#, c-format
-msgid "Float8 argument passing: %s\n"
-msgstr "������������Float8���������������: %s\n"
-
-#: pg_resetxlog.c:697
-#, c-format
-msgid "Data page checksum version: %u\n"
-msgstr "������������������������: %u\n"
-
-#: pg_resetxlog.c:711
-#, c-format
-msgid ""
-"\n"
-"\n"
-"Values to be changed:\n"
-"\n"
-msgstr ""
-"\n"
-"\n"
-"������������������:\n"
-"\n"
-
-#: pg_resetxlog.c:714
-#, c-format
-msgid "First log segment after reset: %s\n"
-msgstr "������������������������������: %s\n"
-
-#: pg_resetxlog.c:718
-#, c-format
-msgid "NextMultiXactId: %u\n"
-msgstr "���������MultiXactId���NextMultiXactId: %u\n"
-
-#: pg_resetxlog.c:720
-#, c-format
-msgid "OldestMultiXid: %u\n"
-msgstr "���������MultiXid���OldestMultiXid: %u\n"
-
-#: pg_resetxlog.c:722
-#, c-format
-msgid "OldestMulti's DB: %u\n"
-msgstr "���������MultiXid���������DB: %u\n"
-
-#: pg_resetxlog.c:728
-#, c-format
-msgid "NextMultiOffset: %u\n"
-msgstr "���������������NextMultiOffset: %u\n"
-
-#: pg_resetxlog.c:734
-#, c-format
-msgid "NextOID: %u\n"
-msgstr "NextOID: %u\n"
-
-#: pg_resetxlog.c:740
-#, c-format
-msgid "NextXID: %u\n"
-msgstr "NextXID: %u\n"
-
-#: pg_resetxlog.c:742
-#, c-format
-msgid "OldestXID: %u\n"
-msgstr "OldestXID: %u\n"
-
-#: pg_resetxlog.c:744
-#, c-format
-msgid "OldestXID's DB: %u\n"
-msgstr "OldestXID's DB: %u\n"
-
-#: pg_resetxlog.c:750
-#, c-format
-msgid "NextXID epoch: %u\n"
-msgstr "NextXID ������: %u\n"
-
-#: pg_resetxlog.c:756
-#, c-format
-#| msgid "oldestCommitTs: %u\n"
-msgid "oldestCommitTsXid: %u\n"
-msgstr "oldestCommitTsXid��� %u\n"
-
-#: pg_resetxlog.c:761
-#, c-format
-#| msgid "newestCommitTs: %u\n"
-msgid "newestCommitTsXid: %u\n"
-msgstr "newestCommitTsXid��� %u\n"
-
-#: pg_resetxlog.c:827
-#, c-format
-msgid ""
-"%s: internal error -- sizeof(ControlFileData) is too large ... fix "
-"PG_CONTROL_SIZE\n"
-msgstr "%s: ������������ -- sizeof(ControlFileData) ������ ... ������ xlog.c\n"
-
-#: pg_resetxlog.c:842
-#, c-format
-msgid "%s: could not create pg_control file: %s\n"
-msgstr "%s: ������������ pg_control ������: %s\n"
-
-#: pg_resetxlog.c:853
-#, c-format
-msgid "%s: could not write pg_control file: %s\n"
-msgstr "%s: ��������� pg_control ������: %s\n"
-
-#: pg_resetxlog.c:860 pg_resetxlog.c:1156
-#, c-format
-msgid "%s: fsync error: %s\n"
-msgstr "%s: fsync ������: %s\n"
-
-#: pg_resetxlog.c:900 pg_resetxlog.c:971 pg_resetxlog.c:1022
-#, c-format
-msgid "%s: could not open directory \"%s\": %s\n"
-msgstr "%s: ������������������ \"%s\": %s\n"
-
-#: pg_resetxlog.c:936 pg_resetxlog.c:993 pg_resetxlog.c:1047
-#, c-format
-msgid "%s: could not read directory \"%s\": %s\n"
-msgstr "%s: ������������������ \"%s\": %s\n"
-
-#: pg_resetxlog.c:943 pg_resetxlog.c:1000 pg_resetxlog.c:1054
-#, c-format
-msgid "%s: could not close directory \"%s\": %s\n"
-msgstr "%s: ������������������ \"%s\": %s\n"
-
-#: pg_resetxlog.c:984 pg_resetxlog.c:1038
-#, c-format
-msgid "%s: could not delete file \"%s\": %s\n"
-msgstr "%s: ������������������ \"%s\": %s\n"
-
-#: pg_resetxlog.c:1123
-#, c-format
-msgid "%s: could not open file \"%s\": %s\n"
-msgstr "%s: ������������������ \"%s\": %s\n"
-
-#: pg_resetxlog.c:1134 pg_resetxlog.c:1148
-#, c-format
-msgid "%s: could not write file \"%s\": %s\n"
-msgstr "%s: ��������������� \"%s\": %s\n"
-
-#: pg_resetxlog.c:1167
-#, c-format
-msgid ""
-"%s resets the PostgreSQL transaction log.\n"
-"\n"
-msgstr ""
-"%s ������ PostgreSQL ������������.\n"
-"\n"
-
-#: pg_resetxlog.c:1168
-#, c-format
-msgid ""
-"Usage:\n"
-" %s [OPTION]... DATADIR\n"
-"\n"
-msgstr ""
-"������������:\n"
-" %s [������]... ������������\n"
-"\n"
-
-#: pg_resetxlog.c:1169
-#, c-format
-msgid "Options:\n"
-msgstr "������:\n"
-
-#: pg_resetxlog.c:1170
-#, c-format
-msgid ""
-" -c XID,XID set oldest and newest transactions bearing commit "
-"timestamp\n"
-msgstr " -c XID,XID ���������������������������������������������������\n"
-
-#: pg_resetxlog.c:1171
-#, c-format
-msgid " (zero in either value means no change)\n"
-msgstr " ������������������������������������������\n"
-
-#: pg_resetxlog.c:1172
-#, c-format
-msgid " [-D] DATADIR data directory\n"
-msgstr " [-D] DATADIR ������������\n"
-
-#: pg_resetxlog.c:1173
-#, c-format
-msgid " -e XIDEPOCH set next transaction ID epoch\n"
-msgstr " -e XIDEPOCH ���������������������ID���������������epoch���\n"
-
-#: pg_resetxlog.c:1174
-#, c-format
-msgid " -f force update to be done\n"
-msgstr " -f ������������\n"
-
-#: pg_resetxlog.c:1175
-#, c-format
-msgid ""
-" -l XLOGFILE force minimum WAL starting location for new transaction "
-"log\n"
-msgstr " -l XLOGFILE ���������������������������������������WAL������������������\n"
-
-#: pg_resetxlog.c:1176
-#, c-format
-msgid " -m MXID,MXID set next and oldest multitransaction ID\n"
-msgstr " -m MXID,MXID ������������������������������������������ID\n"
-
-#: pg_resetxlog.c:1177
-#, c-format
-msgid ""
-" -n no update, just show what would be done (for testing)\n"
-msgstr " -n ���������, ������������������������ (������������)\n"
-
-#: pg_resetxlog.c:1178
-#, c-format
-msgid " -o OID set next OID\n"
-msgstr " -o OID ��������������� OID\n"
-
-#: pg_resetxlog.c:1179
-#, c-format
-msgid " -O OFFSET set next multitransaction offset\n"
-msgstr " -O OFFSET ���������������������������multitransaction���������\n"
-
-#: pg_resetxlog.c:1180
-#, c-format
-msgid " -V, --version output version information, then exit\n"
-msgstr " -V, --version ���������������������������������\n"
-
-#: pg_resetxlog.c:1181
-#, c-format
-msgid " -x XID set next transaction ID\n"
-msgstr " -x XID ��������������������� ID\n"
-
-#: pg_resetxlog.c:1182
-#, c-format
-msgid " -?, --help show this help, then exit\n"
-msgstr " -?, --help ���������������������������������\n"
-
-#: pg_resetxlog.c:1183
-#, c-format
-msgid ""
-"\n"
-"Report bugs to <pgsql-bugs@postgresql.org>.\n"
-msgstr ""
-"\n"
-"��������������� <pgsql-bugs@postgresql.org>.\n"
-
-#~ msgid "%s: invalid argument for option -x\n"
-#~ msgstr "%s: ��� -x ���������������������\n"
-
-#~ msgid "%s: invalid argument for option -o\n"
-#~ msgstr "%s: ��� -o ���������������������\n"
-
-#~ msgid "%s: invalid argument for option -m\n"
-#~ msgstr "%s: ������������-m ������������\n"
-
-#~ msgid "%s: invalid argument for option -O\n"
-#~ msgstr "%s: ������������-O ������������\n"
-
-#~ msgid "%s: invalid argument for option -l\n"
-#~ msgstr "%s: ��� -l ���������������������\n"
-
-#~ msgid "First log file ID after reset: %u\n"
-#~ msgstr "���������������������������������ID: %u\n"
-
-#~ msgid "%s: invalid argument for -o option\n"
-#~ msgstr "%s: ��� -o ���������������������\n"
-
-#~ msgid "%s: invalid argument for -x option\n"
-#~ msgstr "%s: ��� -x ���������������������\n"
-
-#~ msgid "Latest checkpoint's StartUpID: %u\n"
-#~ msgstr "������������������ StartUpID: %u\n"
-
-#~ msgid "Maximum number of function arguments: %u\n"
-#~ msgstr "���������������������������: %u\n"
-
-#~ msgid "%s: invalid LC_CTYPE setting\n"
-#~ msgstr "%s: ��������� LC_CTYPE ������\n"
-
-#~ msgid "%s: invalid LC_COLLATE setting\n"
-#~ msgstr "%s: ��������� LC_COLLATE ������\n"
-
-#~ msgid " --version output version information, then exit\n"
-#~ msgstr " --version ������������������, ������������\n"
-
-#~ msgid " --help show this help, then exit\n"
-#~ msgstr " --help ���������������������, ������������\n"
-
-#~ msgid "%s: could not read from directory \"%s\": %s\n"
-#~ msgstr "%s: ��������������� \"%s\" ���������: %s\n"
diff --git a/src/bin/pg_upgrade/controldata.c b/src/bin/pg_upgrade/controldata.c
index b9387ff..b075e26 100644
--- a/src/bin/pg_upgrade/controldata.c
+++ b/src/bin/pg_upgrade/controldata.c
@@ -18,16 +18,16 @@
*
* gets pg_control information in "ctrl". Assumes that bindir and
* datadir are valid absolute paths to postgresql bin and pgdata
- * directories respectively *and* pg_resetxlog is version compatible
+ * directories respectively *and* pg_resetwal is version compatible
* with datadir. The main purpose of this function is to get pg_control
* data in a version independent manner.
*
- * The approach taken here is to invoke pg_resetxlog with -n option
+ * The approach taken here is to invoke pg_resetwal with -n option
* and then pipe its output. With little string parsing we get the
- * pg_control data. pg_resetxlog cannot be run while the server is running
+ * pg_control data. pg_resetwal cannot be run while the server is running
* so we use pg_controldata; pg_controldata doesn't provide all the fields
* we need to actually perform the upgrade, but it provides enough for
- * check mode. We do not implement pg_resetxlog -n because it is hard to
+ * check mode. We do not implement pg_resetwal -n because it is hard to
* return valid xid data for a running server.
*/
void
@@ -73,7 +73,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
/*
- * Because we test the pg_resetxlog output as strings, it has to be in
+ * Because we test the pg_resetwal output as strings, it has to be in
* English. Copied from pg_regress.c.
*/
if (getenv("LC_COLLATE"))
@@ -113,7 +113,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
snprintf(cmd, sizeof(cmd), "\"%s/%s \"%s\"",
cluster->bindir,
- live_check ? "pg_controldata\"" : "pg_resetxlog\" -n",
+ live_check ? "pg_controldata\"" : "pg_resetwal\" -n",
cluster->pgdata);
fflush(stdout);
fflush(stderr);
@@ -139,7 +139,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
p = strchr(p, ':');
if (p == NULL || strlen(p) <= 1)
- pg_fatal("%d: pg_resetxlog problem\n", __LINE__);
+ pg_fatal("%d: pg_resetwal problem\n", __LINE__);
p++; /* remove ':' char */
cluster->controldata.ctrl_ver = str2uint(p);
@@ -440,7 +440,7 @@ get_control_data(ClusterInfo *cluster, bool live_check)
pg_free(lc_messages);
/*
- * Before 9.3, pg_resetxlog reported the xlogid and segno of the first log
+ * Before 9.3, pg_resetwal reported the xlogid and segno of the first log
* file after reset as separate lines. Starting with 9.3, it reports the
* WAL file name. If the old cluster is older than 9.3, we construct the
* WAL file name from the xlogid and segno.
diff --git a/src/bin/pg_upgrade/exec.c b/src/bin/pg_upgrade/exec.c
index 3a30ea7..c74521f 100644
--- a/src/bin/pg_upgrade/exec.c
+++ b/src/bin/pg_upgrade/exec.c
@@ -335,7 +335,7 @@ check_bin_dir(ClusterInfo *cluster)
validate_exec(cluster->bindir, "postgres");
validate_exec(cluster->bindir, "pg_ctl");
- validate_exec(cluster->bindir, "pg_resetxlog");
+ validate_exec(cluster->bindir, "pg_resetwal");
if (cluster == &new_cluster)
{
/* these are only needed in the new cluster */
diff --git a/src/bin/pg_upgrade/pg_upgrade.c b/src/bin/pg_upgrade/pg_upgrade.c
index 797e36d..145d2da 100644
--- a/src/bin/pg_upgrade/pg_upgrade.c
+++ b/src/bin/pg_upgrade/pg_upgrade.c
@@ -147,7 +147,7 @@ main(int argc, char **argv)
*/
prep_status("Setting next OID for new cluster");
exec_prog(UTILITY_LOG_FILE, NULL, true,
- "\"%s/pg_resetxlog\" -o %u \"%s\"",
+ "\"%s/pg_resetwal\" -o %u \"%s\"",
new_cluster.bindir, old_cluster.controldata.chkpnt_nxtoid,
new_cluster.pgdata);
check_ok();
@@ -408,16 +408,16 @@ copy_clog_xlog_xid(void)
/* set the next transaction id and epoch of the new cluster */
prep_status("Setting next transaction ID and epoch for new cluster");
exec_prog(UTILITY_LOG_FILE, NULL, true,
- "\"%s/pg_resetxlog\" -f -x %u \"%s\"",
+ "\"%s/pg_resetwal\" -f -x %u \"%s\"",
new_cluster.bindir, old_cluster.controldata.chkpnt_nxtxid,
new_cluster.pgdata);
exec_prog(UTILITY_LOG_FILE, NULL, true,
- "\"%s/pg_resetxlog\" -f -e %u \"%s\"",
+ "\"%s/pg_resetwal\" -f -e %u \"%s\"",
new_cluster.bindir, old_cluster.controldata.chkpnt_nxtepoch,
new_cluster.pgdata);
/* must reset commit timestamp limits also */
exec_prog(UTILITY_LOG_FILE, NULL, true,
- "\"%s/pg_resetxlog\" -f -c %u,%u \"%s\"",
+ "\"%s/pg_resetwal\" -f -c %u,%u \"%s\"",
new_cluster.bindir,
old_cluster.controldata.chkpnt_nxtxid,
old_cluster.controldata.chkpnt_nxtxid,
@@ -443,7 +443,7 @@ copy_clog_xlog_xid(void)
* counters here and the oldest multi present on system.
*/
exec_prog(UTILITY_LOG_FILE, NULL, true,
- "\"%s/pg_resetxlog\" -O %u -m %u,%u \"%s\"",
+ "\"%s/pg_resetwal\" -O %u -m %u,%u \"%s\"",
new_cluster.bindir,
old_cluster.controldata.chkpnt_nxtmxoff,
old_cluster.controldata.chkpnt_nxtmulti,
@@ -471,7 +471,7 @@ copy_clog_xlog_xid(void)
* next=MaxMultiXactId, but multixact.c can cope with that just fine.
*/
exec_prog(UTILITY_LOG_FILE, NULL, true,
- "\"%s/pg_resetxlog\" -m %u,%u \"%s\"",
+ "\"%s/pg_resetwal\" -m %u,%u \"%s\"",
new_cluster.bindir,
old_cluster.controldata.chkpnt_nxtmulti + 1,
old_cluster.controldata.chkpnt_nxtmulti,
@@ -483,7 +483,7 @@ copy_clog_xlog_xid(void)
prep_status("Resetting WAL archives");
exec_prog(UTILITY_LOG_FILE, NULL, true,
/* use timeline 1 to match controldata and no WAL history file */
- "\"%s/pg_resetxlog\" -l 00000001%s \"%s\"", new_cluster.bindir,
+ "\"%s/pg_resetwal\" -l 00000001%s \"%s\"", new_cluster.bindir,
old_cluster.controldata.nextxlogfile + 8,
new_cluster.pgdata);
check_ok();
diff --git a/src/bin/pg_waldump/.gitignore b/src/bin/pg_waldump/.gitignore
new file mode 100644
index 0000000..0013a93
--- /dev/null
+++ b/src/bin/pg_waldump/.gitignore
@@ -0,0 +1,4 @@
+/pg_waldump
+# Source files copied from src/backend/access/rmgrdesc/
+/*desc.c
+/xlogreader.c
diff --git a/src/bin/pg_waldump/Makefile b/src/bin/pg_waldump/Makefile
new file mode 100644
index 0000000..f5957bd
--- /dev/null
+++ b/src/bin/pg_waldump/Makefile
@@ -0,0 +1,40 @@
+# src/bin/pg_waldump/Makefile
+
+PGFILEDESC = "pg_waldump - decode and display WAL"
+PGAPPICON=win32
+
+subdir = src/bin/pg_waldump
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+OBJS = pg_waldump.o compat.o xlogreader.o rmgrdesc.o \
+ $(RMGRDESCOBJS) $(WIN32RES)
+
+override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
+
+RMGRDESCSOURCES = $(sort $(notdir $(wildcard $(top_srcdir)/src/backend/access/rmgrdesc/*desc.c)))
+RMGRDESCOBJS = $(patsubst %.c,%.o,$(RMGRDESCSOURCES))
+
+
+all: pg_waldump
+
+pg_waldump: $(OBJS) | submake-libpgport
+ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
+
+xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/%
+ rm -f $@ && $(LN_S) $< .
+
+$(RMGRDESCSOURCES): % : $(top_srcdir)/src/backend/access/rmgrdesc/%
+ rm -f $@ && $(LN_S) $< .
+
+install: all installdirs
+ $(INSTALL_PROGRAM) pg_waldump$(X) '$(DESTDIR)$(bindir)/pg_waldump$(X)'
+
+installdirs:
+ $(MKDIR_P) '$(DESTDIR)$(bindir)'
+
+uninstall:
+ rm -f '$(DESTDIR)$(bindir)/pg_waldump$(X)'
+
+clean distclean maintainer-clean:
+ rm -f pg_waldump$(X) $(OBJS) $(RMGRDESCSOURCES) xlogreader.c
diff --git a/src/bin/pg_waldump/compat.c b/src/bin/pg_waldump/compat.c
new file mode 100644
index 0000000..e9ceef5
--- /dev/null
+++ b/src/bin/pg_waldump/compat.c
@@ -0,0 +1,99 @@
+/*-------------------------------------------------------------------------
+ *
+ * compat.c
+ * Reimplementations of various backend functions.
+ *
+ * Portions Copyright (c) 2013-2017, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_waldump/compat.c
+ *
+ * This file contains client-side implementations for various backend
+ * functions that the rm_desc functions in *desc.c files rely on.
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/* ugly hack, same as in e.g pg_controldata */
+#define FRONTEND 1
+#include "postgres.h"
+
+#include <time.h>
+
+#include "utils/datetime.h"
+#include "lib/stringinfo.h"
+
+/* copied from timestamp.c */
+pg_time_t
+timestamptz_to_time_t(TimestampTz t)
+{
+ pg_time_t result;
+
+#ifdef HAVE_INT64_TIMESTAMP
+ result = (pg_time_t) (t / USECS_PER_SEC +
+ ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY));
+#else
+ result = (pg_time_t) (t +
+ ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY));
+#endif
+ return result;
+}
+
+/*
+ * Stopgap implementation of timestamptz_to_str that doesn't depend on backend
+ * infrastructure. This will work for timestamps that are within the range
+ * of the platform time_t type. (pg_time_t is compatible except for possibly
+ * being wider.)
+ *
+ * XXX the return value points to a static buffer, so beware of using more
+ * than one result value concurrently.
+ *
+ * XXX: The backend timestamp infrastructure should instead be split out and
+ * moved into src/common. That's a large project though.
+ */
+const char *
+timestamptz_to_str(TimestampTz dt)
+{
+ static char buf[MAXDATELEN + 1];
+ char ts[MAXDATELEN + 1];
+ char zone[MAXDATELEN + 1];
+ time_t result = (time_t) timestamptz_to_time_t(dt);
+ struct tm *ltime = localtime(&result);
+
+ strftime(ts, sizeof(ts), "%Y-%m-%d %H:%M:%S", ltime);
+ strftime(zone, sizeof(zone), "%Z", ltime);
+
+#ifdef HAVE_INT64_TIMESTAMP
+ sprintf(buf, "%s.%06d %s", ts, (int) (dt % USECS_PER_SEC), zone);
+#else
+ sprintf(buf, "%s.%.6f %s", ts, fabs(dt - floor(dt)), zone);
+#endif
+
+ return buf;
+}
+
+/*
+ * Provide a hacked up compat layer for StringInfos so xlog desc functions can
+ * be linked/called.
+ */
+void
+appendStringInfo(StringInfo str, const char *fmt,...)
+{
+ va_list args;
+
+ va_start(args, fmt);
+ vprintf(fmt, args);
+ va_end(args);
+}
+
+void
+appendStringInfoString(StringInfo str, const char *string)
+{
+ appendStringInfo(str, "%s", string);
+}
+
+void
+appendStringInfoChar(StringInfo str, char ch)
+{
+ appendStringInfo(str, "%c", ch);
+}
diff --git a/src/bin/pg_waldump/nls.mk b/src/bin/pg_waldump/nls.mk
new file mode 100644
index 0000000..52f06da
--- /dev/null
+++ b/src/bin/pg_waldump/nls.mk
@@ -0,0 +1,6 @@
+# src/bin/pg_waldump/nls.mk
+CATALOG_NAME = pg_waldump
+AVAIL_LANGUAGES =
+GETTEXT_FILES = pg_waldump.c
+GETTEXT_TRIGGERS = fatal_error
+GETTEXT_FLAGS = fatal_error:1:c-format
diff --git a/src/bin/pg_waldump/pg_waldump.c b/src/bin/pg_waldump/pg_waldump.c
new file mode 100644
index 0000000..a7c9051
--- /dev/null
+++ b/src/bin/pg_waldump/pg_waldump.c
@@ -0,0 +1,1064 @@
+/*-------------------------------------------------------------------------
+ *
+ * pg_waldump.c - decode and display WAL
+ *
+ * Copyright (c) 2013-2017, PostgreSQL Global Development Group
+ *
+ * IDENTIFICATION
+ * src/bin/pg_waldump/pg_waldump.c
+ *-------------------------------------------------------------------------
+ */
+
+#define FRONTEND 1
+#include "postgres.h"
+
+#include <dirent.h>
+#include <unistd.h>
+
+#include "access/xlogreader.h"
+#include "access/xlogrecord.h"
+#include "access/xlog_internal.h"
+#include "access/transam.h"
+#include "common/fe_memutils.h"
+#include "getopt_long.h"
+#include "rmgrdesc.h"
+
+
+static const char *progname;
+
+typedef struct XLogDumpPrivate
+{
+ TimeLineID timeline;
+ char *inpath;
+ XLogRecPtr startptr;
+ XLogRecPtr endptr;
+ bool endptr_reached;
+} XLogDumpPrivate;
+
+typedef struct XLogDumpConfig
+{
+ /* display options */
+ bool bkp_details;
+ int stop_after_records;
+ int already_displayed_records;
+ bool follow;
+ bool stats;
+ bool stats_per_record;
+
+ /* filter options */
+ int filter_by_rmgr;
+ TransactionId filter_by_xid;
+ bool filter_by_xid_enabled;
+} XLogDumpConfig;
+
+typedef struct Stats
+{
+ uint64 count;
+ uint64 rec_len;
+ uint64 fpi_len;
+} Stats;
+
+#define MAX_XLINFO_TYPES 16
+
+typedef struct XLogDumpStats
+{
+ uint64 count;
+ Stats rmgr_stats[RM_NEXT_ID];
+ Stats record_stats[RM_NEXT_ID][MAX_XLINFO_TYPES];
+} XLogDumpStats;
+
+static void fatal_error(const char *fmt,...) pg_attribute_printf(1, 2);
+
+/*
+ * Big red button to push when things go horribly wrong.
+ */
+static void
+fatal_error(const char *fmt,...)
+{
+ va_list args;
+
+ fflush(stdout);
+
+ fprintf(stderr, _("%s: FATAL: "), progname);
+ va_start(args, fmt);
+ vfprintf(stderr, _(fmt), args);
+ va_end(args);
+ fputc('\n', stderr);
+
+ exit(EXIT_FAILURE);
+}
+
+static void
+print_rmgr_list(void)
+{
+ int i;
+
+ for (i = 0; i <= RM_MAX_ID; i++)
+ {
+ printf("%s\n", RmgrDescTable[i].rm_name);
+ }
+}
+
+/*
+ * Check whether directory exists and whether we can open it. Keep errno set so
+ * that the caller can report errors somewhat more accurately.
+ */
+static bool
+verify_directory(const char *directory)
+{
+ DIR *dir = opendir(directory);
+
+ if (dir == NULL)
+ return false;
+ closedir(dir);
+ return true;
+}
+
+/*
+ * Split a pathname as dirname(1) and basename(1) would.
+ *
+ * XXX this probably doesn't do very well on Windows. We probably need to
+ * apply canonicalize_path(), at the very least.
+ */
+static void
+split_path(const char *path, char **dir, char **fname)
+{
+ char *sep;
+
+ /* split filepath into directory & filename */
+ sep = strrchr(path, '/');
+
+ /* directory path */
+ if (sep != NULL)
+ {
+ *dir = pg_strdup(path);
+ (*dir)[(sep - path) + 1] = '\0'; /* no strndup */
+ *fname = pg_strdup(sep + 1);
+ }
+ /* local directory */
+ else
+ {
+ *dir = NULL;
+ *fname = pg_strdup(path);
+ }
+}
+
+/*
+ * Try to find the file in several places:
+ * if directory == NULL:
+ * fname
+ * XLOGDIR / fname
+ * $PGDATA / XLOGDIR / fname
+ * else
+ * directory / fname
+ * directory / XLOGDIR / fname
+ *
+ * return a read only fd
+ */
+static int
+fuzzy_open_file(const char *directory, const char *fname)
+{
+ int fd = -1;
+ char fpath[MAXPGPATH];
+
+ if (directory == NULL)
+ {
+ const char *datadir;
+
+ /* fname */
+ fd = open(fname, O_RDONLY | PG_BINARY, 0);
+ if (fd < 0 && errno != ENOENT)
+ return -1;
+ else if (fd >= 0)
+ return fd;
+
+ /* XLOGDIR / fname */
+ snprintf(fpath, MAXPGPATH, "%s/%s",
+ XLOGDIR, fname);
+ fd = open(fpath, O_RDONLY | PG_BINARY, 0);
+ if (fd < 0 && errno != ENOENT)
+ return -1;
+ else if (fd >= 0)
+ return fd;
+
+ datadir = getenv("PGDATA");
+ /* $PGDATA / XLOGDIR / fname */
+ if (datadir != NULL)
+ {
+ snprintf(fpath, MAXPGPATH, "%s/%s/%s",
+ datadir, XLOGDIR, fname);
+ fd = open(fpath, O_RDONLY | PG_BINARY, 0);
+ if (fd < 0 && errno != ENOENT)
+ return -1;
+ else if (fd >= 0)
+ return fd;
+ }
+ }
+ else
+ {
+ /* directory / fname */
+ snprintf(fpath, MAXPGPATH, "%s/%s",
+ directory, fname);
+ fd = open(fpath, O_RDONLY | PG_BINARY, 0);
+ if (fd < 0 && errno != ENOENT)
+ return -1;
+ else if (fd >= 0)
+ return fd;
+
+ /* directory / XLOGDIR / fname */
+ snprintf(fpath, MAXPGPATH, "%s/%s/%s",
+ directory, XLOGDIR, fname);
+ fd = open(fpath, O_RDONLY | PG_BINARY, 0);
+ if (fd < 0 && errno != ENOENT)
+ return -1;
+ else if (fd >= 0)
+ return fd;
+ }
+ return -1;
+}
+
+/*
+ * Read count bytes from a segment file in the specified directory, for the
+ * given timeline, containing the specified record pointer; store the data in
+ * the passed buffer.
+ */
+static void
+XLogDumpXLogRead(const char *directory, TimeLineID timeline_id,
+ XLogRecPtr startptr, char *buf, Size count)
+{
+ char *p;
+ XLogRecPtr recptr;
+ Size nbytes;
+
+ static int sendFile = -1;
+ static XLogSegNo sendSegNo = 0;
+ static uint32 sendOff = 0;
+
+ p = buf;
+ recptr = startptr;
+ nbytes = count;
+
+ while (nbytes > 0)
+ {
+ uint32 startoff;
+ int segbytes;
+ int readbytes;
+
+ startoff = recptr % XLogSegSize;
+
+ if (sendFile < 0 || !XLByteInSeg(recptr, sendSegNo))
+ {
+ char fname[MAXFNAMELEN];
+ int tries;
+
+ /* Switch to another logfile segment */
+ if (sendFile >= 0)
+ close(sendFile);
+
+ XLByteToSeg(recptr, sendSegNo);
+
+ XLogFileName(fname, timeline_id, sendSegNo);
+
+ /*
+ * In follow mode there is a short period of time after the
+ * server has written the end of the previous file before the
+ * new file is available. So we loop for 5 seconds looking
+ * for the file to appear before giving up.
+ */
+ for (tries = 0; tries < 10; tries++)
+ {
+ sendFile = fuzzy_open_file(directory, fname);
+ if (sendFile >= 0)
+ break;
+ if (errno == ENOENT)
+ {
+ int save_errno = errno;
+
+ /* File not there yet, try again */
+ pg_usleep(500 * 1000);
+
+ errno = save_errno;
+ continue;
+ }
+ /* Any other error, fall through and fail */
+ break;
+ }
+
+ if (sendFile < 0)
+ fatal_error("could not find file \"%s\": %s",
+ fname, strerror(errno));
+ sendOff = 0;
+ }
+
+ /* Need to seek in the file? */
+ if (sendOff != startoff)
+ {
+ if (lseek(sendFile, (off_t) startoff, SEEK_SET) < 0)
+ {
+ int err = errno;
+ char fname[MAXPGPATH];
+
+ XLogFileName(fname, timeline_id, sendSegNo);
+
+ fatal_error("could not seek in log segment %s to offset %u: %s",
+ fname, startoff, strerror(err));
+ }
+ sendOff = startoff;
+ }
+
+ /* How many bytes are within this segment? */
+ if (nbytes > (XLogSegSize - startoff))
+ segbytes = XLogSegSize - startoff;
+ else
+ segbytes = nbytes;
+
+ readbytes = read(sendFile, p, segbytes);
+ if (readbytes <= 0)
+ {
+ int err = errno;
+ char fname[MAXPGPATH];
+
+ XLogFileName(fname, timeline_id, sendSegNo);
+
+ fatal_error("could not read from log segment %s, offset %d, length %d: %s",
+ fname, sendOff, segbytes, strerror(err));
+ }
+
+ /* Update state for read */
+ recptr += readbytes;
+
+ sendOff += readbytes;
+ nbytes -= readbytes;
+ p += readbytes;
+ }
+}
+
+/*
+ * XLogReader read_page callback
+ */
+static int
+XLogDumpReadPage(XLogReaderState *state, XLogRecPtr targetPagePtr, int reqLen,
+ XLogRecPtr targetPtr, char *readBuff, TimeLineID *curFileTLI)
+{
+ XLogDumpPrivate *private = state->private_data;
+ int count = XLOG_BLCKSZ;
+
+ if (private->endptr != InvalidXLogRecPtr)
+ {
+ if (targetPagePtr + XLOG_BLCKSZ <= private->endptr)
+ count = XLOG_BLCKSZ;
+ else if (targetPagePtr + reqLen <= private->endptr)
+ count = private->endptr - targetPagePtr;
+ else
+ {
+ private->endptr_reached = true;
+ return -1;
+ }
+ }
+
+ XLogDumpXLogRead(private->inpath, private->timeline, targetPagePtr,
+ readBuff, count);
+
+ return count;
+}
+
+/*
+ * Store per-rmgr and per-record statistics for a given record.
+ */
+static void
+XLogDumpCountRecord(XLogDumpConfig *config, XLogDumpStats *stats,
+ XLogReaderState *record)
+{
+ RmgrId rmid;
+ uint8 recid;
+ uint32 rec_len;
+ uint32 fpi_len;
+ int block_id;
+
+ stats->count++;
+
+ rmid = XLogRecGetRmid(record);
+ rec_len = XLogRecGetDataLen(record) + SizeOfXLogRecord;
+
+ /*
+ * Calculate the amount of FPI data in the record.
+ *
+ * XXX: We peek into xlogreader's private decoded backup blocks for the
+ * bimg_len indicating the length of FPI data. It doesn't seem worth it to
+ * add an accessor macro for this.
+ */
+ fpi_len = 0;
+ for (block_id = 0; block_id <= record->max_block_id; block_id++)
+ {
+ if (XLogRecHasBlockImage(record, block_id))
+ fpi_len += record->blocks[block_id].bimg_len;
+ }
+
+ /* Update per-rmgr statistics */
+
+ stats->rmgr_stats[rmid].count++;
+ stats->rmgr_stats[rmid].rec_len += rec_len;
+ stats->rmgr_stats[rmid].fpi_len += fpi_len;
+
+ /*
+ * Update per-record statistics, where the record is identified by a
+ * combination of the RmgrId and the four bits of the xl_info field that
+ * are the rmgr's domain (resulting in sixteen possible entries per
+ * RmgrId).
+ */
+
+ recid = XLogRecGetInfo(record) >> 4;
+
+ stats->record_stats[rmid][recid].count++;
+ stats->record_stats[rmid][recid].rec_len += rec_len;
+ stats->record_stats[rmid][recid].fpi_len += fpi_len;
+}
+
+/*
+ * Print a record to stdout
+ */
+static void
+XLogDumpDisplayRecord(XLogDumpConfig *config, XLogReaderState *record)
+{
+ const char *id;
+ const RmgrDescData *desc = &RmgrDescTable[XLogRecGetRmid(record)];
+ RelFileNode rnode;
+ ForkNumber forknum;
+ BlockNumber blk;
+ int block_id;
+ uint8 info = XLogRecGetInfo(record);
+ XLogRecPtr xl_prev = XLogRecGetPrev(record);
+
+ id = desc->rm_identify(info);
+ if (id == NULL)
+ id = psprintf("UNKNOWN (%x)", info & ~XLR_INFO_MASK);
+
+ printf("rmgr: %-11s len (rec/tot): %6u/%6u, tx: %10u, lsn: %X/%08X, prev %X/%08X, ",
+ desc->rm_name,
+ XLogRecGetDataLen(record), XLogRecGetTotalLen(record),
+ XLogRecGetXid(record),
+ (uint32) (record->ReadRecPtr >> 32), (uint32) record->ReadRecPtr,
+ (uint32) (xl_prev >> 32), (uint32) xl_prev);
+ printf("desc: %s ", id);
+
+ /* the desc routine will printf the description directly to stdout */
+ desc->rm_desc(NULL, record);
+
+ if (!config->bkp_details)
+ {
+ /* print block references (short format) */
+ for (block_id = 0; block_id <= record->max_block_id; block_id++)
+ {
+ if (!XLogRecHasBlockRef(record, block_id))
+ continue;
+
+ XLogRecGetBlockTag(record, block_id, &rnode, &forknum, &blk);
+ if (forknum != MAIN_FORKNUM)
+ printf(", blkref #%u: rel %u/%u/%u fork %s blk %u",
+ block_id,
+ rnode.spcNode, rnode.dbNode, rnode.relNode,
+ forkNames[forknum],
+ blk);
+ else
+ printf(", blkref #%u: rel %u/%u/%u blk %u",
+ block_id,
+ rnode.spcNode, rnode.dbNode, rnode.relNode,
+ blk);
+ if (XLogRecHasBlockImage(record, block_id))
+ printf(" FPW");
+ }
+ putchar('\n');
+ }
+ else
+ {
+ /* print block references (detailed format) */
+ putchar('\n');
+ for (block_id = 0; block_id <= record->max_block_id; block_id++)
+ {
+ if (!XLogRecHasBlockRef(record, block_id))
+ continue;
+
+ XLogRecGetBlockTag(record, block_id, &rnode, &forknum, &blk);
+ printf("\tblkref #%u: rel %u/%u/%u fork %s blk %u",
+ block_id,
+ rnode.spcNode, rnode.dbNode, rnode.relNode,
+ forkNames[forknum],
+ blk);
+ if (XLogRecHasBlockImage(record, block_id))
+ {
+ if (record->blocks[block_id].bimg_info &
+ BKPIMAGE_IS_COMPRESSED)
+ {
+ printf(" (FPW); hole: offset: %u, length: %u, compression saved: %u\n",
+ record->blocks[block_id].hole_offset,
+ record->blocks[block_id].hole_length,
+ BLCKSZ -
+ record->blocks[block_id].hole_length -
+ record->blocks[block_id].bimg_len);
+ }
+ else
+ {
+ printf(" (FPW); hole: offset: %u, length: %u\n",
+ record->blocks[block_id].hole_offset,
+ record->blocks[block_id].hole_length);
+ }
+ }
+ putchar('\n');
+ }
+ }
+}
+
+/*
+ * Display a single row of record counts and sizes for an rmgr or record.
+ */
+static void
+XLogDumpStatsRow(const char *name,
+ uint64 n, uint64 total_count,
+ uint64 rec_len, uint64 total_rec_len,
+ uint64 fpi_len, uint64 total_fpi_len,
+ uint64 tot_len, uint64 total_len)
+{
+ double n_pct,
+ rec_len_pct,
+ fpi_len_pct,
+ tot_len_pct;
+
+ n_pct = 0;
+ if (total_count != 0)
+ n_pct = 100 * (double) n / total_count;
+
+ rec_len_pct = 0;
+ if (total_rec_len != 0)
+ rec_len_pct = 100 * (double) rec_len / total_rec_len;
+
+ fpi_len_pct = 0;
+ if (total_fpi_len != 0)
+ fpi_len_pct = 100 * (double) fpi_len / total_fpi_len;
+
+ tot_len_pct = 0;
+ if (total_len != 0)
+ tot_len_pct = 100 * (double) tot_len / total_len;
+
+ printf("%-27s "
+ "%20" INT64_MODIFIER "u (%6.02f) "
+ "%20" INT64_MODIFIER "u (%6.02f) "
+ "%20" INT64_MODIFIER "u (%6.02f) "
+ "%20" INT64_MODIFIER "u (%6.02f)\n",
+ name, n, n_pct, rec_len, rec_len_pct, fpi_len, fpi_len_pct,
+ tot_len, tot_len_pct);
+}
+
+
+/*
+ * Display summary statistics about the records seen so far.
+ */
+static void
+XLogDumpDisplayStats(XLogDumpConfig *config, XLogDumpStats *stats)
+{
+ int ri,
+ rj;
+ uint64 total_count = 0;
+ uint64 total_rec_len = 0;
+ uint64 total_fpi_len = 0;
+ uint64 total_len = 0;
+ double rec_len_pct,
+ fpi_len_pct;
+
+ /* ---
+ * Make a first pass to calculate column totals:
+ * count(*),
+ * sum(xl_len+SizeOfXLogRecord),
+ * sum(xl_tot_len-xl_len-SizeOfXLogRecord), and
+ * sum(xl_tot_len).
+ * These are used to calculate percentages for each record type.
+ * ---
+ */
+
+ for (ri = 0; ri < RM_NEXT_ID; ri++)
+ {
+ total_count += stats->rmgr_stats[ri].count;
+ total_rec_len += stats->rmgr_stats[ri].rec_len;
+ total_fpi_len += stats->rmgr_stats[ri].fpi_len;
+ }
+ total_len = total_rec_len + total_fpi_len;
+
+ /*
+ * 27 is strlen("Transaction/COMMIT_PREPARED"), 20 is strlen(2^64), 8 is
+ * strlen("(100.00%)")
+ */
+
+ printf("%-27s %20s %8s %20s %8s %20s %8s %20s %8s\n"
+ "%-27s %20s %8s %20s %8s %20s %8s %20s %8s\n",
+ "Type", "N", "(%)", "Record size", "(%)", "FPI size", "(%)", "Combined size", "(%)",
+ "----", "-", "---", "-----------", "---", "--------", "---", "-------------", "---");
+
+ for (ri = 0; ri < RM_NEXT_ID; ri++)
+ {
+ uint64 count,
+ rec_len,
+ fpi_len,
+ tot_len;
+ const RmgrDescData *desc = &RmgrDescTable[ri];
+
+ if (!config->stats_per_record)
+ {
+ count = stats->rmgr_stats[ri].count;
+ rec_len = stats->rmgr_stats[ri].rec_len;
+ fpi_len = stats->rmgr_stats[ri].fpi_len;
+ tot_len = rec_len + fpi_len;
+
+ XLogDumpStatsRow(desc->rm_name,
+ count, total_count, rec_len, total_rec_len,
+ fpi_len, total_fpi_len, tot_len, total_len);
+ }
+ else
+ {
+ for (rj = 0; rj < MAX_XLINFO_TYPES; rj++)
+ {
+ const char *id;
+
+ count = stats->record_stats[ri][rj].count;
+ rec_len = stats->record_stats[ri][rj].rec_len;
+ fpi_len = stats->record_stats[ri][rj].fpi_len;
+ tot_len = rec_len + fpi_len;
+
+ /* Skip undefined combinations and ones that didn't occur */
+ if (count == 0)
+ continue;
+
+ /* the upper four bits in xl_info are the rmgr's */
+ id = desc->rm_identify(rj << 4);
+ if (id == NULL)
+ id = psprintf("UNKNOWN (%x)", rj << 4);
+
+ XLogDumpStatsRow(psprintf("%s/%s", desc->rm_name, id),
+ count, total_count, rec_len, total_rec_len,
+ fpi_len, total_fpi_len, tot_len, total_len);
+ }
+ }
+ }
+
+ printf("%-27s %20s %8s %20s %8s %20s %8s %20s\n",
+ "", "--------", "", "--------", "", "--------", "", "--------");
+
+ /*
+ * The percentages in earlier rows were calculated against the column
+ * total, but the ones that follow are against the row total. Note that
+ * these are displayed with a % symbol to differentiate them from the
+ * earlier ones, and are thus up to 9 characters long.
+ */
+
+ rec_len_pct = 0;
+ if (total_len != 0)
+ rec_len_pct = 100 * (double) total_rec_len / total_len;
+
+ fpi_len_pct = 0;
+ if (total_len != 0)
+ fpi_len_pct = 100 * (double) total_fpi_len / total_len;
+
+ printf("%-27s "
+ "%20" INT64_MODIFIER "u %-9s"
+ "%20" INT64_MODIFIER "u %-9s"
+ "%20" INT64_MODIFIER "u %-9s"
+ "%20" INT64_MODIFIER "u %-6s\n",
+ "Total", stats->count, "",
+ total_rec_len, psprintf("[%.02f%%]", rec_len_pct),
+ total_fpi_len, psprintf("[%.02f%%]", fpi_len_pct),
+ total_len, "[100%]");
+}
+
+static void
+usage(void)
+{
+ printf(_("%s decodes and displays PostgreSQL transaction logs for debugging.\n\n"),
+ progname);
+ printf(_("Usage:\n"));
+ printf(_(" %s [OPTION]... [STARTSEG [ENDSEG]] \n"), progname);
+ printf(_("\nOptions:\n"));
+ printf(_(" -b, --bkp-details output detailed information about backup blocks\n"));
+ printf(_(" -e, --end=RECPTR stop reading at log position RECPTR\n"));
+ printf(_(" -f, --follow keep retrying after reaching end of WAL\n"));
+ printf(_(" -n, --limit=N number of records to display\n"));
+ printf(_(" -p, --path=PATH directory in which to find log segment files or a\n"
+ " directory with a ./pg_wal that contains such files\n"
+ " (default: current directory, ./pg_wal, PGDATA/pg_wal)\n"));
+ printf(_(" -r, --rmgr=RMGR only show records generated by resource manager RMGR\n"
+ " use --rmgr=list to list valid resource manager names\n"));
+ printf(_(" -s, --start=RECPTR start reading at log position RECPTR\n"));
+ printf(_(" -t, --timeline=TLI timeline from which to read log records\n"
+ " (default: 1 or the value used in STARTSEG)\n"));
+ printf(_(" -V, --version output version information, then exit\n"));
+ printf(_(" -x, --xid=XID only show records with TransactionId XID\n"));
+ printf(_(" -z, --stats[=record] show statistics instead of records\n"
+ " (optionally, show per-record statistics)\n"));
+ printf(_(" -?, --help show this help, then exit\n"));
+}
+
+int
+main(int argc, char **argv)
+{
+ uint32 xlogid;
+ uint32 xrecoff;
+ XLogReaderState *xlogreader_state;
+ XLogDumpPrivate private;
+ XLogDumpConfig config;
+ XLogDumpStats stats;
+ XLogRecord *record;
+ XLogRecPtr first_record;
+ char *errormsg;
+
+ static struct option long_options[] = {
+ {"bkp-details", no_argument, NULL, 'b'},
+ {"end", required_argument, NULL, 'e'},
+ {"follow", no_argument, NULL, 'f'},
+ {"help", no_argument, NULL, '?'},
+ {"limit", required_argument, NULL, 'n'},
+ {"path", required_argument, NULL, 'p'},
+ {"rmgr", required_argument, NULL, 'r'},
+ {"start", required_argument, NULL, 's'},
+ {"timeline", required_argument, NULL, 't'},
+ {"xid", required_argument, NULL, 'x'},
+ {"version", no_argument, NULL, 'V'},
+ {"stats", optional_argument, NULL, 'z'},
+ {NULL, 0, NULL, 0}
+ };
+
+ int option;
+ int optindex = 0;
+
+ set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_waldump"));
+ progname = get_progname(argv[0]);
+
+ memset(&private, 0, sizeof(XLogDumpPrivate));
+ memset(&config, 0, sizeof(XLogDumpConfig));
+ memset(&stats, 0, sizeof(XLogDumpStats));
+
+ private.timeline = 1;
+ private.startptr = InvalidXLogRecPtr;
+ private.endptr = InvalidXLogRecPtr;
+ private.endptr_reached = false;
+
+ config.bkp_details = false;
+ config.stop_after_records = -1;
+ config.already_displayed_records = 0;
+ config.follow = false;
+ config.filter_by_rmgr = -1;
+ config.filter_by_xid = InvalidTransactionId;
+ config.filter_by_xid_enabled = false;
+ config.stats = false;
+ config.stats_per_record = false;
+
+ if (argc <= 1)
+ {
+ fprintf(stderr, _("%s: no arguments specified\n"), progname);
+ goto bad_argument;
+ }
+
+ while ((option = getopt_long(argc, argv, "be:?fn:p:r:s:t:Vx:z",
+ long_options, &optindex)) != -1)
+ {
+ switch (option)
+ {
+ case 'b':
+ config.bkp_details = true;
+ break;
+ case 'e':
+ if (sscanf(optarg, "%X/%X", &xlogid, &xrecoff) != 2)
+ {
+ fprintf(stderr, _("%s: could not parse end log position \"%s\"\n"),
+ progname, optarg);
+ goto bad_argument;
+ }
+ private.endptr = (uint64) xlogid << 32 | xrecoff;
+ break;
+ case 'f':
+ config.follow = true;
+ break;
+ case '?':
+ usage();
+ exit(EXIT_SUCCESS);
+ break;
+ case 'n':
+ if (sscanf(optarg, "%d", &config.stop_after_records) != 1)
+ {
+ fprintf(stderr, _("%s: could not parse limit \"%s\"\n"),
+ progname, optarg);
+ goto bad_argument;
+ }
+ break;
+ case 'p':
+ private.inpath = pg_strdup(optarg);
+ break;
+ case 'r':
+ {
+ int i;
+
+ if (pg_strcasecmp(optarg, "list") == 0)
+ {
+ print_rmgr_list();
+ exit(EXIT_SUCCESS);
+ }
+
+ for (i = 0; i <= RM_MAX_ID; i++)
+ {
+ if (pg_strcasecmp(optarg, RmgrDescTable[i].rm_name) == 0)
+ {
+ config.filter_by_rmgr = i;
+ break;
+ }
+ }
+
+ if (config.filter_by_rmgr == -1)
+ {
+ fprintf(stderr, _("%s: resource manager \"%s\" does not exist\n"),
+ progname, optarg);
+ goto bad_argument;
+ }
+ }
+ break;
+ case 's':
+ if (sscanf(optarg, "%X/%X", &xlogid, &xrecoff) != 2)
+ {
+ fprintf(stderr, _("%s: could not parse start log position \"%s\"\n"),
+ progname, optarg);
+ goto bad_argument;
+ }
+ else
+ private.startptr = (uint64) xlogid << 32 | xrecoff;
+ break;
+ case 't':
+ if (sscanf(optarg, "%d", &private.timeline) != 1)
+ {
+ fprintf(stderr, _("%s: could not parse timeline \"%s\"\n"),
+ progname, optarg);
+ goto bad_argument;
+ }
+ break;
+ case 'V':
+ puts("pg_waldump (PostgreSQL) " PG_VERSION);
+ exit(EXIT_SUCCESS);
+ break;
+ case 'x':
+ if (sscanf(optarg, "%u", &config.filter_by_xid) != 1)
+ {
+ fprintf(stderr, _("%s: could not parse \"%s\" as a valid xid\n"),
+ progname, optarg);
+ goto bad_argument;
+ }
+ config.filter_by_xid_enabled = true;
+ break;
+ case 'z':
+ config.stats = true;
+ config.stats_per_record = false;
+ if (optarg)
+ {
+ if (strcmp(optarg, "record") == 0)
+ config.stats_per_record = true;
+ else if (strcmp(optarg, "rmgr") != 0)
+ {
+ fprintf(stderr, _("%s: unrecognised argument to --stats: %s\n"),
+ progname, optarg);
+ goto bad_argument;
+ }
+ }
+ break;
+ default:
+ goto bad_argument;
+ }
+ }
+
+ if ((optind + 2) < argc)
+ {
+ fprintf(stderr,
+ _("%s: too many command-line arguments (first is \"%s\")\n"),
+ progname, argv[optind + 2]);
+ goto bad_argument;
+ }
+
+ if (private.inpath != NULL)
+ {
+ /* validate path points to directory */
+ if (!verify_directory(private.inpath))
+ {
+ fprintf(stderr,
+ _("%s: path \"%s\" cannot be opened: %s\n"),
+ progname, private.inpath, strerror(errno));
+ goto bad_argument;
+ }
+ }
+
+ /* parse files as start/end boundaries, extract path if not specified */
+ if (optind < argc)
+ {
+ char *directory = NULL;
+ char *fname = NULL;
+ int fd;
+ XLogSegNo segno;
+
+ split_path(argv[optind], &directory, &fname);
+
+ if (private.inpath == NULL && directory != NULL)
+ {
+ private.inpath = directory;
+
+ if (!verify_directory(private.inpath))
+ fatal_error("cannot open directory \"%s\": %s",
+ private.inpath, strerror(errno));
+ }
+
+ fd = fuzzy_open_file(private.inpath, fname);
+ if (fd < 0)
+ fatal_error("could not open file \"%s\"", fname);
+ close(fd);
+
+ /* parse position from file */
+ XLogFromFileName(fname, &private.timeline, &segno);
+
+ if (XLogRecPtrIsInvalid(private.startptr))
+ XLogSegNoOffsetToRecPtr(segno, 0, private.startptr);
+ else if (!XLByteInSeg(private.startptr, segno))
+ {
+ fprintf(stderr,
+ _("%s: start log position %X/%X is not inside file \"%s\"\n"),
+ progname,
+ (uint32) (private.startptr >> 32),
+ (uint32) private.startptr,
+ fname);
+ goto bad_argument;
+ }
+
+ /* no second file specified, set end position */
+ if (!(optind + 1 < argc) && XLogRecPtrIsInvalid(private.endptr))
+ XLogSegNoOffsetToRecPtr(segno + 1, 0, private.endptr);
+
+ /* parse ENDSEG if passed */
+ if (optind + 1 < argc)
+ {
+ XLogSegNo endsegno;
+
+ /* ignore directory, already have that */
+ split_path(argv[optind + 1], &directory, &fname);
+
+ fd = fuzzy_open_file(private.inpath, fname);
+ if (fd < 0)
+ fatal_error("could not open file \"%s\"", fname);
+ close(fd);
+
+ /* parse position from file */
+ XLogFromFileName(fname, &private.timeline, &endsegno);
+
+ if (endsegno < segno)
+ fatal_error("ENDSEG %s is before STARTSEG %s",
+ argv[optind + 1], argv[optind]);
+
+ if (XLogRecPtrIsInvalid(private.endptr))
+ XLogSegNoOffsetToRecPtr(endsegno + 1, 0, private.endptr);
+
+ /* set segno to endsegno for check of --end */
+ segno = endsegno;
+ }
+
+
+ if (!XLByteInSeg(private.endptr, segno) &&
+ private.endptr != (segno + 1) * XLogSegSize)
+ {
+ fprintf(stderr,
+ _("%s: end log position %X/%X is not inside file \"%s\"\n"),
+ progname,
+ (uint32) (private.endptr >> 32),
+ (uint32) private.endptr,
+ argv[argc - 1]);
+ goto bad_argument;
+ }
+ }
+
+ /* we don't know what to print */
+ if (XLogRecPtrIsInvalid(private.startptr))
+ {
+ fprintf(stderr, _("%s: no start log position given.\n"), progname);
+ goto bad_argument;
+ }
+
+ /* done with argument parsing, do the actual work */
+
+ /* we have everything we need, start reading */
+ xlogreader_state = XLogReaderAllocate(XLogDumpReadPage, &private);
+ if (!xlogreader_state)
+ fatal_error("out of memory");
+
+ /* first find a valid recptr to start from */
+ first_record = XLogFindNextRecord(xlogreader_state, private.startptr);
+
+ if (first_record == InvalidXLogRecPtr)
+ fatal_error("could not find a valid record after %X/%X",
+ (uint32) (private.startptr >> 32),
+ (uint32) private.startptr);
+
+ /*
+ * Display a message that we're skipping data if `from` wasn't a pointer
+ * to the start of a record and also wasn't a pointer to the beginning of
+ * a segment (e.g. we were used in file mode).
+ */
+ if (first_record != private.startptr && (private.startptr % XLogSegSize) != 0)
+ printf(_("first record is after %X/%X, at %X/%X, skipping over %u bytes\n"),
+ (uint32) (private.startptr >> 32), (uint32) private.startptr,
+ (uint32) (first_record >> 32), (uint32) first_record,
+ (uint32) (first_record - private.startptr));
+
+ for (;;)
+ {
+ /* try to read the next record */
+ record = XLogReadRecord(xlogreader_state, first_record, &errormsg);
+ if (!record)
+ {
+ if (!config.follow || private.endptr_reached)
+ break;
+ else
+ {
+ pg_usleep(1000000L); /* 1 second */
+ continue;
+ }
+ }
+
+ /* after reading the first record, continue at next one */
+ first_record = InvalidXLogRecPtr;
+
+ /* apply all specified filters */
+ if (config.filter_by_rmgr != -1 &&
+ config.filter_by_rmgr != record->xl_rmid)
+ continue;
+
+ if (config.filter_by_xid_enabled &&
+ config.filter_by_xid != record->xl_xid)
+ continue;
+
+ /* process the record */
+ if (config.stats == true)
+ XLogDumpCountRecord(&config, &stats, xlogreader_state);
+ else
+ XLogDumpDisplayRecord(&config, xlogreader_state);
+
+ /* check whether we printed enough */
+ config.already_displayed_records++;
+ if (config.stop_after_records > 0 &&
+ config.already_displayed_records >= config.stop_after_records)
+ break;
+ }
+
+ if (config.stats == true)
+ XLogDumpDisplayStats(&config, &stats);
+
+ if (errormsg)
+ fatal_error("error in WAL record at %X/%X: %s\n",
+ (uint32) (xlogreader_state->ReadRecPtr >> 32),
+ (uint32) xlogreader_state->ReadRecPtr,
+ errormsg);
+
+ XLogReaderFree(xlogreader_state);
+
+ return EXIT_SUCCESS;
+
+bad_argument:
+ fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
+ return EXIT_FAILURE;
+}
diff --git a/src/bin/pg_waldump/rmgrdesc.c b/src/bin/pg_waldump/rmgrdesc.c
new file mode 100644
index 0000000..506bf97
--- /dev/null
+++ b/src/bin/pg_waldump/rmgrdesc.c
@@ -0,0 +1,40 @@
+/*
+ * rmgrdesc.c
+ *
+ * pg_waldump resource managers definition
+ *
+ * src/bin/pg_waldump/rmgrdesc.c
+ */
+#define FRONTEND 1
+#include "postgres.h"
+
+#include "access/brin_xlog.h"
+#include "access/clog.h"
+#include "access/commit_ts.h"
+#include "access/generic_xlog.h"
+#include "access/gin.h"
+#include "access/gist_private.h"
+#include "access/hash_xlog.h"
+#include "access/heapam_xlog.h"
+#include "access/multixact.h"
+#include "access/nbtree.h"
+#include "access/rmgr.h"
+#include "access/spgist.h"
+#include "access/xact.h"
+#include "access/xlog_internal.h"
+#include "catalog/storage_xlog.h"
+#include "commands/dbcommands_xlog.h"
+#include "commands/sequence.h"
+#include "commands/tablespace.h"
+#include "replication/message.h"
+#include "replication/origin.h"
+#include "rmgrdesc.h"
+#include "storage/standbydefs.h"
+#include "utils/relmapper.h"
+
+#define PG_RMGR(symname,name,redo,desc,identify,startup,cleanup) \
+ { name, desc, identify},
+
+const RmgrDescData RmgrDescTable[RM_MAX_ID + 1] = {
+#include "access/rmgrlist.h"
+};
diff --git a/src/bin/pg_waldump/rmgrdesc.h b/src/bin/pg_waldump/rmgrdesc.h
new file mode 100644
index 0000000..2fa60d9
--- /dev/null
+++ b/src/bin/pg_waldump/rmgrdesc.h
@@ -0,0 +1,22 @@
+/*
+ * rmgrdesc.h
+ *
+ * pg_waldump resource managers declaration
+ *
+ * src/bin/pg_waldump/rmgrdesc.h
+ */
+#ifndef RMGRDESC_H
+#define RMGRDESC_H
+
+#include "lib/stringinfo.h"
+
+typedef struct RmgrDescData
+{
+ const char *rm_name;
+ void (*rm_desc) (StringInfo buf, XLogReaderState *record);
+ const char *(*rm_identify) (uint8 info);
+} RmgrDescData;
+
+extern const RmgrDescData RmgrDescTable[];
+
+#endif /* RMGRDESC_H */
diff --git a/src/bin/pg_xlogdump/.gitignore b/src/bin/pg_xlogdump/.gitignore
deleted file mode 100644
index c4783f1..0000000
--- a/src/bin/pg_xlogdump/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-/pg_xlogdump
-# Source files copied from src/backend/access/rmgrdesc/
-/*desc.c
-/xlogreader.c
diff --git a/src/bin/pg_xlogdump/Makefile b/src/bin/pg_xlogdump/Makefile
deleted file mode 100644
index 11df47d..0000000
--- a/src/bin/pg_xlogdump/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-# src/bin/pg_xlogdump/Makefile
-
-PGFILEDESC = "pg_xlogdump - decode and display WAL"
-PGAPPICON=win32
-
-subdir = src/bin/pg_xlogdump
-top_builddir = ../../..
-include $(top_builddir)/src/Makefile.global
-
-OBJS = pg_xlogdump.o compat.o xlogreader.o rmgrdesc.o \
- $(RMGRDESCOBJS) $(WIN32RES)
-
-override CPPFLAGS := -DFRONTEND $(CPPFLAGS)
-
-RMGRDESCSOURCES = $(sort $(notdir $(wildcard $(top_srcdir)/src/backend/access/rmgrdesc/*desc.c)))
-RMGRDESCOBJS = $(patsubst %.c,%.o,$(RMGRDESCSOURCES))
-
-
-all: pg_xlogdump
-
-pg_xlogdump: $(OBJS) | submake-libpgport
- $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@$(X)
-
-xlogreader.c: % : $(top_srcdir)/src/backend/access/transam/%
- rm -f $@ && $(LN_S) $< .
-
-$(RMGRDESCSOURCES): % : $(top_srcdir)/src/backend/access/rmgrdesc/%
- rm -f $@ && $(LN_S) $< .
-
-install: all installdirs
- $(INSTALL_PROGRAM) pg_xlogdump$(X) '$(DESTDIR)$(bindir)/pg_xlogdump$(X)'
-
-installdirs:
- $(MKDIR_P) '$(DESTDIR)$(bindir)'
-
-uninstall:
- rm -f '$(DESTDIR)$(bindir)/pg_xlogdump$(X)'
-
-clean distclean maintainer-clean:
- rm -f pg_xlogdump$(X) $(OBJS) $(RMGRDESCSOURCES) xlogreader.c
diff --git a/src/bin/pg_xlogdump/compat.c b/src/bin/pg_xlogdump/compat.c
deleted file mode 100644
index ff5acdc..0000000
--- a/src/bin/pg_xlogdump/compat.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * compat.c
- * Reimplementations of various backend functions.
- *
- * Portions Copyright (c) 2013-2017, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- * src/bin/pg_xlogdump/compat.c
- *
- * This file contains client-side implementations for various backend
- * functions that the rm_desc functions in *desc.c files rely on.
- *
- *-------------------------------------------------------------------------
- */
-
-/* ugly hack, same as in e.g pg_controldata */
-#define FRONTEND 1
-#include "postgres.h"
-
-#include <time.h>
-
-#include "utils/datetime.h"
-#include "lib/stringinfo.h"
-
-/* copied from timestamp.c */
-pg_time_t
-timestamptz_to_time_t(TimestampTz t)
-{
- pg_time_t result;
-
-#ifdef HAVE_INT64_TIMESTAMP
- result = (pg_time_t) (t / USECS_PER_SEC +
- ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY));
-#else
- result = (pg_time_t) (t +
- ((POSTGRES_EPOCH_JDATE - UNIX_EPOCH_JDATE) * SECS_PER_DAY));
-#endif
- return result;
-}
-
-/*
- * Stopgap implementation of timestamptz_to_str that doesn't depend on backend
- * infrastructure. This will work for timestamps that are within the range
- * of the platform time_t type. (pg_time_t is compatible except for possibly
- * being wider.)
- *
- * XXX the return value points to a static buffer, so beware of using more
- * than one result value concurrently.
- *
- * XXX: The backend timestamp infrastructure should instead be split out and
- * moved into src/common. That's a large project though.
- */
-const char *
-timestamptz_to_str(TimestampTz dt)
-{
- static char buf[MAXDATELEN + 1];
- char ts[MAXDATELEN + 1];
- char zone[MAXDATELEN + 1];
- time_t result = (time_t) timestamptz_to_time_t(dt);
- struct tm *ltime = localtime(&result);
-
- strftime(ts, sizeof(ts), "%Y-%m-%d %H:%M:%S", ltime);
- strftime(zone, sizeof(zone), "%Z", ltime);
-
-#ifdef HAVE_INT64_TIMESTAMP
- sprintf(buf, "%s.%06d %s", ts, (int) (dt % USECS_PER_SEC), zone);
-#else
- sprintf(buf, "%s.%.6f %s", ts, fabs(dt - floor(dt)), zone);
-#endif
-
- return buf;
-}
-
-/*
- * Provide a hacked up compat layer for StringInfos so xlog desc functions can
- * be linked/called.
- */
-void
-appendStringInfo(StringInfo str, const char *fmt,...)
-{
- va_list args;
-
- va_start(args, fmt);
- vprintf(fmt, args);
- va_end(args);
-}
-
-void
-appendStringInfoString(StringInfo str, const char *string)
-{
- appendStringInfo(str, "%s", string);
-}
-
-void
-appendStringInfoChar(StringInfo str, char ch)
-{
- appendStringInfo(str, "%c", ch);
-}
diff --git a/src/bin/pg_xlogdump/nls.mk b/src/bin/pg_xlogdump/nls.mk
deleted file mode 100644
index 2b254c3..0000000
--- a/src/bin/pg_xlogdump/nls.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-# src/bin/pg_xlogdump/nls.mk
-CATALOG_NAME = pg_xlogdump
-AVAIL_LANGUAGES =
-GETTEXT_FILES = pg_xlogdump.c
-GETTEXT_TRIGGERS = fatal_error
-GETTEXT_FLAGS = fatal_error:1:c-format
diff --git a/src/bin/pg_xlogdump/pg_xlogdump.c b/src/bin/pg_xlogdump/pg_xlogdump.c
deleted file mode 100644
index 590d2ad..0000000
--- a/src/bin/pg_xlogdump/pg_xlogdump.c
+++ /dev/null
@@ -1,1064 +0,0 @@
-/*-------------------------------------------------------------------------
- *
- * pg_xlogdump.c - decode and display WAL
- *
- * Copyright (c) 2013-2017, PostgreSQL Global Development Group
- *
- * IDENTIFICATION
- * src/bin/pg_xlogdump/pg_xlogdump.c
- *-------------------------------------------------------------------------
- */
-
-#define FRONTEND 1
-#include "postgres.h"
-
-#include <dirent.h>
-#include <unistd.h>
-
-#include "access/xlogreader.h"
-#include "access/xlogrecord.h"
-#include "access/xlog_internal.h"
-#include "access/transam.h"
-#include "common/fe_memutils.h"
-#include "getopt_long.h"
-#include "rmgrdesc.h"
-
-
-static const char *progname;
-
-typedef struct XLogDumpPrivate
-{
- TimeLineID timeline;
- char *inpath;
- XLogRecPtr startptr;
- XLogRecPtr endptr;
- bool endptr_reached;
-} XLogDumpPrivate;
-
-typedef struct XLogDumpConfig
-{
- /* display options */
- bool bkp_details;
- int stop_after_records;
- int already_displayed_records;
- bool follow;
- bool stats;
- bool stats_per_record;
-
- /* filter options */
- int filter_by_rmgr;
- TransactionId filter_by_xid;
- bool filter_by_xid_enabled;
-} XLogDumpConfig;
-
-typedef struct Stats
-{
- uint64 count;
- uint64 rec_len;
- uint64 fpi_len;
-} Stats;
-
-#define MAX_XLINFO_TYPES 16
-
-typedef struct XLogDumpStats
-{
- uint64 count;
- Stats rmgr_stats[RM_NEXT_ID];
- Stats record_stats[RM_NEXT_ID][MAX_XLINFO_TYPES];
-} XLogDumpStats;
-
-static void fatal_error(const char *fmt,...) pg_attribute_printf(1, 2);
-
-/*
- * Big red button to push when things go horribly wrong.
- */
-static void
-fatal_error(const char *fmt,...)
-{
- va_list args;
-
- fflush(stdout);
-
- fprintf(stderr, _("%s: FATAL: "), progname);
- va_start(args, fmt);
- vfprintf(stderr, _(fmt), args);
- va_end(args);
- fputc('\n', stderr);
-
- exit(EXIT_FAILURE);
-}
-
-static void
-print_rmgr_list(void)
-{
- int i;
-
- for (i = 0; i <= RM_MAX_ID; i++)
- {
- printf("%s\n", RmgrDescTable[i].rm_name);
- }
-}
-
-/*
- * Check whether directory exists and whether we can open it. Keep errno set so
- * that the caller can report errors somewhat more accurately.
- */
-static bool
-verify_directory(const char *directory)
-{
- DIR *dir = opendir(directory);
-
- if (dir == NULL)
- return false;
- closedir(dir);
- return true;
-}
-
-/*
- * Split a pathname as dirname(1) and basename(1) would.
- *
- * XXX this probably doesn't do very well on Windows. We probably need to
- * apply canonicalize_path(), at the very least.
- */
-static void
-split_path(const char *path, char **dir, char **fname)
-{
- char *sep;
-
- /* split filepath into directory & filename */
- sep = strrchr(path, '/');
-
- /* directory path */
- if (sep != NULL)
- {
- *dir = pg_strdup(path);
- (*dir)[(sep - path) + 1] = '\0'; /* no strndup */
- *fname = pg_strdup(sep + 1);
- }
- /* local directory */
- else
- {
- *dir = NULL;
- *fname = pg_strdup(path);
- }
-}
-
-/*
- * Try to find the file in several places:
- * if directory == NULL:
- * fname
- * XLOGDIR / fname
- * $PGDATA / XLOGDIR / fname
- * else
- * directory / fname
- * directory / XLOGDIR / fname
- *
- * return a read only fd
- */
-static int
-fuzzy_open_file(const char *directory, const char *fname)
-{
- int fd = -1;
- char fpath[MAXPGPATH];
-
- if (directory == NULL)
- {
- const char *datadir;
-
- /* fname */
- fd = open(fname, O_RDONLY | PG_BINARY, 0);
- if (fd < 0 && errno != ENOENT)
- return -1;
- else if (fd >= 0)
- return fd;
-
- /* XLOGDIR / fname */
- snprintf(fpath, MAXPGPATH, "%s/%s",
- XLOGDIR, fname);
- fd = open(fpath, O_RDONLY | PG_BINARY, 0);
- if (fd < 0 && errno != ENOENT)
- return -1;
- else if (fd >= 0)
- return fd;
-
- datadir = getenv("PGDATA");
- /* $PGDATA / XLOGDIR / fname */
- if (datadir != NULL)
- {
- snprintf(fpath, MAXPGPATH, "%s/%s/%s",
- datadir, XLOGDIR, fname);
- fd = open(fpath, O_RDONLY | PG_BINARY, 0);
- if (fd < 0 && errno != ENOENT)
- return -1;
- else if (fd >= 0)
- return fd;
- }
- }
- else
- {
- /* directory / fname */
- snprintf(fpath, MAXPGPATH, "%s/%s",
- directory, fname);
- fd = open(fpath, O_RDONLY | PG_BINARY, 0);
- if (fd < 0 && errno != ENOENT)
- return -1;
- else if (fd >= 0)
- return fd;
-
- /* directory / XLOGDIR / fname */
- snprintf(fpath, MAXPGPATH, "%s/%s/%s",
- directory, XLOGDIR, fname);
- fd = open(fpath, O_RDONLY | PG_BINARY, 0);
- if (fd < 0 && errno != ENOENT)
- return -1;
- else if (fd >= 0)
- return fd;
- }
- return -1;
-}
-
-/*
- * Read count bytes from a segment file in the specified directory, for the
- * given timeline, containing the specified record pointer; store the data in
- * the passed buffer.
- */
-static void
-XLogDumpXLogRead(const char *directory, TimeLineID timeline_id,
- XLogRecPtr startptr, char *buf, Size count)
-{
- char *p;
- XLogRecPtr recptr;
- Size nbytes;
-
- static int sendFile = -1;
- static XLogSegNo sendSegNo = 0;
- static uint32 sendOff = 0;
-
- p = buf;
- recptr = startptr;
- nbytes = count;
-
- while (nbytes > 0)
- {
- uint32 startoff;
- int segbytes;
- int readbytes;
-
- startoff = recptr % XLogSegSize;
-
- if (sendFile < 0 || !XLByteInSeg(recptr, sendSegNo))
- {
- char fname[MAXFNAMELEN];
- int tries;
-
- /* Switch to another logfile segment */
- if (sendFile >= 0)
- close(sendFile);
-
- XLByteToSeg(recptr, sendSegNo);
-
- XLogFileName(fname, timeline_id, sendSegNo);
-
- /*
- * In follow mode there is a short period of time after the
- * server has written the end of the previous file before the
- * new file is available. So we loop for 5 seconds looking
- * for the file to appear before giving up.
- */
- for (tries = 0; tries < 10; tries++)
- {
- sendFile = fuzzy_open_file(directory, fname);
- if (sendFile >= 0)
- break;
- if (errno == ENOENT)
- {
- int save_errno = errno;
-
- /* File not there yet, try again */
- pg_usleep(500 * 1000);
-
- errno = save_errno;
- continue;
- }
- /* Any other error, fall through and fail */
- break;
- }
-
- if (sendFile < 0)
- fatal_error("could not find file \"%s\": %s",
- fname, strerror(errno));
- sendOff = 0;
- }
-
- /* Need to seek in the file? */
- if (sendOff != startoff)
- {
- if (lseek(sendFile, (off_t) startoff, SEEK_SET) < 0)
- {
- int err = errno;
- char fname[MAXPGPATH];
-
- XLogFileName(fname, timeline_id, sendSegNo);
-
- fatal_error("could not seek in log segment %s to offset %u: %s",
- fname, startoff, strerror(err));
- }
- sendOff = startoff;
- }
-
- /* How many bytes are within this segment? */
- if (nbytes > (XLogSegSize - startoff))
- segbytes = XLogSegSize - startoff;
- else
- segbytes = nbytes;
-
- readbytes = read(sendFile, p, segbytes);
- if (readbytes <= 0)
- {
- int err = errno;
- char fname[MAXPGPATH];
-
- XLogFileName(fname, timeline_id, sendSegNo);
-
- fatal_error("could not read from log segment %s, offset %d, length %d: %s",
- fname, sendOff, segbytes, strerror(err));
- }
-
- /* Update state for read */
- recptr += readbytes;
-
- sendOff += readbytes;
- nbytes -= readbytes;
- p += readbytes;
- }
-}
-
-/*
- * XLogReader read_page callback
- */
-static int
-XLogDumpReadPage(XLogReaderState *state, XLogRecPtr targetPagePtr, int reqLen,
- XLogRecPtr targetPtr, char *readBuff, TimeLineID *curFileTLI)
-{
- XLogDumpPrivate *private = state->private_data;
- int count = XLOG_BLCKSZ;
-
- if (private->endptr != InvalidXLogRecPtr)
- {
- if (targetPagePtr + XLOG_BLCKSZ <= private->endptr)
- count = XLOG_BLCKSZ;
- else if (targetPagePtr + reqLen <= private->endptr)
- count = private->endptr - targetPagePtr;
- else
- {
- private->endptr_reached = true;
- return -1;
- }
- }
-
- XLogDumpXLogRead(private->inpath, private->timeline, targetPagePtr,
- readBuff, count);
-
- return count;
-}
-
-/*
- * Store per-rmgr and per-record statistics for a given record.
- */
-static void
-XLogDumpCountRecord(XLogDumpConfig *config, XLogDumpStats *stats,
- XLogReaderState *record)
-{
- RmgrId rmid;
- uint8 recid;
- uint32 rec_len;
- uint32 fpi_len;
- int block_id;
-
- stats->count++;
-
- rmid = XLogRecGetRmid(record);
- rec_len = XLogRecGetDataLen(record) + SizeOfXLogRecord;
-
- /*
- * Calculate the amount of FPI data in the record.
- *
- * XXX: We peek into xlogreader's private decoded backup blocks for the
- * bimg_len indicating the length of FPI data. It doesn't seem worth it to
- * add an accessor macro for this.
- */
- fpi_len = 0;
- for (block_id = 0; block_id <= record->max_block_id; block_id++)
- {
- if (XLogRecHasBlockImage(record, block_id))
- fpi_len += record->blocks[block_id].bimg_len;
- }
-
- /* Update per-rmgr statistics */
-
- stats->rmgr_stats[rmid].count++;
- stats->rmgr_stats[rmid].rec_len += rec_len;
- stats->rmgr_stats[rmid].fpi_len += fpi_len;
-
- /*
- * Update per-record statistics, where the record is identified by a
- * combination of the RmgrId and the four bits of the xl_info field that
- * are the rmgr's domain (resulting in sixteen possible entries per
- * RmgrId).
- */
-
- recid = XLogRecGetInfo(record) >> 4;
-
- stats->record_stats[rmid][recid].count++;
- stats->record_stats[rmid][recid].rec_len += rec_len;
- stats->record_stats[rmid][recid].fpi_len += fpi_len;
-}
-
-/*
- * Print a record to stdout
- */
-static void
-XLogDumpDisplayRecord(XLogDumpConfig *config, XLogReaderState *record)
-{
- const char *id;
- const RmgrDescData *desc = &RmgrDescTable[XLogRecGetRmid(record)];
- RelFileNode rnode;
- ForkNumber forknum;
- BlockNumber blk;
- int block_id;
- uint8 info = XLogRecGetInfo(record);
- XLogRecPtr xl_prev = XLogRecGetPrev(record);
-
- id = desc->rm_identify(info);
- if (id == NULL)
- id = psprintf("UNKNOWN (%x)", info & ~XLR_INFO_MASK);
-
- printf("rmgr: %-11s len (rec/tot): %6u/%6u, tx: %10u, lsn: %X/%08X, prev %X/%08X, ",
- desc->rm_name,
- XLogRecGetDataLen(record), XLogRecGetTotalLen(record),
- XLogRecGetXid(record),
- (uint32) (record->ReadRecPtr >> 32), (uint32) record->ReadRecPtr,
- (uint32) (xl_prev >> 32), (uint32) xl_prev);
- printf("desc: %s ", id);
-
- /* the desc routine will printf the description directly to stdout */
- desc->rm_desc(NULL, record);
-
- if (!config->bkp_details)
- {
- /* print block references (short format) */
- for (block_id = 0; block_id <= record->max_block_id; block_id++)
- {
- if (!XLogRecHasBlockRef(record, block_id))
- continue;
-
- XLogRecGetBlockTag(record, block_id, &rnode, &forknum, &blk);
- if (forknum != MAIN_FORKNUM)
- printf(", blkref #%u: rel %u/%u/%u fork %s blk %u",
- block_id,
- rnode.spcNode, rnode.dbNode, rnode.relNode,
- forkNames[forknum],
- blk);
- else
- printf(", blkref #%u: rel %u/%u/%u blk %u",
- block_id,
- rnode.spcNode, rnode.dbNode, rnode.relNode,
- blk);
- if (XLogRecHasBlockImage(record, block_id))
- printf(" FPW");
- }
- putchar('\n');
- }
- else
- {
- /* print block references (detailed format) */
- putchar('\n');
- for (block_id = 0; block_id <= record->max_block_id; block_id++)
- {
- if (!XLogRecHasBlockRef(record, block_id))
- continue;
-
- XLogRecGetBlockTag(record, block_id, &rnode, &forknum, &blk);
- printf("\tblkref #%u: rel %u/%u/%u fork %s blk %u",
- block_id,
- rnode.spcNode, rnode.dbNode, rnode.relNode,
- forkNames[forknum],
- blk);
- if (XLogRecHasBlockImage(record, block_id))
- {
- if (record->blocks[block_id].bimg_info &
- BKPIMAGE_IS_COMPRESSED)
- {
- printf(" (FPW); hole: offset: %u, length: %u, compression saved: %u\n",
- record->blocks[block_id].hole_offset,
- record->blocks[block_id].hole_length,
- BLCKSZ -
- record->blocks[block_id].hole_length -
- record->blocks[block_id].bimg_len);
- }
- else
- {
- printf(" (FPW); hole: offset: %u, length: %u\n",
- record->blocks[block_id].hole_offset,
- record->blocks[block_id].hole_length);
- }
- }
- putchar('\n');
- }
- }
-}
-
-/*
- * Display a single row of record counts and sizes for an rmgr or record.
- */
-static void
-XLogDumpStatsRow(const char *name,
- uint64 n, uint64 total_count,
- uint64 rec_len, uint64 total_rec_len,
- uint64 fpi_len, uint64 total_fpi_len,
- uint64 tot_len, uint64 total_len)
-{
- double n_pct,
- rec_len_pct,
- fpi_len_pct,
- tot_len_pct;
-
- n_pct = 0;
- if (total_count != 0)
- n_pct = 100 * (double) n / total_count;
-
- rec_len_pct = 0;
- if (total_rec_len != 0)
- rec_len_pct = 100 * (double) rec_len / total_rec_len;
-
- fpi_len_pct = 0;
- if (total_fpi_len != 0)
- fpi_len_pct = 100 * (double) fpi_len / total_fpi_len;
-
- tot_len_pct = 0;
- if (total_len != 0)
- tot_len_pct = 100 * (double) tot_len / total_len;
-
- printf("%-27s "
- "%20" INT64_MODIFIER "u (%6.02f) "
- "%20" INT64_MODIFIER "u (%6.02f) "
- "%20" INT64_MODIFIER "u (%6.02f) "
- "%20" INT64_MODIFIER "u (%6.02f)\n",
- name, n, n_pct, rec_len, rec_len_pct, fpi_len, fpi_len_pct,
- tot_len, tot_len_pct);
-}
-
-
-/*
- * Display summary statistics about the records seen so far.
- */
-static void
-XLogDumpDisplayStats(XLogDumpConfig *config, XLogDumpStats *stats)
-{
- int ri,
- rj;
- uint64 total_count = 0;
- uint64 total_rec_len = 0;
- uint64 total_fpi_len = 0;
- uint64 total_len = 0;
- double rec_len_pct,
- fpi_len_pct;
-
- /* ---
- * Make a first pass to calculate column totals:
- * count(*),
- * sum(xl_len+SizeOfXLogRecord),
- * sum(xl_tot_len-xl_len-SizeOfXLogRecord), and
- * sum(xl_tot_len).
- * These are used to calculate percentages for each record type.
- * ---
- */
-
- for (ri = 0; ri < RM_NEXT_ID; ri++)
- {
- total_count += stats->rmgr_stats[ri].count;
- total_rec_len += stats->rmgr_stats[ri].rec_len;
- total_fpi_len += stats->rmgr_stats[ri].fpi_len;
- }
- total_len = total_rec_len + total_fpi_len;
-
- /*
- * 27 is strlen("Transaction/COMMIT_PREPARED"), 20 is strlen(2^64), 8 is
- * strlen("(100.00%)")
- */
-
- printf("%-27s %20s %8s %20s %8s %20s %8s %20s %8s\n"
- "%-27s %20s %8s %20s %8s %20s %8s %20s %8s\n",
- "Type", "N", "(%)", "Record size", "(%)", "FPI size", "(%)", "Combined size", "(%)",
- "----", "-", "---", "-----------", "---", "--------", "---", "-------------", "---");
-
- for (ri = 0; ri < RM_NEXT_ID; ri++)
- {
- uint64 count,
- rec_len,
- fpi_len,
- tot_len;
- const RmgrDescData *desc = &RmgrDescTable[ri];
-
- if (!config->stats_per_record)
- {
- count = stats->rmgr_stats[ri].count;
- rec_len = stats->rmgr_stats[ri].rec_len;
- fpi_len = stats->rmgr_stats[ri].fpi_len;
- tot_len = rec_len + fpi_len;
-
- XLogDumpStatsRow(desc->rm_name,
- count, total_count, rec_len, total_rec_len,
- fpi_len, total_fpi_len, tot_len, total_len);
- }
- else
- {
- for (rj = 0; rj < MAX_XLINFO_TYPES; rj++)
- {
- const char *id;
-
- count = stats->record_stats[ri][rj].count;
- rec_len = stats->record_stats[ri][rj].rec_len;
- fpi_len = stats->record_stats[ri][rj].fpi_len;
- tot_len = rec_len + fpi_len;
-
- /* Skip undefined combinations and ones that didn't occur */
- if (count == 0)
- continue;
-
- /* the upper four bits in xl_info are the rmgr's */
- id = desc->rm_identify(rj << 4);
- if (id == NULL)
- id = psprintf("UNKNOWN (%x)", rj << 4);
-
- XLogDumpStatsRow(psprintf("%s/%s", desc->rm_name, id),
- count, total_count, rec_len, total_rec_len,
- fpi_len, total_fpi_len, tot_len, total_len);
- }
- }
- }
-
- printf("%-27s %20s %8s %20s %8s %20s %8s %20s\n",
- "", "--------", "", "--------", "", "--------", "", "--------");
-
- /*
- * The percentages in earlier rows were calculated against the column
- * total, but the ones that follow are against the row total. Note that
- * these are displayed with a % symbol to differentiate them from the
- * earlier ones, and are thus up to 9 characters long.
- */
-
- rec_len_pct = 0;
- if (total_len != 0)
- rec_len_pct = 100 * (double) total_rec_len / total_len;
-
- fpi_len_pct = 0;
- if (total_len != 0)
- fpi_len_pct = 100 * (double) total_fpi_len / total_len;
-
- printf("%-27s "
- "%20" INT64_MODIFIER "u %-9s"
- "%20" INT64_MODIFIER "u %-9s"
- "%20" INT64_MODIFIER "u %-9s"
- "%20" INT64_MODIFIER "u %-6s\n",
- "Total", stats->count, "",
- total_rec_len, psprintf("[%.02f%%]", rec_len_pct),
- total_fpi_len, psprintf("[%.02f%%]", fpi_len_pct),
- total_len, "[100%]");
-}
-
-static void
-usage(void)
-{
- printf(_("%s decodes and displays PostgreSQL transaction logs for debugging.\n\n"),
- progname);
- printf(_("Usage:\n"));
- printf(_(" %s [OPTION]... [STARTSEG [ENDSEG]] \n"), progname);
- printf(_("\nOptions:\n"));
- printf(_(" -b, --bkp-details output detailed information about backup blocks\n"));
- printf(_(" -e, --end=RECPTR stop reading at log position RECPTR\n"));
- printf(_(" -f, --follow keep retrying after reaching end of WAL\n"));
- printf(_(" -n, --limit=N number of records to display\n"));
- printf(_(" -p, --path=PATH directory in which to find log segment files or a\n"
- " directory with a ./pg_wal that contains such files\n"
- " (default: current directory, ./pg_wal, PGDATA/pg_wal)\n"));
- printf(_(" -r, --rmgr=RMGR only show records generated by resource manager RMGR\n"
- " use --rmgr=list to list valid resource manager names\n"));
- printf(_(" -s, --start=RECPTR start reading at log position RECPTR\n"));
- printf(_(" -t, --timeline=TLI timeline from which to read log records\n"
- " (default: 1 or the value used in STARTSEG)\n"));
- printf(_(" -V, --version output version information, then exit\n"));
- printf(_(" -x, --xid=XID only show records with TransactionId XID\n"));
- printf(_(" -z, --stats[=record] show statistics instead of records\n"
- " (optionally, show per-record statistics)\n"));
- printf(_(" -?, --help show this help, then exit\n"));
-}
-
-int
-main(int argc, char **argv)
-{
- uint32 xlogid;
- uint32 xrecoff;
- XLogReaderState *xlogreader_state;
- XLogDumpPrivate private;
- XLogDumpConfig config;
- XLogDumpStats stats;
- XLogRecord *record;
- XLogRecPtr first_record;
- char *errormsg;
-
- static struct option long_options[] = {
- {"bkp-details", no_argument, NULL, 'b'},
- {"end", required_argument, NULL, 'e'},
- {"follow", no_argument, NULL, 'f'},
- {"help", no_argument, NULL, '?'},
- {"limit", required_argument, NULL, 'n'},
- {"path", required_argument, NULL, 'p'},
- {"rmgr", required_argument, NULL, 'r'},
- {"start", required_argument, NULL, 's'},
- {"timeline", required_argument, NULL, 't'},
- {"xid", required_argument, NULL, 'x'},
- {"version", no_argument, NULL, 'V'},
- {"stats", optional_argument, NULL, 'z'},
- {NULL, 0, NULL, 0}
- };
-
- int option;
- int optindex = 0;
-
- set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_xlogdump"));
- progname = get_progname(argv[0]);
-
- memset(&private, 0, sizeof(XLogDumpPrivate));
- memset(&config, 0, sizeof(XLogDumpConfig));
- memset(&stats, 0, sizeof(XLogDumpStats));
-
- private.timeline = 1;
- private.startptr = InvalidXLogRecPtr;
- private.endptr = InvalidXLogRecPtr;
- private.endptr_reached = false;
-
- config.bkp_details = false;
- config.stop_after_records = -1;
- config.already_displayed_records = 0;
- config.follow = false;
- config.filter_by_rmgr = -1;
- config.filter_by_xid = InvalidTransactionId;
- config.filter_by_xid_enabled = false;
- config.stats = false;
- config.stats_per_record = false;
-
- if (argc <= 1)
- {
- fprintf(stderr, _("%s: no arguments specified\n"), progname);
- goto bad_argument;
- }
-
- while ((option = getopt_long(argc, argv, "be:?fn:p:r:s:t:Vx:z",
- long_options, &optindex)) != -1)
- {
- switch (option)
- {
- case 'b':
- config.bkp_details = true;
- break;
- case 'e':
- if (sscanf(optarg, "%X/%X", &xlogid, &xrecoff) != 2)
- {
- fprintf(stderr, _("%s: could not parse end log position \"%s\"\n"),
- progname, optarg);
- goto bad_argument;
- }
- private.endptr = (uint64) xlogid << 32 | xrecoff;
- break;
- case 'f':
- config.follow = true;
- break;
- case '?':
- usage();
- exit(EXIT_SUCCESS);
- break;
- case 'n':
- if (sscanf(optarg, "%d", &config.stop_after_records) != 1)
- {
- fprintf(stderr, _("%s: could not parse limit \"%s\"\n"),
- progname, optarg);
- goto bad_argument;
- }
- break;
- case 'p':
- private.inpath = pg_strdup(optarg);
- break;
- case 'r':
- {
- int i;
-
- if (pg_strcasecmp(optarg, "list") == 0)
- {
- print_rmgr_list();
- exit(EXIT_SUCCESS);
- }
-
- for (i = 0; i <= RM_MAX_ID; i++)
- {
- if (pg_strcasecmp(optarg, RmgrDescTable[i].rm_name) == 0)
- {
- config.filter_by_rmgr = i;
- break;
- }
- }
-
- if (config.filter_by_rmgr == -1)
- {
- fprintf(stderr, _("%s: resource manager \"%s\" does not exist\n"),
- progname, optarg);
- goto bad_argument;
- }
- }
- break;
- case 's':
- if (sscanf(optarg, "%X/%X", &xlogid, &xrecoff) != 2)
- {
- fprintf(stderr, _("%s: could not parse start log position \"%s\"\n"),
- progname, optarg);
- goto bad_argument;
- }
- else
- private.startptr = (uint64) xlogid << 32 | xrecoff;
- break;
- case 't':
- if (sscanf(optarg, "%d", &private.timeline) != 1)
- {
- fprintf(stderr, _("%s: could not parse timeline \"%s\"\n"),
- progname, optarg);
- goto bad_argument;
- }
- break;
- case 'V':
- puts("pg_xlogdump (PostgreSQL) " PG_VERSION);
- exit(EXIT_SUCCESS);
- break;
- case 'x':
- if (sscanf(optarg, "%u", &config.filter_by_xid) != 1)
- {
- fprintf(stderr, _("%s: could not parse \"%s\" as a valid xid\n"),
- progname, optarg);
- goto bad_argument;
- }
- config.filter_by_xid_enabled = true;
- break;
- case 'z':
- config.stats = true;
- config.stats_per_record = false;
- if (optarg)
- {
- if (strcmp(optarg, "record") == 0)
- config.stats_per_record = true;
- else if (strcmp(optarg, "rmgr") != 0)
- {
- fprintf(stderr, _("%s: unrecognised argument to --stats: %s\n"),
- progname, optarg);
- goto bad_argument;
- }
- }
- break;
- default:
- goto bad_argument;
- }
- }
-
- if ((optind + 2) < argc)
- {
- fprintf(stderr,
- _("%s: too many command-line arguments (first is \"%s\")\n"),
- progname, argv[optind + 2]);
- goto bad_argument;
- }
-
- if (private.inpath != NULL)
- {
- /* validate path points to directory */
- if (!verify_directory(private.inpath))
- {
- fprintf(stderr,
- _("%s: path \"%s\" cannot be opened: %s\n"),
- progname, private.inpath, strerror(errno));
- goto bad_argument;
- }
- }
-
- /* parse files as start/end boundaries, extract path if not specified */
- if (optind < argc)
- {
- char *directory = NULL;
- char *fname = NULL;
- int fd;
- XLogSegNo segno;
-
- split_path(argv[optind], &directory, &fname);
-
- if (private.inpath == NULL && directory != NULL)
- {
- private.inpath = directory;
-
- if (!verify_directory(private.inpath))
- fatal_error("cannot open directory \"%s\": %s",
- private.inpath, strerror(errno));
- }
-
- fd = fuzzy_open_file(private.inpath, fname);
- if (fd < 0)
- fatal_error("could not open file \"%s\"", fname);
- close(fd);
-
- /* parse position from file */
- XLogFromFileName(fname, &private.timeline, &segno);
-
- if (XLogRecPtrIsInvalid(private.startptr))
- XLogSegNoOffsetToRecPtr(segno, 0, private.startptr);
- else if (!XLByteInSeg(private.startptr, segno))
- {
- fprintf(stderr,
- _("%s: start log position %X/%X is not inside file \"%s\"\n"),
- progname,
- (uint32) (private.startptr >> 32),
- (uint32) private.startptr,
- fname);
- goto bad_argument;
- }
-
- /* no second file specified, set end position */
- if (!(optind + 1 < argc) && XLogRecPtrIsInvalid(private.endptr))
- XLogSegNoOffsetToRecPtr(segno + 1, 0, private.endptr);
-
- /* parse ENDSEG if passed */
- if (optind + 1 < argc)
- {
- XLogSegNo endsegno;
-
- /* ignore directory, already have that */
- split_path(argv[optind + 1], &directory, &fname);
-
- fd = fuzzy_open_file(private.inpath, fname);
- if (fd < 0)
- fatal_error("could not open file \"%s\"", fname);
- close(fd);
-
- /* parse position from file */
- XLogFromFileName(fname, &private.timeline, &endsegno);
-
- if (endsegno < segno)
- fatal_error("ENDSEG %s is before STARTSEG %s",
- argv[optind + 1], argv[optind]);
-
- if (XLogRecPtrIsInvalid(private.endptr))
- XLogSegNoOffsetToRecPtr(endsegno + 1, 0, private.endptr);
-
- /* set segno to endsegno for check of --end */
- segno = endsegno;
- }
-
-
- if (!XLByteInSeg(private.endptr, segno) &&
- private.endptr != (segno + 1) * XLogSegSize)
- {
- fprintf(stderr,
- _("%s: end log position %X/%X is not inside file \"%s\"\n"),
- progname,
- (uint32) (private.endptr >> 32),
- (uint32) private.endptr,
- argv[argc - 1]);
- goto bad_argument;
- }
- }
-
- /* we don't know what to print */
- if (XLogRecPtrIsInvalid(private.startptr))
- {
- fprintf(stderr, _("%s: no start log position given.\n"), progname);
- goto bad_argument;
- }
-
- /* done with argument parsing, do the actual work */
-
- /* we have everything we need, start reading */
- xlogreader_state = XLogReaderAllocate(XLogDumpReadPage, &private);
- if (!xlogreader_state)
- fatal_error("out of memory");
-
- /* first find a valid recptr to start from */
- first_record = XLogFindNextRecord(xlogreader_state, private.startptr);
-
- if (first_record == InvalidXLogRecPtr)
- fatal_error("could not find a valid record after %X/%X",
- (uint32) (private.startptr >> 32),
- (uint32) private.startptr);
-
- /*
- * Display a message that we're skipping data if `from` wasn't a pointer
- * to the start of a record and also wasn't a pointer to the beginning of
- * a segment (e.g. we were used in file mode).
- */
- if (first_record != private.startptr && (private.startptr % XLogSegSize) != 0)
- printf(_("first record is after %X/%X, at %X/%X, skipping over %u bytes\n"),
- (uint32) (private.startptr >> 32), (uint32) private.startptr,
- (uint32) (first_record >> 32), (uint32) first_record,
- (uint32) (first_record - private.startptr));
-
- for (;;)
- {
- /* try to read the next record */
- record = XLogReadRecord(xlogreader_state, first_record, &errormsg);
- if (!record)
- {
- if (!config.follow || private.endptr_reached)
- break;
- else
- {
- pg_usleep(1000000L); /* 1 second */
- continue;
- }
- }
-
- /* after reading the first record, continue at next one */
- first_record = InvalidXLogRecPtr;
-
- /* apply all specified filters */
- if (config.filter_by_rmgr != -1 &&
- config.filter_by_rmgr != record->xl_rmid)
- continue;
-
- if (config.filter_by_xid_enabled &&
- config.filter_by_xid != record->xl_xid)
- continue;
-
- /* process the record */
- if (config.stats == true)
- XLogDumpCountRecord(&config, &stats, xlogreader_state);
- else
- XLogDumpDisplayRecord(&config, xlogreader_state);
-
- /* check whether we printed enough */
- config.already_displayed_records++;
- if (config.stop_after_records > 0 &&
- config.already_displayed_records >= config.stop_after_records)
- break;
- }
-
- if (config.stats == true)
- XLogDumpDisplayStats(&config, &stats);
-
- if (errormsg)
- fatal_error("error in WAL record at %X/%X: %s\n",
- (uint32) (xlogreader_state->ReadRecPtr >> 32),
- (uint32) xlogreader_state->ReadRecPtr,
- errormsg);
-
- XLogReaderFree(xlogreader_state);
-
- return EXIT_SUCCESS;
-
-bad_argument:
- fprintf(stderr, _("Try \"%s --help\" for more information.\n"), progname);
- return EXIT_FAILURE;
-}
diff --git a/src/bin/pg_xlogdump/rmgrdesc.c b/src/bin/pg_xlogdump/rmgrdesc.c
deleted file mode 100644
index 8fe20ce..0000000
--- a/src/bin/pg_xlogdump/rmgrdesc.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * rmgrdesc.c
- *
- * pg_xlogdump resource managers definition
- *
- * src/bin/pg_xlogdump/rmgrdesc.c
- */
-#define FRONTEND 1
-#include "postgres.h"
-
-#include "access/brin_xlog.h"
-#include "access/clog.h"
-#include "access/commit_ts.h"
-#include "access/generic_xlog.h"
-#include "access/gin.h"
-#include "access/gist_private.h"
-#include "access/hash_xlog.h"
-#include "access/heapam_xlog.h"
-#include "access/multixact.h"
-#include "access/nbtree.h"
-#include "access/rmgr.h"
-#include "access/spgist.h"
-#include "access/xact.h"
-#include "access/xlog_internal.h"
-#include "catalog/storage_xlog.h"
-#include "commands/dbcommands_xlog.h"
-#include "commands/sequence.h"
-#include "commands/tablespace.h"
-#include "replication/message.h"
-#include "replication/origin.h"
-#include "rmgrdesc.h"
-#include "storage/standbydefs.h"
-#include "utils/relmapper.h"
-
-#define PG_RMGR(symname,name,redo,desc,identify,startup,cleanup) \
- { name, desc, identify},
-
-const RmgrDescData RmgrDescTable[RM_MAX_ID + 1] = {
-#include "access/rmgrlist.h"
-};
diff --git a/src/bin/pg_xlogdump/rmgrdesc.h b/src/bin/pg_xlogdump/rmgrdesc.h
deleted file mode 100644
index 5440f94..0000000
--- a/src/bin/pg_xlogdump/rmgrdesc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * rmgrdesc.h
- *
- * pg_xlogdump resource managers declaration
- *
- * src/bin/pg_xlogdump/rmgrdesc.h
- */
-#ifndef RMGRDESC_H
-#define RMGRDESC_H
-
-#include "lib/stringinfo.h"
-
-typedef struct RmgrDescData
-{
- const char *rm_name;
- void (*rm_desc) (StringInfo buf, XLogReaderState *record);
- const char *(*rm_identify) (uint8 info);
-} RmgrDescData;
-
-extern const RmgrDescData RmgrDescTable[];
-
-#endif /* RMGRDESC_H */
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index 8ad4d47..9c50b78 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -9,7 +9,7 @@
* So the XLogRecord typedef and associated stuff appear in xlogrecord.h.
*
* Note: This file must be includable in both frontend and backend contexts,
- * to allow stand-alone tools like pg_receivexlog to deal with WAL files.
+ * to allow stand-alone tools like pg_receivewal to deal with WAL files.
*
* Portions Copyright (c) 1996-2017, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
@@ -153,7 +153,7 @@ typedef XLogLongPageHeaderData *XLogLongPageHeader;
strspn(fname, "0123456789ABCDEF") == XLOG_FNAME_LEN)
/*
- * XLOG segment with .partial suffix. Used by pg_receivexlog and at end of
+ * XLOG segment with .partial suffix. Used by pg_receivewal and at end of
* archive recovery, when we want to archive a WAL segment but it might not
* be complete yet.
*/
diff --git a/src/include/storage/bufmgr.h b/src/include/storage/bufmgr.h
index 4c697e2..07a32d6 100644
--- a/src/include/storage/bufmgr.h
+++ b/src/include/storage/bufmgr.h
@@ -237,7 +237,7 @@ extern void FreeAccessStrategy(BufferAccessStrategy strategy);
/*
* Although this header file is nominally backend-only, certain frontend
- * programs like pg_xlogdump include it. For compilers that emit static
+ * programs like pg_waldump include it. For compilers that emit static
* inline functions even when they're unused, that leads to unsatisfied
* external references; hence hide these with #ifndef FRONTEND.
*/
diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm
index e04efe6..0aa1422 100644
--- a/src/tools/msvc/Install.pm
+++ b/src/tools/msvc/Install.pm
@@ -24,7 +24,7 @@ my @client_program_files = (
'dropdb', 'droplang', 'dropuser', 'ecpg',
'libecpg', 'libecpg_compat', 'libpgtypes', 'libpq',
'pg_basebackup', 'pg_config', 'pg_dump', 'pg_dumpall',
- 'pg_isready', 'pg_receivexlog', 'pg_recvlogical', 'pg_restore',
+ 'pg_isready', 'pg_receivewal', 'pg_recvlogical', 'pg_restore',
'psql', 'reindexdb', 'vacuumdb', @client_contribs);
sub lcopy
diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index db566f9..df06e73 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -54,11 +54,11 @@ my @frontend_uselibpq = ('pg_ctl', 'pg_upgrade', 'pgbench', 'psql', 'initdb');
my @frontend_uselibpgport = (
'pg_archivecleanup', 'pg_test_fsync',
'pg_test_timing', 'pg_upgrade',
- 'pg_xlogdump', 'pgbench');
+ 'pg_waldump', 'pgbench');
my @frontend_uselibpgcommon = (
'pg_archivecleanup', 'pg_test_fsync',
'pg_test_timing', 'pg_upgrade',
- 'pg_xlogdump', 'pgbench');
+ 'pg_waldump', 'pgbench');
my $frontend_extralibs = {
'initdb' => ['ws2_32.lib'],
'pg_restore' => ['ws2_32.lib'],
@@ -73,7 +73,7 @@ my $frontend_extrasource = {
[ 'src/bin/pgbench/exprscan.l', 'src/bin/pgbench/exprparse.y' ] };
my @frontend_excludes = (
'pgevent', 'pg_basebackup', 'pg_rewind', 'pg_dump',
- 'pg_xlogdump', 'scripts');
+ 'pg_waldump', 'scripts');
sub mkvcbuild
{
@@ -324,10 +324,10 @@ sub mkvcbuild
$pgbasebackup->AddFile('src/bin/pg_basebackup/pg_basebackup.c');
$pgbasebackup->AddLibrary('ws2_32.lib');
- my $pgreceivexlog = AddSimpleFrontend('pg_basebackup', 1);
- $pgreceivexlog->{name} = 'pg_receivexlog';
- $pgreceivexlog->AddFile('src/bin/pg_basebackup/pg_receivexlog.c');
- $pgreceivexlog->AddLibrary('ws2_32.lib');
+ my $pgreceivewal = AddSimpleFrontend('pg_basebackup', 1);
+ $pgreceivewal->{name} = 'pg_receivewal';
+ $pgreceivewal->AddFile('src/bin/pg_basebackup/pg_receivewal.c');
+ $pgreceivewal->AddLibrary('ws2_32.lib');
my $pgrecvlogical = AddSimpleFrontend('pg_basebackup', 1);
$pgrecvlogical->{name} = 'pg_recvlogical';
@@ -631,15 +631,15 @@ sub mkvcbuild
$pgregress->AddDirResourceFile('src/test/regress');
$pgregress->AddReference($libpgcommon, $libpgport);
- # fix up pg_xlogdump once it's been set up
+ # fix up pg_waldump once it's been set up
# files symlinked on Unix are copied on windows
- my $pg_xlogdump = AddSimpleFrontend('pg_xlogdump');
- $pg_xlogdump->AddDefine('FRONTEND');
+ my $pg_waldump = AddSimpleFrontend('pg_waldump');
+ $pg_waldump->AddDefine('FRONTEND');
foreach my $xf (glob('src/backend/access/rmgrdesc/*desc.c'))
{
- $pg_xlogdump->AddFile($xf);
+ $pg_waldump->AddFile($xf);
}
- $pg_xlogdump->AddFile('src/backend/access/transam/xlogreader.c');
+ $pg_waldump->AddFile('src/backend/access/transam/xlogreader.c');
$solution->Save();
return $solution->{vcver};
--
2.5.4 (Apple Git-61)
0003-Rename-dtrace-probes-for-ongoing-xlog-wal-conversion.patchinvalid/octet-stream; name=0003-Rename-dtrace-probes-for-ongoing-xlog-wal-conversion.patchDownload
From ad9e7579035972b5e117b45177b22876f3f40683 Mon Sep 17 00:00:00 2001
From: Robert Haas <rhaas@postgresql.org>
Date: Thu, 26 Jan 2017 11:38:33 -0500
Subject: [PATCH 3/4] Rename dtrace probes for ongoing xlog -> wal conversion.
xlog-switch becomes wal-switch, and xlog-insert becomes wal-insert.
---
doc/src/sgml/monitoring.sgml | 4 ++--
src/backend/access/transam/xlog.c | 2 +-
src/backend/access/transam/xloginsert.c | 2 +-
src/backend/utils/probes.d | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml
index 01fad38..5b67def 100644
--- a/doc/src/sgml/monitoring.sgml
+++ b/doc/src/sgml/monitoring.sgml
@@ -3349,14 +3349,14 @@ SELECT pg_stat_get_backend_pid(s.backendid) AS pid,
<entry>Probe that fires when a dirty WAL buffer write is complete.</entry>
</row>
<row>
- <entry><literal>xlog-insert</literal></entry>
+ <entry><literal>wal-insert</literal></entry>
<entry><literal>(unsigned char, unsigned char)</literal></entry>
<entry>Probe that fires when a WAL record is inserted.
arg0 is the resource manager (rmid) for the record.
arg1 contains the info flags.</entry>
</row>
<row>
- <entry><literal>xlog-switch</literal></entry>
+ <entry><literal>wal-switch</literal></entry>
<entry><literal>()</literal></entry>
<entry>Probe that fires when a WAL segment switch is requested.</entry>
</row>
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
index 29e0b88..54f078b 100644
--- a/src/backend/access/transam/xlog.c
+++ b/src/backend/access/transam/xlog.c
@@ -1107,7 +1107,7 @@ XLogInsertRecord(XLogRecData *rdata,
*/
if (isLogSwitch)
{
- TRACE_POSTGRESQL_XLOG_SWITCH();
+ TRACE_POSTGRESQL_WAL_SWITCH();
XLogFlush(EndPos);
/*
diff --git a/src/backend/access/transam/xloginsert.c b/src/backend/access/transam/xloginsert.c
index a5aa58d..be9dfe4 100644
--- a/src/backend/access/transam/xloginsert.c
+++ b/src/backend/access/transam/xloginsert.c
@@ -427,7 +427,7 @@ XLogInsert(RmgrId rmid, uint8 info)
if ((info & ~(XLR_RMGR_INFO_MASK | XLR_SPECIAL_REL_UPDATE)) != 0)
elog(PANIC, "invalid xlog info mask %02X", info);
- TRACE_POSTGRESQL_XLOG_INSERT(rmid, info);
+ TRACE_POSTGRESQL_WAL_INSERT(rmid, info);
/*
* In bootstrap mode, we don't actually log anything but XLOG resources;
diff --git a/src/backend/utils/probes.d b/src/backend/utils/probes.d
index 1aaadc1..214dc71 100644
--- a/src/backend/utils/probes.d
+++ b/src/backend/utils/probes.d
@@ -87,8 +87,8 @@ provider postgresql {
probe smgr__md__write__start(ForkNumber, BlockNumber, Oid, Oid, Oid, int);
probe smgr__md__write__done(ForkNumber, BlockNumber, Oid, Oid, Oid, int, int, int);
- probe xlog__insert(unsigned char, unsigned char);
- probe xlog__switch();
+ probe wal__insert(unsigned char, unsigned char);
+ probe wal__switch();
probe wal__buffer__write__dirty__start();
probe wal__buffer__write__dirty__done();
};
--
2.5.4 (Apple Git-61)
0004-Rename-command-line-options-for-ongoing-xlog-wal-con.patchinvalid/octet-stream; name=0004-Rename-command-line-options-for-ongoing-xlog-wal-con.patchDownload
From e0cebfd777521af470e0f1a673f60feae1a598db Mon Sep 17 00:00:00 2001
From: Robert Haas <rhaas@postgresql.org>
Date: Thu, 26 Jan 2017 12:03:08 -0500
Subject: [PATCH 4/4] Rename command line options for ongoing xlog -> wal
conversion.
initdb and pg_basebackup now have a --waldir option rather --xlogdir,
and pg_basebackup now has --wal-method rather than --xlog-method.
---
doc/src/sgml/ref/initdb.sgml | 2 +-
doc/src/sgml/ref/pg_basebackup.sgml | 6 +++---
src/bin/initdb/initdb.c | 4 ++--
src/bin/pg_basebackup/pg_basebackup.c | 8 ++++----
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 2 +-
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/doc/src/sgml/ref/initdb.sgml b/doc/src/sgml/ref/initdb.sgml
index 31f081a..1aaa490 100644
--- a/doc/src/sgml/ref/initdb.sgml
+++ b/doc/src/sgml/ref/initdb.sgml
@@ -311,7 +311,7 @@ PostgreSQL documentation
<varlistentry>
<term><option>-X <replaceable class="parameter">directory</replaceable></option></term>
- <term><option>--xlogdir=<replaceable class="parameter">directory</replaceable></option></term>
+ <term><option>--waldir=<replaceable class="parameter">directory</replaceable></option></term>
<listitem>
<para>
This option specifies the directory where the transaction log
diff --git a/doc/src/sgml/ref/pg_basebackup.sgml b/doc/src/sgml/ref/pg_basebackup.sgml
index 5c2db25..c9dd62c 100644
--- a/doc/src/sgml/ref/pg_basebackup.sgml
+++ b/doc/src/sgml/ref/pg_basebackup.sgml
@@ -296,11 +296,11 @@ PostgreSQL documentation
</varlistentry>
<varlistentry>
- <term><option>--xlogdir=<replaceable class="parameter">xlogdir</replaceable></option></term>
+ <term><option>--waldir=<replaceable class="parameter">waldir</replaceable></option></term>
<listitem>
<para>
Specifies the location for the transaction log directory.
- <replaceable>xlogdir</replaceable> must be an absolute path.
+ <replaceable>waldir</replaceable> must be an absolute path.
The transaction log directory can only be specified when
the backup is in plain mode.
</para>
@@ -309,7 +309,7 @@ PostgreSQL documentation
<varlistentry>
<term><option>-X <replaceable class="parameter">method</replaceable></option></term>
- <term><option>--xlog-method=<replaceable class="parameter">method</replaceable></option></term>
+ <term><option>--wal-method=<replaceable class="parameter">method</replaceable></option></term>
<listitem>
<para>
Includes the required transaction log files (WAL files) in the
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 443c2ee..540427a 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -2255,7 +2255,7 @@ usage(const char *progname)
" default text search configuration\n"));
printf(_(" -U, --username=NAME database superuser name\n"));
printf(_(" -W, --pwprompt prompt for a password for the new superuser\n"));
- printf(_(" -X, --xlogdir=XLOGDIR location for the transaction log directory\n"));
+ printf(_(" -X, --waldir=WALDIR location for the write-ahead log directory\n"));
printf(_("\nLess commonly used options:\n"));
printf(_(" -d, --debug generate lots of debugging output\n"));
printf(_(" -k, --data-checksums use data page checksums\n"));
@@ -2941,7 +2941,7 @@ main(int argc, char *argv[])
{"nosync", no_argument, NULL, 'N'}, /* for backwards compatibility */
{"no-sync", no_argument, NULL, 'N'},
{"sync-only", no_argument, NULL, 'S'},
- {"xlogdir", required_argument, NULL, 'X'},
+ {"waldir", required_argument, NULL, 'X'},
{"data-checksums", no_argument, NULL, 'k'},
{NULL, 0, NULL, 0}
};
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index ce1fe3b..b6463fa 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -342,9 +342,9 @@ usage(void)
printf(_(" --no-slot prevent creation of temporary replication slot\n"));
printf(_(" -T, --tablespace-mapping=OLDDIR=NEWDIR\n"
" relocate tablespace in OLDDIR to NEWDIR\n"));
- printf(_(" -X, --xlog-method=none|fetch|stream\n"
+ printf(_(" -X, --wal-method=none|fetch|stream\n"
" include required WAL files with specified method\n"));
- printf(_(" --xlogdir=XLOGDIR location for the transaction log directory\n"));
+ printf(_(" --waldir=WALDIR location for the transaction log directory\n"));
printf(_(" -z, --gzip compress tar output\n"));
printf(_(" -Z, --compress=0-9 compress tar output with given compression level\n"));
printf(_("\nGeneral options:\n"));
@@ -2065,7 +2065,7 @@ main(int argc, char **argv)
{"write-recovery-conf", no_argument, NULL, 'R'},
{"slot", required_argument, NULL, 'S'},
{"tablespace-mapping", required_argument, NULL, 'T'},
- {"xlog-method", required_argument, NULL, 'X'},
+ {"wal-method", required_argument, NULL, 'X'},
{"gzip", no_argument, NULL, 'z'},
{"compress", required_argument, NULL, 'Z'},
{"label", required_argument, NULL, 'l'},
@@ -2080,7 +2080,7 @@ main(int argc, char **argv)
{"status-interval", required_argument, NULL, 's'},
{"verbose", no_argument, NULL, 'v'},
{"progress", no_argument, NULL, 'P'},
- {"xlogdir", required_argument, NULL, 1},
+ {"waldir", required_argument, NULL, 1},
{"no-slot", no_argument, NULL, 2},
{NULL, 0, NULL, 0}
};
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
index 2c5a365..29f519d 100644
--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -93,7 +93,7 @@ isnt(slurp_file("$tempdir/backup/backup_label"), 'DONOTCOPY',
'existing backup_label not copied');
$node->command_ok(
- [ 'pg_basebackup', '-D', "$tempdir/backup2", '--xlogdir',
+ [ 'pg_basebackup', '-D', "$tempdir/backup2", '--waldir',
"$tempdir/xlog2" ],
'separate xlog directory');
ok(-f "$tempdir/backup2/PG_VERSION", 'backup was created');
--
2.5.4 (Apple Git-61)
Robert Haas wrote:
0002 renames programs whose names contains "xlog".
There have been complaints that pg_receivexlog's name is not consistent
with pg_recvlogical, and I seem to recall there were some votes for
renaming pg_receivexlog to match. We could make it "pg_recvwal" now.
--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 26, 2017 at 12:27 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
Robert Haas wrote:
0002 renames programs whose names contains "xlog".
There have been complaints that pg_receivexlog's name is not consistent
with pg_recvlogical, and I seem to recall there were some votes for
renaming pg_receivexlog to match. We could make it "pg_recvwal" now.
Or prw. :-)
Personally, I generally push to avoid abbreviations like receive ->
recv. Yeah, it's a few extra characters of typing, but you can use
tab completion so it's not really a big deal I think. And the problem
with abbreviating things is that people then have to remember whether
it was abbreviated and in exactly which way. "Wait, was it recv or
rcv this time?" Moreover, some of the abbreviations we've used are
potentially opaque to non-English-speakers, or in some cases even to
English speakers. So I would prefer not to go there. But if the
consensus is otherwise, so be it.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
On Thu, Jan 26, 2017 at 12:27 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:There have been complaints that pg_receivexlog's name is not consistent
with pg_recvlogical, and I seem to recall there were some votes for
renaming pg_receivexlog to match. We could make it "pg_recvwal" now.
... I would prefer not to go there.
I agree. "pg_recvlogical" was a badly chosen name; let's not double
down on the error.
What I think might be worth considering is inserting underscores,
eg "pg_receive_wal", anywhere that we are running the abbreviation
directly against another word. We won't get another chance.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
Robert Haas <robertmhaas@gmail.com> writes:
On Thu, Jan 26, 2017 at 12:27 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:There have been complaints that pg_receivexlog's name is not consistent
with pg_recvlogical, and I seem to recall there were some votes for
renaming pg_receivexlog to match. We could make it "pg_recvwal" now.... I would prefer not to go there.
I agree. "pg_recvlogical" was a badly chosen name; let's not double
down on the error.What I think might be worth considering is inserting underscores,
eg "pg_receive_wal", anywhere that we are running the abbreviation
directly against another word. We won't get another chance.
Wouldn't that make it 'pg_recv_wal'? Or were you referring to the 'wal'
as being the abbreviation? Or did you mean underscores between words in
general?
If we want to switch to using underscores to seperate words, then that
implies a whole lot of *additional* renaming that I'm not sure I can
really get behind...
initdb
pg_archivecleanup
pg_basebackup
pgbench
pg_controldata
pgevent (eh, not really a binary, but it's in src/bin)
pg_dumpall
pg_isready
All of those, to me at least seem fine, and I'd further be fine with
"pg_receivewal".
I haven't got any great answers wrt pg_recvlogical, though I don't
particullarly like the existing name, but that's more because I have
to ask myself how the heck one can receive a "logical"..
Then again 'pg_controldata' only works if you realize it's really
"pg_print_pg_control" or something. It's hardly controlling any data.
Thanks!
Stephen
On Thu, Jan 26, 2017 at 12:41 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Robert Haas <robertmhaas@gmail.com> writes:
On Thu, Jan 26, 2017 at 12:27 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:There have been complaints that pg_receivexlog's name is not consistent
with pg_recvlogical, and I seem to recall there were some votes for
renaming pg_receivexlog to match. We could make it "pg_recvwal" now.... I would prefer not to go there.
I agree. "pg_recvlogical" was a badly chosen name; let's not double
down on the error.What I think might be worth considering is inserting underscores,
eg "pg_receive_wal", anywhere that we are running the abbreviation
directly against another word. We won't get another chance.
Yeah, I thought about that, too, but it doesn't really seem worth it.
If we had pg_receive_wal and pg_receive_logical, they'd be nicely
consistent with each other, but inconsistent with practically every
other utility we have: pg_basebackup, pg_archivecleanup,
pg_controldata, etc. I'm not prepared to endorse renaming all of that
stuff just to add underscores, and frankly I don't think the style
pg_foobarbaz is really a problem. It's a lot easier to remember "the
only underscore is after the initial pg" than it is to remember
exactly how each word was abbreviated in each context.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
* Tom Lane (tgl@sss.pgh.pa.us) wrote:
What I think might be worth considering is inserting underscores,
eg "pg_receive_wal", anywhere that we are running the abbreviation
directly against another word. We won't get another chance.
Wouldn't that make it 'pg_recv_wal'? Or were you referring to the 'wal'
as being the abbreviation?
The latter. As far as the programs go, that would be
pg_receive_wal
pg_reset_wal
pg_wal_dump
The other cases you mention are, for the most part, words that we're
running together ("db" is the only exception) so they're not committing
double sins against readability. Anyway, I'm not suggesting that we
should rename anything this patch isn't touching already.
regards, tom lane
PS: I'm trying hard not to open the can of worms labeled "pg_dump_wal".
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
Yeah, I thought about that, too, but it doesn't really seem worth it.
If we had pg_receive_wal and pg_receive_logical, they'd be nicely
consistent with each other, but inconsistent with practically every
other utility we have: pg_basebackup, pg_archivecleanup,
pg_controldata, etc.
Mmm, good point. I was looking at pg_test_fsync and pg_test_timing,
but those are the only exceptions, and they're only quasi-user-facing
anyway.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 2017-01-24 16:47:29 -0500, Robert Haas wrote:
I'm happy to go change every last bit of it.
I quite regret not aggressively opining against the renaming of pg_xlog
to pg_wal. I think the few users deleting their data don't weigh against
renaming a bunch of tools and function for some sense of
consistency. This will cause pain for a couple years - maybe it'll be
worth it 6-7 releases down the line, but I doubt before that. But then
the original discussion was about renaming pg_xlog, not about a general
s/xlog/$something/.
- Andres
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Andres Freund (andres@anarazel.de) wrote:
On 2017-01-24 16:47:29 -0500, Robert Haas wrote:
I'm happy to go change every last bit of it.
I quite regret not aggressively opining against the renaming of pg_xlog
to pg_wal. I think the few users deleting their data don't weigh against
renaming a bunch of tools and function for some sense of
consistency. This will cause pain for a couple years - maybe it'll be
worth it 6-7 releases down the line, but I doubt before that. But then
the original discussion was about renaming pg_xlog, not about a general
s/xlog/$something/.
For my 2c, I'm actually quite happy that we're finally going to start
reducing the confusion between xlog and WAL.
Let's not forget to go update the documentation to be sensible and
consistent as we're making these mechanical changes to the program
names.
Thanks!
Stephen
On Thu, Jan 26, 2017 at 1:21 PM, Andres Freund <andres@anarazel.de> wrote:
On 2017-01-24 16:47:29 -0500, Robert Haas wrote:
I'm happy to go change every last bit of it.
I quite regret not aggressively opining against the renaming of pg_xlog
to pg_wal. I think the few users deleting their data don't weigh against
renaming a bunch of tools and function for some sense of
consistency. This will cause pain for a couple years - maybe it'll be
worth it 6-7 releases down the line, but I doubt before that. But then
the original discussion was about renaming pg_xlog, not about a general
s/xlog/$something/.
I completely understand that position. I have always been doubtful of
the value of renaming pg_xlog to pg_wal, and I'm not any more
dedicated to the idea now than I was when I committed that patch. But
there was overwhelming support for it, consensus on a level rarely
seen here.
I do not think it can be right to rename the directory and not
anything else. I stand by what I wrote in
/messages/by-id/CA+TgmobeHP2qbtMvYxG2x8Pm_9utjRya-rom5XL4QuyA26c1Gg@mail.gmail.com
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 2017-01-26 14:05:43 -0500, Robert Haas wrote:
I completely understand that position. I have always been doubtful of
the value of renaming pg_xlog to pg_wal, and I'm not any more
dedicated to the idea now than I was when I committed that patch. But
there was overwhelming support for it, consensus on a level rarely
seen here.
I think that consistency was based on the change being a narrow
proposition, not a license to run around and change a lot of stuff
including the names of binary.
I do not think it can be right to rename the directory and not
anything else. I stand by what I wrote in/messages/by-id/CA+TgmobeHP2qbtMvYxG2x8Pm_9utjRya-rom5XL4QuyA26c1Gg@mail.gmail.com
I'm tempted to quote Emerson ;). I don't think the naming of pg_xlog
vs. pg_wal doesn't actually have that large an impact, to change the
dynamics of the wal vs xlog dichotomy. Sure it's nothing you'd do in a
new program, but neither is it very bad.
Andres
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 26, 2017 at 12:13 PM, Andres Freund <andres@anarazel.de> wrote:
On 2017-01-26 14:05:43 -0500, Robert Haas wrote:
I completely understand that position. I have always been doubtful of
the value of renaming pg_xlog to pg_wal, and I'm not any more
dedicated to the idea now than I was when I committed that patch. But
there was overwhelming support for it, consensus on a level rarely
seen here.I think that consistency was based on the change being a narrow
proposition, not a license to run around and change a lot of stuff
including the names of binary.
Whether the voters recognized that fact at the time I would have to concur
that if we are going to change from xlog to wal we should be all-in. If
you want to vote to reject putting the whole camel in the tent I would say
its a vote for reverting the change that put the camel's nose in there in
the first place.
https://en.wikipedia.org/wiki/Camel's_nose
I do not think it can be right to rename the directory and not
anything else. I stand by what I wrote in9utjRya-rom5XL4QuyA26c1Gg@mail.gmail.com
I'm tempted to quote Emerson ;). I don't think the naming of pg_xlog
vs. pg_wal doesn't actually have that large an impact, to change the
dynamics of the wal vs xlog dichotomy. Sure it's nothing you'd do in a
new program, but neither is it very bad.
Once I learned what "write ahead log" was it wasn't that big a deal to
understand that this particular historical implementation detail means I
have to associate xlog with it. Causing wide-spread pain to lower the
comprehension bar doesn't seems like a simple win here. I have no real
feel for how wide-spread that would be, though. I personally wouldn't mind
it being consistent but I am not representative of the larger user base.
David J.
On 2017-01-26 12:23:24 -0700, David G. Johnston wrote:
On Thu, Jan 26, 2017 at 12:13 PM, Andres Freund <andres@anarazel.de> wrote:
On 2017-01-26 14:05:43 -0500, Robert Haas wrote:
I completely understand that position. I have always been doubtful of
the value of renaming pg_xlog to pg_wal, and I'm not any more
dedicated to the idea now than I was when I committed that patch. But
there was overwhelming support for it, consensus on a level rarely
seen here.I think that consistency was based on the change being a narrow
proposition, not a license to run around and change a lot of stuff
including the names of binary.Whether the voters recognized that fact at the time I would have to concur
that if we are going to change from xlog to wal we should be all-in. If
you want to vote to reject putting the whole camel in the tent I would say
its a vote for reverting the change that put the camel's nose in there in
the first place.
WTF.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 26, 2017 at 2:13 PM, Andres Freund <andres@anarazel.de> wrote:
On 2017-01-26 14:05:43 -0500, Robert Haas wrote:
I completely understand that position. I have always been doubtful of
the value of renaming pg_xlog to pg_wal, and I'm not any more
dedicated to the idea now than I was when I committed that patch. But
there was overwhelming support for it, consensus on a level rarely
seen here.I think that consistency was based on the change being a narrow
proposition, not a license to run around and change a lot of stuff
including the names of binary.
I'm not so sure about that. There are a lot of people who have
supported the idea of making this consistent on THIS thread. It's not
clear how much of a majority there is, but it's certainly no worse
than 50-50. It's got far more affirmative votes than most patches
that go in though, I will grant, also far more negative votes.
I do not think it can be right to rename the directory and not
anything else. I stand by what I wrote in/messages/by-id/CA+TgmobeHP2qbtMvYxG2x8Pm_9utjRya-rom5XL4QuyA26c1Gg@mail.gmail.com
I'm tempted to quote Emerson ;). I don't think the naming of pg_xlog
vs. pg_wal doesn't actually have that large an impact, to change the
dynamics of the wal vs xlog dichotomy. Sure it's nothing you'd do in a
new program, but neither is it very bad.
Gee, I can't imagine what Emerson quote you might be thinking about. :-)
I think it's just never going to work to imagine that we can
indefinitely go on having a pg_resetxlog binary to reset a thing that
is no longer called xlog. Sure, for a few years that will seem like
it makes sense, but if we didn't change it now, eventually there would
be a push to do it later. And if that one gets shut down, there will
eventually be another push. We'll repeatedly relitigate this whole
debate, and maybe eventually the result will be one or two more things
get changed ... and then later we'll do it again for what's left. I
am not entirely excited about the backward-compatibility pain we're
incurring here, but I think if we don't do it all at once it's just
going to get spread out over time. Maybe it in a universe where
PostgreSQL was controlled by a small number of people acting as one
you could hold the line, but in the actual universe people just keep
calling a vote on this sort of thing every two or three until they
win. I don't think there's anything you or I or anyone else can say
or do that will prevent that from happening, so I'd as soon just be
done with it.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 26, 2017 at 2:24 PM, Andres Freund <andres@anarazel.de> wrote:
Whether the voters recognized that fact at the time I would have to concur
that if we are going to change from xlog to wal we should be all-in. If
you want to vote to reject putting the whole camel in the tent I would say
its a vote for reverting the change that put the camel's nose in there in
the first place.WTF.
I think that response is unwarranted. I happen to agree entirely with
his position.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 2017-01-26 14:28:01 -0500, Robert Haas wrote:
On Thu, Jan 26, 2017 at 2:24 PM, Andres Freund <andres@anarazel.de> wrote:
Whether the voters recognized that fact at the time I would have to concur
that if we are going to change from xlog to wal we should be all-in. If
you want to vote to reject putting the whole camel in the tent I would say
its a vote for reverting the change that put the camel's nose in there in
the first place.WTF.
I think that response is unwarranted. I happen to agree entirely with
his position.
I don't. Considering intent imo is important. David (and you?) is
basically saying "screw it, you voted for that person, you aren't
allowed to have an opinion anymore", and that's way outside of what I
consider acceptable. So, because you think it doesn't make sense to
view renaming pg_xlog vs pg_wal as separate from a global s/xlog/wal/,
nobody else can have that position. And on top of that David's
underlying that argument with a metaphor that basically implies the
other party is getting screwed over. Sorry, that's not the way I want
decisions to be made here.
Andres
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
On Thu, Jan 26, 2017 at 2:24 PM, Andres Freund <andres@anarazel.de> wrote:
Whether the voters recognized that fact at the time I would have to concur
that if we are going to change from xlog to wal we should be all-in. If
you want to vote to reject putting the whole camel in the tent I would say
its a vote for reverting the change that put the camel's nose in there in
the first place.
WTF.
I think that response is unwarranted. I happen to agree entirely with
his position.
Me three. If we're changing this at all, we should try to eliminate
"xlog" from user-visible names and docs altogether. I was okay with the
proposal to have some redundant names in place for awhile, and I'm equally
okay with not having any; but not with being permanently schizophrenic
on the point.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 26, 2017 at 12:37 PM, Andres Freund <andres@anarazel.de> wrote:
On 2017-01-26 14:28:01 -0500, Robert Haas wrote:
On Thu, Jan 26, 2017 at 2:24 PM, Andres Freund <andres@anarazel.de>
wrote:
Whether the voters recognized that fact at the time I would have to
concur
that if we are going to change from xlog to wal we should be all-in.
If
you want to vote to reject putting the whole camel in the tent I
would say
its a vote for reverting the change that put the camel's nose in
there in
the first place.
WTF.
I think that response is unwarranted. I happen to agree entirely with
his position.I don't. Considering intent imo is important. David (and you?) is
basically saying "screw it, you voted for that person, you aren't
allowed to have an opinion anymore", and that's way outside of what I
consider acceptable. So, because you think it doesn't make sense to
view renaming pg_xlog vs pg_wal as separate from a global s/xlog/wal/,
nobody else can have that position. And on top of that David's
underlying that argument with a metaphor that basically implies the
other party is getting screwed over. Sorry, that's not the way I want
decisions to be made here.
We can think or assume all we want about what people knew or did not know
when the prior consensus to commit the directory change was reached. At
this point it doesn't matter. The limited point I was trying to make is
that "the small change (i.e., the camel's nose) has been made (i.e., is now
in the tent)". Yet here we are talking about the rest of the camel. We
have three options: go all-in, leave the status-quo, undo the previous
action.
The past decision is immaterial and any knowledge/experience/opinions that
it may have entailed can now, on an individual basis, be neatly wrapped up
into a vote on one of those options. No need to make assumptions about
how/why consensus on the previous decision was reached. And, to be fair,
it is not an unreasonable assumption for Robert to make that having voted
for the small action that most of the well-informed persons on this list
were aware and implicitly understood that the underlying intent was not the
directory but rather removing "xlog" from our vocabulary and replacing it
with the more accurate "wal". In that vein assumed consensus makes sense.
I didn't give as much credence to the "status quo" option in my original
response as I probably should have - because, frankly, I find it
unappealing. I do accept that it is a valid position to hold, though.
David J.
-Hackers,
From the field. I do not care what you chose, I care that:
1. It is consistent
2. It is readable/understandable
3. It is documented
4. It is done wholesale (because of usability)
That's it. So whatever meets that criteria, let's go for it. That may
mean that certain commands look a little off but with the goal of
consistency that is o.k.. It becomes explainable.
JD
--
Command Prompt, Inc. http://the.postgres.company/
+1-503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Everyone appreciates your honesty, until you are honest with them.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 26, 2017 at 2:37 PM, Andres Freund <andres@anarazel.de> wrote:
On 2017-01-26 14:28:01 -0500, Robert Haas wrote:
On Thu, Jan 26, 2017 at 2:24 PM, Andres Freund <andres@anarazel.de> wrote:
Whether the voters recognized that fact at the time I would have to concur
that if we are going to change from xlog to wal we should be all-in. If
you want to vote to reject putting the whole camel in the tent I would say
its a vote for reverting the change that put the camel's nose in there in
the first place.WTF.
I think that response is unwarranted. I happen to agree entirely with
his position.I don't. Considering intent imo is important. David (and you?) is
basically saying "screw it, you voted for that person, you aren't
allowed to have an opinion anymore", and that's way outside of what I
consider acceptable. So, because you think it doesn't make sense to
view renaming pg_xlog vs pg_wal as separate from a global s/xlog/wal/,
nobody else can have that position. And on top of that David's
underlying that argument with a metaphor that basically implies the
other party is getting screwed over. Sorry, that's not the way I want
decisions to be made here.
I'm not saying that people aren't allowed to have an opinion any more.
I'm saying that when somebody has an opinion that is different than
yours, you should politely disagree with it rather than saying "WTF",
which just as a reminder expands to "What The Fuck". Frankly, I think
WTF is generally not a particularly useful contribution to most
discussions, but at the very least I think it should be used with some
kind of context. Sending an email that says "WTF" and nothing else
conveys nothing other than that you don't respect the author of the
email to which you are replying, and David's response was not so
outlandish as to deserve that. You might as well send an email that
says "go dire in a fire".
The substantive issue here is whether we should go forward with this
change, back out the change we already did, or leave things as they
are. Tom, David, and I seem to be in lock step on at least the
following conclusion: halfway in between is bad. So I have every
intention of continuing to push very hard for us to go either forward
or backward. I hope to do that politely and respectfully, but I am
not prepared to give up on that basic point unless there are a WHOLE
LOT of contrary votes, and that is just not where we are at present.
While a variety of opinions have been expressed on the patch
originally posted and while many of those people took subtly different
positions which I'm unable to summarize concisely, there was ZERO
pushback against my email volunteering to go make all of this
consistent and pushing for it to be made consistent until you showed
up to complain. Now there is one person objecting and several people
in favor, and I think it is pretty fair to say that many of the people
who were arguing for Vladimir's original patch are still in favor of
proceeding. Even Peter, who wasn't super-excited about Vladimir's
patch in isolation, conceded that the xlog terminology sucked and
asked for a complete patch set. I don't think he's unequivocally in
favor of this, but he seemed to be willing to sit still for it. After
waiting two days for further opinions, I went and wrote the patches as
promised.
And I think that's all pretty reasonable. I don't consider this a
done deal yet. I don't consider your -1 irrelevant. But I don't
think it's fair to present this as if I am somehow running roughshod
over community process, either. If a large crew of people show up to
insist that we should rename only the directories and nothing else, I
guess I'll have to live with that. But I think that's a bad decision
that will never survive the passage of time, and there seem to be
several people who agree with me.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Robert Haas (robertmhaas@gmail.com) wrote:
And I think that's all pretty reasonable. I don't consider this a
done deal yet. I don't consider your -1 irrelevant. But I don't
think it's fair to present this as if I am somehow running roughshod
over community process, either. If a large crew of people show up to
insist that we should rename only the directories and nothing else, I
guess I'll have to live with that. But I think that's a bad decision
that will never survive the passage of time, and there seem to be
several people who agree with me.
+1 (to the above, and the rest of Robert's comments on that email).
For my 2c, I'm also in the crowd of forward or back, but don't leave it
half-done. My preference is certainly to move forward with these
changes, but I understand the process and if there's enough agreement
that we just shouldn't make these changes, then we really shouldn't make
any of them.
Thanks!
Stephen
On 1/26/17 5:07 PM, Stephen Frost wrote:
* Robert Haas (robertmhaas@gmail.com) wrote:
And I think that's all pretty reasonable. I don't consider this a
done deal yet. I don't consider your -1 irrelevant. But I don't
think it's fair to present this as if I am somehow running roughshod
over community process, either. If a large crew of people show up to
insist that we should rename only the directories and nothing else, I
guess I'll have to live with that. But I think that's a bad decision
that will never survive the passage of time, and there seem to be
several people who agree with me.+1 (to the above, and the rest of Robert's comments on that email).
For my 2c, I'm also in the crowd of forward or back, but don't leave it
half-done. My preference is certainly to move forward with these
changes, but I understand the process and if there's enough agreement
that we just shouldn't make these changes, then we really shouldn't make
any of them.
+1 for forward or back. I prefer forward but would take back over the
state we're in now.
--
-David
david@pgmasters.net
On 2017-01-26 16:55:37 -0500, Robert Haas wrote:
On Thu, Jan 26, 2017 at 2:37 PM, Andres Freund <andres@anarazel.de> wrote:
On 2017-01-26 14:28:01 -0500, Robert Haas wrote:
On Thu, Jan 26, 2017 at 2:24 PM, Andres Freund <andres@anarazel.de> wrote:
Whether the voters recognized that fact at the time I would have to concur
that if we are going to change from xlog to wal we should be all-in. If
you want to vote to reject putting the whole camel in the tent I would say
its a vote for reverting the change that put the camel's nose in there in
the first place.WTF.
I think that response is unwarranted. I happen to agree entirely with
his position.I don't. Considering intent imo is important. David (and you?) is
basically saying "screw it, you voted for that person, you aren't
allowed to have an opinion anymore", and that's way outside of what I
consider acceptable. So, because you think it doesn't make sense to
view renaming pg_xlog vs pg_wal as separate from a global s/xlog/wal/,
nobody else can have that position. And on top of that David's
underlying that argument with a metaphor that basically implies the
other party is getting screwed over. Sorry, that's not the way I want
decisions to be made here.I'm not saying that people aren't allowed to have an opinion any more.
I'm saying that when somebody has an opinion that is different than
yours, you should politely disagree with it rather than saying "WTF",
which just as a reminder expands to "What The Fuck". Frankly, I think
WTF is generally not a particularly useful contribution to most
discussions, but at the very least I think it should be used with some
kind of context. Sending an email that says "WTF" and nothing else
conveys nothing other than that you don't respect the author of the
email to which you are replying, and David's response was not so
outlandish as to deserve that. You might as well send an email that
says "go dire in a fire".
The WTF wasn't about David wanting to go all in or not, but the way he
framed the general discussion. And I do find it outlandish enough to
deserve that. To me, especially with that methaphor and link, it still
reads as "you voted for it, even if phrased a lot more narrowly, so you
now get to eat all of it". *Especially* as it's a reply to me saying
that I'm concerned about my tepid yes to s/pg_xlog/pg_wal/ being used
for a larger change.
Using the normal ~concensus type of process for a mildly controversial
breaking change is fine with me. I *personally* don't think it's worth
changing all this without taking more care about backward compat than
we're apparently willing to do. I'm ok with loosing that argument. I
just don't think the previous concensus for a narrower change can be
used for the wider one.
Andres
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 26, 2017 at 3:28 PM, Andres Freund <andres@anarazel.de> wrote:
I *personally* don't think it's worth
changing all this without taking more care about backward compat than
we're apparently willing to do. I'm ok with loosing that argument. I
just don't think the previous concensus for a narrower change can be
used for the wider one
.
It would probably help others if you could brain dump a bit as to the
benefit of the status-quo compared to both the 9.6 behavior and the all-in
one.
Honestly, the reference to the camel sticking their nose in a tent was
supposed to be taken humorously, the serious explanation that it meant to
convey was already very well presented by Robert. The only reason I added
the wiki link was to give those who would have no clue about the metaphor a
chance at understanding it.
I actually took your response as: "why the f**k is he talking about
camels?" and started laughing...
Dave
On 2017-01-26 15:45:15 -0700, David G. Johnston wrote:
On Thu, Jan 26, 2017 at 3:28 PM, Andres Freund <andres@anarazel.de> wrote:
I *personally* don't think it's worth
changing all this without taking more care about backward compat than
we're apparently willing to do. I'm ok with loosing that argument. I
just don't think the previous concensus for a narrower change can be
used for the wider one
.It would probably help others if you could brain dump a bit as to the
benefit of the status-quo compared to both the 9.6 behavior and the all-in
one.
Well, I think I've lost that argument, so I'm not sure how much effort
we should spent on litigating my opinion on it. But here we go:
As I said somewhere upthread (when discussing the function names), I
think we're playing it too fast and loose with unnecessary changes.
We decided s/pg_xlog/pg_wal/ was necessary because people lost their
data, and we couldn't come up with a reasonable way to change it without
the name. The tradeoff is dataloss vs. dealing with directory renaming
in a few lowlevel tools. So we decided to change the name. It seems
breakage was unavoidable.
For me the renaming of functions, binaries, etc, is different because
the benefit is long-term avoidance of a bit of confusion, with the
shorter term price being tool breakages and confusion because
documentation/guides/... for different versions don't apply anymore, and
the search terms don't help anymore. But we're still changing this,
even though breakage seems avoidable.
And that fits into the bigger topic of us doing minor cleanups without a
lot of concern for backward compatibility, e.g. like us whacking things
around in pg_stat_activity for most of the last releases - nearly all of
those could have been done in a compatible manner, without even smelling
that badly.
I hear these complaints about postgres most frequently: 1) replication
sucks. 2) way too slow on analytics queries. 3) existing admin tools
suck. 4) self written admin tools (required due to 3)) constantly break.
There's a lot being done on 1) and 2). There's very little in-core
progress about 3). We're getting worse on 4).
I actually took your response as: "why the f**k is he talking about
camels?" and started laughing...
That's good then, and let's raise a $beverage_of_choice tonight to the
fallability of e-mail conversation ;)
Andres
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 26, 2017 at 4:19 PM, Andres Freund <andres@anarazel.de> wrote:
We decided s/pg_xlog/pg_wal/ was necessary because people lost their
data, and we couldn't come up with a reasonable way to change it without
the name. The tradeoff is dataloss vs. dealing with directory renaming
in a few lowlevel tools. So we decided to change the name. It seems
breakage was unavoidable.For me the renaming of functions, binaries, etc, is different because
the benefit is long-term avoidance of a bit of confusion, with the
shorter term price being tool breakages and confusion because
documentation/guides/... for different versions don't apply anymore, and
the search terms don't help anymore. But we're still changing this,
even though breakage seems avoidable.
Well stated and compelling.
And that fits into the bigger topic of us doing minor cleanups without a
lot of concern for backward compatibility, e.g. like us whacking things
around in pg_stat_activity for most of the last releases - nearly all of
those could have been done in a compatible manner, without even smelling
that badly.I hear these complaints about postgres most frequently: 1) replication
sucks. 2) way too slow on analytics queries. 3) existing admin tools
suck. 4) self written admin tools (required due to 3)) constantly break.There's a lot being done on 1) and 2). There's very little in-core
progress about 3). We're getting worse on 4).
I would posit, broadly, and without any evidence, that changes like we are
discussing here, will go toward helping on 3 since (hopefully) as
PostgreSQL becomes a more appealing option in the marketplace more quality
developers will be drawn toward using their skills to improve its
ecosystem. Mandating uniformity in areas like this speaks toward
professionalism.
Given that "there's a lot being done on #1" it would seem that right now is
an excellent time to make these changes - so that the new guides and tools
that leverage those enhancements can use the WAL terminology and have its
presence be consistently present throughout the system.
If there was a reasonably short horizon for features or capabilities that
make this kind of renaming breaking easier to accommodate I would say we
could probably wait for it to be completed first. But AFAIK there isn't
anything in the works that would allow individual users to easily enable a
backward-compatibility mode for the mid-level API that we are largely
touching here.
It may be that this is a straw that breaks the camel's back for some users
of PostgreSQL who are fed up with #4 ... I don't know ... but I'm
reasonably confident that new users a couple of years from now would have a
better experience with our product with these changes in place. Its an
aggressive play for growth - and that entails risk and upsetting those
invested in the status-quo (which are are already doing per your #1).
David J.
Andres,
* Andres Freund (andres@anarazel.de) wrote:
I hear these complaints about postgres most frequently: 1) replication
sucks. 2) way too slow on analytics queries. 3) existing admin tools
suck. 4) self written admin tools (required due to 3)) constantly break.There's a lot being done on 1) and 2). There's very little in-core
progress about 3). We're getting worse on 4).
I certainly hear some of these complaints also, and I'd love it if '3'
were something that the project was focused on, but, well, I really
don't see pgAdmin ever being in core, and 99% of the time that I'm
talking to end users, that's really what they're looking for (or, well,
something like it). I don't recall, off-hand at least, ever running
into a user complaining that their pgAdmin-like admin tool broke.
I have doubts that we could even get something like check_postgres or
another monitoring type of tool into core, though it would be sooooo
nice to have tight integration between montioring and the core code.
That would require some kind of pluggable system which could support the
montioring-of-the-day and an easy way to extend it and a way to set up
what should be monitored and what shouldn't along with something to
actually gather that info while the system is running (eg: a background
worker of some kind), or at least, those are my general thoughts.
Maybe we'll get to the point where we'd have a fully-baked, featureful
backup solution that works with large-scale systems in core; I've at
least got some hopes of that happening, but not any particular timeline
or expectation of it happening soon.
Having a good way to do logging of different levels to different
locations would also be really nice, because our current logging
situation is really rather terrible.
I actually took your response as: "why the f**k is he talking about
camels?" and started laughing...That's good then, and let's raise a $beverage_of_choice tonight to the
fallability of e-mail conversation ;)
Hah, now that I can certainly agree with..
Thanks!
Stephen
On 2017-01-26 19:01:54 -0500, Stephen Frost wrote:
Andres,
* Andres Freund (andres@anarazel.de) wrote:
I hear these complaints about postgres most frequently: 1) replication
sucks. 2) way too slow on analytics queries. 3) existing admin tools
suck. 4) self written admin tools (required due to 3)) constantly break.There's a lot being done on 1) and 2). There's very little in-core
progress about 3). We're getting worse on 4).I certainly hear some of these complaints also, and I'd love it if '3'
were something that the project was focused on, but, well, I really
don't see pgAdmin ever being in core, and 99% of the time that I'm
talking to end users, that's really what they're looking for (or, well,
something like it). I don't recall, off-hand at least, ever running
into a user complaining that their pgAdmin-like admin tool broke.
For me it's it's not a pgadmin alike (or rather a more featureful
version) that's breaking the camel's back. By far the biggest one I
hear is auto-HA. There's no in-core support, and pretty much all of the
stuff out there is immature as hell. And even if it weren't people for
good reason don't trust such core aspects to $random_project. Good,
easy to set up, monitoring is another thing - and I don't thing
check_postgres is a significant portion of that, it doesn't have much in
the way of guidelines, and actually pointing people to where problems
are.
Greetings,
Andres Freund
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Andres,
* Andres Freund (andres@anarazel.de) wrote:
On 2017-01-26 19:01:54 -0500, Stephen Frost wrote:
* Andres Freund (andres@anarazel.de) wrote:
I hear these complaints about postgres most frequently: 1) replication
sucks. 2) way too slow on analytics queries. 3) existing admin tools
suck. 4) self written admin tools (required due to 3)) constantly break.There's a lot being done on 1) and 2). There's very little in-core
progress about 3). We're getting worse on 4).I certainly hear some of these complaints also, and I'd love it if '3'
were something that the project was focused on, but, well, I really
don't see pgAdmin ever being in core, and 99% of the time that I'm
talking to end users, that's really what they're looking for (or, well,
something like it). I don't recall, off-hand at least, ever running
into a user complaining that their pgAdmin-like admin tool broke.For me it's it's not a pgadmin alike (or rather a more featureful
version) that's breaking the camel's back. By far the biggest one I
hear is auto-HA. There's no in-core support, and pretty much all of the
stuff out there is immature as hell.
Oh, that's not what I tend to think of as 'admin tool'. I completely
agree with you on #1 and also that we need something better for HA.
And even if it weren't people for
good reason don't trust such core aspects to $random_project. Good,
easy to set up, monitoring is another thing - and I don't thing
check_postgres is a significant portion of that, it doesn't have much in
the way of guidelines, and actually pointing people to where problems
are.
My comment with check_postgres was more of a 'it seems unlikely we would
get in something as simple as this', not to suggest in any way that it's
the end-all, be-all of monitoring.
And now to, unashamedly, push my own agenda- any ideas about something
that would help with any of this that could be accomplished over a
summer by a student? Even if you don't want to mentor, having a good
description, what skills are needed, the difficulty level, and the
expected outcomes might allow someone else to mentor...
Thanks!
Stephen
On Fri, Jan 27, 2017 at 2:21 AM, Robert Haas <robertmhaas@gmail.com> wrote:
On Tue, Jan 24, 2017 at 4:47 PM, Robert Haas <robertmhaas@gmail.com> wrote:
But I don't see any proposals to actually change all uses of "xlog" to
"wal". What about program names, command line options, etc.? If the
argument is, we changed one thing, we should change the rest, then let's
see that. I think that argument itself is flawed, but if that's what
we're going with, let's see the whole plan.I'm happy to go change every last bit of it. I was expecting after I
committed the initial rename that somebody would provide a follow-on
patch to do the rest of it in short order. Instead, months went by
and we still don't have a complete patch. But I don't see why that
has to take more than a day's work, probably just a few hours. I'd
like to do that and move on.And here are patches for that.
0001 renames everything that contains "xlog" in pg_proc.h to refer to "wal".
0002 renames programs whose names contains "xlog".
0003 renames the dtrace probes whose names contain "xlog".
0004 renames command line options which contain "xlog".There are probably a few more things that could be done afterwards to
clean up other odds and ends, but I think this gets the vast bulk of
the user-visible references to xlog.
Thanks for doing this work. Jumping on the train, here is a review for
those patches. All of them are very mechanical changes. Just:
-<!ENTITY pgxlogdump SYSTEM "pg_xlogdump.sgml">
+<!ENTITY pgwaldump SYSTEM "pg_waldump.sgml">
<!ENTITY postgres SYSTEM "postgres-ref.sgml">
A nit about the number of spaces here.
In protocol.sgml:
<varlistentry>
<term>
<literal>xlogpos</literal> (<type>text</type>)
</term>
<listitem>
<para>
Current xlog flush location. Useful to get a known location in the
transaction log where streaming can start.
</para>
</listitem>
</varlistentry>
You want to say WAL here instead of xlog.
In storage.sgml, similar thing:
<row>
<entry>pd_lsn</entry>
<entry>PageXLogRecPtr</entry>
<entry>8 bytes</entry>
<entry>LSN: next byte after last byte of xlog record for last change
to this page</entry>
</row>
s/xlog/WAL/
In pg_standby.c:
pg_standby.c: printf(" %s [OPTION]... ARCHIVELOCATION NEXTWALFILE
XLOGFILEPATH [RESTARTWALFILE]\n", progname);
s/XLOGFILEPATH/WALFILEPATH/.
All the other references to "xlog" are in the code comments, for the
user-facing changes your set of patches is enough.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/26/17 2:05 PM, Robert Haas wrote:
I do not think it can be right to rename the directory and not
anything else.
I think this is the root of the confusion.
A lot of people apparently consented to renaming pg_xlog with the
understanding that that's it, whereas other people understood it as
consensus for renaming everything.
You really have (at least) three options here:
1. Rename nothing
2. Rename directory only
3. Rename everything
and you need to count the votes of each pair separately.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/26/17 1:10 PM, Tom Lane wrote:
pg_reset_wal
It's really more pg_reset_controldata, isn't it?
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/24/17 4:47 PM, Robert Haas wrote:
I'm not excited about starting to change pg_clog before we finish with
xlog -> wal. Then we just have two half-done things, IMO. But I'm
also not the only one with a commit bit.
I think that depends on which way you slice the overall mission. You
appear to think the mission is to have everything named consistently. I
thought the mission was to have no directories named *log*.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Sat, Jan 28, 2017 at 8:06 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
On 1/24/17 4:47 PM, Robert Haas wrote:
I'm not excited about starting to change pg_clog before we finish with
xlog -> wal. Then we just have two half-done things, IMO. But I'm
also not the only one with a commit bit.I think that depends on which way you slice the overall mission. You
appear to think the mission is to have everything named consistently. I
thought the mission was to have no directories named *log*.
Those are two different missions. Deciding what to do for the renaming
of pg_xlog does not prevent pg_clog and pg_subtrans to be renamed as
no functions and no binaries use those terms.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 2017-01-27 18:06:11 -0500, Peter Eisentraut wrote:
On 1/24/17 4:47 PM, Robert Haas wrote:
I'm not excited about starting to change pg_clog before we finish with
xlog -> wal. Then we just have two half-done things, IMO. But I'm
also not the only one with a commit bit.I think that depends on which way you slice the overall mission. You
appear to think the mission is to have everything named consistently. I
thought the mission was to have no directories named *log*.
+1
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Sat, Jan 28, 2017 at 8:03 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
On 1/26/17 2:05 PM, Robert Haas wrote:
I do not think it can be right to rename the directory and not
anything else.I think this is the root of the confusion.
A lot of people apparently consented to renaming pg_xlog with the
understanding that that's it, whereas other people understood it as
consensus for renaming everything.You really have (at least) three options here:
1. Rename nothing
2. Rename directory only
3. Rename everythingand you need to count the votes of each pair separately.
4. Rename everything with aliases.
I would vote for 4., or 3. for consistency if 4. is not an eligible choice.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 1/27/17 6:47 PM, Michael Paquier wrote:
On Sat, Jan 28, 2017 at 8:03 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:On 1/26/17 2:05 PM, Robert Haas wrote:
I do not think it can be right to rename the directory and not
anything else.I think this is the root of the confusion.
A lot of people apparently consented to renaming pg_xlog with the
understanding that that's it, whereas other people understood it as
consensus for renaming everything.You really have (at least) three options here:
1. Rename nothing
2. Rename directory only
3. Rename everythingand you need to count the votes of each pair separately.
4. Rename everything with aliases.
I would vote for 4., or 3. for consistency if 4. is not an eligible choice.
I vote for 3.
The problem I have with aliases is that they would need to be done
across the board. At the least, we would need function aliases,
symlinks for the binaries (which would rneed to be done by the
packagers), aliases for the command line options, and lots of notations
in the documentation.
All of this would need to be preserved more or less indefinitely,
because if we can't decide on a break now it's not likely to happen later.
--
-David
david@pgmasters.net
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Sat, Jan 28, 2017 at 12:43 PM, David Steele <david@pgmasters.net> wrote:
The problem I have with aliases is that they would need to be done across
the board. At the least, we would need function aliases, symlinks for the
binaries (which would rneed to be done by the packagers), aliases for the
command line options, and lots of notations in the documentation.
I was not precise enough here, I am fine with only the function
aliases, because they just have as cost an extra line in pg_proc.h and
because binary-level aliases on Windows are a pain.
All of this would need to be preserved more or less indefinitely, because if
we can't decide on a break now it's not likely to happen later.
That's true as well.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 2017-01-28 08:47:03 +0900, Michael Paquier wrote:
On Sat, Jan 28, 2017 at 8:03 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:On 1/26/17 2:05 PM, Robert Haas wrote:
I do not think it can be right to rename the directory and not
anything else.I think this is the root of the confusion.
A lot of people apparently consented to renaming pg_xlog with the
understanding that that's it, whereas other people understood it as
consensus for renaming everything.You really have (at least) three options here:
1. Rename nothing
2. Rename directory only
3. Rename everythingand you need to count the votes of each pair separately.
4. Rename everything with aliases.
I would vote for 4., or 3. for consistency if 4. is not an eligible choice.
2, 4, 1, 3
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Andres Freund (andres@anarazel.de) wrote:
On 2017-01-28 08:47:03 +0900, Michael Paquier wrote:
On Sat, Jan 28, 2017 at 8:03 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:On 1/26/17 2:05 PM, Robert Haas wrote:
I do not think it can be right to rename the directory and not
anything else.I think this is the root of the confusion.
A lot of people apparently consented to renaming pg_xlog with the
understanding that that's it, whereas other people understood it as
consensus for renaming everything.You really have (at least) three options here:
1. Rename nothing
2. Rename directory only
3. Rename everythingand you need to count the votes of each pair separately.
4. Rename everything with aliases.
I would vote for 4., or 3. for consistency if 4. is not an eligible choice.
2, 4, 1, 3
For me, it's: 3, 4, 1, 2.
I tend to agree with the other discussion, which points out that aliases
for everything isn't really practical..
Of course, I'd also like to drop things like pg_user and pg_shadow one
day... Never thought they'd last anywhere near this long when I first
wrote those views, 12 years ago...
Thanks!
Stephen
On Fri, Jan 27, 2017 at 11:03 PM, Peter Eisentraut <
peter.eisentraut@2ndquadrant.com> wrote:
1. Rename nothing
2. Rename directory only
3. Rename everything
3 or 1 (with a slight preference for 3).
Not sure if my vote counts, but for me as ex-DBA consistency mattered *a
lot*.
This is one of the reasons PostgreSQL is actually nicer to work with than
many other databases. I remember 'wal' vs 'xlog' was actually one of a very
few confusing things. I think it is important to stick to just one term,
whether it be wal or xlog. I'd prefer wal since it's a term used in many
other systems. 'xlog' may be confused with likes of binary log in MySQL
which is not what it is.
Now, I've rebased my patches to rename functions (with and without aliases)
on top of current master, but there's probably no point of posting them now
given there are patches above that rename other things as well.
--
Vladimir Rusinov
Storage SRE, Google Ireland
Google Ireland Ltd.,Gordon House, Barrow Street, Dublin 4, Ireland
Registered in Dublin, Ireland
Registration Number: 368047
Attachments:
On Mon, Jan 30, 2017 at 8:01 PM, Vladimir Rusinov <vrusinov@google.com> wrote:
On Fri, Jan 27, 2017 at 11:03 PM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:1. Rename nothing
2. Rename directory only
3. Rename everything3 or 1 (with a slight preference for 3).
Not sure if my vote counts, but for me as ex-DBA consistency mattered a lot.
Any voice counts :)
This is one of the reasons PostgreSQL is actually nicer to work with than
many other databases. I remember 'wal' vs 'xlog' was actually one of a very
few confusing things. I think it is important to stick to just one term,
whether it be wal or xlog. I'd prefer wal since it's a term used in many
other systems. 'xlog' may be confused with likes of binary log in MySQL
which is not what it is.
The first time I worked on Postgres, I was not able to do the mapping
between both terms as well.
Now, I've rebased my patches to rename functions (with and without aliases)
on top of current master, but there's probably no point of posting them now
given there are patches above that rename other things as well.
OK, I have moved this patch to CF 2017-03, let's make the discussion
continue with more votes coming in.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Peter Eisentraut wrote:
You really have (at least) three options here:
1. Rename nothing
2. Rename directory only
3. Rename everything
I vote for 1) as I believe the renaming will create more confusion
than it's worth, not even considering the renaming of functions
and views.
What if we look at the change from the pessimistic angle?
An example of confusion that the change would create:
a lot of users currently choose pg_wal for the destination
directory of their archive command. Less-informed users
that set up archiving and/or log shipping in PG10 based on
advice online from previous versions will be fairly
confused about the missing pg_xlog, and the fact that the
pg_wal directory they're supposed to create already exists.
Also googling for pg_wal, I'm finding food for thought like this
IBM technote:
http://www-01.ibm.com/support/docview.wss?uid=isg3T1015637
which recommends to
"Remove all files under /var/lib/pgsql/9.0/data/pg_wal/"
and also calls that directory the "write-ahead log directory"
which is quite confusing because apparently it's the destination of
their archive command.
This brings the question: what about the people who will delete
their pg_wal (ex-pg_xlog) when they face a disk-full condition and
they mix up in their mind the archive directory and the WAL directory?
It's hard to guess how many could make that mistake but I don't see
why it would be less probable than confusing pg_xlog and pg_log.
At least the contents of the latter directories look totally
different, contrary to the wal directory versus wal archive.
Also, what about the users who are helped currently by
the fact that "pg_xlog" is associated at the top of google results
to good articles that explain what it is, why it fills up and what
to do about it? By burying the name "pg_xlog" we're also loosing that
connection, and in the worst case making worse the problem we
wanted to help with.
There's also the disruption in existing backup scripts that directly
reference pg_xlog. Obviously these scripts are critical, and there's
something weird in breaking that intentionally. The motivation of the
breakage is likely to be felt as frivolous and unfair to those people who
are adversely impacted by the change, even if the part of not
reading the release notes is their fault.
Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Fri, Feb 3, 2017 at 8:50 AM, Daniel Verite <daniel@manitou-mail.org> wrote:
What if we look at the change from the pessimistic angle?
An example of confusion that the change would create:
a lot of users currently choose pg_wal for the destination
directory of their archive command.
Really? I find that surprising to say "a lot". Perhaps there are some,
but first I would not suspect that there are many people to use this
repository name, and even less crazy enough to store them directly in
PGDATA itself. And of course that's not on a different partition :)
Also googling for pg_wal, I'm finding food for thought like this
IBM technote:
http://www-01.ibm.com/support/docview.wss?uid=isg3T1015637
which recommends to
"Remove all files under /var/lib/pgsql/9.0/data/pg_wal/"
and also calls that directory the "write-ahead log directory"
which is quite confusing because apparently it's the destination of
their archive command.
Well this product of IBM is one.
There's also the disruption in existing backup scripts that directly
reference pg_xlog. Obviously these scripts are critical, and there's
something weird in breaking that intentionally. The motivation of the
breakage is likely to be felt as frivolous and unfair to those people who
are adversely impacted by the change, even if the part of not
reading the release notes is their fault.
Those are not complicated to fix because they are hard failures.
Sufficient tests need to be done so as backup scripts don't show in
red on live systems before deploying them. The original reason to do
the rename is that there are folks as well thinking that removing
pg_xlog is fine on full disk because, you know, it contains just
*logs* so they are not critical for the system.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Daniel,
* Daniel Verite (daniel@manitou-mail.org) wrote:
What if we look at the change from the pessimistic angle?
An example of confusion that the change would create:
a lot of users currently choose pg_wal for the destination
directory of their archive command. Less-informed users
that set up archiving and/or log shipping in PG10 based on
advice online from previous versions will be fairly
confused about the missing pg_xlog, and the fact that the
pg_wal directory they're supposed to create already exists.
One would hope that they would realize that's not going to work
when they set up PG10. If they aren't paying attention sufficient
to realize that then it seems entirely likely that they would feel
equally safe removing the contents of a directory named 'pg_xlog'.
Also googling for pg_wal, I'm finding food for thought like this
IBM technote:
http://www-01.ibm.com/support/docview.wss?uid=isg3T1015637
which recommends to
"Remove all files under /var/lib/pgsql/9.0/data/pg_wal/"
and also calls that directory the "write-ahead log directory"
which is quite confusing because apparently it's the destination of
their archive command.
It's certainly unfortunate that people have thought that they can create
arbitrary directories under the PG data directory. That's never going
to be safe, witness that we've created new directories under PGDATA in
the last few releases and I don't see any reason why that would change
moving forward. Perhaps we should check for the existance of such a
directory during pg_upgrade and throw an error, and we should go back
and do the same for other directories which have been added over
releases, but I'm not sure I can see an argument for doing much more
than that.
This brings the question: what about the people who will delete
their pg_wal (ex-pg_xlog) when they face a disk-full condition and
they mix up in their mind the archive directory and the WAL directory?
In my experience, at least, that's less likely to happen than someone
nuke'ing pg_xlog.
It's hard to guess how many could make that mistake but I don't see
why it would be less probable than confusing pg_xlog and pg_log.
Based on my experience, at least, that seems quite a bit less likely to
happen.
At least the contents of the latter directories look totally
different, contrary to the wal directory versus wal archive.
Sadly, that doesn't seem to have always made much of a difference.
Also, what about the users who are helped currently by
the fact that "pg_xlog" is associated at the top of google results
to good articles that explain what it is, why it fills up and what
to do about it? By burying the name "pg_xlog" we're also loosing that
connection, and in the worst case making worse the problem we
wanted to help with.
We'll have new articles about pg_wal which will be picked up by Google
also. I'm not quite sure how we would be making the problem worse
though- previously when it filled, a group of users believed it to be a
log directory which could be wiped out. With the new name, it's at
least clearer that it's not simple a directory of not-necessary log
files.
There's also the disruption in existing backup scripts that directly
reference pg_xlog. Obviously these scripts are critical, and there's
something weird in breaking that intentionally. The motivation of the
breakage is likely to be felt as frivolous and unfair to those people who
are adversely impacted by the change, even if the part of not
reading the release notes is their fault.
While these scripts are critical, they're also likely to not be safe,
which is the unfortunate reality. If they're well written then they'll
break cleanly, quickly, and be easily fixed.
We will break things across major version upgrades. That's part of
the reason that we have major version upgrades, and why we support
released versions for years with bug fixes.
Thanks!
Stephen
On Fri, Feb 3, 2017 at 5:21 AM, Stephen Frost <sfrost@snowman.net> wrote:
Daniel,
* Daniel Verite (daniel@manitou-mail.org) wrote:
What if we look at the change from the pessimistic angle?
An example of confusion that the change would create:
a lot of users currently choose pg_wal for the destination
directory of their archive command. Less-informed users
that set up archiving and/or log shipping in PG10 based on
advice online from previous versions will be fairly
confused about the missing pg_xlog, and the fact that the
pg_wal directory they're supposed to create already exists.One would hope that they would realize that's not going to work
when they set up PG10. If they aren't paying attention sufficient
to realize that then it seems entirely likely that they would feel
equally safe removing the contents of a directory named 'pg_xlog'.
So... somebody want to tally up the votes here?
And... was this discussed at the FOSDEM developer meeting?
(Please say yes.)
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Jan 26, 2017 at 3:55 PM, Robert Haas <robertmhaas@gmail.com> wrote:
The substantive issue here is whether we should go forward with this
change, back out the change we already did, or leave things as they
are. Tom, David, and I seem to be in lock step on at least the
following conclusion: halfway in between is bad.
I agree.
So I have every
intention of continuing to push very hard for us to go either forward
or backward.
+1
Given the number of times I've known of people deleting files from
pg_xlog because the name made the contents seem unimportant, I
think finishing the job is better.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Sat, Feb 4, 2017 at 6:39 AM, Robert Haas <robertmhaas@gmail.com> wrote:
On Fri, Feb 3, 2017 at 5:21 AM, Stephen Frost <sfrost@snowman.net> wrote:
Daniel,
* Daniel Verite (daniel@manitou-mail.org) wrote:
What if we look at the change from the pessimistic angle?
An example of confusion that the change would create:
a lot of users currently choose pg_wal for the destination
directory of their archive command. Less-informed users
that set up archiving and/or log shipping in PG10 based on
advice online from previous versions will be fairly
confused about the missing pg_xlog, and the fact that the
pg_wal directory they're supposed to create already exists.One would hope that they would realize that's not going to work
when they set up PG10. If they aren't paying attention sufficient
to realize that then it seems entirely likely that they would feel
equally safe removing the contents of a directory named 'pg_xlog'.So... somebody want to tally up the votes here?
Here is what I have, 6 votes clearly stated:
1. Rename nothing: Daniel,
2. Rename directory only: Andres
3. Rename everything: Stephen, Vladimir, David S, Michael P (with
aliases for functions, I could live without at this point...)
And... was this discussed at the FOSDEM developer meeting?
(Please say yes.)
Looking only at the minutes, the answer is no:
https://wiki.postgresql.org/wiki/FOSDEM/PGDay_2017_Developer_Meeting
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Sun, Feb 5, 2017 at 10:24 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
So... somebody want to tally up the votes here?
Here is what I have, 6 votes clearly stated:
1. Rename nothing: Daniel,
2. Rename directory only: Andres
3. Rename everything: Stephen, Vladimir, David S, Michael P (with
aliases for functions, I could live without at this point...)
I vote for 3 as well, with 1 as the only sane alternative.
--
Kevin Grittner
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Mon, Feb 6, 2017 at 1:24 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
On Sat, Feb 4, 2017 at 6:39 AM, Robert Haas <robertmhaas@gmail.com> wrote:
On Fri, Feb 3, 2017 at 5:21 AM, Stephen Frost <sfrost@snowman.net> wrote:
Daniel,
* Daniel Verite (daniel@manitou-mail.org) wrote:
What if we look at the change from the pessimistic angle?
An example of confusion that the change would create:
a lot of users currently choose pg_wal for the destination
directory of their archive command. Less-informed users
that set up archiving and/or log shipping in PG10 based on
advice online from previous versions will be fairly
confused about the missing pg_xlog, and the fact that the
pg_wal directory they're supposed to create already exists.One would hope that they would realize that's not going to work
when they set up PG10. If they aren't paying attention sufficient
to realize that then it seems entirely likely that they would feel
equally safe removing the contents of a directory named 'pg_xlog'.So... somebody want to tally up the votes here?
Here is what I have, 6 votes clearly stated:
1. Rename nothing: Daniel,
2. Rename directory only: Andres
3. Rename everything: Stephen, Vladimir, David S, Michael P (with
aliases for functions, I could live without at this point...)
I vote for 1.
I still wonder how much the renaming of pg_xlog actually helps very careless
people who remove pg_xlog becase its name includes "log". I'm afraid that
they would make another serious mistake (e.g., remove pg_wal because it has
many files and it occupies large amount of disk space) even after renaming
to pg_wal. The crazy idea, making initdb create the empty file with the name
"DONT_REMOVE_pg_xlog_IF_YOU_DONT_WANT_TO_LOSE_YOUR_IMPORTANT_DATA"
in $PGDATA seems more helpful. Anyway I'm afraid that the renaming would
cause more pain than gain.
Regards,
--
Fujii Masao
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Mon, Feb 6, 2017 at 5:24 AM, Michael Paquier <michael.paquier@gmail.com>
wrote:
On Sat, Feb 4, 2017 at 6:39 AM, Robert Haas <robertmhaas@gmail.com> wrote:
On Fri, Feb 3, 2017 at 5:21 AM, Stephen Frost <sfrost@snowman.net>
wrote:
Daniel,
* Daniel Verite (daniel@manitou-mail.org) wrote:
What if we look at the change from the pessimistic angle?
An example of confusion that the change would create:
a lot of users currently choose pg_wal for the destination
directory of their archive command. Less-informed users
that set up archiving and/or log shipping in PG10 based on
advice online from previous versions will be fairly
confused about the missing pg_xlog, and the fact that the
pg_wal directory they're supposed to create already exists.One would hope that they would realize that's not going to work
when they set up PG10. If they aren't paying attention sufficient
to realize that then it seems entirely likely that they would feel
equally safe removing the contents of a directory named 'pg_xlog'.So... somebody want to tally up the votes here?
Here is what I have, 6 votes clearly stated:
1. Rename nothing: Daniel,
2. Rename directory only: Andres
3. Rename everything: Stephen, Vladimir, David S, Michael P (with
aliases for functions, I could live without at this point...)
Put my vote down for 2.
And... was this discussed at the FOSDEM developer meeting?
(Please say yes.)
Looking only at the minutes, the answer is no:
https://wiki.postgresql.org/wiki/FOSDEM/PGDay_2017_Developer_Meeting
We discussed discussing it :) And came to the conclusion that we did not
have enough of a quorum to actually make any decision on it complete, so we
figured it's better if everybody just chime in individually.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
On Mon, Feb 6, 2017 at 12:29 PM, Magnus Hagander <magnus@hagander.net> wrote:
Here is what I have, 6 votes clearly stated:
1. Rename nothing: Daniel,
2. Rename directory only: Andres
3. Rename everything: Stephen, Vladimir, David S, Michael P (with
aliases for functions, I could live without at this point...)Put my vote down for 2.
I think there is a very strong consensus for going either forward and
renaming everything or going backward and renaming nothing. That
position has been endorsed by me, David Johnston, Tom Lane, Stephen
Frost, Kevin Grittner, Vladimir Rusinov, David Steele, probably
Michael Paquier, and possibly JD. The only people who have explicitly
voted against that position are Andres and Magnus, who prefer renaming
only the directory. I think that's approximately a 7-2 vote in favor
of not leaving things as they are (#2).
The vote on whether to go forward (#3) or backward (#1) is closer.
All of the people mentioned above as wanting consistency - except for
JD whose actual vote wasn't entirely clear - indicated a preference
for #3 over #1, but a number of them prefer it only weakly. Moreover,
Fujii Masao and Daniel Verite prefer #1. But I still think that the
vote is in favor of #3. There are 7 clear votes for that position and
no more than 2 votes for any other position. Even regarding every
vote that isn't for #3 as a vote for #1, which is probably not
entirely accurate, it's still 7-4 in favor of #3.
Looking back at older emails before things came quite so sharply into
focus, I found various other opinions. But I don't think they change
the overall picture very much. Cynthia Shang seemed to favor a more
limited renaming, but her point was that we have lots of internal
stuff that uses the xlog terminology, which isn't quite the same
question as whether the user-visible stuff should all match. David
Fetter favored not adding aliases when we did the renaming, but didn't
clearly spell out that he favored the renaming. Similarly, Euler
Taveira favored aliases in an extension, but likewise didn't clearly
spell out his position on the renaming itself. (I would tend to count
those as votes in favor of the renaming itself but you could argue
that.) Bruce Momjian wanted to go forward to keep things clean.
Simon Riggs wanted to leave things as they are, but the reason given
was not so much about the merits of the issue but about not wanting to
spend more time on it. You can come up with different counts
depending on exactly how you interpret what all of those people said,
but not even the least favorable allocation of those votes ends up
with anything other than #3 as the most popular option.
Therefore, I plan to go ahead and do #3. Somebody's probably going to
jump in now with another opinion but I think this thread's gone on
long enough. We're going to take some backward-compatibility pain
here as a result of these changes and some people are going to be
unhappy about that, but I think we've allowed enough time for people
to weigh in with opinions and this seems to be where we're at.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
On Mon, Feb 6, 2017 at 12:29 PM, Magnus Hagander <magnus@hagander.net> wrote:
Here is what I have, 6 votes clearly stated:
1. Rename nothing: Daniel,
2. Rename directory only: Andres
3. Rename everything: Stephen, Vladimir, David S, Michael P (with
aliases for functions, I could live without at this point...)
[ vote-counting ]
Therefore, I plan to go ahead and do #3. Somebody's probably going to
jump in now with another opinion but I think this thread's gone on
long enough.
Agreed, let's just get it done.
Although this doesn't really settle whether we ought to do 3a (with
backwards-compatibility function aliases in core) or 3b (without 'em).
Do people want to re-vote, understanding that those are the remaining
choices?
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Feb 9, 2017 at 12:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Robert Haas <robertmhaas@gmail.com> writes:
On Mon, Feb 6, 2017 at 12:29 PM, Magnus Hagander <magnus@hagander.net>
wrote:
Here is what I have, 6 votes clearly stated:
1. Rename nothing: Daniel,
2. Rename directory only: Andres
3. Rename everything: Stephen, Vladimir, David S, Michael P (with
aliases for functions, I could live without at this point...)[ vote-counting ]
Therefore, I plan to go ahead and do #3. Somebody's probably going to
jump in now with another opinion but I think this thread's gone on
long enough.Agreed, let's just get it done.
Although this doesn't really settle whether we ought to do 3a (with
backwards-compatibility function aliases in core) or 3b (without 'em).
Do people want to re-vote, understanding that those are the remaining
choices?
I wouldn't oppose:
CREATE EXTENSION give_me_my_xlog_back;
but my prior thoughts lead me toward not including such functions in the
bootstrap catalog.
David J.
On 2/9/17 2:14 PM, David G. Johnston wrote:
On Thu, Feb 9, 2017 at 12:08 PM, Tom Lane <tgl@sss.pgh.pa.us
<mailto:tgl@sss.pgh.pa.us>>wrote:Robert Haas <robertmhaas@gmail.com <mailto:robertmhaas@gmail.com>>
writes:On Mon, Feb 6, 2017 at 12:29 PM, Magnus Hagander <magnus@hagander.net <mailto:magnus@hagander.net>> wrote:
Here is what I have, 6 votes clearly stated:
1. Rename nothing: Daniel,
2. Rename directory only: Andres
3. Rename everything: Stephen, Vladimir, David S, Michael P (with
aliases for functions, I could live without at this point...)[ vote-counting ]
Therefore, I plan to go ahead and do #3. Somebody's probably going to
jump in now with another opinion but I think this thread's gone on
long enough.Agreed, let's just get it done.
Although this doesn't really settle whether we ought to do 3a (with
backwards-compatibility function aliases in core) or 3b (without 'em).
Do people want to re-vote, understanding that those are the remaining
choices?
-1 on aliases in core (so to be clear my vote is for 3b).
I wouldn't oppose:
CREATE EXTENSION give_me_my_xlog_back;
but my prior thoughts lead me toward not including such functions in the
bootstrap catalog.
I'm not very excited about an extension, can we just provide a link to a
script in the release notes, or simply note that wrappers can be created?
--
-David
david@pgmasters.net
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 2017-02-09 14:08:14 -0500, Tom Lane wrote:
Robert Haas <robertmhaas@gmail.com> writes:
On Mon, Feb 6, 2017 at 12:29 PM, Magnus Hagander <magnus@hagander.net> wrote:
Here is what I have, 6 votes clearly stated:
1. Rename nothing: Daniel,
2. Rename directory only: Andres
3. Rename everything: Stephen, Vladimir, David S, Michael P (with
aliases for functions, I could live without at this point...)[ vote-counting ]
Therefore, I plan to go ahead and do #3. Somebody's probably going to
jump in now with another opinion but I think this thread's gone on
long enough.Agreed, let's just get it done.
Although this doesn't really settle whether we ought to do 3a (with
backwards-compatibility function aliases in core) or 3b (without 'em).
Do people want to re-vote, understanding that those are the remaining
choices?
3a)
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Feb 9, 2017 at 2:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Robert Haas <robertmhaas@gmail.com> writes:
On Mon, Feb 6, 2017 at 12:29 PM, Magnus Hagander <magnus@hagander.net> wrote:
Here is what I have, 6 votes clearly stated:
1. Rename nothing: Daniel,
2. Rename directory only: Andres
3. Rename everything: Stephen, Vladimir, David S, Michael P (with
aliases for functions, I could live without at this point...)[ vote-counting ]
Therefore, I plan to go ahead and do #3. Somebody's probably going to
jump in now with another opinion but I think this thread's gone on
long enough.Agreed, let's just get it done.
Although this doesn't really settle whether we ought to do 3a (with
backwards-compatibility function aliases in core) or 3b (without 'em).
Do people want to re-vote, understanding that those are the remaining
choices?
I prefer (3c) put them in an extension and let people that need 'em
install 'em, but not have them available by default. If the only
choices are (3a) and (3b) then I guess I pick (3b), but I think an
extension doesn't cost much and will ease the migration pain for users
so I'm in favor of it.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
On Thu, Feb 9, 2017 at 2:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Although this doesn't really settle whether we ought to do 3a (with
backwards-compatibility function aliases in core) or 3b (without 'em).
Do people want to re-vote, understanding that those are the remaining
choices?
I prefer (3c) put them in an extension and let people that need 'em
install 'em, but not have them available by default.
As far as the core code is concerned, 3b and 3c are the same thing.
IOW, somebody can write the extension later.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Feb 9, 2017 at 1:44 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Robert Haas <robertmhaas@gmail.com> writes:
On Thu, Feb 9, 2017 at 2:08 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Although this doesn't really settle whether we ought to do 3a (with
backwards-compatibility function aliases in core) or 3b (without 'em).
Do people want to re-vote, understanding that those are the remaining
choices?I prefer (3c) put them in an extension and let people that need 'em
install 'em, but not have them available by default.As far as the core code is concerned, 3b and 3c are the same thing.
I think so, too, if we're talking about an extension in core.
My vote is for 3b. If someone wants to write the alias extension and
make it available outside of core, fine -- though they don't need anyone's
vote to do so.
--
Kevin Grittner
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 02/09/2017 11:08 AM, Tom Lane wrote:
Agreed, let's just get it done.
Although this doesn't really settle whether we ought to do 3a (with
backwards-compatibility function aliases in core) or 3b (without 'em).
Do people want to re-vote, understanding that those are the remaining
choices?
Does 3a) mean keeping the aliases more-or-less forever?
If not, I vote for 3b. If we're going to need to break stuff, let's
just do it.
If we can keep the aliases for 6-10 years, then I see no reason not to
have them (3a). They're not exactly likely to conflict with user-chosen
names.
--
Josh Berkus
Containers & Databases Oh My!
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Josh Berkus (josh@berkus.org) wrote:
On 02/09/2017 11:08 AM, Tom Lane wrote:
Agreed, let's just get it done.
Although this doesn't really settle whether we ought to do 3a (with
backwards-compatibility function aliases in core) or 3b (without 'em).
Do people want to re-vote, understanding that those are the remaining
choices?Does 3a) mean keeping the aliases more-or-less forever?
If not, I vote for 3b. If we're going to need to break stuff, let's
just do it.If we can keep the aliases for 6-10 years, then I see no reason not to
have them (3a). They're not exactly likely to conflict with user-chosen
names.
When we remove pg_shadow, then I'll be willing to agree that maybe we
can start having things in PG for a couple releases that are just for
backwards-compatibility and will actually be removed later.
History has shown that's next to impossible, however.
Thanks!
Stephen
On 02/09/2017 12:42 PM, Stephen Frost wrote:
* Josh Berkus (josh@berkus.org) wrote:
On 02/09/2017 11:08 AM, Tom Lane wrote:
Agreed, let's just get it done.
Although this doesn't really settle whether we ought to do 3a (with
backwards-compatibility function aliases in core) or 3b (without 'em).
Do people want to re-vote, understanding that those are the remaining
choices?Does 3a) mean keeping the aliases more-or-less forever?
If not, I vote for 3b. If we're going to need to break stuff, let's
just do it.If we can keep the aliases for 6-10 years, then I see no reason not to
have them (3a). They're not exactly likely to conflict with user-chosen
names.When we remove pg_shadow, then I'll be willing to agree that maybe we
can start having things in PG for a couple releases that are just for
backwards-compatibility and will actually be removed later.History has shown that's next to impossible, however.
That's why I said 6-10 years. If we're doing 3a, realistically we're
supporting it until PostgreSQL 16, at least, and more likely 20. I'm OK
with that.
What I'm voting against is the idea that we'll have aliases in core, but
remove them in two releases. Either that's unrealistic, or it's just
prolonging the pain.
--
Josh Berkus
Containers & Databases Oh My!
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Josh Berkus (josh@berkus.org) wrote:
On 02/09/2017 12:42 PM, Stephen Frost wrote:
* Josh Berkus (josh@berkus.org) wrote:
On 02/09/2017 11:08 AM, Tom Lane wrote:
Agreed, let's just get it done.
Although this doesn't really settle whether we ought to do 3a (with
backwards-compatibility function aliases in core) or 3b (without 'em).
Do people want to re-vote, understanding that those are the remaining
choices?Does 3a) mean keeping the aliases more-or-less forever?
If not, I vote for 3b. If we're going to need to break stuff, let's
just do it.If we can keep the aliases for 6-10 years, then I see no reason not to
have them (3a). They're not exactly likely to conflict with user-chosen
names.When we remove pg_shadow, then I'll be willing to agree that maybe we
can start having things in PG for a couple releases that are just for
backwards-compatibility and will actually be removed later.History has shown that's next to impossible, however.
That's why I said 6-10 years. If we're doing 3a, realistically we're
supporting it until PostgreSQL 16, at least, and more likely 20. I'm OK
with that.
Uh, to be clear, I think it's an entirely bad thing that we've had those
views and various other cruft hang around for over 10 years.
And removing them today will probably still have people crying about how
pgAdmin3 and other things still use them.
What I'm voting against is the idea that we'll have aliases in core, but
remove them in two releases. Either that's unrealistic, or it's just
prolonging the pain.
Waiting 10+ years doesn't make the pain go away when it comes to
removing things like that.
Let's not go there.
Thanks!
Stephen
On 2017-02-09 15:53:47 -0500, Stephen Frost wrote:
* Josh Berkus (josh@berkus.org) wrote:
What I'm voting against is the idea that we'll have aliases in core, but
remove them in two releases. Either that's unrealistic, or it's just
prolonging the pain.Waiting 10+ years doesn't make the pain go away when it comes to
removing things like that.
That's ridiculous. I think we can fairly argue whether backward compat
is worth it, but claiming that migrations to something new aren't easier
if there's a number of versions that support both the old and the new
names/syntax/whatnot is obviously wrong.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 02/09/2017 12:53 PM, Stephen Frost wrote:
* Josh Berkus (josh@berkus.org) wrote:
On 02/09/2017 12:42 PM, Stephen Frost wrote:
* Josh Berkus (josh@berkus.org) wrote:
On 02/09/2017 11:08 AM, Tom Lane wrote:
Agreed, let's just get it done.
Although this doesn't really settle whether we ought to do 3a (with
backwards-compatibility function aliases in core) or 3b (without 'em).
Do people want to re-vote, understanding that those are the remaining
choices?Does 3a) mean keeping the aliases more-or-less forever?
If not, I vote for 3b. If we're going to need to break stuff, let's
just do it.If we can keep the aliases for 6-10 years, then I see no reason not to
have them (3a). They're not exactly likely to conflict with user-chosen
names.When we remove pg_shadow, then I'll be willing to agree that maybe we
can start having things in PG for a couple releases that are just for
backwards-compatibility and will actually be removed later.History has shown that's next to impossible, however.
That's why I said 6-10 years. If we're doing 3a, realistically we're
supporting it until PostgreSQL 16, at least, and more likely 20. I'm OK
with that.Uh, to be clear, I think it's an entirely bad thing that we've had those
views and various other cruft hang around for over 10 years.And removing them today will probably still have people crying about how
pgAdmin3 and other things still use them.What I'm voting against is the idea that we'll have aliases in core, but
remove them in two releases. Either that's unrealistic, or it's just
prolonging the pain.Waiting 10+ years doesn't make the pain go away when it comes to
removing things like that.
Sure it does. That's two whole generations of client tools. For
example, at that point, pgAdmin3 won't reliably run on any supported
platform, so it won't be a problem if we break it.
If we clearly mark the old function names as deprecated aliases, client
tools will gradually move to the new names.
Counter-argument: moving the directory is going to break many tools
anyway, so why bother with function aliases?
--
Josh Berkus
Containers & Databases Oh My!
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Andres,
* Andres Freund (andres@anarazel.de) wrote:
On 2017-02-09 15:53:47 -0500, Stephen Frost wrote:
* Josh Berkus (josh@berkus.org) wrote:
What I'm voting against is the idea that we'll have aliases in core, but
remove them in two releases. Either that's unrealistic, or it's just
prolonging the pain.Waiting 10+ years doesn't make the pain go away when it comes to
removing things like that.That's ridiculous. I think we can fairly argue whether backward compat
is worth it, but claiming that migrations to something new aren't easier
if there's a number of versions that support both the old and the new
names/syntax/whatnot is obviously wrong.
We do provide a number of years of overlap- 5 years in fact. I believe
that's an entirely good thing and gives our users a chance to manage
their upgrade paths from one major release to the next.
Increasing that overlap to 10 or 15 years, however, doesn't make a
hill-of-beans worth of difference, in my opinion. Either they're
tracking the releases that we're doing and making changes and adapting
as we change things, or they aren't and won't ever unless they're forced
to, instead preferring to make us carry the burden of maintenance on the
backwards-compat pieces.
Thanks!
Stephen
On 2/9/17 4:03 PM, Josh Berkus wrote:
Counter-argument: moving the directory is going to break many tools
anyway, so why bother with function aliases?
+1.
--
-David
david@pgmasters.net
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Josh Berkus (josh@berkus.org) wrote:
On 02/09/2017 12:53 PM, Stephen Frost wrote:
Waiting 10+ years doesn't make the pain go away when it comes to
removing things like that.Sure it does. That's two whole generations of client tools. For
example, at that point, pgAdmin3 won't reliably run on any supported
platform, so it won't be a problem if we break it.
That's not true if OpenSCG has their way as they're continuing to
maintain it, from my understanding.
And, I'm sorry, but counting on projects to essentially die off to be
the point where we can drop certain bits of backwards-compatibility just
isn't a winning strategy.
If we clearly mark the old function names as deprecated aliases, client
tools will gradually move to the new names.
No, they won't. They haven't. Look at pg_shadow- it was clearly marked
as deprecated in *8.1*.
Counter-argument: moving the directory is going to break many tools
anyway, so why bother with function aliases?
You're going to have to explain exactly the argument you're making
there, because I don't see the point you're trying to get at with that
question.
Thanks!
Stephen
On 2017-02-09 13:03:41 -0800, Josh Berkus wrote:
Counter-argument: moving the directory is going to break many tools
anyway, so why bother with function aliases?
There's not actually that many tools affected by renaming pg_xlog,
i.e. there are tools that aren't affected by the rename at all, but do
calle *xlog* functions.
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
* Josh Berkus (josh@berkus.org) wrote:
If we clearly mark the old function names as deprecated aliases, client
tools will gradually move to the new names.
No, they won't. They haven't. Look at pg_shadow- it was clearly marked
as deprecated in *8.1*.
Back in 8.1 we didn't have extensions. Now that we do, I think the
terms of discussion are a bit different. In particular, if we relegate
the aliases to an extension, the pain of getting/installing that extension
will provide a forcing function encouraging users to fix their code so
they don't need it anymore.
Also, our experience with contrib/tsearch2 suggests that the extension
shouldn't be part of contrib, because we have zero track record of getting
rid of stuff in contrib, no matter how dead it is.
So I'm entirely happy with somebody who feels a need for this developing
an extension that we don't ship with the core system, and maintaining it
for as long as they continue to feel the need for it. We couldn't stop
that from happening anyway. But let's not buy into maintaining it as
part of the core distribution. We don't have a mechanism for getting
rid of stuff once it's in the distro.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Thu, Feb 9, 2017 at 4:24 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Also, our experience with contrib/tsearch2 suggests that the extension
shouldn't be part of contrib, because we have zero track record of getting
rid of stuff in contrib, no matter how dead it is.
Let's nuke tsearch2 to remove this adverse precedent, and then add the
new thing.
Anybody who still wants tsearch2 can go get it from an old version, or
somebody can maintain a fork on github.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Robert Haas (robertmhaas@gmail.com) wrote:
On Thu, Feb 9, 2017 at 4:24 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Also, our experience with contrib/tsearch2 suggests that the extension
shouldn't be part of contrib, because we have zero track record of getting
rid of stuff in contrib, no matter how dead it is.Let's nuke tsearch2 to remove this adverse precedent, and then add the
new thing.Anybody who still wants tsearch2 can go get it from an old version, or
somebody can maintain a fork on github.
Works for me. I'd love to nuke pg_shadow and all the other
not-really-maintained backwards-compat things from when roles were
added too.
Thanks!
Stephen
On 2017-02-09 19:19:21 -0500, Stephen Frost wrote:
* Robert Haas (robertmhaas@gmail.com) wrote:
On Thu, Feb 9, 2017 at 4:24 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Also, our experience with contrib/tsearch2 suggests that the extension
shouldn't be part of contrib, because we have zero track record of getting
rid of stuff in contrib, no matter how dead it is.Let's nuke tsearch2 to remove this adverse precedent, and then add the
new thing.Anybody who still wants tsearch2 can go get it from an old version, or
somebody can maintain a fork on github.Works for me.
+1
I'd love to nuke pg_shadow and all the other
not-really-maintained backwards-compat things from when roles were
added too.
Not sure if it's worth the work to rip out and such, but I'm mildly
supportive of this one too. Depends a bit on what all the other things
are ;)
Andres
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Andres Freund (andres@anarazel.de) wrote:
On 2017-02-09 19:19:21 -0500, Stephen Frost wrote:
I'd love to nuke pg_shadow and all the other
not-really-maintained backwards-compat things from when roles were
added too.Not sure if it's worth the work to rip out and such, but I'm mildly
supportive of this one too. Depends a bit on what all the other things
are ;)
Reviewing 7762619e95272974f90a38d8d85aafbe0e94add5 where roles were
added, I find:
pg_user - use pg_roles instead, which actually includes all of the role
attributes, unlike pg_user
pg_shadow - use pg_authid instead, which, again, actually includes all
of the role attributes, unlike pg_shadow.
pg_group - use pg_auth_members instead, which includes the info about
the admin option and the grantor
I don't think we should remove things like CREATE USER, that's a
perfectly reasonable and maintained interface, unlike the above views,
which missed out on things like the 'createrole' role attribute.
Thanks!
Stephen
On 2/9/17 6:37 PM, Andres Freund wrote:
Anybody who still wants tsearch2 can go get it from an old version, or
somebody can maintain a fork on github.Works for me.
+1
+1
I'd love to nuke pg_shadow and all the other
not-really-maintained backwards-compat things from when roles were
added too.Not sure if it's worth the work to rip out and such, but I'm mildly
supportive of this one too. Depends a bit on what all the other things
are ;)
The problem with pg_shadow is unless you specifically looked at it in
the docs after 8.1, you had no idea it was deprecated. I don't really
think of it as deprecated.
As someone mentioned, forcing a user to install an extension makes the
deprecation visible. Another option would be to have the backend spit
out a WARNING the first time you access anything that's deprecated. Both
of those are pertinent reminders to people that they need to change
their tools.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
855-TREBLE2 (855-873-2532)
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Jim,
* Jim Nasby (Jim.Nasby@BlueTreble.com) wrote:
On 2/9/17 6:37 PM, Andres Freund wrote:
I'd love to nuke pg_shadow and all the other
not-really-maintained backwards-compat things from when roles were
added too.Not sure if it's worth the work to rip out and such, but I'm mildly
supportive of this one too. Depends a bit on what all the other things
are ;)The problem with pg_shadow is unless you specifically looked at it
in the docs after 8.1, you had no idea it was deprecated. I don't
really think of it as deprecated.
It's not even maintained properly, I hardly see how it couldn't be
anything but deprecated, and the docs certainly are the right place, if
anywhere, to say that something is deprecated.
As someone mentioned, forcing a user to install an extension makes
the deprecation visible. Another option would be to have the backend
spit out a WARNING the first time you access anything that's
deprecated. Both of those are pertinent reminders to people that
they need to change their tools.
Ugh. Please, no. Hacking up the backend to recognize that a given
query is referring to a deprecated view and then throwing a warning on
it is just plain ugly.
Let's go one step further, and throw an ERROR if someone tries to query
these views instead.
Thanks!
Stephen
On Fri, Feb 10, 2017 at 10:16 AM, Stephen Frost <sfrost@snowman.net> wrote:
As someone mentioned, forcing a user to install an extension makes
the deprecation visible. Another option would be to have the backend
spit out a WARNING the first time you access anything that's
deprecated. Both of those are pertinent reminders to people that
they need to change their tools.Ugh. Please, no. Hacking up the backend to recognize that a given
query is referring to a deprecated view and then throwing a warning on
it is just plain ugly.Let's go one step further, and throw an ERROR if someone tries to query
these views instead.
FWIW, I am of the opinion to just nuke them as the "soft of"
deprecation period has been very long. Applications should have
switched to pg_authid and pg_roles long ago already.
--
Michael
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 2017-02-09 20:02:54 -0500, Stephen Frost wrote:
* Andres Freund (andres@anarazel.de) wrote:
On 2017-02-09 19:19:21 -0500, Stephen Frost wrote:
I'd love to nuke pg_shadow and all the other
not-really-maintained backwards-compat things from when roles were
added too.Not sure if it's worth the work to rip out and such, but I'm mildly
supportive of this one too. Depends a bit on what all the other things
are ;)Reviewing 7762619e95272974f90a38d8d85aafbe0e94add5 where roles were
added, I find:pg_user - use pg_roles instead, which actually includes all of the role
attributes, unlike pg_user
Hm, I presume this is the most used one.
pg_group - use pg_auth_members instead, which includes the info about
the admin option and the grantor
then this.
pg_shadow - use pg_authid instead, which, again, actually includes all
of the role attributes, unlike pg_shadow.
That's probably fine.
I'm fine with dropping now, alternatively we could, and that seems like
it'd institute a good practice, name them to be removed in 10+1 in the
10 release notes. "Upcoming removal of deprecated features" or such. And
schedule stuff for that regularly. Like e.g. dropping psql support for
< 9.0 (randomly chosen version), pg_dump support for very old versions,
etc, ...
While not everyone will be saved by that (by virtue of not reading /
reacting) it helps those that actually read the notes. Obviously
there'd still some incompatibilities that do not go through that
mechanism.
I don't think we should remove things like CREATE USER, that's a
perfectly reasonable and maintained interface, unlike the above views,
which missed out on things like the 'createrole' role attribute.
Yea, that'd be a bad plan.
Greetings,
Andres Freund
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On 02/09/2017 05:19 PM, Michael Paquier wrote:
On Fri, Feb 10, 2017 at 10:16 AM, Stephen Frost <sfrost@snowman.net> wrote:
As someone mentioned, forcing a user to install an extension makes
the deprecation visible. Another option would be to have the backend
spit out a WARNING the first time you access anything that's
deprecated. Both of those are pertinent reminders to people that
they need to change their tools.Ugh. Please, no. Hacking up the backend to recognize that a given
query is referring to a deprecated view and then throwing a warning on
it is just plain ugly.Let's go one step further, and throw an ERROR if someone tries to query
these views instead.FWIW, I am of the opinion to just nuke them as the "soft of"
deprecation period has been very long. Applications should have
switched to pg_authid and pg_roles long ago already.
We will definitely break a lot of client code by removing these -- I
know that, deprecated or not, a lot of infrequently-updated
driver/orm/GUI code still refers to pg_shadow/pg_user.
I think Postgres 10 is the right time to break that code (I mean, we
have to do it someday, and we're already telling people about breakage
in 10), but be aware that there will be shouting and carrying on.
-1 on a warning. Very little code today which references the deprecated
code is interactive, so who's going to see the warning?
--
Josh Berkus
Containers & Databases Oh My!
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
* Josh Berkus (josh@berkus.org) wrote:
On 02/09/2017 05:19 PM, Michael Paquier wrote:
On Fri, Feb 10, 2017 at 10:16 AM, Stephen Frost <sfrost@snowman.net> wrote:
As someone mentioned, forcing a user to install an extension makes
the deprecation visible. Another option would be to have the backend
spit out a WARNING the first time you access anything that's
deprecated. Both of those are pertinent reminders to people that
they need to change their tools.Ugh. Please, no. Hacking up the backend to recognize that a given
query is referring to a deprecated view and then throwing a warning on
it is just plain ugly.Let's go one step further, and throw an ERROR if someone tries to query
these views instead.FWIW, I am of the opinion to just nuke them as the "soft of"
deprecation period has been very long. Applications should have
switched to pg_authid and pg_roles long ago already.We will definitely break a lot of client code by removing these -- I
know that, deprecated or not, a lot of infrequently-updated
driver/orm/GUI code still refers to pg_shadow/pg_user.
Any that we're aware of, I'd suggest we reach out to the maintainers of
and let them know.
I think Postgres 10 is the right time to break that code (I mean, we
have to do it someday, and we're already telling people about breakage
in 10), but be aware that there will be shouting and carrying on.
Agreed.
-1 on a warning. Very little code today which references the deprecated
code is interactive, so who's going to see the warning?
Indeed, I was thinking of this also. The warnings would just end up in
the server logs, amongst tons of often not-terribly-interesting
information that far too many users ignore already, and those that don't
probably actually read the release notes.
Thanks!
Stephen
On Fri, Feb 3, 2017 at 05:21:28AM -0500, Stephen Frost wrote:
Also googling for pg_wal, I'm finding food for thought like this
IBM technote:
http://www-01.ibm.com/support/docview.wss?uid=isg3T1015637
which recommends to
"Remove all files under /var/lib/pgsql/9.0/data/pg_wal/"
and also calls that directory the "write-ahead log directory"
which is quite confusing because apparently it's the destination of
their archive command.It's certainly unfortunate that people have thought that they can create
arbitrary directories under the PG data directory. That's never going
to be safe, witness that we've created new directories under PGDATA in
the last few releases and I don't see any reason why that would change
moving forward. Perhaps we should check for the existance of such a
directory during pg_upgrade and throw an error, and we should go back
and do the same for other directories which have been added over
releases, but I'm not sure I can see an argument for doing much more
than that.
Actually, pg_upgrade already checks for some odd directories stored
inside of PGDATA:
WARNING: new data directory should not be inside the
old data directory, e.g. %s\n", old_cluster_pgdata);
WARNING: user-defined tablespace locations should
not be inside the data directory, e.g. %s\n", old_tablespace_dir);
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers