Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Facebook
Downloads
Home
>
mailing lists
Re: [TODO] Track number of files ready to be archived in pg_stat_archiver - Mailing list pgsql-hackers
From
Brightwell, Adam
Subject
Re: [TODO] Track number of files ready to be archived in pg_stat_archiver
Date
October 21, 2014
08:36:09
Msg-id
CAKRt6CTygBmvTnS-uue22OcvGs7_oYfz6fyoHmyFX3jJ9jA6=g@mail.gmail.com
Whole thread
Raw
In response to
Re: [TODO] Track number of files ready to be archived in pg_stat_archiver
(Julien Rouhaud <julien.rouhaud@dalibo.com>)
Responses
Re: [TODO] Track number of files ready to be archived in pg_stat_archiver
List
pgsql-hackers
Tree view
Julien,
The following is an initial review:
* Applies cleanly to master (f330a6d).
* Regression tests updated and pass, including 'check-world'.
* Documentation updated and builds successfully.
* Might want to consider replacing the following magic number with a constant or perhaps calculated value.
+ int basenamelen = (int) strlen(rlde->d_name) - 6;
* Wouldn't it be easier, or perhaps more reliable to use "strrchr()" with the following instead?
+ strcmp(rlde->d_name + basenamelen, ".ready") == 0)
char *extension = strrchr(ride->d_name, '.');
...
strcmp(extension, ".ready") == 0)
I think this approach might also help to resolve the magic number above. For example:
char *extension = strrchr(ride->d_name, '.');
int basenamelen = (int) strlen(ride->d_name) - strlen(extension);
-Adam
--
Adam Brightwell -
adam.brightwell@crunchydatasolutions.com
Database Engineer -
www.crunchydatasolutions.com
pgsql-hackers
by date:
Previous
From:
Amit Kapila
Date:
21 October 2014, 06:47:51
Subject:
Re: pg_basebackup fails with long tablespace paths
Next
From:
Kyotaro HORIGUCHI
Date:
21 October 2014, 09:16:43
Subject:
Re: alter user set local_preload_libraries.
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
I confirm that I have read and accepted PostgresPro’s
Privacy Policy
.
I agree to get Postgres Pro discount offers and other marketing communications.
✖
×
×
Everywhere
Documentation
Mailing list
List:
all lists
pgsql-general
pgsql-hackers
buildfarm-members
pgadmin-hackers
pgadmin-support
pgsql-admin
pgsql-advocacy
pgsql-announce
pgsql-benchmarks
pgsql-bugs
pgsql-chat
pgsql-cluster-hackers
pgsql-committers
pgsql-cygwin
pgsql-docs
pgsql-hackers-pitr
pgsql-hackers-win32
pgsql-interfaces
pgsql-jdbc
pgsql-jobs
pgsql-novice
pgsql-odbc
pgsql-patches
pgsql-performance
pgsql-php
pgsql-pkg-debian
pgsql-pkg-yum
pgsql-ports
pgsql-rrreviewers
pgsql-ru-general
pgsql-sql
pgsql-students
pgsql-testers
pgsql-translators
pgsql-www
psycopg
Period
anytime
within last day
within last week
within last month
within last 6 months
within last year
Sort by
date
reverse date
rank
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
By continuing to browse this website, you agree to the use of cookies. Go to
Privacy Policy
.
I accept cookies