Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes 1.5.2 #6

Merged
merged 4 commits into from
Nov 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
pg-fact-loader (1.5.2-1) unstable; urgency=medium

* Fix time zone bug and behavior of SIGTERM

-- Jeremy Finzel <[email protected]> Thu, 29 Nov 2018 10:36:36 -0600

pg-fact-loader (1.5.1-2) UNRELEASED; urgency=medium

* Test-Depend on postgresql-contrib-PGVERSION.
Expand Down
7 changes: 5 additions & 2 deletions expected/06_basic_workers.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
SET client_min_messages TO warning;
--This is for testing functionality of timezone-specific timestamps
SET TIMEZONE TO 'America/Chicago';
-- Client time zone should not change functionality of worker - use a different one here
SET TIMEZONE TO 'UTC';
--Enable all except dep tables for now
UPDATE fact_loader.fact_tables ft SET enabled = TRUE
WHERE NOT EXISTS (SELECT 1 FROM fact_loader.fact_table_deps d WHERE d.child_id = ft.fact_table_id);
Expand Down Expand Up @@ -117,6 +117,9 @@ ORDER BY customer_id, as_of_date;
5 | [04-12-2018,infinity) | 1 | 04-12-2018
(4 rows)

-- Set time zone back to America/Chicago because the audit data is being logged at that time zone
-- (another great reason NEVER to use timestamp, but functionality we need at any rate)
SET TIMEZONE TO 'America/Chicago';
UPDATE test.customers SET age = 40 WHERE customer_id = 2;
-- We need to make deletes handled with recursive joins as well first before testing this
-- DELETE FROM test.customers WHERE customer_id = 3;
Expand Down
8 changes: 4 additions & 4 deletions functions/sql_builder.sql
Original file line number Diff line number Diff line change
Expand Up @@ -402,12 +402,12 @@ example of this, see the test cases involving the test.order_product_promos tabl
END)
AS inner_global_where_sql,
format($$
%s < %s %s
-- changed_at is guaranteed now to be in timestamptz - any time zone casting is only in subquery
changed_at < %s
AND (min_missed_id IS NULL OR (fact_loader_batch_id < min_missed_id))
$$,
quote_ident(c.queue_table_timestamp),
quote_literal(c.maximum_cutoff_time),
changed_at_tz_correction)
quote_literal(c.maximum_cutoff_time)
)
AS outer_global_where_sql,
format($$
AND q.%s = 'I'
Expand Down
Loading