Bitmapset *
ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate)
{
- Bitmapset *ret;
- MemoryContext oldcxt;
+ Bitmapset *ret;
+ MemoryContext oldcxt;
oldcxt = MemoryContextSwitchTo(GetPerTupleMemoryContext(estate));
if (!ok)
{
/*
- * File contained one or more errors, so bail out.
- * MemoryContextDelete is enough to clean up everything, including
- * regexes.
+ * File contained one or more errors, so bail out. MemoryContextDelete
+ * is enough to clean up everything, including regexes.
*/
MemoryContextDelete(hbacxt);
return false;
if (!ok)
{
/*
- * File contained one or more errors, so bail out.
- * MemoryContextDelete is enough to clean up everything, including
- * regexes.
+ * File contained one or more errors, so bail out. MemoryContextDelete
+ * is enough to clean up everything, including regexes.
*/
MemoryContextDelete(ident_context);
return false;
WalRcvExecResult *res;
char originname[NAMEDATALEN];
RepOriginId originid;
- UserContext ucxt;
+ UserContext ucxt;
bool must_use_password;
bool run_as_owner;
}
/*
- * Make sure that the copy command runs as the table owner, unless
- * the user has opted out of that behaviour.
+ * Make sure that the copy command runs as the table owner, unless the
+ * user has opted out of that behaviour.
*/
run_as_owner = MySubscription->runasowner;
if (!run_as_owner)
res->err)));
walrcv_clear_result(res);
- if(!run_as_owner)
+ if (!run_as_owner)
RestoreUserContext(&ucxt);
table_close(rel, NoLock);
int
pg_fsync_no_writethrough(int fd)
{
- int rc;
+ int rc;
if (!enableFsync)
return 0;
int
pg_fdatasync(int fd)
{
- int rc;
+ int rc;
if (!enableFsync)
return 0;
return;
retry:
+
/*
* sync_file_range(SYNC_FILE_RANGE_WRITE), currently linux specific,
* tells the OS that writeback for the specified blocks should be
/*
* The startup process currently has no convenient way to schedule
* stats to be reported. XLOG_RUNNING_XACTS records issued at a
- * regular cadence, making this a convenient location to report
- * stats. While these records aren't generated with wal_level=minimal,
- * stats also cannot be accessed during WAL replay.
+ * regular cadence, making this a convenient location to report stats.
+ * While these records aren't generated with wal_level=minimal, stats
+ * also cannot be accessed during WAL replay.
*/
pgstat_report_stat(true);
}
Assert(segstartblock + numblocks <= RELSEG_SIZE);
/*
- * If available and useful, use posix_fallocate() (via FileFallocate())
- * to extend the relation. That's often more efficient than using
- * write(), as it commonly won't cause the kernel to allocate page
- * cache space for the extended pages.
+ * If available and useful, use posix_fallocate() (via
+ * FileFallocate()) to extend the relation. That's often more
+ * efficient than using write(), as it commonly won't cause the kernel
+ * to allocate page cache space for the extended pages.
*
* However, we don't use FileFallocate() for small extensions, as it
* defeats delayed allocation on some filesystems. Not clear where
values[26] = CStringGetTextDatum(beentry->st_gssstatus->gss_princ);
values[27] = BoolGetDatum(beentry->st_gssstatus->gss_enc); /* GSS Encryption in use */
values[28] = BoolGetDatum(beentry->st_gssstatus->gss_delegation); /* GSS credentials
- * delegated */
+ * delegated */
}
else
{
command_like(
[
- 'initdb', '--no-sync', '-A', 'trust',
+ 'initdb', '--no-sync',
+ '-A', 'trust',
'--locale-provider=icu', '--locale=und',
- '--lc-collate=C', '--lc-ctype=C', '--lc-messages=C',
- '--lc-numeric=C', '--lc-monetary=C', '--lc-time=C',
+ '--lc-collate=C', '--lc-ctype=C',
+ '--lc-messages=C', '--lc-numeric=C',
+ '--lc-monetary=C', '--lc-time=C',
"$tempdir/data4"
],
qr/^\s+ICU locale:\s+und\n/ms,
$node2->command_ok(
[
- 'createdb', '-T', 'template0', '--locale-provider', 'icu',
- '--locale', 'en', '--lc-collate', 'C', '--lc-ctype', 'C',
- 'foobar57'
+ 'createdb', '-T',
+ 'template0', '--locale-provider',
+ 'icu', '--locale',
+ 'en', '--lc-collate',
+ 'C', '--lc-ctype',
+ 'C', 'foobar57'
],
- 'create database with locale as ICU locale'
- );
+ 'create database with locale as ICU locale');
}
else
{
char gss_princ[NAMEDATALEN]; /* GSSAPI Principal used to auth */
bool gss_auth; /* If GSSAPI authentication was used */
bool gss_enc; /* If encryption is being used */
- bool gss_delegation; /* If credentials delegated */
+ bool gss_delegation; /* If credentials delegated */
} PgBackendGSSStatus;
# Remove the subscrition and truncate the table for the initial data sync
# tests.
$node_subscriber->safe_psql(
- 'postgres', qq(
+ 'postgres', qq(
DROP SUBSCRIPTION admin_sub;
TRUNCATE alice.unpartitioned;
));
# Create a new subscription "admin_sub" owned by regress_admin2. It's
# disabled so that we revoke superuser privilege after creation.
$node_subscriber->safe_psql(
- 'postgres', qq(
+ 'postgres', qq(
SET SESSION AUTHORIZATION regress_admin2;
CREATE SUBSCRIPTION admin_sub CONNECTION '$publisher_connstr' PUBLICATION alice
WITH (run_as_owner = false, password_required = false, copy_data = true, enabled = false);
# ability to SET ROLE. Then enable the subscription "admin_sub".
revoke_superuser("regress_admin2");
$node_subscriber->safe_psql(
- 'postgres', qq(
+ 'postgres', qq(
GRANT regress_alice TO regress_admin2 WITH INHERIT FALSE, SET TRUE;
ALTER SUBSCRIPTION admin_sub ENABLE;
));
# Because the initial data sync is working as the table owner, all
# data should be copied.
-$node_subscriber->wait_for_subscription_sync($node_publisher,
- 'admin_sub');
+$node_subscriber->wait_for_subscription_sync($node_publisher, 'admin_sub');
expect_replication("alice.unpartitioned", 3, 7, 13,
- "table owner can do the initial data copy");
+ "table owner can do the initial data copy");
done_testing();