agora inbox for [email protected]
help / color / mirror / Atom feed[PATCH 11/18] duplicate words
7+ messages / 2 participants
[nested] [flat]
* [PATCH 11/18] duplicate words
@ 2021-01-31 00:10 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: Justin Pryzby @ 2021-01-31 00:10 UTC (permalink / raw)
commit 9c4f5192f69ed16c99e0d079f0b5faebd7bad212
Allow pg_rewind to use a standby server as the source system.
commit 4a252996d5fda7662b2afdf329a5c95be0fe3b01
Add tests for tuplesort.c.
commit 0a2bc5d61e713e3fe72438f020eea5fcc90b0f0b
Move per-agg and per-trans duplicate finding to the planner.
commit 623a9ba79bbdd11c5eccb30b8bd5c446130e521c
snapshot scalability: cache snapshots using a xact completion counter.
commit 2c03216d831160bedd72d45f712601b6f7d03f1c
Revamp the WAL record format.
---
src/backend/access/transam/xlogutils.c | 3 +--
src/backend/optimizer/prep/prepagg.c | 2 +-
src/backend/storage/ipc/procarray.c | 2 +-
src/bin/pg_rewind/libpq_source.c | 2 +-
src/test/regress/expected/tuplesort.out | 2 +-
src/test/regress/sql/tuplesort.sql | 2 +-
6 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/backend/access/transam/xlogutils.c b/src/backend/access/transam/xlogutils.c
index e723253297..25d6df1659 100644
--- a/src/backend/access/transam/xlogutils.c
+++ b/src/backend/access/transam/xlogutils.c
@@ -433,8 +433,7 @@ XLogReadBufferForRedoExtended(XLogReaderState *record,
* NB: A redo function should normally not call this directly. To get a page
* to modify, use XLogReadBufferForRedoExtended instead. It is important that
* all pages modified by a WAL record are registered in the WAL records, or
- * they will be invisible to tools that that need to know which pages are
- * modified.
+ * they will be invisible to tools that need to know which pages are modified.
*/
Buffer
XLogReadBufferExtended(RelFileNode rnode, ForkNumber forknum,
diff --git a/src/backend/optimizer/prep/prepagg.c b/src/backend/optimizer/prep/prepagg.c
index 929a8ea13b..89046f9afb 100644
--- a/src/backend/optimizer/prep/prepagg.c
+++ b/src/backend/optimizer/prep/prepagg.c
@@ -71,7 +71,7 @@ static Datum GetAggInitVal(Datum textInitVal, Oid transtype);
*
* Information about the aggregates and transition functions are collected
* in the root->agginfos and root->aggtransinfos lists. The 'aggtranstype',
- * 'aggno', and 'aggtransno' fields in are filled in in each Aggref.
+ * 'aggno', and 'aggtransno' fields of each Aggref are filled in.
*
* NOTE: This modifies the Aggrefs in the input expression in-place!
*
diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c
index cf12eda504..b9fbdcb88f 100644
--- a/src/backend/storage/ipc/procarray.c
+++ b/src/backend/storage/ipc/procarray.c
@@ -2049,7 +2049,7 @@ GetSnapshotDataReuse(Snapshot snapshot)
* holding ProcArrayLock) exclusively). Thus the xactCompletionCount check
* ensures we would detect if the snapshot would have changed.
*
- * As the snapshot contents are the same as it was before, it is is safe
+ * As the snapshot contents are the same as it was before, it is safe
* to re-enter the snapshot's xmin into the PGPROC array. None of the rows
* visible under the snapshot could already have been removed (that'd
* require the set of running transactions to change) and it fulfills the
diff --git a/src/bin/pg_rewind/libpq_source.c b/src/bin/pg_rewind/libpq_source.c
index 86d2adcaee..ac794cf4eb 100644
--- a/src/bin/pg_rewind/libpq_source.c
+++ b/src/bin/pg_rewind/libpq_source.c
@@ -539,7 +539,7 @@ process_queued_fetch_requests(libpq_source *src)
chunkoff, rq->path, (int64) rq->offset);
/*
- * We should not receive receive more data than we requested, or
+ * We should not receive more data than we requested, or
* pg_read_binary_file() messed up. We could receive less,
* though, if the file was truncated in the source after we
* checked its size. That's OK, there should be a WAL record of
diff --git a/src/test/regress/expected/tuplesort.out b/src/test/regress/expected/tuplesort.out
index 3fc1998bf2..418f296a3f 100644
--- a/src/test/regress/expected/tuplesort.out
+++ b/src/test/regress/expected/tuplesort.out
@@ -1,7 +1,7 @@
-- only use parallelism when explicitly intending to do so
SET max_parallel_maintenance_workers = 0;
SET max_parallel_workers = 0;
--- A table with with contents that, when sorted, triggers abbreviated
+-- A table with contents that, when sorted, triggers abbreviated
-- key aborts. One easy way to achieve that is to use uuids that all
-- have the same prefix, as abbreviated keys for uuids just use the
-- first sizeof(Datum) bytes.
diff --git a/src/test/regress/sql/tuplesort.sql b/src/test/regress/sql/tuplesort.sql
index 7d7e02f02a..846484d561 100644
--- a/src/test/regress/sql/tuplesort.sql
+++ b/src/test/regress/sql/tuplesort.sql
@@ -2,7 +2,7 @@
SET max_parallel_maintenance_workers = 0;
SET max_parallel_workers = 0;
--- A table with with contents that, when sorted, triggers abbreviated
+-- A table with contents that, when sorted, triggers abbreviated
-- key aborts. One easy way to achieve that is to use uuids that all
-- have the same prefix, as abbreviated keys for uuids just use the
-- first sizeof(Datum) bytes.
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0012-doc-review-piecemeal-construction-of-partitioned-ind.patch"
^ permalink raw reply [nested|flat] 7+ messages in thread
* [PATCH v8 1/4] move PG_TEMP_FILE* macros to file_utils.h
@ 2023-08-22 02:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Bossart @ 2023-08-22 02:05 UTC (permalink / raw)
---
src/backend/backup/basebackup.c | 2 +-
src/backend/postmaster/postmaster.c | 1 +
src/backend/storage/file/fileset.c | 1 +
src/bin/pg_checksums/pg_checksums.c | 10 ----------
src/bin/pg_rewind/filemap.c | 2 +-
src/include/common/file_utils.h | 4 ++++
src/include/storage/fd.h | 4 ----
7 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c
index 45be21131c..5d66014499 100644
--- a/src/backend/backup/basebackup.c
+++ b/src/backend/backup/basebackup.c
@@ -25,6 +25,7 @@
#include "commands/defrem.h"
#include "common/compression.h"
#include "common/file_perm.h"
+#include "common/file_utils.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "nodes/pg_list.h"
@@ -37,7 +38,6 @@
#include "storage/bufpage.h"
#include "storage/checksum.h"
#include "storage/dsm_impl.h"
-#include "storage/fd.h"
#include "storage/ipc.h"
#include "storage/reinit.h"
#include "utils/builtins.h"
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index d7bfb28ff3..54e9bfb8c4 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -94,6 +94,7 @@
#include "access/xlogrecovery.h"
#include "catalog/pg_control.h"
#include "common/file_perm.h"
+#include "common/file_utils.h"
#include "common/ip.h"
#include "common/pg_prng.h"
#include "common/string.h"
diff --git a/src/backend/storage/file/fileset.c b/src/backend/storage/file/fileset.c
index e9951b0269..84cae32548 100644
--- a/src/backend/storage/file/fileset.c
+++ b/src/backend/storage/file/fileset.c
@@ -25,6 +25,7 @@
#include "catalog/pg_tablespace.h"
#include "commands/tablespace.h"
+#include "common/file_utils.h"
#include "common/hashfn.h"
#include "miscadmin.h"
#include "storage/ipc.h"
diff --git a/src/bin/pg_checksums/pg_checksums.c b/src/bin/pg_checksums/pg_checksums.c
index 19eb67e485..9011a19b4e 100644
--- a/src/bin/pg_checksums/pg_checksums.c
+++ b/src/bin/pg_checksums/pg_checksums.c
@@ -52,16 +52,6 @@ typedef enum
PG_MODE_ENABLE
} PgChecksumMode;
-/*
- * Filename components.
- *
- * XXX: fd.h is not declared here as frontend side code is not able to
- * interact with the backend-side definitions for the various fsync
- * wrappers.
- */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
static PgChecksumMode mode = PG_MODE_CHECK;
static const char *progname;
diff --git a/src/bin/pg_rewind/filemap.c b/src/bin/pg_rewind/filemap.c
index bd5c598e20..58280d9abc 100644
--- a/src/bin/pg_rewind/filemap.c
+++ b/src/bin/pg_rewind/filemap.c
@@ -27,12 +27,12 @@
#include <unistd.h>
#include "catalog/pg_tablespace_d.h"
+#include "common/file_utils.h"
#include "common/hashfn.h"
#include "common/string.h"
#include "datapagemap.h"
#include "filemap.h"
#include "pg_rewind.h"
-#include "storage/fd.h"
/*
* Define a hash table which we can use to store information about the files
diff --git a/src/include/common/file_utils.h b/src/include/common/file_utils.h
index b7efa1226d..dd1532bcb0 100644
--- a/src/include/common/file_utils.h
+++ b/src/include/common/file_utils.h
@@ -46,4 +46,8 @@ extern ssize_t pg_pwritev_with_retry(int fd,
extern ssize_t pg_pwrite_zeros(int fd, size_t size, off_t offset);
+/* Filename components */
+#define PG_TEMP_FILES_DIR "pgsql_tmp"
+#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
+
#endif /* FILE_UTILS_H */
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h
index 6791a406fc..aea30c0622 100644
--- a/src/include/storage/fd.h
+++ b/src/include/storage/fd.h
@@ -195,8 +195,4 @@ extern int durable_unlink(const char *fname, int elevel);
extern void SyncDataDirectory(void);
extern int data_sync_elevel(int elevel);
-/* Filename components */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
#endif /* FD_H */
--
2.25.1
--oyUTqETQ0mS9luUI
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v8-0002-make-common-enum-for-sync-methods.patch"
^ permalink raw reply [nested|flat] 7+ messages in thread
* [PATCH v9 1/4] move PG_TEMP_FILE* macros to file_utils.h
@ 2023-08-22 02:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Bossart @ 2023-08-22 02:05 UTC (permalink / raw)
---
src/backend/backup/basebackup.c | 2 +-
src/backend/postmaster/postmaster.c | 1 +
src/backend/storage/file/fileset.c | 1 +
src/bin/pg_checksums/pg_checksums.c | 10 ----------
src/bin/pg_rewind/filemap.c | 2 +-
src/include/common/file_utils.h | 4 ++++
src/include/storage/fd.h | 4 ----
7 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c
index 45be21131c..5d66014499 100644
--- a/src/backend/backup/basebackup.c
+++ b/src/backend/backup/basebackup.c
@@ -25,6 +25,7 @@
#include "commands/defrem.h"
#include "common/compression.h"
#include "common/file_perm.h"
+#include "common/file_utils.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "nodes/pg_list.h"
@@ -37,7 +38,6 @@
#include "storage/bufpage.h"
#include "storage/checksum.h"
#include "storage/dsm_impl.h"
-#include "storage/fd.h"
#include "storage/ipc.h"
#include "storage/reinit.h"
#include "utils/builtins.h"
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index d7bfb28ff3..54e9bfb8c4 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -94,6 +94,7 @@
#include "access/xlogrecovery.h"
#include "catalog/pg_control.h"
#include "common/file_perm.h"
+#include "common/file_utils.h"
#include "common/ip.h"
#include "common/pg_prng.h"
#include "common/string.h"
diff --git a/src/backend/storage/file/fileset.c b/src/backend/storage/file/fileset.c
index e9951b0269..84cae32548 100644
--- a/src/backend/storage/file/fileset.c
+++ b/src/backend/storage/file/fileset.c
@@ -25,6 +25,7 @@
#include "catalog/pg_tablespace.h"
#include "commands/tablespace.h"
+#include "common/file_utils.h"
#include "common/hashfn.h"
#include "miscadmin.h"
#include "storage/ipc.h"
diff --git a/src/bin/pg_checksums/pg_checksums.c b/src/bin/pg_checksums/pg_checksums.c
index 19eb67e485..9011a19b4e 100644
--- a/src/bin/pg_checksums/pg_checksums.c
+++ b/src/bin/pg_checksums/pg_checksums.c
@@ -52,16 +52,6 @@ typedef enum
PG_MODE_ENABLE
} PgChecksumMode;
-/*
- * Filename components.
- *
- * XXX: fd.h is not declared here as frontend side code is not able to
- * interact with the backend-side definitions for the various fsync
- * wrappers.
- */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
static PgChecksumMode mode = PG_MODE_CHECK;
static const char *progname;
diff --git a/src/bin/pg_rewind/filemap.c b/src/bin/pg_rewind/filemap.c
index bd5c598e20..58280d9abc 100644
--- a/src/bin/pg_rewind/filemap.c
+++ b/src/bin/pg_rewind/filemap.c
@@ -27,12 +27,12 @@
#include <unistd.h>
#include "catalog/pg_tablespace_d.h"
+#include "common/file_utils.h"
#include "common/hashfn.h"
#include "common/string.h"
#include "datapagemap.h"
#include "filemap.h"
#include "pg_rewind.h"
-#include "storage/fd.h"
/*
* Define a hash table which we can use to store information about the files
diff --git a/src/include/common/file_utils.h b/src/include/common/file_utils.h
index b7efa1226d..dd1532bcb0 100644
--- a/src/include/common/file_utils.h
+++ b/src/include/common/file_utils.h
@@ -46,4 +46,8 @@ extern ssize_t pg_pwritev_with_retry(int fd,
extern ssize_t pg_pwrite_zeros(int fd, size_t size, off_t offset);
+/* Filename components */
+#define PG_TEMP_FILES_DIR "pgsql_tmp"
+#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
+
#endif /* FILE_UTILS_H */
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h
index 6791a406fc..aea30c0622 100644
--- a/src/include/storage/fd.h
+++ b/src/include/storage/fd.h
@@ -195,8 +195,4 @@ extern int durable_unlink(const char *fname, int elevel);
extern void SyncDataDirectory(void);
extern int data_sync_elevel(int elevel);
-/* Filename components */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
#endif /* FD_H */
--
2.25.1
--2fHTh5uZTiUOsy+g
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v9-0002-make-common-enum-for-sync-methods.patch"
^ permalink raw reply [nested|flat] 7+ messages in thread
* [PATCH 1/1] move PG_TEMP_FILE* macros to file_utils.h
@ 2023-08-22 02:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Bossart @ 2023-08-22 02:05 UTC (permalink / raw)
---
src/backend/backup/basebackup.c | 2 +-
src/backend/storage/file/fileset.c | 1 +
src/bin/pg_checksums/pg_checksums.c | 10 ----------
src/bin/pg_rewind/filemap.c | 2 +-
src/include/common/file_utils.h | 4 ++++
src/include/storage/fd.h | 4 ----
6 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c
index 45be21131c..5d66014499 100644
--- a/src/backend/backup/basebackup.c
+++ b/src/backend/backup/basebackup.c
@@ -25,6 +25,7 @@
#include "commands/defrem.h"
#include "common/compression.h"
#include "common/file_perm.h"
+#include "common/file_utils.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "nodes/pg_list.h"
@@ -37,7 +38,6 @@
#include "storage/bufpage.h"
#include "storage/checksum.h"
#include "storage/dsm_impl.h"
-#include "storage/fd.h"
#include "storage/ipc.h"
#include "storage/reinit.h"
#include "utils/builtins.h"
diff --git a/src/backend/storage/file/fileset.c b/src/backend/storage/file/fileset.c
index e9951b0269..84cae32548 100644
--- a/src/backend/storage/file/fileset.c
+++ b/src/backend/storage/file/fileset.c
@@ -25,6 +25,7 @@
#include "catalog/pg_tablespace.h"
#include "commands/tablespace.h"
+#include "common/file_utils.h"
#include "common/hashfn.h"
#include "miscadmin.h"
#include "storage/ipc.h"
diff --git a/src/bin/pg_checksums/pg_checksums.c b/src/bin/pg_checksums/pg_checksums.c
index 19eb67e485..9011a19b4e 100644
--- a/src/bin/pg_checksums/pg_checksums.c
+++ b/src/bin/pg_checksums/pg_checksums.c
@@ -52,16 +52,6 @@ typedef enum
PG_MODE_ENABLE
} PgChecksumMode;
-/*
- * Filename components.
- *
- * XXX: fd.h is not declared here as frontend side code is not able to
- * interact with the backend-side definitions for the various fsync
- * wrappers.
- */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
static PgChecksumMode mode = PG_MODE_CHECK;
static const char *progname;
diff --git a/src/bin/pg_rewind/filemap.c b/src/bin/pg_rewind/filemap.c
index bd5c598e20..58280d9abc 100644
--- a/src/bin/pg_rewind/filemap.c
+++ b/src/bin/pg_rewind/filemap.c
@@ -27,12 +27,12 @@
#include <unistd.h>
#include "catalog/pg_tablespace_d.h"
+#include "common/file_utils.h"
#include "common/hashfn.h"
#include "common/string.h"
#include "datapagemap.h"
#include "filemap.h"
#include "pg_rewind.h"
-#include "storage/fd.h"
/*
* Define a hash table which we can use to store information about the files
diff --git a/src/include/common/file_utils.h b/src/include/common/file_utils.h
index b7efa1226d..dd1532bcb0 100644
--- a/src/include/common/file_utils.h
+++ b/src/include/common/file_utils.h
@@ -46,4 +46,8 @@ extern ssize_t pg_pwritev_with_retry(int fd,
extern ssize_t pg_pwrite_zeros(int fd, size_t size, off_t offset);
+/* Filename components */
+#define PG_TEMP_FILES_DIR "pgsql_tmp"
+#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
+
#endif /* FILE_UTILS_H */
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h
index 6791a406fc..aea30c0622 100644
--- a/src/include/storage/fd.h
+++ b/src/include/storage/fd.h
@@ -195,8 +195,4 @@ extern int durable_unlink(const char *fname, int elevel);
extern void SyncDataDirectory(void);
extern int data_sync_elevel(int elevel);
-/* Filename components */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
#endif /* FD_H */
--
2.25.1
--cNdxnHkX5QqsyA0e--
^ permalink raw reply [nested|flat] 7+ messages in thread
* [PATCH v5 1/2] move PG_TEMP_FILE* macros to file_utils.h
@ 2023-08-22 02:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Bossart @ 2023-08-22 02:05 UTC (permalink / raw)
---
src/backend/backup/basebackup.c | 2 +-
src/backend/postmaster/postmaster.c | 1 +
src/backend/storage/file/fileset.c | 1 +
src/bin/pg_checksums/pg_checksums.c | 10 ----------
src/bin/pg_rewind/filemap.c | 2 +-
src/include/common/file_utils.h | 4 ++++
src/include/storage/fd.h | 4 ----
7 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c
index 45be21131c..5d66014499 100644
--- a/src/backend/backup/basebackup.c
+++ b/src/backend/backup/basebackup.c
@@ -25,6 +25,7 @@
#include "commands/defrem.h"
#include "common/compression.h"
#include "common/file_perm.h"
+#include "common/file_utils.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "nodes/pg_list.h"
@@ -37,7 +38,6 @@
#include "storage/bufpage.h"
#include "storage/checksum.h"
#include "storage/dsm_impl.h"
-#include "storage/fd.h"
#include "storage/ipc.h"
#include "storage/reinit.h"
#include "utils/builtins.h"
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 9c8ec779f9..d375dcb795 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -94,6 +94,7 @@
#include "access/xlogrecovery.h"
#include "catalog/pg_control.h"
#include "common/file_perm.h"
+#include "common/file_utils.h"
#include "common/ip.h"
#include "common/pg_prng.h"
#include "common/string.h"
diff --git a/src/backend/storage/file/fileset.c b/src/backend/storage/file/fileset.c
index e9951b0269..84cae32548 100644
--- a/src/backend/storage/file/fileset.c
+++ b/src/backend/storage/file/fileset.c
@@ -25,6 +25,7 @@
#include "catalog/pg_tablespace.h"
#include "commands/tablespace.h"
+#include "common/file_utils.h"
#include "common/hashfn.h"
#include "miscadmin.h"
#include "storage/ipc.h"
diff --git a/src/bin/pg_checksums/pg_checksums.c b/src/bin/pg_checksums/pg_checksums.c
index 19eb67e485..9011a19b4e 100644
--- a/src/bin/pg_checksums/pg_checksums.c
+++ b/src/bin/pg_checksums/pg_checksums.c
@@ -52,16 +52,6 @@ typedef enum
PG_MODE_ENABLE
} PgChecksumMode;
-/*
- * Filename components.
- *
- * XXX: fd.h is not declared here as frontend side code is not able to
- * interact with the backend-side definitions for the various fsync
- * wrappers.
- */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
static PgChecksumMode mode = PG_MODE_CHECK;
static const char *progname;
diff --git a/src/bin/pg_rewind/filemap.c b/src/bin/pg_rewind/filemap.c
index bd5c598e20..58280d9abc 100644
--- a/src/bin/pg_rewind/filemap.c
+++ b/src/bin/pg_rewind/filemap.c
@@ -27,12 +27,12 @@
#include <unistd.h>
#include "catalog/pg_tablespace_d.h"
+#include "common/file_utils.h"
#include "common/hashfn.h"
#include "common/string.h"
#include "datapagemap.h"
#include "filemap.h"
#include "pg_rewind.h"
-#include "storage/fd.h"
/*
* Define a hash table which we can use to store information about the files
diff --git a/src/include/common/file_utils.h b/src/include/common/file_utils.h
index b7efa1226d..dd1532bcb0 100644
--- a/src/include/common/file_utils.h
+++ b/src/include/common/file_utils.h
@@ -46,4 +46,8 @@ extern ssize_t pg_pwritev_with_retry(int fd,
extern ssize_t pg_pwrite_zeros(int fd, size_t size, off_t offset);
+/* Filename components */
+#define PG_TEMP_FILES_DIR "pgsql_tmp"
+#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
+
#endif /* FILE_UTILS_H */
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h
index 6791a406fc..aea30c0622 100644
--- a/src/include/storage/fd.h
+++ b/src/include/storage/fd.h
@@ -195,8 +195,4 @@ extern int durable_unlink(const char *fname, int elevel);
extern void SyncDataDirectory(void);
extern int data_sync_elevel(int elevel);
-/* Filename components */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
#endif /* FD_H */
--
2.25.1
--X1bOJ3K7DJ5YkBrT
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v5-0002-allow-syncfs-in-frontend-utilities.patch"
^ permalink raw reply [nested|flat] 7+ messages in thread
* [PATCH v6 1/2] move PG_TEMP_FILE* macros to file_utils.h
@ 2023-08-22 02:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Bossart @ 2023-08-22 02:05 UTC (permalink / raw)
---
src/backend/backup/basebackup.c | 2 +-
src/backend/postmaster/postmaster.c | 1 +
src/backend/storage/file/fileset.c | 1 +
src/bin/pg_checksums/pg_checksums.c | 10 ----------
src/bin/pg_rewind/filemap.c | 2 +-
src/include/common/file_utils.h | 4 ++++
src/include/storage/fd.h | 4 ----
7 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c
index 45be21131c..5d66014499 100644
--- a/src/backend/backup/basebackup.c
+++ b/src/backend/backup/basebackup.c
@@ -25,6 +25,7 @@
#include "commands/defrem.h"
#include "common/compression.h"
#include "common/file_perm.h"
+#include "common/file_utils.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "nodes/pg_list.h"
@@ -37,7 +38,6 @@
#include "storage/bufpage.h"
#include "storage/checksum.h"
#include "storage/dsm_impl.h"
-#include "storage/fd.h"
#include "storage/ipc.h"
#include "storage/reinit.h"
#include "utils/builtins.h"
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index d7bfb28ff3..54e9bfb8c4 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -94,6 +94,7 @@
#include "access/xlogrecovery.h"
#include "catalog/pg_control.h"
#include "common/file_perm.h"
+#include "common/file_utils.h"
#include "common/ip.h"
#include "common/pg_prng.h"
#include "common/string.h"
diff --git a/src/backend/storage/file/fileset.c b/src/backend/storage/file/fileset.c
index e9951b0269..84cae32548 100644
--- a/src/backend/storage/file/fileset.c
+++ b/src/backend/storage/file/fileset.c
@@ -25,6 +25,7 @@
#include "catalog/pg_tablespace.h"
#include "commands/tablespace.h"
+#include "common/file_utils.h"
#include "common/hashfn.h"
#include "miscadmin.h"
#include "storage/ipc.h"
diff --git a/src/bin/pg_checksums/pg_checksums.c b/src/bin/pg_checksums/pg_checksums.c
index 19eb67e485..9011a19b4e 100644
--- a/src/bin/pg_checksums/pg_checksums.c
+++ b/src/bin/pg_checksums/pg_checksums.c
@@ -52,16 +52,6 @@ typedef enum
PG_MODE_ENABLE
} PgChecksumMode;
-/*
- * Filename components.
- *
- * XXX: fd.h is not declared here as frontend side code is not able to
- * interact with the backend-side definitions for the various fsync
- * wrappers.
- */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
static PgChecksumMode mode = PG_MODE_CHECK;
static const char *progname;
diff --git a/src/bin/pg_rewind/filemap.c b/src/bin/pg_rewind/filemap.c
index bd5c598e20..58280d9abc 100644
--- a/src/bin/pg_rewind/filemap.c
+++ b/src/bin/pg_rewind/filemap.c
@@ -27,12 +27,12 @@
#include <unistd.h>
#include "catalog/pg_tablespace_d.h"
+#include "common/file_utils.h"
#include "common/hashfn.h"
#include "common/string.h"
#include "datapagemap.h"
#include "filemap.h"
#include "pg_rewind.h"
-#include "storage/fd.h"
/*
* Define a hash table which we can use to store information about the files
diff --git a/src/include/common/file_utils.h b/src/include/common/file_utils.h
index b7efa1226d..dd1532bcb0 100644
--- a/src/include/common/file_utils.h
+++ b/src/include/common/file_utils.h
@@ -46,4 +46,8 @@ extern ssize_t pg_pwritev_with_retry(int fd,
extern ssize_t pg_pwrite_zeros(int fd, size_t size, off_t offset);
+/* Filename components */
+#define PG_TEMP_FILES_DIR "pgsql_tmp"
+#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
+
#endif /* FILE_UTILS_H */
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h
index 6791a406fc..aea30c0622 100644
--- a/src/include/storage/fd.h
+++ b/src/include/storage/fd.h
@@ -195,8 +195,4 @@ extern int durable_unlink(const char *fname, int elevel);
extern void SyncDataDirectory(void);
extern int data_sync_elevel(int elevel);
-/* Filename components */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
#endif /* FD_H */
--
2.25.1
--bp/iNruPH9dso1Pn
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v6-0002-allow-syncfs-in-frontend-utilities.patch"
^ permalink raw reply [nested|flat] 7+ messages in thread
* [PATCH v7 1/2] move PG_TEMP_FILE* macros to file_utils.h
@ 2023-08-22 02:05 Nathan Bossart <[email protected]>
0 siblings, 0 replies; 7+ messages in thread
From: Nathan Bossart @ 2023-08-22 02:05 UTC (permalink / raw)
---
src/backend/backup/basebackup.c | 2 +-
src/backend/postmaster/postmaster.c | 1 +
src/backend/storage/file/fileset.c | 1 +
src/bin/pg_checksums/pg_checksums.c | 10 ----------
src/bin/pg_rewind/filemap.c | 2 +-
src/include/common/file_utils.h | 4 ++++
src/include/storage/fd.h | 4 ----
7 files changed, 8 insertions(+), 16 deletions(-)
diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c
index 45be21131c..5d66014499 100644
--- a/src/backend/backup/basebackup.c
+++ b/src/backend/backup/basebackup.c
@@ -25,6 +25,7 @@
#include "commands/defrem.h"
#include "common/compression.h"
#include "common/file_perm.h"
+#include "common/file_utils.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "nodes/pg_list.h"
@@ -37,7 +38,6 @@
#include "storage/bufpage.h"
#include "storage/checksum.h"
#include "storage/dsm_impl.h"
-#include "storage/fd.h"
#include "storage/ipc.h"
#include "storage/reinit.h"
#include "utils/builtins.h"
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index d7bfb28ff3..54e9bfb8c4 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -94,6 +94,7 @@
#include "access/xlogrecovery.h"
#include "catalog/pg_control.h"
#include "common/file_perm.h"
+#include "common/file_utils.h"
#include "common/ip.h"
#include "common/pg_prng.h"
#include "common/string.h"
diff --git a/src/backend/storage/file/fileset.c b/src/backend/storage/file/fileset.c
index e9951b0269..84cae32548 100644
--- a/src/backend/storage/file/fileset.c
+++ b/src/backend/storage/file/fileset.c
@@ -25,6 +25,7 @@
#include "catalog/pg_tablespace.h"
#include "commands/tablespace.h"
+#include "common/file_utils.h"
#include "common/hashfn.h"
#include "miscadmin.h"
#include "storage/ipc.h"
diff --git a/src/bin/pg_checksums/pg_checksums.c b/src/bin/pg_checksums/pg_checksums.c
index 19eb67e485..9011a19b4e 100644
--- a/src/bin/pg_checksums/pg_checksums.c
+++ b/src/bin/pg_checksums/pg_checksums.c
@@ -52,16 +52,6 @@ typedef enum
PG_MODE_ENABLE
} PgChecksumMode;
-/*
- * Filename components.
- *
- * XXX: fd.h is not declared here as frontend side code is not able to
- * interact with the backend-side definitions for the various fsync
- * wrappers.
- */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
static PgChecksumMode mode = PG_MODE_CHECK;
static const char *progname;
diff --git a/src/bin/pg_rewind/filemap.c b/src/bin/pg_rewind/filemap.c
index bd5c598e20..58280d9abc 100644
--- a/src/bin/pg_rewind/filemap.c
+++ b/src/bin/pg_rewind/filemap.c
@@ -27,12 +27,12 @@
#include <unistd.h>
#include "catalog/pg_tablespace_d.h"
+#include "common/file_utils.h"
#include "common/hashfn.h"
#include "common/string.h"
#include "datapagemap.h"
#include "filemap.h"
#include "pg_rewind.h"
-#include "storage/fd.h"
/*
* Define a hash table which we can use to store information about the files
diff --git a/src/include/common/file_utils.h b/src/include/common/file_utils.h
index b7efa1226d..dd1532bcb0 100644
--- a/src/include/common/file_utils.h
+++ b/src/include/common/file_utils.h
@@ -46,4 +46,8 @@ extern ssize_t pg_pwritev_with_retry(int fd,
extern ssize_t pg_pwrite_zeros(int fd, size_t size, off_t offset);
+/* Filename components */
+#define PG_TEMP_FILES_DIR "pgsql_tmp"
+#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
+
#endif /* FILE_UTILS_H */
diff --git a/src/include/storage/fd.h b/src/include/storage/fd.h
index 6791a406fc..aea30c0622 100644
--- a/src/include/storage/fd.h
+++ b/src/include/storage/fd.h
@@ -195,8 +195,4 @@ extern int durable_unlink(const char *fname, int elevel);
extern void SyncDataDirectory(void);
extern int data_sync_elevel(int elevel);
-/* Filename components */
-#define PG_TEMP_FILES_DIR "pgsql_tmp"
-#define PG_TEMP_FILE_PREFIX "pgsql_tmp"
-
#endif /* FD_H */
--
2.25.1
--3MwIy2ne0vdjdPXF
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="v7-0002-allow-syncfs-in-frontend-utilities.patch"
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2023-08-22 02:05 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-31 00:10 [PATCH 11/18] duplicate words Justin Pryzby <[email protected]>
2023-08-22 02:05 [PATCH v8 1/4] move PG_TEMP_FILE* macros to file_utils.h Nathan Bossart <[email protected]>
2023-08-22 02:05 [PATCH v9 1/4] move PG_TEMP_FILE* macros to file_utils.h Nathan Bossart <[email protected]>
2023-08-22 02:05 [PATCH 1/1] move PG_TEMP_FILE* macros to file_utils.h Nathan Bossart <[email protected]>
2023-08-22 02:05 [PATCH v5 1/2] move PG_TEMP_FILE* macros to file_utils.h Nathan Bossart <[email protected]>
2023-08-22 02:05 [PATCH v6 1/2] move PG_TEMP_FILE* macros to file_utils.h Nathan Bossart <[email protected]>
2023-08-22 02:05 [PATCH v7 1/2] move PG_TEMP_FILE* macros to file_utils.h Nathan Bossart <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox